@cnamts/synapse 0.0.0-alpha.0

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 (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/design-system-v3.d.ts +246 -0
  4. package/dist/design-system-v3.js +5425 -0
  5. package/dist/design-system-v3.umd.cjs +2 -0
  6. package/dist/style.css +1 -0
  7. package/package.json +104 -0
  8. package/src/assets/tokens.scss +500 -0
  9. package/src/components/Alert/Alert.mdx +36 -0
  10. package/src/components/Alert/Alert.stories.ts +115 -0
  11. package/src/components/Alert/Alert.vue +248 -0
  12. package/src/components/Alert/locales.ts +3 -0
  13. package/src/components/Alert/tests/Alert.spec.ts +105 -0
  14. package/src/components/Alert/tests/__snapshots__/Alert.spec.ts.snap +15 -0
  15. package/src/components/BackBtn/BackBtn.mdx +26 -0
  16. package/src/components/BackBtn/BackBtn.stories.ts +138 -0
  17. package/src/components/BackBtn/BackBtn.vue +60 -0
  18. package/src/components/BackBtn/locales.ts +3 -0
  19. package/src/components/BackBtn/tests/BackBtn.spec.ts +103 -0
  20. package/src/components/BackBtn/tests/__snapshots__/BackBtn.spec.ts.snap +9 -0
  21. package/src/components/BackToTopBtn/BackToTopBtn.mdx +52 -0
  22. package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +188 -0
  23. package/src/components/BackToTopBtn/BackToTopBtn.vue +137 -0
  24. package/src/components/BackToTopBtn/config.ts +12 -0
  25. package/src/components/BackToTopBtn/locales.ts +3 -0
  26. package/src/components/BackToTopBtn/tests/BackToTopBtn.spec.ts +173 -0
  27. package/src/components/BackToTopBtn/tests/__snapshots__/BackToTopBtn.spec.ts.snap +17 -0
  28. package/src/components/Beta/beta.mdx +5 -0
  29. package/src/components/CopyBtn/CopyBtn.mdx +38 -0
  30. package/src/components/CopyBtn/CopyBtn.stories.ts +209 -0
  31. package/src/components/CopyBtn/CopyBtn.vue +103 -0
  32. package/src/components/CopyBtn/config.ts +17 -0
  33. package/src/components/CopyBtn/locales.ts +3 -0
  34. package/src/components/CopyBtn/tests/CopyBtn.spec.ts +99 -0
  35. package/src/components/CopyBtn/tests/__snapshots__/CopyBtn.spec.ts.snap +7 -0
  36. package/src/components/Deprecated/deprecated.mdx +5 -0
  37. package/src/components/DownloadBtn/DownloadBtn.mdx +94 -0
  38. package/src/components/DownloadBtn/DownloadBtn.stories.ts +211 -0
  39. package/src/components/DownloadBtn/DownloadBtn.vue +113 -0
  40. package/src/components/DownloadBtn/config.ts +13 -0
  41. package/src/components/DownloadBtn/tests/DownloadBtn.spec.ts +82 -0
  42. package/src/components/DownloadBtn/tests/__snapshots__/DownloadBtn.spec.ts.snap +17 -0
  43. package/src/components/DownloadBtn/tests/data/filePromise.ts +53 -0
  44. package/src/components/DownloadBtn/tests/data/test.json +0 -0
  45. package/src/components/FranceConnectBtn/FranceConnectBtn.mdx +34 -0
  46. package/src/components/FranceConnectBtn/FranceConnectBtn.stories.ts +92 -0
  47. package/src/components/FranceConnectBtn/FranceConnectBtn.vue +154 -0
  48. package/src/components/FranceConnectBtn/locales.ts +6 -0
  49. package/src/components/FranceConnectBtn/tests/FranceConnectBtn.spec.ts +62 -0
  50. package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +36 -0
  51. package/src/components/LangBtn/LangBtn.mdx +37 -0
  52. package/src/components/LangBtn/LangBtn.stories.ts +147 -0
  53. package/src/components/LangBtn/LangBtn.vue +167 -0
  54. package/src/components/LangBtn/config.ts +17 -0
  55. package/src/components/LangBtn/locales.ts +3 -0
  56. package/src/components/LangBtn/tests/Config.spec.ts +24 -0
  57. package/src/components/LangBtn/tests/LangBtn.spec.ts +283 -0
  58. package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +11 -0
  59. package/src/components/LangBtn/types.d.ts +7 -0
  60. package/src/components/NotificationBar/NotificationBar.mdx +94 -0
  61. package/src/components/NotificationBar/NotificationBar.stories.ts +366 -0
  62. package/src/components/NotificationBar/NotificationBar.vue +296 -0
  63. package/src/components/NotificationBar/options.ts +15 -0
  64. package/src/components/NotificationBar/tests/NotificationBar.spec.ts +332 -0
  65. package/src/components/NotificationBar/tests/__snapshots__/NotificationBar.spec.ts.snap +7 -0
  66. package/src/components/NotificationBar/types.ts +7 -0
  67. package/src/components/PageContainer/PageContainer.mdx +29 -0
  68. package/src/components/PageContainer/PageContainer.stories.ts +115 -0
  69. package/src/components/PageContainer/PageContainer.vue +68 -0
  70. package/src/components/PageContainer/tests/PageContainer.spec.ts +56 -0
  71. package/src/components/PageContainer/tests/__snapshots__/PageContainer.spec.ts.snap +7 -0
  72. package/src/components/SkipLink/SkipLink.mdx +55 -0
  73. package/src/components/SkipLink/SkipLink.stories.ts +70 -0
  74. package/src/components/SkipLink/SkipLink.vue +79 -0
  75. package/src/components/SkipLink/locales.ts +3 -0
  76. package/src/components/SkipLink/tests/__snapshots__/skipLink.spec.ts.snap +3 -0
  77. package/src/components/SkipLink/tests/skipLink.spec.ts +46 -0
  78. package/src/components/index.ts +8 -0
  79. package/src/composables/useCustomizableOptions.ts +23 -0
  80. package/src/designTokens/bootstrapColors.md +66 -0
  81. package/src/designTokens/cnamColors.md +193 -0
  82. package/src/designTokens/index.ts +15 -0
  83. package/src/designTokens/tokens/bootstrap/bootstrapColors.ts +158 -0
  84. package/src/designTokens/tokens/bootstrap/bootstrapLightTheme.ts +22 -0
  85. package/src/designTokens/tokens/cnam/cnamColors.ts +171 -0
  86. package/src/designTokens/tokens/cnam/cnamContextual.ts +58 -0
  87. package/src/designTokens/tokens/cnam/cnamLightTheme.ts +90 -0
  88. package/src/designTokens/tokens/cnam/cnamSemantic.ts +87 -0
  89. package/src/designTokens/tokens/json/contextual-tokens.json +156 -0
  90. package/src/designTokens/tokens/json/primitives.json +209 -0
  91. package/src/designTokens/tokens/json/semantic.json +120 -0
  92. package/src/designTokens/utils/convertGaps.ts +11 -0
  93. package/src/designTokens/utils/convertSemanticsToken.ts +32 -0
  94. package/src/designTokens/utils/createFlattenTheme.ts +19 -0
  95. package/src/designTokens/utils/index.ts +4 -0
  96. package/src/main.ts +2 -0
  97. package/src/services/NotificationService.ts +27 -0
  98. package/src/stories/Fondamentaux/Accessibilite/Accessibilite.mdx +52 -0
  99. package/src/stories/Fondamentaux/Accessibilite/Accessibilite.stories.ts +36 -0
  100. package/src/stories/Fondamentaux/Accessibilite/AccessibiliteItems.ts +706 -0
  101. package/src/stories/Fondamentaux/Accessibilite/constants/ExpertiseLevelEnum.ts +5 -0
  102. package/src/stories/Fondamentaux/Accessibilite/constants/RGAALevelEnum.ts +4 -0
  103. package/src/stories/Fondamentaux/EcoConception/EcoConception.mdx +24 -0
  104. package/src/stories/Fondamentaux/EcoConception/Econception.stories.ts +30 -0
  105. package/src/stories/Fondamentaux/EcoConception/ecoDesignItems.ts +55 -0
  106. package/src/stories/GuideDuDev/CommentContribuer.mdx +22 -0
  107. package/src/stories/GuideDuDev/components.stories.ts +23 -0
  108. package/src/stories/GuideDuDev/moduleDeNotification.mdx +182 -0
  109. package/src/stories/GuideDuDev/vuetifyOptions.mdx +72 -0
  110. package/src/stories/Guidelines/Colors.mdx +220 -0
  111. package/src/stories/Guidelines/CustomisationEtThemes.mdx +3 -0
  112. package/src/stories/Guidelines/Introduction.mdx +35 -0
  113. package/src/stories/Guidelines/Typo.mdx +53 -0
  114. package/src/stories/Home/Accueil.mdx +7 -0
  115. package/src/stories/Home/PolitiqueDeConfidentialite.mdx +4 -0
  116. package/src/stories/Home/synapse.webp +0 -0
  117. package/src/temp/TestA11y.vue +14 -0
  118. package/src/temp/TestComponent.vue +37 -0
  119. package/src/temp/TestDTComponent.vue +93 -0
  120. package/src/temp/customizableOptions.vue +18 -0
  121. package/src/temp/gridsTests.vue +54 -0
  122. package/src/temp/options.json +5 -0
  123. package/src/types/vuetifyTypes.ts +3 -0
  124. package/src/utils/convertToUnit/index.ts +16 -0
  125. package/src/utils/convertToUnit/test/convertToUnit.spec.ts +32 -0
  126. package/src/utils/functions/copyToClipboard/index.ts +38 -0
  127. package/src/utils/functions/copyToClipboard/tests/copyToClipboard.spec.ts +104 -0
  128. package/src/utils/functions/downloadFile/index.ts +37 -0
  129. package/src/utils/functions/downloadFile/tests/downloadFile.spec.ts +69 -0
  130. package/src/utils/functions/downloadFile/types.ts +1 -0
@@ -0,0 +1,70 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+ import SkipLink from './SkipLink.vue'
3
+
4
+ const meta = {
5
+ title: 'Components/SkipLink',
6
+ component: SkipLink,
7
+ argTypes: {
8
+ default: {
9
+ control: { type: 'text' },
10
+ default: 'Skip to content',
11
+ },
12
+ },
13
+ parameters: {
14
+ layout: 'fullscreen',
15
+ },
16
+ } as Meta<typeof SkipLink>
17
+
18
+ export default meta
19
+
20
+ type Story = StoryObj<typeof meta>
21
+
22
+ export const Default: Story = {
23
+ args: {
24
+ target: 'https://cnam-design-system.netlify.app/?path=/docs/components-skiplink--docs#main',
25
+ },
26
+ render: (args) => {
27
+ return {
28
+ components: { SkipLink },
29
+ setup() {
30
+ return { args }
31
+ },
32
+ template: `
33
+ <div class="pa-8">
34
+ <p>Pour afficher le composant, cliquez ici et appuyer sur <kbd>Tab</kbd>.</p>
35
+ <SkipLink
36
+ :target="args.target"
37
+ :label="args.label"
38
+ >
39
+ <template #default v-if="args.default"><span v-html="args.default"/></template>
40
+ </SkipLink>
41
+ </div>
42
+ `,
43
+ }
44
+ },
45
+ }
46
+
47
+ export const WithSlot: Story = {
48
+ args: {
49
+ target: 'https://cnam-design-system.netlify.app/?path=/docs/components-skiplink--docs#main',
50
+ default: '<b>lorem ipsum</b>',
51
+ },
52
+ render: (args) => {
53
+ return {
54
+ components: { SkipLink },
55
+ setup() {
56
+ return { args }
57
+ },
58
+ template: `
59
+ <div class="pa-8">
60
+ <p>Pour afficher le composant, cliquez ici et appuyer sur <kbd>Tab</kbd>.</p>
61
+ <SkipLink
62
+ v-bind="args"
63
+ >
64
+ <template #default v-if="args.default"><span v-html="args.default"/></template>
65
+ </SkipLink>
66
+ </div>
67
+ `,
68
+ }
69
+ },
70
+ }
@@ -0,0 +1,79 @@
1
+ <script lang="ts" setup>
2
+ import { locales } from './locales'
3
+ import { nextTick, ref, onMounted } from 'vue'
4
+ import { getCurrentInstance } from 'vue'
5
+ import type { Router } from 'vue-router'
6
+
7
+ withDefaults(
8
+ defineProps<{
9
+ label?: string
10
+ target?: string
11
+ }>(),
12
+ {
13
+ label: locales.label,
14
+ target: '#main',
15
+ },
16
+ )
17
+
18
+ const skipLinkSpan = ref<HTMLLinkElement | null>(null)
19
+
20
+ onMounted(() => {
21
+ const instance = getCurrentInstance()
22
+ if (!instance) return
23
+
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we test the existence of Nuxt
25
+ const nuxtApp = (instance?.appContext.app as any)?.$nuxt
26
+ let router: undefined | Router
27
+ if (nuxtApp && nuxtApp.$router) {
28
+ router = nuxtApp.$router as Router
29
+ }
30
+
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we test the existence of vue-router
32
+ const vueRouter = (instance.appContext.app.config.globalProperties as any)?.$router
33
+ if (vueRouter) {
34
+ router = vueRouter as Router
35
+ }
36
+
37
+ if (router && router.afterEach) {
38
+ router.afterEach((to, from, fail) => {
39
+ if (fail) return
40
+ if (to.path === from.path) return
41
+ nextTick(() => {
42
+ skipLinkSpan.value?.focus()
43
+ })
44
+ })
45
+ }
46
+ })
47
+ </script>
48
+
49
+ <template>
50
+ <div class="vd-skip-link-container">
51
+ <span
52
+ ref="skipLinkSpan"
53
+ tabindex="-1"
54
+ />
55
+
56
+ <a
57
+ :href="target"
58
+ class="vd-skip-link text-primary d-block d-sr-only-focusable px-2"
59
+ >
60
+ <slot>{{ label }}</slot>
61
+ </a>
62
+ </div>
63
+ </template>
64
+
65
+ <style lang="scss" scoped>
66
+ @use '/src/assets/tokens.scss';
67
+
68
+ .vd-skip-link {
69
+ z-index: 150;
70
+ position: fixed;
71
+ top: 0;
72
+ right: 0;
73
+ transition: none;
74
+ width: 100%;
75
+ background: #fff;
76
+ outline: none; // Disable outline to use border
77
+ border: 2px solid tokens.$blue-darken-60;
78
+ }
79
+ </style>
@@ -0,0 +1,3 @@
1
+ export const locales = {
2
+ label: 'Aller au contenu principal',
3
+ }
@@ -0,0 +1,3 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`SkipLink > renders correctly 1`] = `"<div data-v-bf1925a1="" class="vd-skip-link-container"><span data-v-bf1925a1="" tabindex="-1"></span><a data-v-bf1925a1="" href="#main" class="vd-skip-link text-primary d-block d-sr-only-focusable px-2">Aller au contenu principal</a></div>"`;
@@ -0,0 +1,46 @@
1
+ import { describe, it, expect, beforeEach, vi } from 'vitest'
2
+ import { mount } from '@vue/test-utils'
3
+ import { createRouter, createWebHistory } from 'vue-router'
4
+ import SkipLink from '../SkipLink.vue'
5
+
6
+ // Create a mock router
7
+ const router = createRouter({
8
+ history: createWebHistory(),
9
+ routes: [
10
+ { path: '/', component: { template: '<div>Home</div>' } },
11
+ { path: '/about', component: { template: '<div>About</div>' } },
12
+ ],
13
+ })
14
+
15
+ describe('SkipLink', () => {
16
+ beforeEach(() => {
17
+ vi.restoreAllMocks()
18
+ })
19
+
20
+ it('renders correctly', async () => {
21
+ const wrapper = mount(SkipLink, {
22
+ global: {
23
+ plugins: [router],
24
+ },
25
+ })
26
+
27
+ expect(wrapper.html()).toMatchSnapshot()
28
+ })
29
+
30
+ it('focuses the skip link on route change', async () => {
31
+ const wrapper = mount(SkipLink, {
32
+ global: {
33
+ plugins: [router],
34
+ },
35
+ })
36
+
37
+ // Create a mock for the focus method
38
+ const spy = vi.spyOn(wrapper.vm.$refs.skipLinkSpan as HTMLLinkElement, 'focus')
39
+
40
+ // Trigger the route change
41
+ await router.push('/about')
42
+ await router.isReady() // Ensure the router is ready
43
+
44
+ expect(spy).toHaveBeenCalled()
45
+ })
46
+ })
@@ -0,0 +1,8 @@
1
+ export { default as PageContainer } from './PageContainer/PageContainer.vue'
2
+ export { default as Alert } from './Alert/Alert.vue'
3
+ export { default as CopyBtn } from './CopyBtn/CopyBtn.vue'
4
+ export { default as SkipLink } from './SkipLink/SkipLink.vue'
5
+ export { default as BackToTopBtn } from './BackToTopBtn/BackToTopBtn.vue'
6
+ export { default as FranceConnectBtn } from './FranceConnectBtn/FranceConnectBtn.vue'
7
+ export { default as NotificationBar } from './NotificationBar/NotificationBar.vue'
8
+ export { default as LangBtn } from './LangBtn/LangBtn.vue'
@@ -0,0 +1,23 @@
1
+ import { computed, toRaw, type ComputedRef } from 'vue'
2
+ import deepmerge from 'deepmerge'
3
+
4
+ type PropsList = Record<string, unknown>
5
+ type ComponentsProps = Record<string, PropsList>
6
+ export interface CustomizableOptions {
7
+ vuetifyOptions?: ComponentsProps
8
+ }
9
+
10
+ export default function useCustomizableOptions<T1 extends ComponentsProps, T2 extends ComponentsProps>(
11
+ defaultOptions: T1,
12
+ props: { vuetifyOptions?: T2 },
13
+ ): ComputedRef<T1 & T2>
14
+ export default function useCustomizableOptions<T extends ComponentsProps>(
15
+ defaultOptions: Partial<T>,
16
+ props: { vuetifyOptions?: Partial<T> },
17
+ ): ComputedRef<T>
18
+ export default function useCustomizableOptions(
19
+ defaultOptions: ComponentsProps,
20
+ props: CustomizableOptions,
21
+ ) {
22
+ return computed(() => deepmerge(defaultOptions, toRaw(props.vuetifyOptions) ?? {}))
23
+ }
@@ -0,0 +1,66 @@
1
+ # Color Bootstrap Cnam Light
2
+
3
+ ## Primary
4
+
5
+ <span style="background-color:#084298"></span>
6
+
7
+ ## Secondary
8
+
9
+ <span style="background-color:#801F4F"></span>
10
+
11
+ ## Accent
12
+
13
+ <span style="background-color:#0dcaf0"></span>
14
+
15
+ ## Error
16
+
17
+ <span style="background-color:#B02A37"></span>
18
+
19
+ ## Info
20
+
21
+ <span style="background-color:#052C64"></span>
22
+
23
+ ## Success
24
+
25
+ <span style="background-color:#479F76"></span>
26
+
27
+ ## Warning
28
+
29
+ <span style="background-color:#FFF2CD"></span>
30
+
31
+ ## Risque Pro
32
+
33
+ <span style="background-color:#dc3545"></span>
34
+
35
+ ## Light
36
+
37
+ <span style="background-color:#DEE2E6"></span>
38
+
39
+ ## Dark
40
+
41
+ <span style="background-color:#212529"></span>
42
+
43
+ ## Brand
44
+
45
+ <span style="background-color:#4a3f59"></span>
46
+
47
+ ## BrandSecondary
48
+
49
+ <span style="background-color:#ac1c81"></span>
50
+
51
+ ## BrandMuted
52
+
53
+ <span style="background-color:#b7cbd6"></span>
54
+
55
+ ## BrandMutedLite
56
+
57
+ <span style="background-color:#E7F3F9"></span>
58
+
59
+
60
+ ## HilitePrimary
61
+
62
+ <span style="background-color:#0062ac"></span>
63
+
64
+ ## HiliteSecondary
65
+
66
+ <span style="background-color:#e6bebf"></span>
@@ -0,0 +1,193 @@
1
+ # Color Palette Cnam Light
2
+
3
+ ## Primary
4
+
5
+ <span style="background-color:#0000ff"></span>
6
+
7
+ ## Secondary
8
+
9
+ <span style="background-color:#00bcd4"></span>
10
+
11
+ ## Accent
12
+
13
+ <span style="background-color:#00bcd4"></span>
14
+
15
+ ## Error
16
+
17
+ <span style="background-color:#ff9800"></span>
18
+
19
+ ## Info
20
+
21
+ <span style="background-color:#0000ff"></span>
22
+
23
+ ## Success
24
+
25
+ <span style="background-color:#4caf50"></span>
26
+
27
+ ## Warning
28
+
29
+ <span style="background-color:#ffeb3b"></span>
30
+
31
+ ## Risk Pro
32
+
33
+ <span style="background-color:#b22222"></span>
34
+
35
+ ## On Background
36
+
37
+ <span style="background-color:#ffffff"></span>
38
+
39
+ ## On Surface Alt
40
+
41
+ <span style="background-color:#e7ecf5"></span>
42
+
43
+ ## On Surface
44
+
45
+ <span style="background-color:#ffffff"></span>
46
+
47
+ ## On Warning
48
+
49
+ <span style="background-color:#fcf0d3">On Warning</span>
50
+
51
+ ## Overlay Fullpage
52
+
53
+ <span style="background-color:#989b9b">Overlay Fullpage</span>
54
+
55
+ ## Overlay On Dark
56
+
57
+ <span style="background-color:#ffffff">Overlay On Dark</span>
58
+
59
+ ## Overlay On Light
60
+
61
+ <span style="background-color:#0c419a">Overlay On Light</span>
62
+
63
+ ## Interactive Default
64
+
65
+ <span style="background-color:rgba(255, 255, 255, 0.0000)">Interactive Default</span>
66
+
67
+ ## Interactive Hover
68
+
69
+ <span style="background-color:#e7ecf5">Interactive Hover</span>
70
+
71
+ ## Interactive Pressed
72
+
73
+ <span style="background-color:#ced9eb">Interactive Pressed</span>
74
+
75
+ ## Interactive Focus
76
+
77
+ <span style="background-color:#e7ecf5">Interactive Focus</span>
78
+
79
+ ## Interactive Disabled
80
+
81
+ <span style="background-color:rgba(255, 255, 255, 0.0000)">Interactive Disabled</span>
82
+
83
+ ## Interactive Hover On Selected
84
+
85
+ <span style="background-color:#ced9eb">Interactive Hover On Selected</span>
86
+
87
+ ## Background Main
88
+
89
+ <span style="background-color:#e7ecf5">Background Main</span>
90
+
91
+ ## Background Surface
92
+
93
+ <span style="background-color:#ffffff">Background Surface</span>
94
+
95
+ ## Background Surface Alt
96
+
97
+ <span style="background-color:#e7ecf5">Background Surface Alt</span>
98
+
99
+ ## Background Main Alt
100
+
101
+ <span style="background-color:#ffffff">Background Main Alt</span>
102
+
103
+ ## Background Raised
104
+
105
+ <span style="background-color:#f8f9fc">Background Raised</span>
106
+
107
+ ## Background Accent
108
+
109
+ <span style="background-color:#0c419a">Background Accent</span>
110
+
111
+ ## Background Accent Contrasted
112
+
113
+ <span style="background-color:#07275c">Background Accent Contrasted</span>
114
+
115
+ ## Background Accent Alt
116
+
117
+ <span style="background-color:#111212">Background Accent Alt</span>
118
+
119
+ ## Background Info
120
+
121
+ <span style="background-color:#ced9eb">Background Info</span>
122
+
123
+ ## Background Info Subdued
124
+
125
+ <span style="background-color:#e7ecf5">Background Info Subdued</span>
126
+
127
+ ## Background Info Contrasted
128
+
129
+ <span style="background-color:#0c419a">Background Info Contrasted</span>
130
+
131
+ ## Background Success
132
+
133
+ <span style="background-color:#cceee8">Background Success</span>
134
+
135
+ ## Background Success Subdued
136
+
137
+ <span style="background-color:#e5f7f4">Background Success Subdued</span>
138
+
139
+ ## Background Success Contrasted
140
+
141
+ <span style="background-color:#56c271">Background Success Contrasted</span>
142
+
143
+ ## Background Warning
144
+
145
+ <span style="background-color:#fcf0d3">Background Warning</span>
146
+
147
+ ## Background Warning Subdued
148
+
149
+ <span style="background-color:#fdf7e9">Background Warning Subdued</span>
150
+
151
+ ## Background Warning Contrasted
152
+
153
+ <span style="background-color:#f0b323">Background Warning Contrasted</span>
154
+
155
+ ## Background Error
156
+
157
+ <span style="background-color:#f9dcd7">Background Error</span>
158
+
159
+ ## Background Error Subdued
160
+
161
+ <span style="background-color:#fcedeb">Background Error Subdued</span>
162
+
163
+ ## Background Error Contrasted
164
+
165
+ <span style="background-color:#b33f2e">Background Error Contrasted</span>
166
+
167
+ ## Background Disabled
168
+
169
+ <span style="background-color:#dddede">Background Disabled</span>
170
+
171
+ ## Background Disabled On Dark
172
+
173
+ <span style="background-color:rgba(255, 255, 255, 0.0800)">Background Disabled On Dark</span>
174
+
175
+ ## Background Assure
176
+
177
+ <span style="background-color:#ed76b3">Background Assure</span>
178
+
179
+ ## Background Professionnel
180
+
181
+ <span style="background-color:#66c9ec">Background Professionnel</span>
182
+
183
+ ## Background Entreprise
184
+
185
+ <span style="background-color:#f0b323">Background Entreprise</span>
186
+
187
+ ## transparentBlue18
188
+
189
+ <span style="background-color:#a6d4eb">transparentBlue18</span>
190
+
191
+ ## transparentBlue8
192
+
193
+ <span style="background-color:#ebf0f7">transparentBlue8</span>
@@ -0,0 +1,15 @@
1
+ import { cnamSemanticTokens } from './tokens/cnam/cnamSemantic'
2
+ import { cnamContextualTokens } from './tokens/cnam/cnamContextual'
3
+ import { cnamColorsTokens } from './tokens/cnam/cnamColors'
4
+ import { cnamLightTheme } from './tokens/cnam/cnamLightTheme'
5
+ import { bootstrapColorsTokens } from './tokens/bootstrap/bootstrapColors'
6
+ import { bootstrapLightTheme } from './tokens/bootstrap/bootstrapLightTheme'
7
+
8
+ export {
9
+ cnamColorsTokens,
10
+ cnamSemanticTokens,
11
+ cnamContextualTokens,
12
+ cnamLightTheme,
13
+ bootstrapColorsTokens,
14
+ bootstrapLightTheme,
15
+ }
@@ -0,0 +1,158 @@
1
+ export const bootstrapColorsTokens = {
2
+ amBlue: {
3
+ darken80: '#020d1f',
4
+ darken60: '#052C64',
5
+ darken40: '#084298',
6
+ darken20: '#0B58CA',
7
+ base: '#0d6efd',
8
+ lighten20: '#0C6DFD',
9
+ lighten40: '#3D8BFD',
10
+ lighten60: '#6EA7FD',
11
+ lighten80: '#9EC5FE',
12
+ lighten90: '#CFE1FE',
13
+ lighten97: '#f8f9fc',
14
+ },
15
+ cyan: {
16
+ darken80: '#032830',
17
+ darken60: '#055160',
18
+ darken40: '#06798F',
19
+ darken20: '#07A2C0',
20
+ base: '#0dcaf0',
21
+ lighten20: '#10CAF0',
22
+ lighten40: '#37BFDB',
23
+ lighten60: '#6DDEF6',
24
+ lighten80: '#9EEAF9',
25
+ lighten90: '#CEF4FC',
26
+ lighten97: '#f7fcfe',
27
+ },
28
+ frostedBlue: {
29
+ darken80: '#142327',
30
+ darken60: '#28464d',
31
+ darken40: '#3d6874',
32
+ darken20: '#518b9a',
33
+ base: '#65aec1',
34
+ lighten20: '#84becd',
35
+ lighten40: '#a3ceda',
36
+ lighten60: '#c1dfe6',
37
+ lighten80: '#e0eff3',
38
+ lighten90: '#f0f7f9',
39
+ lighten97: '#fafdfd',
40
+ },
41
+ parme: {
42
+ darken80: '#150330',
43
+ darken60: '#290661',
44
+ darken40: '#3D0A91',
45
+ darken20: '#520DC1',
46
+ base: '#6610f2',
47
+ lighten20: '#661de3',
48
+ lighten40: '#8540F5',
49
+ lighten60: '#A270F7',
50
+ lighten80: '#C19EFA',
51
+ lighten90: '#E0CFFC',
52
+ lighten97: '#fbfcfd',
53
+ },
54
+ mauve: {
55
+ darken80: '#170D26',
56
+ darken60: '#2B1A4D',
57
+ darken40: '#3D0A91',
58
+ darken20: '#59359A',
59
+ base: '#6f42c1',
60
+ lighten20: '#6F42C1',
61
+ lighten40: '#8B67CD',
62
+ lighten60: '#A98EDA',
63
+ lighten80: '#C5B3E5',
64
+ lighten90: '#E1D9F3',
65
+ lighten97: '#fcfafd',
66
+ },
67
+ pink: {
68
+ darken80: '#2B0A1B',
69
+ darken60: '#561435',
70
+ darken40: '#801F4F',
71
+ darken20: '#AA2869',
72
+ base: '#d63384',
73
+ lighten20: '#D63384',
74
+ lighten40: '#DD5C9D',
75
+ lighten60: '#E685B5',
76
+ lighten80: '#EFADCD',
77
+ lighten90: '#F7D6E6',
78
+ lighten97: '#fef8fb',
79
+ },
80
+ brick: {
81
+ darken80: '#2C0B0F',
82
+ darken60: '#58151C',
83
+ darken40: '#831F29',
84
+ darken20: '#B02A37',
85
+ base: '#dc3545',
86
+ lighten20: '#dc3d4d',
87
+ lighten40: '#E35C6A',
88
+ lighten60: '#E9868F',
89
+ lighten80: '#F1AEB5',
90
+ lighten90: '#F8D7D9',
91
+ lighten97: '#fdfafa',
92
+ },
93
+ orange: {
94
+ darken80: '#321904',
95
+ darken60: '#643208',
96
+ darken40: '#984C0B',
97
+ darken20: '#CA6410',
98
+ base: '#fd7e14',
99
+ lighten20: '#fb8325',
100
+ lighten40: '#FD9843',
101
+ lighten60: '#FEB272',
102
+ lighten80: '#FECBA1',
103
+ lighten90: '#FFE5D0',
104
+ lighten97: '#fefaf9',
105
+ },
106
+ yellow: {
107
+ darken80: '#332602',
108
+ darken60: '#664D04',
109
+ darken40: '#997305',
110
+ darken20: '#CB9A07',
111
+ base: '#ffc107',
112
+ lighten20: '#fdc312',
113
+ lighten40: '#FFCD38',
114
+ lighten60: '#FFD969',
115
+ lighten80: '#FFE69C',
116
+ lighten90: '#FFF2CD',
117
+ lighten97: '#fffdf8',
118
+ },
119
+ green: {
120
+ darken80: '#051C12',
121
+ darken60: '#0B3622',
122
+ darken40: '#0F5132',
123
+ darken20: '#136B42',
124
+ base: '#198754',
125
+ lighten20: '#1e8a57',
126
+ lighten40: '#479F76',
127
+ lighten60: '#75B798',
128
+ lighten80: '#A3CFBB',
129
+ lighten90: '#D1E6DD',
130
+ lighten97: '#fafdfb',
131
+ },
132
+ turquoise: {
133
+ darken80: '#051C12',
134
+ darken60: '#0B3622',
135
+ darken40: '#0F5132',
136
+ darken20: '#1AA179',
137
+ base: '#20c997',
138
+ lighten20: '#28cf9e',
139
+ lighten40: '#4DD4AC',
140
+ lighten60: '#78DFC0',
141
+ lighten80: '#A5E9D5',
142
+ lighten90: '#D2F4E9',
143
+ lighten97: '#f7fcfc',
144
+ },
145
+ grey: {
146
+ darken80: '#212529',
147
+ darken60: '#343A3F',
148
+ darken40: '#485056',
149
+ darken20: '#6C757D',
150
+ base: '#adb5bd',
151
+ lighten20: '#b5bcc3',
152
+ lighten40: '#CED4D9',
153
+ lighten60: '#DEE2E6',
154
+ lighten80: '#E9ECEF',
155
+ lighten90: '#F8F9FA',
156
+ lighten97: '#fafafa',
157
+ },
158
+ }
@@ -0,0 +1,22 @@
1
+ import { bootstrapColorsTokens } from './bootstrapColors'
2
+ import { cnamColorsTokens } from '../cnam/cnamColors'
3
+
4
+ // Pour l'utiilser cf : dev/main.ts -> a ajouter a la place des cnamColorsTokens
5
+ export const bootstrapLightTheme = {
6
+ primary: bootstrapColorsTokens.amBlue.darken40,
7
+ secondary: bootstrapColorsTokens.pink.darken40,
8
+ accent: bootstrapColorsTokens.cyan.base,
9
+ error: bootstrapColorsTokens.brick.darken20,
10
+ info: bootstrapColorsTokens.amBlue.darken60,
11
+ success: bootstrapColorsTokens.green.lighten40,
12
+ warning: bootstrapColorsTokens.yellow.lighten90,
13
+ risquePro: cnamColorsTokens.brick.base,
14
+ light: cnamColorsTokens.grey.lighten60,
15
+ dark: cnamColorsTokens.grey.darken80,
16
+ brand: '#4a3f59',
17
+ brandSecondary: '#ac1c81',
18
+ brandMuted: '#b7cbd6',
19
+ brandMutedLite: '#E7F3F9',
20
+ hilitePrimary: '#0062ac',
21
+ hiliteSecondary: '#e6bebf',
22
+ }