diff --git a/angular/demo/bootstrap/src/app/samples/alert/config.route.ts b/angular/demo/bootstrap/src/app/samples/alert/config.route.ts index bd2449c21c..6c966c1b15 100644 --- a/angular/demo/bootstrap/src/app/samples/alert/config.route.ts +++ b/angular/demo/bootstrap/src/app/samples/alert/config.route.ts @@ -2,17 +2,7 @@ import {AgnosUIAngularModule} from '@agnos-ui/angular-bootstrap'; import type {AlertComponent} from '@agnos-ui/angular-bootstrap'; import {Component, signal} from '@angular/core'; import {FormsModule} from '@angular/forms'; - -export enum AlertStatus { - success = 'success', - info = 'info', - warning = 'warning', - danger = 'danger', - primary = 'primary', - secondary = 'secondary', - light = 'light', - dark = 'dark', -} +import {AlertStatus} from '@agnos-ui/common/samples/alert/alert-status.enum'; @Component({ standalone: true, diff --git a/angular/demo/bootstrap/src/app/samples/toast/dynamic.route.ts b/angular/demo/bootstrap/src/app/samples/toast/dynamic.route.ts index 7a9c2b45ea..220e96069a 100644 --- a/angular/demo/bootstrap/src/app/samples/toast/dynamic.route.ts +++ b/angular/demo/bootstrap/src/app/samples/toast/dynamic.route.ts @@ -2,18 +2,7 @@ import type {ToastProps} from '@agnos-ui/angular-bootstrap'; import {AgnosUIAngularModule, ToastComponent} from '@agnos-ui/angular-bootstrap'; import {Component, Injectable, inject, signal} from '@angular/core'; import {FormsModule} from '@angular/forms'; - -export enum ToastPositions { - topLeft = 'top-0 start-0', - topCenter = 'top-0 start-50 translate-middle-x', - topRight = 'top-0 end-0', - middleLeft = 'top-50 start-0 translate-middle-y', - middleCenter = 'top-50 start-50 translate-middle', - middleRight = 'top-50 end-0 translate-middle-y', - bottomLeft = 'bottom-0 start-0', - bottomCenter = 'bottom-0 start-50 translate-middle-x', - bottomRight = 'bottom-0 end-0', -} +import {ToastPositions} from '@agnos-ui/common/samples/toast/toast-positions.enum'; @Injectable({providedIn: 'root'}) class ToastService { diff --git a/common/samples/alert/alert-status.enum.ts b/common/samples/alert/alert-status.enum.ts new file mode 100644 index 0000000000..21ee1898b3 --- /dev/null +++ b/common/samples/alert/alert-status.enum.ts @@ -0,0 +1,10 @@ +export enum AlertStatus { + success = 'success', + info = 'info', + warning = 'warning', + danger = 'danger', + primary = 'primary', + secondary = 'secondary', + light = 'light', + dark = 'dark', +} diff --git a/common/samples/toast/toast-positions.enum.ts b/common/samples/toast/toast-positions.enum.ts new file mode 100644 index 0000000000..ab48d52203 --- /dev/null +++ b/common/samples/toast/toast-positions.enum.ts @@ -0,0 +1,11 @@ +export enum ToastPositions { + topLeft = 'top-0 start-0', + topCenter = 'top-0 start-50 translate-middle-x', + topRight = 'top-0 end-0', + middleLeft = 'top-50 start-0 translate-middle-y', + middleCenter = 'top-50 start-50 translate-middle', + middleRight = 'top-50 end-0 translate-middle-y', + bottomLeft = 'bottom-0 start-0', + bottomCenter = 'bottom-0 start-50 translate-middle-x', + bottomRight = 'bottom-0 end-0', +} diff --git a/react/demo/src/bootstrap/samples/alert/Config.route.tsx b/react/demo/src/bootstrap/samples/alert/Config.route.tsx index e311f3a1dc..8b78a04736 100644 --- a/react/demo/src/bootstrap/samples/alert/Config.route.tsx +++ b/react/demo/src/bootstrap/samples/alert/Config.route.tsx @@ -1,17 +1,7 @@ import type {AlertApi, AlertProps} from '@agnos-ui/react-bootstrap/components/alert'; import {Alert} from '@agnos-ui/react-bootstrap/components/alert'; import {useRef, useState} from 'react'; - -export enum AlertStatus { - success = 'success', - info = 'info', - warning = 'warning', - danger = 'danger', - primary = 'primary', - secondary = 'secondary', - light = 'light', - dark = 'dark', -} +import {AlertStatus} from '@agnos-ui/common/samples/alert/alert-status.enum'; const DefaultDemo = () => { const alertRef = useRef(null); diff --git a/react/demo/src/bootstrap/samples/toast/Dynamic.route.tsx b/react/demo/src/bootstrap/samples/toast/Dynamic.route.tsx index 5eba8c3c9d..fa5b98cc5b 100644 --- a/react/demo/src/bootstrap/samples/toast/Dynamic.route.tsx +++ b/react/demo/src/bootstrap/samples/toast/Dynamic.route.tsx @@ -1,18 +1,7 @@ import type {ToastProps} from '@agnos-ui/react-bootstrap/components/toast'; import {Toast} from '@agnos-ui/react-bootstrap/components/toast'; import {useState} from 'react'; - -export enum ToastPositions { - topLeft = 'top-0 start-0', - topCenter = 'top-0 start-50 translate-middle-x', - topRight = 'top-0 end-0', - middleLeft = 'top-50 start-0 translate-middle-y', - middleCenter = 'top-50 start-50 translate-middle', - middleRight = 'top-50 end-0 translate-middle-y', - bottomLeft = 'bottom-0 start-0', - bottomCenter = 'bottom-0 start-50 translate-middle-x', - bottomRight = 'bottom-0 end-0', -} +import {ToastPositions} from '@agnos-ui/common/samples/toast/toast-positions.enum'; type ReactToastProps = Partial & {id: number}; diff --git a/svelte/demo/src/bootstrap/samples/alert/Config.route.svelte b/svelte/demo/src/bootstrap/samples/alert/Config.route.svelte index 93a0675976..6ff9f9e2f7 100644 --- a/svelte/demo/src/bootstrap/samples/alert/Config.route.svelte +++ b/svelte/demo/src/bootstrap/samples/alert/Config.route.svelte @@ -1,21 +1,11 @@