diff --git a/.gitignore b/.gitignore index 8ce2050..becd5bf 100644 --- a/.gitignore +++ b/.gitignore @@ -168,3 +168,22 @@ coverage/ docs/_build/ site/ +# Documentation de dรฉveloppement/session (garder uniquement README.md) +*_HANDOFF_*.md +*_COMPLETE*.md +*_GUIDE*.md +*_REPORT*.md +*_SUMMARY*.md +*_AUDIT*.md +*_DEBUG*.md +*_FINAL*.md +*_MIGRATION*.md +*_OPTIMISATION*.md +*_SESSION*.md +AJAX_*.md +CHARTE_*.md +COMPOSANTS_*.md +GUIDE_*.md +PLAN_*.md +README_AMELIORATION_*.md + diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 053c71d..5414574 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -4,7 +4,7 @@ dev.lions primefaces-freya-extension-parent - 1.0.0-SNAPSHOT + 1.0.0 primefaces-freya-extension-integration-tests PrimeFaces Freya Extension - Integration Tests diff --git a/integration-tests/src/main/java/dev/lions/freya/demo/DemoBean.java b/integration-tests/src/main/java/dev/lions/freya/demo/DemoBean.java index a023d0b..d1e5b4a 100644 --- a/integration-tests/src/main/java/dev/lions/freya/demo/DemoBean.java +++ b/integration-tests/src/main/java/dev/lions/freya/demo/DemoBean.java @@ -38,6 +38,7 @@ public class DemoBean implements Serializable { // Donnรฉes pour les nouveaux composants private List sampleUsers; + private SampleUser selectedUser; // Pour la sรฉlection dans dataTable private MenuModel breadcrumbModel; private MenuModel stepsModel; private MenuModel splitButtonModel; @@ -264,6 +265,14 @@ public class DemoBean implements Serializable { this.sampleUsers = sampleUsers; } + public SampleUser getSelectedUser() { + return selectedUser; + } + + public void setSelectedUser(SampleUser selectedUser) { + this.selectedUser = selectedUser; + } + public MenuModel getBreadcrumbModel() { return breadcrumbModel; } diff --git a/integration-tests/src/main/resources/META-INF/resources/buttons-showcase.xhtml b/integration-tests/src/main/resources/META-INF/resources/buttons-showcase.xhtml new file mode 100644 index 0000000..4124d89 --- /dev/null +++ b/integration-tests/src/main/resources/META-INF/resources/buttons-showcase.xhtml @@ -0,0 +1,595 @@ + + + + + + Lions.dev - Showcase Boutons + + + + + + + + + + + + + + + +
+

๐Ÿฆ Lions.dev - Showcase Boutons

+

Dรฉmonstration complรจte du systรจme de boutons avec identitรฉ visuelle Lions.dev

+

+ Version 1.0.0 | Priority #1 CRITIQUE | Gradients รฉlรฉgants โ€ข Animations hover โ€ข Focus accessible WCAG 2.1 AA +

+
+ + + + + +
+

๐ŸŽจ Palette de Couleurs Lions.dev

+ +
+
+

Couleurs Signature

+

Lions Blue: #2D9BEF (Primary)

+

Lions Gold: #FFC700 (Premium/Help)

+
+ +
+

Couleurs Sรฉmantiques

+

Success: #22BB69

+

Info: #00BCD4

+

Warning: #FF9800

+

Danger: #F44336

+

Secondary: #8995A1

+
+
+
+ + +
+

๐ŸŽฏ Boutons Solid - Toutes les Severities

+

Boutons avec gradients Lions.dev รฉlรฉgants et ombres colorรฉes

+ +
+ + + + + + + + + + + + + +
+ +
+<fr:commandButton value="Primary" severity="primary" /> +<fr:commandButton value="Success" severity="success" /> +<fr:commandButton value="Help (Gold)" severity="help" /> +
+ +
+

๐Ÿ’ก Astuce: Passez la souris sur les boutons pour voir les animations (translateY -2px + shadow elevation)

+
+
+ + +
+

๐Ÿ“ Boutons Outlined - Bordures Colorรฉes

+

Boutons avec bordure colorรฉe et background transparent

+ +
+ + + + + + + + + + + + + +
+ +
+<fr:commandButton value="Primary Outlined" severity="primary" outlined="true" /> +<fr:commandButton value="Danger Outlined" severity="danger" outlined="true" /> +
+
+ + +
+

๐Ÿ”— Boutons Text - Minimalistes

+

Boutons sans bordure ni background (sauf au hover)

+ +
+ + + + + + + +
+ +
+<fr:commandButton value="Primary Text" severity="primary" text="true" /> +
+
+ + +
+

๐Ÿ“ Tailles de Boutons

+

Support de 3 tailles : sm (32px), base/dรฉfaut (40px), lg (48px)

+ +

Small (32px height)

+
+ + + +
+ +

Base / Dรฉfaut (40px height)

+
+ + + +
+ +

Large (48px height)

+
+ + + +
+ +
+<fr:commandButton value="Small" size="sm" /> +<fr:commandButton value="Base" /> <!-- size="base" par dรฉfaut --> +<fr:commandButton value="Large" size="lg" /> +
+
+ + +
+

๐Ÿ”ต Boutons Rounded - Forme Pill

+

Boutons avec border-radius: 9999px (forme pill/capsule)

+ +
+ + + + +
+ +
+<fr:commandButton value="Rounded Primary" severity="primary" rounded="true" /> +
+
+ + +
+

๐Ÿ“ Boutons Raised - Effet d'ร‰lรฉvation

+

Boutons avec shadow-lg pour effet surรฉlevรฉ (au hover: shadow-xl)

+ +
+ + + + +
+ +
+<fr:commandButton value="Raised" severity="primary" raised="true" /> +
+
+ + +
+

โœจ Combinaisons de Variantes

+

Combinaisons de plusieurs attributs pour des boutons uniques

+ +

Rounded + Raised

+
+ + +
+ +

Outlined + Rounded

+
+ + +
+ +

Large + Rounded + Raised

+
+ +
+ +
+<fr:commandButton value="Combo" severity="primary" + rounded="true" raised="true" size="lg" /> +
+
+ + +
+

๐ŸŽจ Icon-Only Buttons (Carrรฉs et Ronds)

+

Boutons sans texte, uniquement avec icรดne (utilisez l'attribut title pour accessibilitรฉ)

+ +

Icon-Only Square (dรฉfaut)

+
+ + + + +
+ +

Icon-Only Rounded (cercles)

+
+ + + + +
+ +

Diffรฉrentes Tailles

+
+ + + +
+ +
+<fr:commandButton icon="pi pi-search" title="Rechercher" /> +<fr:commandButton icon="pi pi-plus" rounded="true" title="Ajouter" /> +
+
+ + +
+

โŒ ร‰tat Disabled

+

Boutons dรฉsactivรฉs avec opacity: 0.5 et cursor: not-allowed

+ +
+ + + + +
+ +
+<fr:commandButton value="Disabled" severity="primary" disabled="true" /> +
+
+ + +
+

๐Ÿ’ผ Exemples Pratiques - Cas d'Usage Rรฉels

+ +

Formulaire d'ร‰dition

+
+ + +
+ +

Actions Dangereuses avec Confirmation

+
+ + + + +
+ +

Actions Premium / Upgrade

+
+ + +
+ +

Toolbar d'Actions

+
+ + + + + +
+
+ + +
+

โ™ฟ Accessibilitรฉ WCAG 2.1 AA

+ +
+
+

โœ… Fonctionnalitรฉs Accessibles

+
    +
  • Focus Ring: Anneau de focus visible (3px solid rgba blue) avec offset 2px
  • +
  • Contrastes: Tous les boutons respectent WCAG AA (ratio โ‰ฅ 4.5:1)
  • +
  • Navigation Clavier: Tous les boutons sont focusables et activables au clavier
  • +
  • Tailles Touch-Friendly: Minimum 44px sur mobile (iOS guidelines)
  • +
  • Reduced Motion: Support de prefers-reduced-motion (pas d'animations)
  • +
  • High Contrast: Support de prefers-contrast: high (bordures 2px)
  • +
+
+ +
+

๐Ÿงช Testez le Focus

+

Utilisez la touche TAB pour naviguer entre les boutons et observer le focus ring

+ +
+ + + + +
+
+
+ +
+

๐Ÿ’ก Astuce Accessibilitรฉ: Pour les boutons icon-only, TOUJOURS utiliser l'attribut title pour fournir un label accessible aux lecteurs d'รฉcran.

+
+
+ + +
+

๐Ÿ“Š Rรฉsumรฉ Technique

+ +
+
+

๐ŸŽจ Design System

+
    +
  • Lions Blue #2D9BEF (Primary)
  • +
  • Lions Gold #FFC700 (Premium)
  • +
  • 7 Severities disponibles
  • +
  • Gradients 135deg
  • +
  • Shadows colorรฉes rgba(color, 0.25)
  • +
  • Border-radius: 8px (base)
  • +
+
+ +
+

โšก Animations

+
    +
  • Transition: 250ms cubic-bezier
  • +
  • Hover: translateY(-2px)
  • +
  • Hover: shadow elevation +10%
  • +
  • Active: translateY(0)
  • +
  • Support prefers-reduced-motion
  • +
+
+ +
+

๐Ÿ“ Tailles

+
    +
  • Small: 32px height
  • +
  • Base: 40px height (dรฉfaut)
  • +
  • Large: 48px height
  • +
  • Touch minimum: 44px mobile
  • +
  • Icon spacing: 8px (base)
  • +
+
+
+ +

+ ยฉ 2026 Lions Development Team | Version 1.0.0 | Priority #1 CRITIQUE โœ… COMPLร‰Tร‰ +

+
+
+ + + + + +
+ diff --git a/integration-tests/src/main/resources/META-INF/resources/components-demo.xhtml b/integration-tests/src/main/resources/META-INF/resources/components-demo.xhtml index c3ece47..bbb2519 100644 --- a/integration-tests/src/main/resources/META-INF/resources/components-demo.xhtml +++ b/integration-tests/src/main/resources/META-INF/resources/components-demo.xhtml @@ -1,10 +1,13 @@ - + - Freya Extension - Dรฉmonstration des Composants + Freya Extension - Dรฉmonstration Complรจte des Composants @@ -13,562 +16,760 @@ + + + +
+ + +
-
- -
- - -
-
-
-
-

- - Freya Extension -

-

- 43 composants composites pour simplifier vos formulaires Jakarta Faces -

-
- -
-
-
- - -
-
-
-

- - Formulaire d'inscription -

-

- Dรฉmonstration interactive des 43 composants composites -

-
-
+

Freya Extension - Showcase Complet

+

+ Dรฉmonstration complรจte de tous les composants composites Freya Extension. + Cette page suit strictement les patterns et le style du showcase officiel PrimeFaces Freya. +

- - -
- - Informations personnelles -
- - - - - - - -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- - - - -
- - Sรฉcuritรฉ -
- - -
-
- -
-
- -
-
- - -
- - Prรฉfรฉrences et Intรฉrรชts -
- - -
-
- - - - - - - -
-
- - - -
-
- -
-
- -
-
- -
-
- - - - - -
-
- -
-
- -
-
- -
-
- - -
- - - - - -
-
+ +
+
+
- - - - + +
+
+

Composants de Formulaire (Field Pattern)

+
- -
-

- - Nouveaux composants de formulaire -

+ +
+
+
fr:fieldInput
+

Champ de saisie texte avec label et message de validation

- -
-
- -
-
- -
-
+ - - - -
+
+
- -
-

- - Composants de donnรฉes -

+ +
+
+
fr:fieldTextarea
+

Champ de saisie multiligne pour texte long

- - - - - - - - - - - +
+
- -
-

- - Composants de navigation -

+ +
+
+
fr:fieldPassword
+

Champ mot de passe avec indicateur de force

- + - - - - - - - - -

Contenu du premier onglet avec composants Freya.

- -
- -

Contenu du deuxiรจme onglet.

- - - - -
-
+
+
- -
-

- - Composants d'action -

+ +
+
+
fr:fieldSelect
+

Liste dรฉroulante avec filtrage

-
- - - - -
- - + + + + + + + +
+
- -
-

- - Composants de feedback -

+ +
+
+
fr:fieldCalendar
+

Sรฉlecteur de date avec icรดne calendrier

- - - - - - - - - - - - - - - - - +
+
- -
-

- - Composants utilitaires -

+ +
+
+
fr:fieldNumber
+

Champ numรฉrique avec symbole et dรฉcimales

-
- - - -
- -
- - - - -
- -
- - - - -
- - - -

Barre de progression:

- - - - -

Divider avec texte:

- - OU - +
+
- -
-

- - Composants de layout -

+ +
+
+
fr:fieldCheckbox
+

Case ร  cocher avec label

+ + + + +
+
+ + +
+
+
fr:fieldSwitch
+

Interrupteur ON/OFF moderne

+ + +
+
+ + +
+
+
fr:fieldMultiSelect
+

Sรฉlection multiple avec chips

+ + + + +
+
+ + +
+
+
fr:fieldRadio
+

Boutons radio pour sรฉlection unique

+ + + + + + +
+
+ + +
+
+
fr:fieldToggle
+

Bouton bascule avec labels personnalisรฉs

+ + +
+
+ + +
+
+
fr:fieldChips
+

Saisie de tags/mots-clรฉs

+ + +
+
+ + +
+
+
fr:fieldRating
+

ร‰valuation par รฉtoiles

+ + +
+
+ + +
+
+
fr:fieldColor
+

Sรฉlecteur de couleur

+ + +
+
+ + +
+
+
fr:fieldMask
+

Champ avec masque de saisie

+ + +
+
+ + +
+
+
fr:fieldAutoComplete
+

Autocomplรฉtion avec suggestions

+ + +
+
+ + +
+
+
fr:fieldSpinner
+

Spinner numรฉrique avec min/max

+ + +
+
+ + +
+
+
fr:fieldSlider
+

Slider pour sรฉlection de valeur

+ + +
+
+ + +
+
+
fr:fieldFileUpload
+

Upload de fichiers avec contraintes

+ + +

Formats acceptรฉs: PDF, DOC, DOCX, TXT (max 3 fichiers)

+
+
+
+ + +
+
+

Composants d'Action

+
+ +
+
+
Buttons - Variations et Severitรฉs
+

Dรฉmonstration des composants fr:button, fr:commandButton, fr:linkButton et fr:splitButton avec diffรฉrentes severitรฉs

- -

Contenu de la carte avec le composant fr:card.

- -
+
fr:button (Navigation)
+
+ + + +
+
- -

Contenu du panneau avec le composant fr:panel.

-

Ce panneau peut รชtre repliรฉ en cliquant sur l'icรดne.

-
+
fr:commandButton (Action)
+
+ + + +
-
- - - -
-
- - -
- -
-

- - Rรฉduction de code -

-

- Ce formulaire utilise 7 composants fr:field*. -

- -
-
- Avec extension: - +
+
fr:linkButton (Lien stylisรฉ)
+
+ + +
-
- Sans extension: - + +
+
fr:splitButton (Menu dรฉroulant)
+
+ +
- -
- Gain: - -80% -
-
-
- - -
-

- - Composants disponibles (43) -

- - - -
- fr:fieldInput - fr:fieldTextarea - fr:fieldPassword - fr:fieldNumber - fr:fieldSelect - fr:fieldMultiSelect - fr:fieldCalendar - fr:fieldRadio - fr:fieldCheckbox - fr:fieldSwitch - fr:fieldToggle - fr:fieldChips - fr:fieldRating - fr:fieldColor - fr:fieldFileUpload - fr:fieldAutoComplete - fr:fieldMask - fr:fieldSlider - fr:fieldSpinner -
-
- -
- fr:actionDialog - fr:formDialog - fr:card - fr:panel -
-
- -
- fr:dataTable - fr:dataView - fr:treeTable -
-
- -
- fr:breadcrumb - fr:steps - fr:tabView -
-
- -
- fr:button - fr:commandButton - fr:linkButton - fr:splitButton -
-
- -
- fr:message - fr:growl - fr:inplace -
-
- -
- fr:themeSelector - fr:spacer - fr:divider - fr:badge - fr:avatar - fr:tag - fr:progressBar -
-
-
-
- - -
- - - -

- Ce dialog utilise le composant fr:actionDialog avec des champs - fr:field* ร  l'intรฉrieur. -

- - - - - - - - - - - -
- - - -

- Ce dialog utilise le composant fr:formDialog qui inclut - automatiquement un formulaire avec validation. -

- - - - - - -
- - -
+ + +
+
+

Composants de Layout

+
+ + +
+ +

Contenu de la carte. Le composant fr:card permet d'encapsuler du contenu dans un container รฉlรฉgant avec header optionnel.

+ +
+
+ + +
+ +

Contenu du panneau. Le composant fr:panel supporte le pliage/dรฉpliage et la fermeture.

+

Cliquez sur l'icรดne pour plier/dรฉplier ce panneau.

+
+
+ + +
+
+
Dialogs - fr:actionDialog et fr:formDialog
+

Dialogs modaux standardisรฉs avec boutons d'action

+ +
+ + + +
+ + + +

+ Ce dialog utilise le composant fr:actionDialog avec des champs fr:field* ร  l'intรฉrieur. +

+ + + + + + + + + + + +
+ + + +

+ Le composant fr:formDialog intรจgre un formulaire avec validation automatique. +

+ + + + + + +
+
+
+
+ + +
+
+

Composants de Navigation

+
+ + +
+
+
fr:breadcrumb - Fil d'Ariane
+

Navigation hiรฉrarchique

+ + +
+
+ + +
+
+
fr:steps - Indicateur d'รฉtapes
+

Affichage de la progression dans un processus multi-รฉtapes

+ + +
+
+ + +
+
+
fr:tabView - Onglets
+

Organisation du contenu en onglets

+ + + +

Premier onglet avec informations gรฉnรฉrales.

+ +
+ +

Deuxiรจme onglet avec paramรจtres.

+ +
+ +

Troisiรจme onglet avec options avancรฉes.

+
+
+
+
+
+ + +
+
+

Composants de Donnรฉes

+
+ + +
+
+
fr:dataTable - Tableau de donnรฉes
+

Tableau avec tri, pagination et sรฉlection

+ + + + + + + + + + + + + #{user.active ? 'ACTIF' : 'INACTIF'} + + + + +

+ + Utilisateur sรฉlectionnรฉ: #{demoBean.selectedUser.nom} (#{demoBean.selectedUser.email}) +

+
+
+
+ + +
+
+

Composants de Feedback

+
+ + +
+
+
fr:message - Message d'information
+

Affichage de messages avec diffรฉrents niveaux de sรฉvรฉritรฉ

+ + + + +
+
+ + +
+
+
fr:growl - Notifications Toast
+

Messages toast temporaires

+ + +

Les notifications growl s'affichent automatiquement lors des actions.

+
+
+ + +
+
+
fr:inplace - ร‰dition en place
+

ร‰dition de contenu sans ouvrir de dialog

+ + + + +
+
+
+ + +
+
+

Composants Utilitaires

+
+ +
+
+
fr:spacer - Espacement
+

Crรฉe un espace vertical entre les รฉlรฉments

+ +

ร‰lรฉment 1

+ +

ร‰lรฉment 2 (espacรฉ de 2rem)

+
+
+ +
+
+
fr:divider - Sรฉparateur
+

Ligne de sรฉparation horizontale ou verticale

+ +

Contenu avant

+ +

Contenu aprรจs

+
+
+ +
+
+
fr:badge - Badge numรฉrique
+

Indicateur numรฉrique ou de statut

+ +
+ + + +
+
+
+ +
+
+
fr:avatar - Avatar utilisateur
+

Reprรฉsentation visuelle d'un utilisateur

+ +
+ + + +
+
+
+ +
+
+
fr:tag - ร‰tiquette
+

Tag de catรฉgorisation avec couleur

+ +
+ + + +
+
+
+ +
+
+
fr:progressBar - Barre de progression
+

Indicateur de progression

+ + + + +
+
+
+ + +
+
+

Composants Avancรฉs

+
+ +
+
+
Composants Avancรฉs
+

Les composants fr:tree, fr:fieldEditor et fr:chart sont disponibles pour des cas d'usage avancรฉs.

+ +

+ fr:tree - Arbre hiรฉrarchique avec sรฉlection
+ fr:fieldEditor - ร‰diteur WYSIWYG pour contenu riche
+ fr:chart - Graphiques interactifs (bar, line, pie, etc.)
+ fr:treeTable - Table avec structure hiรฉrarchique
+ fr:dataView - Affichage en grille/liste avec templates +

+
+
+
+ + + +
+
+
+
Actions du formulaire
+
+ + +
+
+
+
+
- - \ No newline at end of file + diff --git a/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-common.css b/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-common.css new file mode 100644 index 0000000..80823b4 --- /dev/null +++ b/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-common.css @@ -0,0 +1,122 @@ +/* Common styles for Freya demo components */ + +.order-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; +} + +.order-badge.order-delivered { + background: #ACEBB4; + color: #348861; +} + +.order-badge.order-cancelled { + background: #FABD9A; + color: #AD342B; +} + +.order-badge.order-pending { + background: #F8D895; + color: #A76927; +} + +.order-badge.order-returned { + background: #EFB8E5; + color: #833F91; +} + +.product-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; + text-align: center; +} + +.product-badge.status-instock { + background: #ACEBB4; + color: #348861; +} + +.product-badge.status-outofstock { + background: #FABD9A; + color: #AD342B; +} + +.product-badge.status-lowstock { + background: #F8D895; + color: #A76927; +} + +.customer-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; +} + +.customer-badge.status-qualified { + background: #ACEBB4; + color: #348861; +} + +.customer-badge.status-unqualified { + background: #FABD9A; + color: #AD342B; +} + +.customer-badge.status-negotiation { + background: #F8D895; + color: #A76927; +} + +.customer-badge.status-new { + background: #9BF2F7; + color: #2B7AA4; +} + +.customer-badge.status-renewal { + background: #EFB8E5; + color: #833F91; +} + +.customer-badge.status-proposal { + background: #FFD8B2; + color: #805B36; +} + +.filter-container .ui-inputtext { + width: 400px; +} + +.ui-selection-column { + width: 2rem; +} + +@media (max-width: 640px) { + .filter-container { + width: 100%; + margin-top: .5rem; + } + + .filter-container .ui-inputtext { + width: 100%; + } + + .ui-selection-column { + width: auto; + text-align: center; + } + + .ui-selection-column .ui-column-title { + display: none !important; + } +} diff --git a/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-light.css b/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-light.css new file mode 100644 index 0000000..7576348 --- /dev/null +++ b/integration-tests/src/main/resources/META-INF/resources/demo/css/demo-light.css @@ -0,0 +1,734 @@ +.order-badge { + border-radius: 2px; + padding: 0.25em 0.5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: 0.3px; +} +.order-badge.order-delivered { + background: #ACEBB4; + color: #348861; +} +.order-badge.order-cancelled { + background: #FABD9A; + color: #AD342B; +} +.order-badge.order-pending { + background: #F8D895; + color: #A76927; +} +.order-badge.order-returned { + background: #EFB8E5; + color: #833F91; +} + +.product-badge { + border-radius: 2px; + padding: 0.25em 0.5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: 0.3px; + text-align: center; +} +.product-badge.status-instock { + background: #ACEBB4; + color: #348861; +} +.product-badge.status-outofstock { + background: #FABD9A; + color: #AD342B; +} +.product-badge.status-lowstock { + background: #F8D895; + color: #A76927; +} + +.customer-badge { + border-radius: 2px; + padding: 0.25em 0.5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: 0.3px; +} +.customer-badge.status-qualified { + background: #ACEBB4; + color: #348861; +} +.customer-badge.status-unqualified { + background: #FABD9A; + color: #AD342B; +} +.customer-badge.status-negotiation { + background: #F8D895; + color: #A76927; +} +.customer-badge.status-new { + background: #9BF2F7; + color: #2B7AA4; +} +.customer-badge.status-renewal { + background: #EFB8E5; + color: #833F91; +} +.customer-badge.status-proposal { + background: #FFD8B2; + color: #805B36; +} + +.filter-container .ui-inputtext { + width: 400px; +} + +.ui-selection-column { + width: 2rem; +} + +@media (max-width: 640px) { + .filter-container { + width: 100%; + margin-top: 0.5rem; + } + + .filter-container .ui-inputtext { + width: 100%; + } + + .ui-selection-column { + width: auto; + text-align: center; + } + .ui-selection-column .ui-column-title { + display: none !important; + } +} +.crud-demo .ui-datatable { + margin-top: 1rem; +} +.crud-demo .product-image { + width: 100px; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); +} +.crud-demo .ui-dialog .product-image { + width: 250px; + margin: 0 auto 2rem auto; + display: block; +} +.crud-demo .ui-dialog-footer .ui-button { + min-width: 6rem; +} +.crud-demo .ui-datatable .ui-column-filter { + display: none; +} +.crud-demo .products-table-header { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.crud-demo .edit-button.ui-button { + margin-right: 0.5rem; +} +.crud-demo .orders-subtable { + padding: 1rem; +} +.crud-demo .products-table > .ui-datatable-tablewrapper > table > thead > tr > th:nth-child(2) { + width: 2rem; +} +.crud-demo .products-table .ui-rating { + display: inline-block; +} + +@media (max-width: 640px) { + .products-table > .ui-datatable-tablewrapper > table > thead > tr > th:nth-child(2) .ui-column-title, +.products-table > .ui-datatable-tablewrapper > table > tbody > tr > td:nth-child(2) .ui-column-title { + display: none !important; + } + + .products-buttonbar { + -ms-flex-direction: column; + flex-direction: column; + } + .products-buttonbar > div:last-child { + margin-top: 0.5rem; + } +} +.docs li { + line-height: 1.5; +} + +.icons-demo .icons-list { + text-align: center; + color: rgba(41, 50, 65, 0.8); +} +.icons-demo .icons-list i { + font-size: 1.5rem; + margin-bottom: 0.5rem; +} + +.list-demo .product-name { + font-size: 1.5rem; + font-weight: 700; +} +.list-demo .product-description { + margin: 0 0 1rem 0; +} +.list-demo .product-category-icon { + vertical-align: middle; + margin-right: 0.5rem; +} +.list-demo .product-category { + font-weight: 600; + vertical-align: middle; +} +.list-demo .product-list-item { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 1rem; +} +.list-demo .product-list-item img { + width: 150px; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + margin-right: 2rem; +} +.list-demo .product-list-item .product-list-detail { + flex: 1 1 0; + -ms-flex: 1 1 0px; +} +.list-demo .product-list-item .ui-rating { + margin: 0 0 0.5rem 0; +} +.list-demo .product-list-item .product-price { + font-size: 1.5rem; + font-weight: 600; + margin-bottom: 0.5rem; + align-self: flex-end; +} +.list-demo .product-list-item .product-list-action { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} +.list-demo .product-list-item .ui-button { + margin-bottom: 0.5rem; +} +.list-demo .product-grid-item { + border: 1px solid #dee2e6; + box-shadow: none; +} +.list-demo .product-grid-item .product-grid-item-top, +.list-demo .product-grid-item .product-grid-item-bottom { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; +} +.list-demo .product-grid-item img { + width: 75%; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + margin: 2rem 0; +} +.list-demo .product-grid-item .product-grid-item-content { + text-align: center; +} +.list-demo .product-grid-item .product-price { + font-size: 1.5rem; + font-weight: 600; +} + +@media screen and (max-width: 576px) { + .list-demo .product-list-item { + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-align: center; + align-items: center; + } + .list-demo .product-list-item img { + width: 75%; + margin: 2rem 0; + } + .list-demo .product-list-item .product-list-detail { + text-align: center; + } + .list-demo .product-list-item .product-price { + align-self: center; + } + .list-demo .product-list-item .product-list-action { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + } + .list-demo .product-list-item .product-list-action { + margin-top: 2rem; + -ms-flex-direction: row; + flex-direction: row; + -ms-flex-pack: justify; + justify-content: space-between; + -ms-flex-align: center; + align-items: center; + width: 100%; + } +} +.messages-demo .ui-button.ui-widget { + min-width: 6rem; +} +.messages-demo .field > label { + width: 125px; +} + +.misc-demo .ui-button.ui-widget { + min-width: 6rem; +} +.misc-demo .badges .ui-badge, +.misc-demo .badges .ui-tag { + margin-right: 0.5rem; +} +.misc-demo .ui-chip.custom-chip { + background: var(--primary-color); + color: var(--primary-color-text); +} +.misc-demo .custom-scrolltop { + width: 2rem; + height: 2rem; + border-radius: 4px; + background-color: var(--primary-color); +} +.misc-demo .custom-scrolltop:hover { + background-color: var(--primary-color); +} +.misc-demo .custom-scrolltop .ui-scrolltop-icon { + font-size: 1rem; + color: var(--primary-color-text); +} +.misc-demo .custom-skeleton { + border: 1px solid var(--surface-d); + border-radius: 4px; +} +.misc-demo .custom-skeleton ul { + list-style: none; +} + +.table-demo .ui-datatable .ui-column-filter { + display: none; +} +.table-demo .customers-table-header { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} + +@media (max-width: 640px) { + .table-demo .ui-progressbar { + margin-top: 0.5rem; + } +} +.custom-marker { + display: flex; + width: 2rem; + height: 2rem; + align-items: center; + justify-content: center; + color: #ffffff; + border-radius: 50%; + z-index: 1; +} + +.ui-chronoline-event-content, +.ui-chronoline-event-opposite { + line-height: 1; +} + +@media screen and (max-width: 960px) { + .customized-chronoline .ui-chronoline-event:nth-child(even) { + flex-direction: row !important; + } + + .customized-chronoline .ui-chronoline-event:nth-child(even) .ui-chronoline-event-content { + text-align: left !important; + } + + .customized-chronoline .ui-chronoline-event-opposite { + flex: 0; + } + + .customized-chronoline .ui-card { + margin-top: 1rem; + } +} +.floatlabel-demo .field { + margin-top: 2rem; +} + +/** +* prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML +* Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics); +* @author Tim Shedor +*/ +code[class*=language-], +pre[class*=language-] { + color: black; + background: none; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*=language-] { + position: relative; + margin: 0.5em 0; + overflow: visible; + padding: 0; +} + +pre[class*=language-] > code { + position: relative; + border-left: 10px solid #358ccb; + box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf; + background-color: #fdfdfd; + background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); + background-size: 3em 3em; + background-origin: content-box; + background-attachment: local; +} + +code[class*=language] { + max-height: inherit; + padding: 0 1em; + display: block; + overflow: auto; +} + +/* Margin bottom to accomodate shadow */ +:not(pre) > code[class*=language-], +pre[class*=language-] { + background-color: #fdfdfd; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 1em; +} + +/* Inline code */ +:not(pre) > code[class*=language-] { + position: relative; + padding: 0.2em; + border-radius: 0.3em; + color: #c92c2c; + border: 1px solid rgba(0, 0, 0, 0.1); + display: inline; + white-space: normal; +} + +pre[class*=language-]:before, +pre[class*=language-]:after { + content: ""; + z-index: -2; + display: block; + position: absolute; + bottom: 0.75em; + left: 0.18em; + width: 40%; + height: 20%; + max-height: 13em; + box-shadow: 0px 13px 8px #979797; + -webkit-transform: rotate(-2deg); + -moz-transform: rotate(-2deg); + -ms-transform: rotate(-2deg); + -o-transform: rotate(-2deg); + transform: rotate(-2deg); +} + +:not(pre) > code[class*=language-]:after, +pre[class*=language-]:after { + right: 0.75em; + left: auto; + -webkit-transform: rotate(2deg); + -moz-transform: rotate(2deg); + -ms-transform: rotate(2deg); + -o-transform: rotate(2deg); + transform: rotate(2deg); +} + +.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #7D8B99; +} + +.token.punctuation { + color: #5F6364; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.function-name, +.token.constant, +.token.symbol, +.token.deleted { + color: #c92c2c; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.function, +.token.builtin, +.token.inserted { + color: #2f9c0a; +} + +.token.operator, +.token.entity, +.token.url, +.token.variable { + color: #a67f59; + background: rgba(255, 255, 255, 0.5); +} + +.token.atrule, +.token.attr-value, +.token.keyword, +.token.class-name { + color: #1990b8; +} + +.token.regex, +.token.important { + color: #e90; +} + +.language-css .token.string, +.style .token.string { + color: #a67f59; + background: rgba(255, 255, 255, 0.5); +} + +.token.important { + font-weight: normal; +} + +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.namespace { + opacity: 0.7; +} + +@media screen and (max-width: 767px) { + pre[class*=language-]:before, +pre[class*=language-]:after { + bottom: 14px; + box-shadow: none; + } +} +/* Plugin styles */ +.token.tab:not(:empty):before, +.token.cr:before, +.token.lf:before { + color: #e0d7d1; +} + +/* Plugin styles: Line Numbers */ +pre[class*=language-].line-numbers { + padding-left: 0; +} + +pre[class*=language-].line-numbers code { + padding-left: 3.8em; +} + +pre[class*=language-].line-numbers .line-numbers-rows { + left: 0; +} + +/* Plugin styles: Line Highlight */ +pre[class*=language-][data-line] { + padding-top: 0; + padding-bottom: 0; + padding-left: 0; +} + +pre[data-line] code { + position: relative; + padding-left: 4em; +} + +pre .line-highlight { + margin-top: 0; +} + +/* PrimeFaces styles */ +pre[class*=language-]:before, pre[class*=language-]:after { + display: none !important; +} +pre[class*=language-] code { + border-left: 6px solid var(--surface-border) !important; + box-shadow: none !important; + background: var(--surface-ground) !important; + margin: 1em 0; + color: var(--text-color); +} + +.language-css .token.string, +.style .token.string { + background: transparent; +} + +.block-section { + margin-bottom: 4rem; +} + +.block-header { + padding: 1rem 2rem; + background-color: var(--surface-section); + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border: 1px solid var(--surface-d); + display: flex; + align-items: center; + justify-content: space-between; +} +.block-header .block-title { + font-size: 1.25rem; + font-weight: 600; + display: inline-flex; + align-items: center; +} +.block-header .block-title .badge-free { + border-radius: 4px; + padding: 0.25rem 0.5rem; + background-color: var(--orange-500); + color: white; + margin-left: 1rem; + font-weight: 600; + font-size: 0.875rem; +} +.block-header .block-title .badge-new { + border-radius: 4px; + padding: 0.25rem 0.5rem; + background-color: var(--green-500); + color: white; + margin-left: 1rem; + font-weight: 600; + font-size: 0.875rem; +} +.block-header .block-actions { + display: flex; + align-items: center; + justify-content: space-between; + user-select: none; +} +.block-header .block-actions a { + display: flex; + align-items: center; + margin-right: 0.75rem; + padding: 0.5rem 1rem; + border-radius: 4px; + border: 1px solid transparent; + transition: background-color 0.2s; + cursor: pointer; + color: var(--text-color); +} +.block-header .block-actions a:last-child { + margin-right: 0; +} +.block-header .block-actions a:not(.block-action-disabled):hover { + background-color: var(--surface-c); +} +.block-header .block-actions a.block-action-active { + border-color: var(--primary-color); + color: var(--primary-color); +} +.block-header .block-actions a.block-action-copy i { + color: var(--primary-color); + font-size: 1.25rem; +} +.block-header .block-actions a.block-action-disabled { + opacity: 0.6; + pointer-events: none; + cursor: auto !important; +} +.block-header .block-actions a .pi-lock { + margin-right: 0.5rem; +} + +.block-content { + padding: 0; + border: 1px solid var(--surface-d); + border-top: 0 none; +} +.block-content > div { + display: none; +} +.block-content > div.block-content-active { + display: block; +} + +.block-section pre[class*=language-] { + margin: 0 !important; +} +.block-section pre[class*=language-]:before, .block-section pre[class*=language-]:after { + display: none !important; +} +.block-section pre[class*=language-] code { + border-left: 0 none !important; + box-shadow: none !important; + background: var(--surface-e) !important; + margin: 0; + color: var(--text-color); + font-size: 14px; + padding: 1.5rem 2rem !important; +} + +@media screen and (max-width: 575px) { + .block-header { + flex-direction: column; + align-items: start; + } + .block-header .block-actions { + margin-top: 1rem; + } +} diff --git a/integration-tests/src/main/resources/META-INF/resources/demo/css/pages/_common.scss b/integration-tests/src/main/resources/META-INF/resources/demo/css/pages/_common.scss new file mode 100644 index 0000000..cc053d1 --- /dev/null +++ b/integration-tests/src/main/resources/META-INF/resources/demo/css/pages/_common.scss @@ -0,0 +1,122 @@ +.order-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; + + &.order-delivered { + background: #ACEBB4; + color: #348861; + } + + &.order-cancelled { + background: #FABD9A; + color:#AD342B; + } + + &.order-pending { + background: #F8D895; + color: #A76927; + } + + &.order-returned { + background: #EFB8E5; + color: #833F91; + } +} + +.product-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; + text-align: center; + + &.status-instock { + background: #ACEBB4; + color: #348861; + } + + &.status-outofstock { + background: #FABD9A; + color:#AD342B; + } + + &.status-lowstock { + background: #F8D895; + color: #A76927; + } +} + +.customer-badge { + border-radius: 2px; + padding: .25em .5rem; + text-transform: uppercase; + font-weight: 700; + font-size: 12px; + letter-spacing: .3px; + + &.status-qualified { + background: #ACEBB4; + color: #348861; + } + + &.status-unqualified { + background: #FABD9A; + color:#AD342B; + } + + &.status-negotiation { + background: #F8D895; + color: #A76927; + } + + &.status-new { + background: #9BF2F7; + color: #2B7AA4; + } + + &.status-renewal { + background: #EFB8E5; + color: #833F91; + } + + &.status-proposal { + background: #FFD8B2; + color: #805B36; + } +} + +.filter-container { + .ui-inputtext { + width: 400px; + } +} + +.ui-selection-column { + width: 2rem; +} + +@media (max-width: 640px) { + .filter-container { + width: 100%; + margin-top: .5rem; + } + + .filter-container .ui-inputtext { + width: 100%; + } + + .ui-selection-column { + width: auto; + text-align: center; + + .ui-column-title { + display: none !important; + } + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 16e1d3d..a2b4103 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 dev.lions primefaces-freya-extension-parent - 1.0.0-SNAPSHOT + 1.0.0 pom PrimeFaces Freya Extension - Parent diff --git a/runtime/pom.xml b/runtime/pom.xml index 0fc86ff..d499fa7 100644 --- a/runtime/pom.xml +++ b/runtime/pom.xml @@ -4,7 +4,7 @@ dev.lions primefaces-freya-extension-parent - 1.0.0-SNAPSHOT + 1.0.0 primefaces-freya-extension PrimeFaces Freya Extension - Runtime diff --git a/runtime/src/main/resources/META-INF/resources/freya/avatar.xhtml b/runtime/src/main/resources/META-INF/resources/freya/avatar.xhtml index ec467cc..c877e53 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/avatar.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/avatar.xhtml @@ -4,13 +4,151 @@ xmlns:composite="http://xmlns.jcp.org/jsf/composite" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> - @@ -19,7 +157,10 @@ - + + + + @@ -31,9 +172,14 @@ image="#{cc.attrs.image}" size="#{cc.attrs.size}" shape="#{cc.attrs.shape}" - styleClass="#{cc.attrs.styleClass}" - style="#{cc.attrs.style}" /> + styleClass="ui-avatar-#{cc.attrs.severity} #{cc.attrs.bordered ? 'ui-avatar-bordered' : ''} #{cc.attrs.styleClass}" + style="#{cc.attrs.style}"> + + + - diff --git a/runtime/src/main/resources/META-INF/resources/freya/breadcrumb.xhtml b/runtime/src/main/resources/META-INF/resources/freya/breadcrumb.xhtml index c508685..6526888 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/breadcrumb.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/breadcrumb.xhtml @@ -8,16 +8,25 @@ - + + + + @@ -26,6 +35,7 @@ styleClass="#{cc.attrs.styleClass}" style="#{cc.attrs.style}"> + diff --git a/runtime/src/main/resources/META-INF/resources/freya/button.xhtml b/runtime/src/main/resources/META-INF/resources/freya/button.xhtml index e9c035e..36a6f7c 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/button.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/button.xhtml @@ -6,10 +6,59 @@ xmlns:p="http://primefaces.org/ui"> @@ -27,6 +76,10 @@ + + + + @@ -46,7 +99,7 @@ outcome="#{cc.attrs.outcome}" href="#{cc.attrs.href}" target="#{cc.attrs.target}" - styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" + styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-button-'.concat(cc.attrs.size) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" style="#{cc.attrs.style}" title="#{cc.attrs.title}" badge="#{cc.attrs.badge}" diff --git a/runtime/src/main/resources/META-INF/resources/freya/card.xhtml b/runtime/src/main/resources/META-INF/resources/freya/card.xhtml index 5e707a8..87b28c2 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/card.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/card.xhtml @@ -7,12 +7,76 @@ xmlns:f="http://xmlns.jcp.org/jsf/core"> diff --git a/runtime/src/main/resources/META-INF/resources/freya/commandButton.xhtml b/runtime/src/main/resources/META-INF/resources/freya/commandButton.xhtml index d326b49..1134b5c 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/commandButton.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/commandButton.xhtml @@ -6,14 +6,63 @@ xmlns:p="http://primefaces.org/ui"> @@ -41,6 +90,10 @@ + + + + @@ -52,6 +105,13 @@ + + + + + + + @@ -71,13 +131,15 @@ global="#{cc.attrs.global}" validateClient="#{cc.attrs.validateClient}" immediate="#{cc.attrs.immediate}" - styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" + styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-button-'.concat(cc.attrs.size) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" style="#{cc.attrs.style}" title="#{cc.attrs.title}" type="#{cc.attrs.type}" widgetVar="#{cc.attrs.widgetVar}" badge="#{cc.attrs.badge}" - badgeSeverity="#{cc.attrs.badgeSeverity}" /> + badgeSeverity="#{cc.attrs.badgeSeverity}"> + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/confirmDialog.xhtml b/runtime/src/main/resources/META-INF/resources/freya/confirmDialog.xhtml new file mode 100644 index 0000000..9422f33 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/confirmDialog.xhtml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/dataTable.xhtml b/runtime/src/main/resources/META-INF/resources/freya/dataTable.xhtml index a82e28f..88a1854 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/dataTable.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/dataTable.xhtml @@ -7,18 +7,177 @@ xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -59,6 +218,22 @@ + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/dataView.xhtml b/runtime/src/main/resources/META-INF/resources/freya/dataView.xhtml index 172f918..ef1b3ab 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/dataView.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/dataView.xhtml @@ -7,21 +7,178 @@ xmlns:f="http://xmlns.jcp.org/jsf/core"> diff --git a/runtime/src/main/resources/META-INF/resources/freya/dialog.xhtml b/runtime/src/main/resources/META-INF/resources/freya/dialog.xhtml new file mode 100644 index 0000000..d350cae --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/dialog.xhtml @@ -0,0 +1,257 @@ + + + + + + + + + + + + + 4. Dialog maximisable: + + + #{item.produit} + #{item.quantite} + #{item.prix} FCFA + + + + + + + + 5. Dialog avec position personnalisรฉe: + + + + + + + + + Attributs disponibles: + - header: Titre du dialog + - widgetVar: Variable JS pour contrรดle programmatique (REQUIS) + - modal: true/false - Dialog modal avec backdrop (dรฉfaut: false) + - visible: true/false - Visible au chargement (dรฉfaut: false) + - width: Largeur (px, %, auto) - dรฉfaut: auto + - height: Hauteur (px, %, auto) - dรฉfaut: auto + - minWidth: Largeur minimale en px (dรฉfaut: 150) + - minHeight: Hauteur minimale en px (dรฉfaut: 150) + - draggable: true/false - Dรฉplaรงable par le header (dรฉfaut: false) + - resizable: true/false - Redimensionnable (dรฉfaut: false) + - maximizable: true/false - Bouton maximiser (dรฉfaut: false) + - minimizable: true/false - Bouton minimiser (dรฉfaut: false) + - closable: true/false - Bouton fermer (dรฉfaut: true) + - closeOnEscape: true/false - Fermer avec ร‰chap (dรฉfaut: false) + - position: Position - "center", "top", "bottom", "left", "right" (dรฉfaut: center) + - showEffect: Effet d'apparition - "fade", "slide", "explode", etc. + - hideEffect: Effet de disparition - "fade", "slide", "explode", etc. + - appendTo: Sรฉlecteur de l'รฉlรฉment parent (dรฉfaut: @(body)) + - responsive: true/false - Responsive sur mobile (dรฉfaut: true) + - styleClass: Classes CSS additionnelles + - style: Styles CSS inline + + Facets disponibles: + - header: Header personnalisรฉ (remplace l'attribut header) + - footer: Footer avec boutons d'action + + Contrรดle JavaScript (widgetVar): + ```javascript + // Afficher le dialog + PF('dlg').show(); + + // Masquer le dialog + PF('dlg').hide(); + + // Basculer l'affichage + PF('dlg').toggle(); + + // Maximiser + PF('dlg').maximize(); + + // Minimiser + PF('dlg').minimize(); + + // Restaurer + PF('dlg').restore(); + ``` + + Events AJAX disponibles: + - open: Dรฉclenchรฉ ร  l'ouverture + - close: Dรฉclenchรฉ ร  la fermeture + - maximize: Dรฉclenchรฉ ร  la maximisation + - minimize: Dรฉclenchรฉ ร  la minimisation + - move: Dรฉclenchรฉ au dรฉplacement + - resize: Dรฉclenchรฉ au redimensionnement + + Exemple avec AJAX: + + + + + + Positions disponibles: + - center: Centre de l'รฉcran (dรฉfaut) + - top: En haut centrรฉ + - bottom: En bas centrรฉ + - left: ร€ gauche centrรฉ + - right: ร€ droite centrรฉ + - top-left, top-right, bottom-left, bottom-right: Coins + + Notes: + - widgetVar est REQUIS pour contrรดler le dialog via JS + - Modal true bloque l'interaction avec la page (backdrop) + - Backdrop avec blur 3px pour effet moderne + - Animation fade-in/fade-out fluide + - Header avec gradient bleu Lions.dev + - Footer avec gradient gris + - Responsive: max 95vw/95vh sur mobile + - Support drag & drop du header si draggable="true" + - Redimensionnable par coin infรฉrieur droit si resizable="true" + - ร‰chap pour fermer si closeOnEscape="true" + - Support ARIA pour accessibilitรฉ + - Focus trap automatique en mode modal + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldAutoComplete.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldAutoComplete.xhtml index c35c8f2..92773fa 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldAutoComplete.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldAutoComplete.xhtml @@ -6,14 +6,96 @@ xmlns:p="http://primefaces.org/ui"> @@ -40,6 +122,7 @@ + @@ -47,7 +130,7 @@ -
+
@@ -29,15 +95,24 @@ + + + + + + + + + -
+
- - + + + - - + + + + - -
- - + + - - - - + + #{cc.attrs.helpText} + + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldFileUpload.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldFileUpload.xhtml index c9a7957..6b63918 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldFileUpload.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldFileUpload.xhtml @@ -6,14 +6,121 @@ xmlns:p="http://primefaces.org/ui"> @@ -40,11 +147,12 @@ + -
+
@@ -26,15 +85,24 @@ + + + + + + + + + - -
+ +
+ + + + + + + + ``` + + Notes: + - Affiche un compteur "X sur Y sรฉlectionnรฉs" + - Case "Tout sรฉlectionner / Tout dรฉsรฉlectionner" en header + - Filtre de recherche en temps rรฉel (si filter="true") + - Scroll automatique si plus de 10 รฉlรฉments + - Support du clavier (flรจches, Espace, Enter, Esc) + - Affichage responsive sur mobile --> @@ -28,6 +111,7 @@ + @@ -39,7 +123,7 @@ -
+
@@ -46,6 +103,7 @@ --> + @@ -53,7 +111,7 @@ -
+
@@ -28,15 +33,24 @@ + + + + + + + + + -
+
- - + + + - - + + + + - - -
- - + + - - - - - + + #{cc.attrs.helpText} + + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldRating.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldRating.xhtml index d1f520e..49981ac 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldRating.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldRating.xhtml @@ -4,53 +4,224 @@ xmlns:composite="http://xmlns.jcp.org/jsf/composite" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> - - - - - + + + + + + + - - + + + + - -
- - + + - - + cancel="#{cc.attrs.cancel}" + readonly="#{cc.attrs.readonly}" + disabled="#{cc.attrs.disabled}" + required="#{cc.attrs.required}" + styleClass="#{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-rating-'.concat(cc.attrs.size) : ''} #{cc.attrs.variant eq 'hearts' ? 'ui-rating-hearts' : ''}" /> - - + + #{cc.attrs.helpText} + + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldSelect.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldSelect.xhtml index 3bd6024..3e5143a 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldSelect.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldSelect.xhtml @@ -7,17 +7,22 @@ xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -29,18 +34,26 @@ + + + + + + + + -
+
- - - - - - - @@ -33,23 +197,28 @@ + + + + + + - - + + + + - -
- - - - +
- - + + + disabled="#{cc.attrs.disabled}" + styleClass="ui-slider-#{cc.attrs.variant} #{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-slider-'.concat(cc.attrs.size) : ''}" /> - - - + + #{cc.attrs.helpText} + + +
- diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldSwitch.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldSwitch.xhtml index 563b552..7804c7f 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldSwitch.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldSwitch.xhtml @@ -4,46 +4,208 @@ xmlns:composite="http://xmlns.jcp.org/jsf/composite" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> - - - + + + + + + + - - + + + + - -
- +
- - + + - - + + #{cc.attrs.helpText} + + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/fieldTextarea.xhtml b/runtime/src/main/resources/META-INF/resources/freya/fieldTextarea.xhtml index 5c14929..b9d5d5c 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/fieldTextarea.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/fieldTextarea.xhtml @@ -6,14 +6,19 @@ xmlns:p="http://primefaces.org/ui"> @@ -29,15 +34,24 @@ + + + + + + + + + -
+
- - - - - - - - + + + + + + + - - + + + + - -
- - + + - - + offIcon="#{cc.attrs.offIcon}" + styleClass="#{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-togglebutton-'.concat(cc.attrs.size) : ''}" /> - - + + #{cc.attrs.helpText} + + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/growl.xhtml b/runtime/src/main/resources/META-INF/resources/freya/growl.xhtml index 3d698b1..b22b553 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/growl.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/growl.xhtml @@ -6,10 +6,138 @@ xmlns:p="http://primefaces.org/ui"> diff --git a/runtime/src/main/resources/META-INF/resources/freya/linkButton.xhtml b/runtime/src/main/resources/META-INF/resources/freya/linkButton.xhtml index 1fb8d73..a97a511 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/linkButton.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/linkButton.xhtml @@ -6,13 +6,65 @@ xmlns:p="http://primefaces.org/ui"> @@ -32,6 +84,10 @@ + + + + @@ -54,7 +110,7 @@ target="#{cc.attrs.target}" includeViewParams="#{cc.attrs.includeViewParams}" fragment="#{cc.attrs.fragment}" - styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" + styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-button-'.concat(cc.attrs.size) : ''} #{cc.attrs.text ? 'ui-button-text' : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.link ? 'ui-button-link' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" style="#{cc.attrs.style}" title="#{cc.attrs.title}"> diff --git a/runtime/src/main/resources/META-INF/resources/freya/menu.xhtml b/runtime/src/main/resources/META-INF/resources/freya/menu.xhtml new file mode 100644 index 0000000..06772db --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/menu.xhtml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/menubar.xhtml b/runtime/src/main/resources/META-INF/resources/freya/menubar.xhtml new file mode 100644 index 0000000..ddca217 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/menubar.xhtml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/messages.xhtml b/runtime/src/main/resources/META-INF/resources/freya/messages.xhtml new file mode 100644 index 0000000..6188b07 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/messages.xhtml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/overlayPanel.xhtml b/runtime/src/main/resources/META-INF/resources/freya/overlayPanel.xhtml new file mode 100644 index 0000000..bb7188d --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/overlayPanel.xhtml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/panel.xhtml b/runtime/src/main/resources/META-INF/resources/freya/panel.xhtml index 8c83663..7ff9be1 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/panel.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/panel.xhtml @@ -7,12 +7,82 @@ xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -24,6 +94,8 @@ + + @@ -40,13 +112,16 @@ toggleable="#{cc.attrs.toggleable}" collapsed="#{cc.attrs.collapsed}" closable="#{cc.attrs.closable}" - styleClass="#{cc.attrs.styleClass}" + styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-panel-'.concat(cc.attrs.severity) : ''}" style="#{cc.attrs.style}" widgetVar="#{cc.attrs.widgetVar}"> - - - + + +
+ + +
diff --git a/runtime/src/main/resources/META-INF/resources/freya/sidebar.xhtml b/runtime/src/main/resources/META-INF/resources/freya/sidebar.xhtml new file mode 100644 index 0000000..7202780 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/sidebar.xhtml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/freya/splitButton.xhtml b/runtime/src/main/resources/META-INF/resources/freya/splitButton.xhtml index e7abcd6..4396d34 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/splitButton.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/splitButton.xhtml @@ -6,14 +6,77 @@ xmlns:p="http://primefaces.org/ui"> @@ -38,6 +101,10 @@ + + + + @@ -46,6 +113,10 @@ + + + + @@ -65,7 +136,7 @@ global="#{cc.attrs.global}" model="#{cc.attrs.model}" menuStyleClass="#{cc.attrs.menuStyleClass}" - styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" + styleClass="#{cc.attrs.styleClass} #{not empty cc.attrs.severity ? 'ui-button-'.concat(cc.attrs.severity) : ''} #{not empty cc.attrs.size and cc.attrs.size ne 'base' ? 'ui-button-'.concat(cc.attrs.size) : ''} #{cc.attrs.outlined ? 'ui-button-outlined' : ''} #{cc.attrs.rounded ? 'ui-button-rounded' : ''} #{cc.attrs.raised ? 'ui-button-raised' : ''}" style="#{cc.attrs.style}" title="#{cc.attrs.title}" widgetVar="#{cc.attrs.widgetVar}"> diff --git a/runtime/src/main/resources/META-INF/resources/freya/tabView.xhtml b/runtime/src/main/resources/META-INF/resources/freya/tabView.xhtml index 791a2f5..ccb5f54 100644 --- a/runtime/src/main/resources/META-INF/resources/freya/tabView.xhtml +++ b/runtime/src/main/resources/META-INF/resources/freya/tabView.xhtml @@ -3,53 +3,39 @@ - + xmlns:p="http://primefaces.org/ui"> - + - - + - - + + - - - - - diff --git a/runtime/src/main/resources/META-INF/resources/freya/toast.xhtml b/runtime/src/main/resources/META-INF/resources/freya/toast.xhtml new file mode 100644 index 0000000..8334a35 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/freya/toast.xhtml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/_mixins.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/_mixins.scss new file mode 100644 index 0000000..d80d3b5 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/_mixins.scss @@ -0,0 +1,570 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Mixins SCSS + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Mixins rรฉutilisables pour composants Lions.dev + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import 'variables'; + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE BREAKPOINTS +// ============================================ + +@mixin lions-responsive-sm { + @media (min-width: $lions-breakpoint-sm) { + @content; + } +} + +@mixin lions-responsive-md { + @media (min-width: $lions-breakpoint-md) { + @content; + } +} + +@mixin lions-responsive-lg { + @media (min-width: $lions-breakpoint-lg) { + @content; + } +} + +@mixin lions-responsive-xl { + @media (min-width: $lions-breakpoint-xl) { + @content; + } +} + +@mixin lions-responsive-2xl { + @media (min-width: $lions-breakpoint-2xl) { + @content; + } +} + +// Responsive custom breakpoint +@mixin lions-responsive-custom($breakpoint) { + @media (min-width: $breakpoint) { + @content; + } +} + +// ============================================ +// ๐ŸŽจ GRADIENTS +// ============================================ + +@mixin lions-gradient-blue { + background: linear-gradient(135deg, $lions-blue-500 0%, $lions-blue-700 100%); +} + +@mixin lions-gradient-gold { + background: linear-gradient(135deg, $lions-gold-500 0%, $lions-gold-700 100%); +} + +@mixin lions-gradient-success { + background: linear-gradient(135deg, $lions-success-500 0%, $lions-success-700 100%); +} + +@mixin lions-gradient-warning { + background: linear-gradient(135deg, $lions-warning-500 0%, $lions-warning-700 100%); +} + +@mixin lions-gradient-danger { + background: linear-gradient(135deg, $lions-danger-500 0%, $lions-danger-700 100%); +} + +@mixin lions-gradient-info { + background: linear-gradient(135deg, $lions-info-500 0%, $lions-info-700 100%); +} + +// Gradient custom +@mixin lions-gradient-custom($color-start, $color-end, $angle: 135deg) { + background: linear-gradient($angle, $color-start 0%, $color-end 100%); +} + +// ============================================ +// ๐ŸŽฏ OMBRES +// ============================================ + +@mixin lions-shadow($level: 'base') { + @if $level == 'xs' { + box-shadow: $lions-shadow-xs; + } @else if $level == 'sm' { + box-shadow: $lions-shadow-sm; + } @else if $level == 'base' { + box-shadow: $lions-shadow-base; + } @else if $level == 'md' { + box-shadow: $lions-shadow-md; + } @else if $level == 'lg' { + box-shadow: $lions-shadow-lg; + } @else if $level == 'xl' { + box-shadow: $lions-shadow-xl; + } @else if $level == '2xl' { + box-shadow: $lions-shadow-2xl; + } +} + +// Shadow colorรฉe +@mixin lions-shadow-color($color, $opacity: 0.25) { + box-shadow: 0 4px 16px rgba($color, $opacity); +} + +// ============================================ +// ๐Ÿ”ฒ BORDER RADIUS +// ============================================ + +@mixin lions-rounded($size: 'base') { + @if $size == 'none' { + border-radius: $lions-radius-none; + } @else if $size == 'sm' { + border-radius: $lions-radius-sm; + } @else if $size == 'base' { + border-radius: $lions-radius-base; + } @else if $size == 'md' { + border-radius: $lions-radius-md; + } @else if $size == 'lg' { + border-radius: $lions-radius-lg; + } @else if $size == 'xl' { + border-radius: $lions-radius-xl; + } @else if $size == '2xl' { + border-radius: $lions-radius-2xl; + } @else if $size == 'full' { + border-radius: $lions-radius-full; + } +} + +// ============================================ +// ๐ŸŒ€ TRANSITIONS +// ============================================ + +@mixin lions-transition($properties: all, $duration: $lions-transition-base, $easing: $lions-ease-in-out) { + transition: $properties $duration $easing; +} + +// ============================================ +// โ™ฟ FOCUS RING +// ============================================ + +@mixin lions-focus-ring($color: $lions-blue-500, $opacity: 0.4) { + outline: 3px solid rgba($color, $opacity); + outline-offset: 2px; +} + +@mixin lions-focus-visible { + &:focus-visible { + @include lions-focus-ring(); + } +} + +// ============================================ +// ๐Ÿ“ SIZING +// ============================================ + +@mixin lions-size($width, $height: $width) { + width: $width; + height: $height; +} + +// Square +@mixin lions-square($size) { + @include lions-size($size, $size); +} + +// Circle +@mixin lions-circle($size) { + @include lions-square($size); + border-radius: $lions-radius-full; +} + +// ============================================ +// ๐Ÿ“ SPACING +// ============================================ + +@mixin lions-padding($value) { + padding: $value; +} + +@mixin lions-padding-x($value) { + padding-left: $value; + padding-right: $value; +} + +@mixin lions-padding-y($value) { + padding-top: $value; + padding-bottom: $value; +} + +@mixin lions-margin($value) { + margin: $value; +} + +@mixin lions-margin-x($value) { + margin-left: $value; + margin-right: $value; +} + +@mixin lions-margin-y($value) { + margin-top: $value; + margin-bottom: $value; +} + +// ============================================ +// ๐Ÿ”ค TYPOGRAPHY +// ============================================ + +@mixin lions-font-size($size: 'base') { + @if $size == 'xs' { + font-size: $lions-font-xs; + } @else if $size == 'sm' { + font-size: $lions-font-sm; + } @else if $size == 'base' { + font-size: $lions-font-base; + } @else if $size == 'lg' { + font-size: $lions-font-lg; + } @else if $size == 'xl' { + font-size: $lions-font-xl; + } @else if $size == '2xl' { + font-size: $lions-font-2xl; + } @else if $size == '3xl' { + font-size: $lions-font-3xl; + } @else if $size == '4xl' { + font-size: $lions-font-4xl; + } @else if $size == '5xl' { + font-size: $lions-font-5xl; + } +} + +@mixin lions-font-weight($weight: 'regular') { + @if $weight == 'light' { + font-weight: $lions-font-light; + } @else if $weight == 'regular' { + font-weight: $lions-font-regular; + } @else if $weight == 'medium' { + font-weight: $lions-font-medium; + } @else if $weight == 'semibold' { + font-weight: $lions-font-semibold; + } @else if $weight == 'bold' { + font-weight: $lions-font-bold; + } @else if $weight == 'extrabold' { + font-weight: $lions-font-extrabold; + } @else if $weight == 'black' { + font-weight: $lions-font-black; + } +} + +// Truncate text with ellipsis +@mixin lions-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +// Line clamp (multiline truncate) +@mixin lions-line-clamp($lines: 2) { + display: -webkit-box; + -webkit-line-clamp: $lines; + -webkit-box-orient: vertical; + overflow: hidden; +} + +// ============================================ +// ๐ŸŽจ BUTTON VARIANTS +// ============================================ + +@mixin lions-button-base { + display: inline-flex; + align-items: center; + justify-content: center; + gap: $lions-spacing-2; + font-family: $lions-font-family-primary; + @include lions-font-weight('semibold'); + text-align: center; + text-decoration: none; + cursor: pointer; + user-select: none; + border: $lions-button-border-width solid transparent; + @include lions-rounded('base'); + @include lions-transition(); + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + pointer-events: none; + } +} + +@mixin lions-button-size($size: 'base') { + @if $size == 'sm' { + height: $lions-button-height-sm; + padding: 0 $lions-button-padding-x-sm; + @include lions-font-size('sm'); + } @else if $size == 'base' { + height: $lions-button-height-base; + padding: 0 $lions-button-padding-x-base; + @include lions-font-size('base'); + } @else if $size == 'lg' { + height: $lions-button-height-lg; + padding: 0 $lions-button-padding-x-lg; + @include lions-font-size('lg'); + } +} + +@mixin lions-button-solid($color: $lions-blue-500, $color-dark: $lions-blue-700) { + @include lions-gradient-custom($color, $color-dark); + color: $lions-white; + @include lions-shadow-color($color, 0.25); + + &:hover { + transform: translateY(-2px); + @include lions-shadow-color($color, 0.35); + @include lions-gradient-custom(darken($color, 5%), darken($color-dark, 5%)); + } + + &:active { + transform: translateY(0); + @include lions-shadow-color($color, 0.2); + } + + &:focus-visible { + @include lions-focus-ring($color); + } +} + +@mixin lions-button-outlined($color: $lions-blue-500) { + background: transparent; + border-color: $color; + color: darken($color, 10%); + box-shadow: none; + + &:hover { + background: rgba($color, 0.1); + border-color: darken($color, 10%); + transform: translateY(-2px); + } + + &:active { + transform: translateY(0); + background: rgba($color, 0.15); + } + + &:focus-visible { + @include lions-focus-ring($color); + } +} + +@mixin lions-button-text($color: $lions-blue-500) { + background: transparent; + border: none; + color: darken($color, 10%); + box-shadow: none; + + &:hover { + background: rgba($color, 0.1); + } + + &:active { + background: rgba($color, 0.15); + } + + &:focus-visible { + @include lions-focus-ring($color); + } +} + +// ============================================ +// ๐Ÿ“ FORM FIELD VARIANTS +// ============================================ + +@mixin lions-input-base { + width: 100%; + font-family: $lions-font-family-primary; + @include lions-font-size('base'); + color: $lions-text-primary; + background: $lions-white; + border: $lions-input-border-width solid $lions-gray-300; + @include lions-rounded('base'); + @include lions-transition(); + + &::placeholder { + color: $lions-gray-400; + } + + &:hover { + border-color: $lions-gray-400; + } + + &:focus { + outline: none; + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + &:disabled { + background: $lions-gray-100; + cursor: not-allowed; + opacity: 0.6; + } +} + +@mixin lions-input-size($size: 'base') { + @if $size == 'sm' { + height: $lions-input-height-sm; + padding: 0 $lions-spacing-3; + @include lions-font-size('sm'); + } @else if $size == 'base' { + height: $lions-input-height-base; + padding: $lions-input-padding-y $lions-input-padding-x; + } @else if $size == 'lg' { + height: $lions-input-height-lg; + padding: $lions-spacing-4 $lions-spacing-5; + @include lions-font-size('lg'); + } +} + +@mixin lions-input-state-error { + border-color: $lions-danger-500; + box-shadow: 0 0 0 3px rgba($lions-danger-500, 0.15); + + &:focus { + border-color: $lions-danger-500; + box-shadow: 0 0 0 3px rgba($lions-danger-500, 0.15); + } +} + +@mixin lions-input-state-success { + border-color: $lions-success-500; + box-shadow: 0 0 0 3px rgba($lions-success-500, 0.15); + + &:focus { + border-color: $lions-success-500; + box-shadow: 0 0 0 3px rgba($lions-success-500, 0.15); + } +} + +// ============================================ +// ๐ŸŽด CARD & PANEL +// ============================================ + +@mixin lions-card { + background: $lions-white; + border: 1px solid $lions-gray-200; + @include lions-rounded('md'); + @include lions-shadow('base'); + @include lions-padding($lions-card-padding); + @include lions-transition(); + + &:hover { + @include lions-shadow('md'); + } +} + +// ============================================ +// ๐Ÿ”„ LOADING SPINNER +// ============================================ + +@mixin lions-spinner($size: 1rem, $color: $lions-blue-500) { + display: inline-block; + @include lions-size($size); + border: 2px solid rgba($color, 0.25); + border-top-color: $color; + border-radius: $lions-radius-full; + animation: lions-spin 0.6s linear infinite; +} + +@keyframes lions-spin { + to { + transform: rotate(360deg); + } +} + +// ============================================ +// ๐Ÿ“Š TABLE +// ============================================ + +@mixin lions-table-base { + width: 100%; + border-collapse: separate; + border-spacing: 0; + border: 1px solid $lions-gray-200; + @include lions-rounded('md'); + overflow: hidden; +} + +@mixin lions-table-header { + background: $lions-gray-100; + @include lions-font-weight('semibold'); + color: $lions-text-primary; + padding: $lions-spacing-4; + border-bottom: 2px solid $lions-gray-300; + text-align: left; +} + +@mixin lions-table-cell { + padding: $lions-spacing-4; + border-bottom: 1px solid $lions-gray-200; + color: $lions-text-primary; +} + +@mixin lions-table-row-hover { + &:hover { + background: rgba($lions-blue-50, 0.5); + } +} + +// ============================================ +// ๐ŸŽญ UTILITIES +// ============================================ + +// Visually hidden (screen reader only) +@mixin lions-sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +// Reset list styles +@mixin lions-list-reset { + list-style: none; + padding: 0; + margin: 0; +} + +// Clearfix +@mixin lions-clearfix { + &::after { + content: ''; + display: table; + clear: both; + } +} + +// Center element absolutely +@mixin lions-absolute-center { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +// Flexbox center +@mixin lions-flex-center { + display: flex; + align-items: center; + justify-content: center; +} + +// Grid center +@mixin lions-grid-center { + display: grid; + place-items: center; +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/_variables.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/_variables.scss new file mode 100644 index 0000000..0c3fcda --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/_variables.scss @@ -0,0 +1,273 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Variables SCSS + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Toutes les variables de design systรจme Lions.dev + * Basรฉ sur la Charte Graphique Lions.dev v1.0.0 + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +// ============================================ +// ๐ŸŽจ PALETTE DE COULEURS LIONS.DEV +// ============================================ + +// ๐Ÿ”ต Lions Blue (Couleur signature) +$lions-blue-50: #E8F4FD !default; +$lions-blue-100: #C3E2FA !default; +$lions-blue-200: #9BCEF7 !default; +$lions-blue-300: #72BAF4 !default; +$lions-blue-400: #50AAF1 !default; +$lions-blue-500: #2D9BEF !default; // Base - Lions Blue +$lions-blue-600: #2889D6 !default; +$lions-blue-700: #2275BC !default; +$lions-blue-800: #1C61A3 !default; +$lions-blue-900: #164D89 !default; + +// ๐ŸŸ  Lions Gold (Couleur d'accentuation) +$lions-gold-50: #FFF9E6 !default; +$lions-gold-100: #FFEFB3 !default; +$lions-gold-200: #FFE580 !default; +$lions-gold-300: #FFDB4D !default; +$lions-gold-400: #FFD11A !default; +$lions-gold-500: #FFC700 !default; // Base - Lions Gold +$lions-gold-600: #E6B300 !default; +$lions-gold-700: #CC9F00 !default; +$lions-gold-800: #B38B00 !default; +$lions-gold-900: #997700 !default; + +// โœ… Success (Vert Lions) +$lions-success-50: #E8F8F0 !default; +$lions-success-100: #C3ECD5 !default; +$lions-success-200: #9CE0BA !default; +$lions-success-300: #74D39F !default; +$lions-success-400: #4DC784 !default; +$lions-success-500: #22BB69 !default; // Base +$lions-success-600: #1FA85F !default; +$lions-success-700: #1B9555 !default; +$lions-success-800: #18824B !default; +$lions-success-900: #146F41 !default; + +// โš ๏ธ Warning (Orange Lions) +$lions-warning-50: #FFF3E0 !default; +$lions-warning-100: #FFE0B3 !default; +$lions-warning-200: #FFCC80 !default; +$lions-warning-300: #FFB84D !default; +$lions-warning-400: #FFA826 !default; +$lions-warning-500: #FF9800 !default; // Base +$lions-warning-600: #F08A00 !default; +$lions-warning-700: #E07B00 !default; +$lions-warning-800: #D16D00 !default; +$lions-warning-900: #C15E00 !default; + +// โŒ Danger (Rouge Lions) +$lions-danger-50: #FEEBEE !default; +$lions-danger-100: #FCCDD2 !default; +$lions-danger-200: #FAA6AF !default; +$lions-danger-300: #F87F8C !default; +$lions-danger-400: #F65870 !default; +$lions-danger-500: #F44336 !default; // Base +$lions-danger-600: #E93D31 !default; +$lions-danger-700: #DD342C !default; +$lions-danger-800: #D22C27 !default; +$lions-danger-900: #C41F1E !default; + +// โ„น๏ธ Info (Cyan Lions) +$lions-info-50: #E0F7FA !default; +$lions-info-100: #B3EBF3 !default; +$lions-info-200: #80DEEB !default; +$lions-info-300: #4DD1E3 !default; +$lions-info-400: #26C6DC !default; +$lions-info-500: #00BCD4 !default; // Base +$lions-info-600: #00AAC1 !default; +$lions-info-700: #0098AE !default; +$lions-info-800: #00869B !default; +$lions-info-900: #007488 !default; + +// ๐ŸŽจ Surface (Neutral) +$lions-white: #FFFFFF !default; +$lions-gray-50: #FAFBFC !default; +$lions-gray-100: #F4F6F8 !default; +$lions-gray-200: #E8ECEF !default; +$lions-gray-300: #D2D9DF !default; +$lions-gray-400: #B0B9C2 !default; +$lions-gray-500: #8995A1 !default; // Base +$lions-gray-600: #68737F !default; +$lions-gray-700: #4F5861 !default; +$lions-gray-800: #363E46 !default; +$lions-gray-900: #1F252B !default; +$lions-black: #0A0D0F !default; + +// Text colors +$lions-text-primary: $lions-gray-900 !default; +$lions-text-secondary: $lions-gray-600 !default; +$lions-text-disabled: $lions-gray-400 !default; +$lions-text-inverse: $lions-white !default; + +// ============================================ +// ๐Ÿ”ค TYPOGRAPHIE +// ============================================ + +// Font families +$lions-font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !default; +$lions-font-family-headings: 'Inter', system-ui, -apple-system, sans-serif !default; +$lions-font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !default; + +// Font sizes (Ratio 1.250 - Major Third) +$lions-font-xs: 0.750rem !default; // 12px +$lions-font-sm: 0.875rem !default; // 14px +$lions-font-base: 1.000rem !default; // 16px (base) +$lions-font-lg: 1.125rem !default; // 18px +$lions-font-xl: 1.250rem !default; // 20px +$lions-font-2xl: 1.563rem !default; // 25px +$lions-font-3xl: 1.953rem !default; // 31px +$lions-font-4xl: 2.441rem !default; // 39px +$lions-font-5xl: 3.052rem !default; // 49px + +// Font weights +$lions-font-light: 300 !default; +$lions-font-regular: 400 !default; +$lions-font-medium: 500 !default; +$lions-font-semibold: 600 !default; +$lions-font-bold: 700 !default; +$lions-font-extrabold: 800 !default; +$lions-font-black: 900 !default; + +// Line heights +$lions-line-height-tight: 1.25 !default; +$lions-line-height-normal: 1.5 !default; +$lions-line-height-relaxed: 1.75 !default; +$lions-line-height-loose: 2.0 !default; + +// ============================================ +// ๐Ÿ“ ESPACEMENTS (Systรจme 4px) +// ============================================ + +$lions-spacing-0: 0 !default; +$lions-spacing-1: 0.25rem !default; // 4px +$lions-spacing-2: 0.5rem !default; // 8px +$lions-spacing-3: 0.75rem !default; // 12px +$lions-spacing-4: 1rem !default; // 16px (base) +$lions-spacing-5: 1.25rem !default; // 20px +$lions-spacing-6: 1.5rem !default; // 24px +$lions-spacing-8: 2rem !default; // 32px +$lions-spacing-10: 2.5rem !default; // 40px +$lions-spacing-12: 3rem !default; // 48px +$lions-spacing-16: 4rem !default; // 64px +$lions-spacing-20: 5rem !default; // 80px +$lions-spacing-24: 6rem !default; // 96px + +// ============================================ +// ๐Ÿ”ฒ COMPOSANTS - DIMENSIONS +// ============================================ + +// Boutons +$lions-button-height-sm: 2rem !default; // 32px +$lions-button-height-base: 2.5rem !default; // 40px +$lions-button-height-lg: 3rem !default; // 48px +$lions-button-padding-x-sm: 0.75rem !default; // 12px +$lions-button-padding-x-base: 1rem !default; // 16px +$lions-button-padding-x-lg: 1.5rem !default; // 24px +$lions-button-border-radius: 0.5rem !default; // 8px +$lions-button-border-width: 2px !default; + +// Champs de formulaire +$lions-input-height-sm: 2rem !default; // 32px +$lions-input-height-base: 2.75rem !default; // 44px +$lions-input-height-lg: 3.25rem !default; // 52px +$lions-input-padding-x: 1rem !default; // 16px +$lions-input-padding-y: 0.75rem !default; // 12px +$lions-input-border-radius: 0.5rem !default; // 8px +$lions-input-border-width: 1px !default; + +// Cards & Panels +$lions-card-padding: $lions-spacing-6 !default; // 24px +$lions-card-border-radius: 0.75rem !default; // 12px +$lions-card-border-width: 1px !default; + +// Tables +$lions-table-row-padding: $lions-spacing-4 !default; // 16px +$lions-table-header-height: 3rem !default; // 48px +$lions-table-row-height: 2.75rem !default; // 44px + +// ============================================ +// ๐ŸŒˆ ANIMATIONS & TRANSITIONS +// ============================================ + +// Durรฉes +$lions-transition-fast: 150ms !default; +$lions-transition-base: 250ms !default; +$lions-transition-slow: 350ms !default; + +// Easing functions +$lions-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1) !default; +$lions-ease-out: cubic-bezier(0.0, 0, 0.2, 1) !default; +$lions-ease-in: cubic-bezier(0.4, 0, 1, 1) !default; +$lions-ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1) !default; + +// ============================================ +// ๐ŸŽฏ OMBRES (Elevation System) +// ============================================ + +$lions-shadow-xs: 0 1px 2px 0 rgba($lions-black, 0.05) !default; +$lions-shadow-sm: 0 1px 3px 0 rgba($lions-black, 0.1), 0 1px 2px 0 rgba($lions-black, 0.06) !default; +$lions-shadow-base: 0 4px 6px -1px rgba($lions-black, 0.1), 0 2px 4px -1px rgba($lions-black, 0.06) !default; +$lions-shadow-md: 0 10px 15px -3px rgba($lions-black, 0.1), 0 4px 6px -2px rgba($lions-black, 0.05) !default; +$lions-shadow-lg: 0 20px 25px -5px rgba($lions-black, 0.1), 0 10px 10px -5px rgba($lions-black, 0.04) !default; +$lions-shadow-xl: 0 25px 50px -12px rgba($lions-black, 0.25) !default; +$lions-shadow-2xl: 0 30px 60px -15px rgba($lions-black, 0.3) !default; + +// Shadows colorรฉes +$lions-shadow-blue: 0 4px 16px rgba($lions-blue-500, 0.25) !default; +$lions-shadow-gold: 0 4px 16px rgba($lions-gold-500, 0.25) !default; + +// ============================================ +// ๐Ÿ”„ BREAKPOINTS (Mobile-First) +// ============================================ + +$lions-breakpoint-xs: 0 !default; +$lions-breakpoint-sm: 576px !default; +$lions-breakpoint-md: 768px !default; +$lions-breakpoint-lg: 1024px !default; +$lions-breakpoint-xl: 1280px !default; +$lions-breakpoint-2xl: 1536px !default; + +// ============================================ +// ๐ŸŽจ Z-INDEX LAYERS +// ============================================ + +$lions-z-dropdown: 1000 !default; +$lions-z-sticky: 1020 !default; +$lions-z-fixed: 1030 !default; +$lions-z-modal-backdrop: 1040 !default; +$lions-z-modal: 1050 !default; +$lions-z-popover: 1060 !default; +$lions-z-tooltip: 1070 !default; + +// ============================================ +// ๐Ÿ”ฒ BORDER RADIUS +// ============================================ + +$lions-radius-none: 0 !default; +$lions-radius-sm: 0.25rem !default; // 4px +$lions-radius-base: 0.5rem !default; // 8px +$lions-radius-md: 0.75rem !default; // 12px +$lions-radius-lg: 1rem !default; // 16px +$lions-radius-xl: 1.5rem !default; // 24px +$lions-radius-2xl: 2rem !default; // 32px +$lions-radius-full: 9999px !default; // Pill shape + +// ============================================ +// ๐Ÿ“ GRID SYSTEM +// ============================================ + +$lions-grid-columns: 12 !default; +$lions-grid-gutter-width: $lions-spacing-6 !default; // 24px +$lions-container-max-width-sm: 540px !default; +$lions-container-max-width-md: 720px !default; +$lions-container-max-width-lg: 960px !default; +$lions-container-max-width-xl: 1140px !default; +$lions-container-max-width-2xl: 1320px !default; diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_breadcrumb-steps.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_breadcrumb-steps.scss new file mode 100644 index 0000000..146669e --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_breadcrumb-steps.scss @@ -0,0 +1,451 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Breadcrumb & Steps Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Breadcrumb et Steps (fil d'Ariane et รฉtapes) + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: MOYENNE #37-38 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿž BREADCRUMB STYLES +// ============================================ + +.ui-breadcrumb { + background: rgba($lions-gray-100, 0.5); + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + padding: $lions-spacing-3 $lions-spacing-5; + @include lions-shadow('sm'); + + .ui-breadcrumb-list { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: $lions-spacing-2; + list-style: none; + margin: 0; + padding: 0; + } + + .ui-breadcrumb-item { + display: flex; + align-items: center; + gap: $lions-spacing-2; + + .ui-menuitem-link { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + padding: $lions-spacing-1 $lions-spacing-2; + @include lions-rounded('sm'); + color: $lions-gray-600; + text-decoration: none; + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + @include lions-transition(); + + .ui-menuitem-icon { + font-size: 1rem; + color: $lions-gray-500; + } + + &:hover { + background: rgba($lions-blue-50, 0.6); + color: $lions-blue-700; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + + // Separator + .ui-breadcrumb-chevron { + color: $lions-gray-400; + font-size: 0.875rem; + @include lions-transition(); + } + + // Last item (current page) + &:last-child { + .ui-menuitem-link { + color: $lions-text-primary; + @include lions-font-weight('semibold'); + pointer-events: none; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + } + + // Home icon + &:first-child { + .ui-menuitem-link { + .ui-menuitem-icon { + font-size: 1.125rem; + } + } + } + } +} + +// Compact breadcrumb +.ui-breadcrumb-compact { + padding: $lions-spacing-2 $lions-spacing-4; + + .ui-menuitem-link { + padding: $lions-spacing-1; + @include lions-font-size('xs'); + } + + .ui-breadcrumb-chevron { + font-size: 0.75rem; + } +} + +// ============================================ +// ๐Ÿ“Š STEPS STYLES +// ============================================ + +.ui-steps { + position: relative; + padding: $lions-spacing-4 0; + + .ui-steps-list { + display: flex; + list-style: none; + margin: 0; + padding: 0; + position: relative; + } + + .ui-steps-item { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + position: relative; + text-align: center; + + // Connector line + &::before { + content: ''; + position: absolute; + top: 1.25rem; + left: 50%; + right: -50%; + height: 2px; + background: $lions-gray-300; + z-index: 0; + @include lions-transition(); + } + + &:last-child::before { + display: none; + } + + .ui-menuitem-link { + display: flex; + flex-direction: column; + align-items: center; + gap: $lions-spacing-3; + text-decoration: none; + position: relative; + z-index: 1; + @include lions-transition(); + + .ui-steps-number { + width: 2.5rem; + height: 2.5rem; + @include lions-rounded('full'); + @include lions-flex-center; + background: $lions-white; + border: 2px solid $lions-gray-300; + color: $lions-gray-600; + @include lions-font-weight('semibold'); + @include lions-font-size('base'); + @include lions-shadow('sm'); + @include lions-transition(); + } + + .ui-steps-title { + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + color: $lions-gray-600; + @include lions-transition(); + max-width: 150px; + } + + &:hover { + .ui-steps-number { + border-color: $lions-blue-400; + transform: scale(1.05); + } + + .ui-steps-title { + color: $lions-blue-700; + } + } + + &:focus-visible { + .ui-steps-number { + @include lions-focus-ring(); + } + } + } + + // Completed state + &.ui-steps-completed { + &::before { + background: $lions-success-500; + } + + .ui-menuitem-link { + .ui-steps-number { + @include lions-gradient-success; + border-color: $lions-success-600; + color: $lions-white; + + .pi { + font-size: 1rem; + } + } + + .ui-steps-title { + color: $lions-success-700; + @include lions-font-weight('semibold'); + } + } + } + + // Active/Current state + &.ui-steps-current { + .ui-menuitem-link { + .ui-steps-number { + @include lions-gradient-blue; + border-color: $lions-blue-600; + color: $lions-white; + @include lions-shadow('md'); + box-shadow: 0 0 0 4px rgba($lions-blue-500, 0.2), $lions-shadow-md; + } + + .ui-steps-title { + color: $lions-blue-700; + @include lions-font-weight('bold'); + } + } + } + + // Disabled/Future state + &.ui-steps-disabled { + .ui-menuitem-link { + pointer-events: none; + + .ui-steps-number { + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-gray-400; + } + + .ui-steps-title { + color: $lions-gray-400; + } + } + } + } + + // Vertical steps + &.ui-steps-vertical { + .ui-steps-list { + flex-direction: column; + align-items: flex-start; + } + + .ui-steps-item { + flex-direction: row; + align-items: flex-start; + text-align: left; + width: 100%; + padding: $lions-spacing-4 0; + + &::before { + top: 3.5rem; + bottom: -$lions-spacing-4; + left: 1.25rem; + right: auto; + width: 2px; + height: auto; + } + + &:last-child { + padding-bottom: 0; + + &::before { + display: none; + } + } + + .ui-menuitem-link { + flex-direction: row; + align-items: center; + gap: $lions-spacing-4; + } + + .ui-steps-title { + text-align: left; + max-width: none; + } + } + } + + // Readonly steps + &.ui-steps-readonly { + .ui-steps-item .ui-menuitem-link { + pointer-events: none; + cursor: default; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-breadcrumb { + .ui-breadcrumb-list { + gap: $lions-spacing-1; + } + + .ui-menuitem-link { + padding: $lions-spacing-1; + @include lions-font-size('xs'); + } + + .ui-breadcrumb-chevron { + font-size: 0.75rem; + } + } + + .ui-steps { + // Switch to vertical on mobile + .ui-steps-list { + flex-direction: column; + align-items: flex-start; + } + + .ui-steps-item { + flex-direction: row; + align-items: flex-start; + text-align: left; + width: 100%; + padding: $lions-spacing-3 0; + + &::before { + top: 3rem; + bottom: 0; + left: 1.25rem; + right: auto; + width: 2px; + height: calc(100% - 2.5rem); + } + + &:last-child::before { + display: none; + } + + .ui-menuitem-link { + flex-direction: row; + align-items: center; + gap: $lions-spacing-3; + } + + .ui-steps-number { + width: 2rem; + height: 2rem; + @include lions-font-size('sm'); + } + + .ui-steps-title { + text-align: left; + max-width: none; + @include lions-font-size('xs'); + } + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-breadcrumb, +.ui-steps { + // Focus visible + .ui-menuitem-link:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + .ui-menuitem-link, + .ui-steps-number { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + } +} + +// ============================================ +// ๐ŸŽจ UTILITY CLASSES +// ============================================ + +// Large steps +.ui-steps-lg { + .ui-steps-number { + width: 3rem !important; + height: 3rem !important; + @include lions-font-size('lg'); + } + + .ui-steps-title { + @include lions-font-size('base'); + } +} + +// Compact steps +.ui-steps-sm { + padding: $lions-spacing-2 0; + + .ui-steps-number { + width: 2rem !important; + height: 2rem !important; + @include lions-font-size('sm'); + } + + .ui-steps-title { + @include lions-font-size('xs'); + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_button.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_button.scss new file mode 100644 index 0000000..99fafbd --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_button.scss @@ -0,0 +1,442 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Button Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Amรฉlioration visuelle complรจte des boutons avec identitรฉ Lions.dev + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #1 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐ŸŽฏ BASE BUTTON STYLES +// ============================================ + +.ui-button { + @include lions-button-base; + @include lions-button-size('base'); + @include lions-button-solid($lions-blue-500, $lions-blue-700); + + // Override PrimeFaces defaults + font-family: $lions-font-family-primary !important; + + // Icon spacing + .ui-button-icon-left { + margin-right: $lions-spacing-2; + } + + .ui-button-icon-right { + margin-left: $lions-spacing-2; + } +} + +// ============================================ +// ๐ŸŽจ SEVERITY VARIANTS (Solid buttons) +// ============================================ + +// Primary (Lions Blue) - Default +.ui-button-primary, +.ui-button:not([class*="ui-button-"]) { + @include lions-button-solid($lions-blue-500, $lions-blue-700); +} + +// Secondary (Gray) +.ui-button-secondary { + @include lions-button-solid($lions-gray-500, $lions-gray-700); +} + +// Success (Green) +.ui-button-success { + @include lions-button-solid($lions-success-500, $lions-success-700); +} + +// Info (Cyan) +.ui-button-info { + @include lions-button-solid($lions-info-500, $lions-info-700); +} + +// Warning (Orange) +.ui-button-warning { + @include lions-button-solid($lions-warning-500, $lions-warning-700); +} + +// Help (Lions Gold - Premium) +.ui-button-help { + @include lions-button-solid($lions-gold-500, $lions-gold-700); + + // Extra visual impact for premium actions + font-weight: $lions-font-bold; + letter-spacing: 0.025em; +} + +// Danger (Red) +.ui-button-danger { + @include lions-button-solid($lions-danger-500, $lions-danger-700); +} + +// ============================================ +// ๐Ÿ“ OUTLINED VARIANT +// ============================================ + +.ui-button.ui-button-outlined { + &.ui-button-primary, + &:not([class*="ui-button-"]) { + @include lions-button-outlined($lions-blue-500); + } + + &.ui-button-secondary { + @include lions-button-outlined($lions-gray-600); + } + + &.ui-button-success { + @include lions-button-outlined($lions-success-500); + } + + &.ui-button-info { + @include lions-button-outlined($lions-info-500); + } + + &.ui-button-warning { + @include lions-button-outlined($lions-warning-500); + } + + &.ui-button-help { + @include lions-button-outlined($lions-gold-600); + } + + &.ui-button-danger { + @include lions-button-outlined($lions-danger-500); + } +} + +// ============================================ +// ๐Ÿ”— TEXT VARIANT +// ============================================ + +.ui-button.ui-button-text { + &.ui-button-primary, + &:not([class*="ui-button-"]) { + @include lions-button-text($lions-blue-500); + } + + &.ui-button-secondary { + @include lions-button-text($lions-gray-600); + } + + &.ui-button-success { + @include lions-button-text($lions-success-500); + } + + &.ui-button-info { + @include lions-button-text($lions-info-500); + } + + &.ui-button-warning { + @include lions-button-text($lions-warning-500); + } + + &.ui-button-help { + @include lions-button-text($lions-gold-600); + } + + &.ui-button-danger { + @include lions-button-text($lions-danger-500); + } +} + +// ============================================ +// ๐Ÿ”— LINK VARIANT (Text sans background hover) +// ============================================ + +.ui-button.ui-button-link { + background: transparent !important; + border: none !important; + box-shadow: none !important; + padding: 0 !important; + height: auto !important; + color: $lions-blue-500; + text-decoration: underline; + text-underline-offset: 2px; + + &:hover { + color: $lions-blue-700; + transform: none; + text-decoration: underline; + } + + &:active { + color: $lions-blue-800; + transform: none; + } + + &:focus-visible { + @include lions-focus-ring($lions-blue-500); + } + + // Severity variants for link + &.ui-button-secondary { + color: $lions-gray-700; + &:hover { color: $lions-gray-900; } + } + + &.ui-button-success { + color: $lions-success-500; + &:hover { color: $lions-success-700; } + } + + &.ui-button-danger { + color: $lions-danger-500; + &:hover { color: $lions-danger-700; } + } +} + +// ============================================ +// ๐Ÿ”ต ROUNDED VARIANT (Pill shape) +// ============================================ + +.ui-button.ui-button-rounded { + border-radius: $lions-radius-full !important; + padding-left: $lions-spacing-6 !important; + padding-right: $lions-spacing-6 !important; +} + +// ============================================ +// ๐Ÿ“ RAISED VARIANT (Elevated) +// ============================================ + +.ui-button.ui-button-raised { + @include lions-shadow('lg'); + + &:hover { + @include lions-shadow('xl'); + transform: translateY(-3px); + } + + &:active { + @include lions-shadow('md'); + transform: translateY(-1px); + } +} + +// ============================================ +// ๐Ÿ“ SIZE VARIANTS +// ============================================ + +.ui-button { + // Small buttons + &.ui-button-sm, + &[data-size="sm"] { + @include lions-button-size('sm'); + + .ui-button-icon-left { + margin-right: $lions-spacing-1; + } + + .ui-button-icon-right { + margin-left: $lions-spacing-1; + } + } + + // Large buttons + &.ui-button-lg, + &[data-size="lg"] { + @include lions-button-size('lg'); + + .ui-button-icon-left { + margin-right: $lions-spacing-3; + } + + .ui-button-icon-right { + margin-left: $lions-spacing-3; + } + } +} + +// ============================================ +// ๐Ÿ”„ LOADING STATE +// ============================================ + +.ui-button { + &.ui-state-loading, + &[aria-busy="true"] { + position: relative; + pointer-events: none; + color: transparent !important; + + &::after { + content: ''; + @include lions-spinner(1rem, $lions-white); + @include lions-absolute-center; + } + } + + // Loading state for outlined/text buttons + &.ui-button-outlined, + &.ui-button-text { + &.ui-state-loading, + &[aria-busy="true"] { + &::after { + border-top-color: currentColor; + border-color: rgba(currentColor, 0.25); + } + } + } +} + +// ============================================ +// โŒ DISABLED STATE +// ============================================ + +.ui-button { + &:disabled, + &.ui-state-disabled { + opacity: 0.5 !important; + cursor: not-allowed !important; + pointer-events: none !important; + transform: none !important; + box-shadow: none !important; + } +} + +// ============================================ +// ๐ŸŽ–๏ธ BADGE SUPPORT +// ============================================ + +.ui-button { + .ui-badge { + position: absolute; + top: -$lions-spacing-2; + right: -$lions-spacing-2; + min-width: $lions-spacing-5; + height: $lions-spacing-5; + line-height: $lions-spacing-5; + border-radius: $lions-radius-full; + background: $lions-danger-500; + color: $lions-white; + font-size: $lions-font-xs; + font-weight: $lions-font-bold; + padding: 0 $lions-spacing-1; + + &.ui-badge-success { + background: $lions-success-500; + } + + &.ui-badge-warning { + background: $lions-warning-500; + } + + &.ui-badge-info { + background: $lions-info-500; + } + } +} + +// ============================================ +// ๐ŸŽจ ICON-ONLY BUTTONS (Square) +// ============================================ + +.ui-button { + &.ui-button-icon-only { + width: $lions-button-height-base; + padding: 0 !important; + @include lions-flex-center; + + &.ui-button-sm, + &[data-size="sm"] { + width: $lions-button-height-sm; + } + + &.ui-button-lg, + &[data-size="lg"] { + width: $lions-button-height-lg; + } + + // Rounded icon-only buttons become circles + &.ui-button-rounded { + border-radius: $lions-radius-full !important; + } + } +} + +// ============================================ +// ๐ŸŽฏ BUTTON GROUP SUPPORT +// ============================================ + +.ui-buttonset { + display: inline-flex; + gap: 0; + + .ui-button { + border-radius: 0; + margin-left: -1px; + + &:first-child { + margin-left: 0; + border-top-left-radius: $lions-radius-base; + border-bottom-left-radius: $lions-radius-base; + } + + &:last-child { + border-top-right-radius: $lions-radius-base; + border-bottom-right-radius: $lions-radius-base; + } + + &:hover, + &:focus { + z-index: 1; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-button { + // Ensure focus ring is always visible + &:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode support + @media (prefers-contrast: high) { + border-width: 2px !important; + } + + // Reduced motion support + @media (prefers-reduced-motion: reduce) { + transition: none !important; + + &:hover { + transform: none !important; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +// Touch-friendly on mobile +@media (hover: none) and (pointer: coarse) { + .ui-button { + min-height: 44px; // iOS touch target minimum + + &.ui-button-sm { + min-height: 40px; + } + } +} + +// Smaller spacing on mobile +@include lions-responsive-custom($lions-breakpoint-md) { + .ui-buttonset { + gap: $lions-spacing-1; + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_card.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_card.scss new file mode 100644 index 0000000..a0b7794 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_card.scss @@ -0,0 +1,509 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Card & Panel Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Amรฉlioration visuelle complรจte des cartes et panneaux avec identitรฉ Lions.dev + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #9-10 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐ŸŽด CARD BASE STYLES +// ============================================ + +.card { + @include lions-card; + @include lions-transition(); + + // Card with border accent + &.card-border-top { + border-top: 4px solid $lions-blue-500; + } + + &.card-border-left { + border-left: 4px solid $lions-blue-500; + } + + // Severity colors for border + &.card-primary { + border-top-color: $lions-blue-500; + border-left-color: $lions-blue-500; + } + + &.card-success { + border-top-color: $lions-success-500; + border-left-color: $lions-success-500; + } + + &.card-info { + border-top-color: $lions-info-500; + border-left-color: $lions-info-500; + } + + &.card-warning { + border-top-color: $lions-warning-500; + border-left-color: $lions-warning-500; + } + + &.card-danger { + border-top-color: $lions-danger-500; + border-left-color: $lions-danger-500; + } + + &.card-help { + border-top-color: $lions-gold-500; + border-left-color: $lions-gold-500; + } + + // Hover effect + &.card-hover:hover { + @include lions-shadow('lg'); + transform: translateY(-2px); + cursor: pointer; + } + + // Clickable card + &.card-clickable { + cursor: pointer; + @include lions-transition(); + + &:hover { + @include lions-shadow('lg'); + transform: translateY(-2px); + } + + &:active { + transform: translateY(0); + } + } +} + +// ============================================ +// ๐Ÿ“‹ CARD HEADER +// ============================================ + +.card-header { + padding: $lions-spacing-4 $lions-spacing-6; + border-bottom: 1px solid $lions-gray-200; + background: $lions-gray-50; + @include lions-rounded('md'); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + h5, h6 { + margin: 0; + @include lions-font-weight('bold'); + color: $lions-text-primary; + } + + .card-title { + @include lions-font-size('lg'); + @include lions-font-weight('bold'); + color: $lions-text-primary; + margin: 0; + } + + .card-subtitle { + @include lions-font-size('sm'); + color: $lions-text-secondary; + margin: $lions-spacing-1 0 0 0; + } + + // Icon in header + .card-icon { + font-size: 1.5rem; + color: $lions-blue-500; + margin-right: $lions-spacing-3; + } + + // Actions in header (buttons, etc.) + .card-actions { + display: flex; + gap: $lions-spacing-2; + align-items: center; + } +} + +// ============================================ +// ๐Ÿ“„ CARD CONTENT +// ============================================ + +.card-content { + padding: $lions-spacing-6; + color: $lions-text-primary; + line-height: $lions-line-height-normal; + + p:last-child { + margin-bottom: 0; + } +} + +// Compact card content +.card-compact .card-content { + padding: $lions-spacing-4; +} + +// Large card content +.card-large .card-content { + padding: $lions-spacing-8; +} + +// ============================================ +// ๐Ÿฆถ CARD FOOTER +// ============================================ + +.card-footer { + padding: $lions-spacing-4 $lions-spacing-6; + border-top: 1px solid $lions-gray-200; + background: $lions-gray-50; + @include lions-rounded('md'); + border-top-left-radius: 0; + border-top-right-radius: 0; + + // Actions in footer + display: flex; + justify-content: space-between; + align-items: center; + gap: $lions-spacing-2; +} + +// ============================================ +// ๐Ÿ“ฆ PANEL STYLES (Collapsible Card) +// ============================================ + +.ui-panel { + @include lions-card; + @include lions-transition(); + + .ui-panel-titlebar { + background: $lions-gray-50; + border-bottom: 1px solid $lions-gray-200; + padding: $lions-spacing-4 $lions-spacing-6; + @include lions-rounded('md'); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + display: flex; + justify-content: space-between; + align-items: center; + + .ui-panel-title { + @include lions-font-size('lg'); + @include lions-font-weight('bold'); + color: $lions-text-primary; + margin: 0; + display: flex; + align-items: center; + gap: $lions-spacing-2; + + // Icon support + i { + font-size: 1.25rem; + color: $lions-blue-500; + } + } + + .ui-panel-titlebar-icon { + @include lions-button-base; + width: 2rem; + height: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-gray-600; + @include lions-transition(); + + &:hover { + background: $lions-gray-200; + color: $lions-blue-500; + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + } + + .ui-panel-content { + padding: $lions-spacing-6; + background: $lions-white; + @include lions-rounded('md'); + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + // Panel states + &.ui-panel-collapsed { + .ui-panel-content { + display: none; + } + + .ui-panel-titlebar { + @include lions-rounded('md'); + } + } +} + +// ============================================ +// ๐ŸŽจ PANEL SEVERITY VARIANTS +// ============================================ + +.ui-panel-primary { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.1) 0%, rgba($lions-blue-700, 0.05) 100%); + border-bottom-color: $lions-blue-200; + + .ui-panel-title i { + color: $lions-blue-500; + } + } +} + +.ui-panel-success { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-success-500, 0.1) 0%, rgba($lions-success-700, 0.05) 100%); + border-bottom-color: $lions-success-200; + + .ui-panel-title i { + color: $lions-success-500; + } + } +} + +.ui-panel-info { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-info-500, 0.1) 0%, rgba($lions-info-700, 0.05) 100%); + border-bottom-color: $lions-info-200; + + .ui-panel-title i { + color: $lions-info-500; + } + } +} + +.ui-panel-warning { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-warning-500, 0.1) 0%, rgba($lions-warning-700, 0.05) 100%); + border-bottom-color: $lions-warning-200; + + .ui-panel-title i { + color: $lions-warning-500; + } + } +} + +.ui-panel-danger { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-danger-500, 0.1) 0%, rgba($lions-danger-700, 0.05) 100%); + border-bottom-color: $lions-danger-200; + + .ui-panel-title i { + color: $lions-danger-500; + } + } +} + +.ui-panel-help { + .ui-panel-titlebar { + background: linear-gradient(135deg, rgba($lions-gold-500, 0.15) 0%, rgba($lions-gold-700, 0.08) 100%); + border-bottom-color: $lions-gold-200; + + .ui-panel-title i { + color: $lions-gold-600; + } + } +} + +// ============================================ +// ๐Ÿ“ CARD SIZES +// ============================================ + +.card-compact { + padding: $lions-spacing-4; + + .card-header { + padding: $lions-spacing-3 $lions-spacing-4; + } + + .card-content { + padding: $lions-spacing-4; + } + + .card-footer { + padding: $lions-spacing-3 $lions-spacing-4; + } +} + +.card-large { + padding: $lions-spacing-8; + + .card-header { + padding: $lions-spacing-6 $lions-spacing-8; + } + + .card-content { + padding: $lions-spacing-8; + } + + .card-footer { + padding: $lions-spacing-6 $lions-spacing-8; + } +} + +// ============================================ +// ๐ŸŽฏ SPECIAL CARD VARIANTS +// ============================================ + +// Outlined card (no fill) +.card-outlined { + background: transparent; + border: 2px solid $lions-gray-300; + box-shadow: none; + + &:hover { + border-color: $lions-blue-500; + @include lions-shadow('sm'); + } +} + +// Elevated card (more shadow) +.card-elevated { + @include lions-shadow('xl'); + + &:hover { + @include lions-shadow('2xl'); + } +} + +// Flat card (no shadow) +.card-flat { + box-shadow: none; + border: 1px solid $lions-gray-200; +} + +// Gradient card backgrounds +.card-gradient-blue { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.05) 0%, rgba($lions-blue-700, 0.02) 100%); +} + +.card-gradient-gold { + background: linear-gradient(135deg, rgba($lions-gold-500, 0.08) 0%, rgba($lions-gold-700, 0.03) 100%); +} + +.card-gradient-success { + background: linear-gradient(135deg, rgba($lions-success-500, 0.05) 0%, rgba($lions-success-700, 0.02) 100%); +} + +// ============================================ +// ๐Ÿ“Š CARD GRID / LIST +// ============================================ + +.card-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + gap: $lions-spacing-6; + + // Responsive + @media (max-width: $lions-breakpoint-md) { + grid-template-columns: 1fr; + gap: $lions-spacing-4; + } +} + +.card-list { + display: flex; + flex-direction: column; + gap: $lions-spacing-4; +} + +// ============================================ +// ๐Ÿ–ผ๏ธ CARD WITH IMAGE +// ============================================ + +.card-image { + width: 100%; + height: 200px; + object-fit: cover; + @include lions-rounded('md'); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.card-image-container { + position: relative; + overflow: hidden; + @include lions-rounded('md'); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + img { + width: 100%; + height: 200px; + object-fit: cover; + @include lions-transition(); + } + + &:hover img { + transform: scale(1.05); + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.card { + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + transition: none !important; + + &:hover { + transform: none !important; + } + } +} + +.ui-panel { + @media (prefers-reduced-motion: reduce) { + .ui-panel-content { + transition: none !important; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .card, + .ui-panel { + .card-content, + .ui-panel-content { + padding: $lions-spacing-4; + } + + .card-header, + .ui-panel-titlebar { + padding: $lions-spacing-3 $lions-spacing-4; + } + + .card-footer { + padding: $lions-spacing-3 $lions-spacing-4; + flex-direction: column; + align-items: stretch; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_chart.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_chart.scss new file mode 100644 index 0000000..1a99f50 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_chart.scss @@ -0,0 +1,662 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Chart Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Charts (visualisation de donnรฉes avec Chart.js) + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: MOYENNE #44 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ“Š CHART CONTAINER STYLES +// ============================================ + +.ui-chart { + position: relative; + display: block; + width: 100%; + @include lions-rounded('lg'); + background: $lions-white; + padding: $lions-spacing-5; + border: 1px solid $lions-gray-200; + @include lions-shadow('sm'); + + // Canvas element + canvas { + max-width: 100%; + height: auto !important; + } + + // Chart title + .ui-chart-title { + @include lions-font-size('lg'); + @include lions-font-weight('bold'); + color: $lions-text-primary; + margin-bottom: $lions-spacing-4; + text-align: center; + } + + // Chart subtitle + .ui-chart-subtitle { + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + color: $lions-gray-600; + margin-bottom: $lions-spacing-3; + text-align: center; + } + + // Loading state + &.ui-chart-loading { + position: relative; + min-height: 300px; + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba($lions-white, 0.9); + @include lions-flex-center; + z-index: 10; + } + + &::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 3rem; + height: 3rem; + border: 3px solid $lions-gray-200; + border-top-color: $lions-blue-500; + border-radius: 50%; + animation: lions-chart-spin 1s linear infinite; + z-index: 11; + } + } + + // Size variants + &.ui-chart-sm { + padding: $lions-spacing-3; + + canvas { + max-height: 200px; + } + } + + &.ui-chart-lg { + padding: $lions-spacing-6; + + canvas { + min-height: 400px; + } + } + + // Borderless variant + &.ui-chart-borderless { + border: none; + box-shadow: none; + padding: 0; + } +} + +// ============================================ +// ๐ŸŽจ LIONS.DEV COLOR PALETTE FOR CHARTS +// ============================================ + +// Palette de couleurs Lions.dev pour les datasets +$lions-chart-colors: ( + primary: $lions-blue-500, + secondary: $lions-gray-500, + success: $lions-success-500, + info: $lions-info-500, + warning: $lions-warning-500, + danger: $lions-danger-500, + gold: $lions-gold-500, + purple: #9333EA, + pink: #EC4899, + teal: #14B8A6, + indigo: #6366F1, + orange: #F97316 +); + +// Couleurs avec transparence pour les zones (area charts) +$lions-chart-colors-alpha: ( + primary: rgba($lions-blue-500, 0.2), + secondary: rgba($lions-gray-500, 0.2), + success: rgba($lions-success-500, 0.2), + info: rgba($lions-info-500, 0.2), + warning: rgba($lions-warning-500, 0.2), + danger: rgba($lions-danger-500, 0.2), + gold: rgba($lions-gold-500, 0.2), + purple: rgba(#9333EA, 0.2), + pink: rgba(#EC4899, 0.2), + teal: rgba(#14B8A6, 0.2), + indigo: rgba(#6366F1, 0.2), + orange: rgba(#F97316, 0.2) +); + +// ============================================ +// ๐Ÿท๏ธ CHART LEGEND STYLES +// ============================================ + +.chartjs-legend { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: $lions-spacing-3; + margin-top: $lions-spacing-4; + padding: $lions-spacing-3; + background: $lions-gray-50; + @include lions-rounded('md'); + + ul { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: $lions-spacing-3; + list-style: none; + margin: 0; + padding: 0; + } + + li { + display: flex; + align-items: center; + gap: $lions-spacing-2; + cursor: pointer; + @include lions-transition(); + + &:hover { + opacity: 0.8; + } + + &.hidden { + opacity: 0.4; + text-decoration: line-through; + } + + span { + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + color: $lions-text-primary; + } + + .legend-color { + width: 1rem; + height: 1rem; + @include lions-rounded('sm'); + border: 2px solid transparent; + @include lions-transition(); + + &:hover { + border-color: $lions-gray-400; + } + } + } +} + +// ============================================ +// ๐Ÿ’ฌ CHART TOOLTIP STYLES +// ============================================ + +.chartjs-tooltip { + position: absolute; + background: rgba($lions-gray-900, 0.95); + color: $lions-white; + @include lions-rounded('md'); + @include lions-shadow('lg'); + padding: $lions-spacing-3 $lions-spacing-4; + pointer-events: none; + z-index: 1000; + @include lions-transition(); + opacity: 0; + transform: translateY(10px); + + &.active { + opacity: 1; + transform: translateY(0); + } + + .tooltip-title { + @include lions-font-size('sm'); + @include lions-font-weight('bold'); + color: $lions-white; + margin-bottom: $lions-spacing-2; + padding-bottom: $lions-spacing-2; + border-bottom: 1px solid rgba($lions-white, 0.2); + } + + .tooltip-body { + @include lions-font-size('sm'); + color: $lions-white; + + .tooltip-item { + display: flex; + align-items: center; + gap: $lions-spacing-2; + margin-bottom: $lions-spacing-1; + + &:last-child { + margin-bottom: 0; + } + + .tooltip-color { + width: 0.75rem; + height: 0.75rem; + @include lions-rounded('sm'); + flex-shrink: 0; + } + + .tooltip-label { + @include lions-font-weight('medium'); + color: rgba($lions-white, 0.9); + } + + .tooltip-value { + @include lions-font-weight('bold'); + color: $lions-white; + margin-left: auto; + } + } + } +} + +// ============================================ +// ๐Ÿ“ˆ CHART TYPE SPECIFIC STYLES +// ============================================ + +// Line Chart +.ui-chart-line { + canvas { + min-height: 300px; + } +} + +// Bar Chart +.ui-chart-bar { + canvas { + min-height: 300px; + } +} + +// Pie/Doughnut Chart +.ui-chart-pie, +.ui-chart-doughnut { + canvas { + max-width: 400px; + margin: 0 auto; + } + + .chartjs-legend { + margin-top: $lions-spacing-5; + } +} + +// Radar Chart +.ui-chart-radar { + canvas { + max-width: 400px; + margin: 0 auto; + } +} + +// Polar Area Chart +.ui-chart-polararea { + canvas { + max-width: 400px; + margin: 0 auto; + } +} + +// ============================================ +// ๐Ÿ“Š CHART WRAPPER & GRID +// ============================================ + +.ui-chart-wrapper { + position: relative; + display: block; + width: 100%; + + // Chart header avec actions + .ui-chart-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: $lions-spacing-4; + padding-bottom: $lions-spacing-3; + border-bottom: 1px solid $lions-gray-200; + + .ui-chart-title { + @include lions-font-size('lg'); + @include lions-font-weight('bold'); + color: $lions-text-primary; + margin: 0; + } + + .ui-chart-actions { + display: flex; + gap: $lions-spacing-2; + + button { + @include lions-button-base; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-rounded('md'); + background: $lions-gray-100; + border: 1px solid $lions-gray-300; + color: $lions-gray-700; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-200; + border-color: $lions-gray-400; + } + + i { + font-size: 1rem; + } + } + } + } + + // Chart footer avec lรฉgende ou infos + .ui-chart-footer { + margin-top: $lions-spacing-4; + padding-top: $lions-spacing-3; + border-top: 1px solid $lions-gray-200; + @include lions-font-size('sm'); + color: $lions-gray-600; + text-align: center; + } +} + +// Chart Grid (multiple charts) +.ui-chart-grid { + display: grid; + gap: $lions-spacing-5; + + &.ui-chart-grid-2 { + grid-template-columns: repeat(2, 1fr); + } + + &.ui-chart-grid-3 { + grid-template-columns: repeat(3, 1fr); + } + + &.ui-chart-grid-4 { + grid-template-columns: repeat(4, 1fr); + } + + @media (max-width: $lions-breakpoint-lg) { + &.ui-chart-grid-3, + &.ui-chart-grid-4 { + grid-template-columns: repeat(2, 1fr); + } + } + + @media (max-width: $lions-breakpoint-md) { + &.ui-chart-grid-2, + &.ui-chart-grid-3, + &.ui-chart-grid-4 { + grid-template-columns: 1fr; + } + } +} + +// ============================================ +// ๐ŸŽฌ ANIMATIONS +// ============================================ + +@keyframes lions-chart-spin { + 0% { + transform: translate(-50%, -50%) rotate(0deg); + } + 100% { + transform: translate(-50%, -50%) rotate(360deg); + } +} + +@keyframes lions-chart-fade-in { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +.ui-chart { + animation: lions-chart-fade-in 0.4s ease-out; +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-chart { + padding: $lions-spacing-4; + + canvas { + min-height: 250px !important; + } + + &.ui-chart-sm canvas { + max-height: 180px; + } + + &.ui-chart-lg canvas { + min-height: 300px !important; + } + } + + .ui-chart-pie, + .ui-chart-doughnut, + .ui-chart-radar, + .ui-chart-polararea { + canvas { + max-width: 100% !important; + } + } + + .chartjs-legend { + padding: $lions-spacing-2; + + ul { + gap: $lions-spacing-2; + } + + li { + @include lions-font-size('xs'); + + .legend-color { + width: 0.875rem; + height: 0.875rem; + } + } + } + + .ui-chart-wrapper { + .ui-chart-header { + flex-direction: column; + align-items: flex-start; + gap: $lions-spacing-3; + + .ui-chart-actions { + width: 100%; + justify-content: flex-end; + } + } + } +} + +@media (max-width: $lions-breakpoint-sm) { + .ui-chart { + padding: $lions-spacing-3; + + canvas { + min-height: 200px !important; + } + } + + .chartjs-tooltip { + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-font-size('xs'); + + .tooltip-title { + @include lions-font-size('xs'); + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-chart { + // Focus visible for interactive elements + button:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + .chartjs-legend li { + border: 2px solid currentColor; + padding: $lions-spacing-1 $lions-spacing-2; + @include lions-rounded('md'); + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + animation: none !important; + + * { + transition: none !important; + animation: none !important; + } + } + + // Screen reader only text for data + .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; + } +} + +// ============================================ +// ๐ŸŽจ UTILITY CLASSES +// ============================================ + +// Chart with gradient background +.ui-chart-gradient { + background: linear-gradient(135deg, rgba($lions-blue-50, 0.5) 0%, rgba($lions-white, 1) 100%); +} + +// Chart with dark theme +.ui-chart-dark { + background: $lions-gray-900; + border-color: $lions-gray-700; + + .ui-chart-title, + .ui-chart-subtitle { + color: $lions-white; + } + + .ui-chart-header { + border-bottom-color: $lions-gray-700; + + .ui-chart-title { + color: $lions-white; + } + } + + .ui-chart-footer { + border-top-color: $lions-gray-700; + color: $lions-gray-400; + } + + .chartjs-legend { + background: rgba($lions-gray-800, 0.5); + + li span { + color: $lions-white; + } + } +} + +// Chart full height +.ui-chart-fullheight { + height: 100%; + + canvas { + height: 100% !important; + } +} + +// Chart with hover effect +.ui-chart-hoverable { + @include lions-transition(); + + &:hover { + @include lions-shadow('md'); + transform: translateY(-2px); + } +} + +// Chart export button +.ui-chart-export { + position: absolute; + top: $lions-spacing-3; + right: $lions-spacing-3; + + button { + @include lions-button-base; + width: 2rem; + height: 2rem; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('sm'); + color: $lions-gray-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-blue-50; + border-color: $lions-blue-300; + color: $lions-blue-600; + @include lions-shadow('md'); + } + + i { + font-size: 1rem; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_data.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_data.scss new file mode 100644 index 0000000..e57d9f9 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_data.scss @@ -0,0 +1,538 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Data Display Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles complets pour DataTable, DataView et composants de donnรฉes + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #16-17 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ“Š DATATABLE BASE STYLES +// ============================================ + +.ui-datatable { + @include lions-card; + overflow: hidden; + + // Table wrapper + .ui-datatable-tablewrapper { + overflow-x: auto; + } + + // Table element + table { + width: 100%; + border-collapse: collapse; + background: $lions-white; + @include lions-font-size('base'); + } + + // Header + .ui-datatable-thead { + background: linear-gradient(135deg, rgba($lions-blue-50, 0.5) 0%, rgba($lions-blue-100, 0.3) 100%); + border-bottom: 2px solid $lions-blue-500; + + th { + padding: $lions-spacing-4 $lions-spacing-5; + text-align: left; + @include lions-font-weight('bold'); + color: $lions-text-primary; + border-bottom: 1px solid $lions-gray-300; + white-space: nowrap; + @include lions-transition(); + + // Sortable column + &.ui-sortable-column { + cursor: pointer; + + &:hover { + background: rgba($lions-blue-100, 0.5); + color: $lions-blue-700; + } + + .ui-sortable-column-icon { + margin-left: $lions-spacing-2; + color: $lions-gray-500; + @include lions-transition(); + } + + &.ui-state-active { + background: rgba($lions-blue-200, 0.6); + color: $lions-blue-700; + + .ui-sortable-column-icon { + color: $lions-blue-600; + } + } + } + + // Filter inputs in header + .ui-column-filter { + width: 100%; + margin-top: $lions-spacing-2; + @include lions-input-base; + @include lions-input-size('sm'); + } + } + } + + // Body + .ui-datatable-data { + tr { + border-bottom: 1px solid $lions-gray-200; + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-50, 0.4); + } + + &.ui-state-highlight { + background: rgba($lions-blue-100, 0.6); + color: $lions-blue-900; + } + + // Striped rows + &:nth-child(even) { + background: rgba($lions-gray-50, 0.3); + + &:hover { + background: rgba($lions-blue-50, 0.5); + } + } + + td { + padding: $lions-spacing-4 $lions-spacing-5; + color: $lions-text-primary; + vertical-align: middle; + border-bottom: 1px solid $lions-gray-200; + + // Row editor controls + .ui-row-editor { + display: flex; + gap: $lions-spacing-2; + + .ui-icon { + cursor: pointer; + color: $lions-blue-500; + padding: $lions-spacing-1; + @include lions-rounded('sm'); + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-100, 0.8); + color: $lions-blue-700; + } + } + } + } + } + } + + // Empty message + .ui-datatable-empty-message { + td { + text-align: center; + padding: $lions-spacing-8 !important; + color: $lions-text-secondary; + @include lions-font-size('lg'); + } + } + + // Small size variant + &.ui-datatable-sm { + th, td { + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-font-size('sm'); + } + } + + // Large size variant + &.ui-datatable-lg { + th, td { + padding: $lions-spacing-5 $lions-spacing-6; + @include lions-font-size('lg'); + } + } + + // Gridlines variant + &.ui-datatable-gridlines { + td, th { + border: 1px solid $lions-gray-300; + } + } +} + +// ============================================ +// ๐Ÿ“„ DATATABLE PAGINATOR +// ============================================ + +.ui-paginator { + background: linear-gradient(135deg, rgba($lions-gray-50, 0.8) 0%, rgba($lions-gray-100, 0.5) 100%); + border-top: 1px solid $lions-gray-300; + padding: $lions-spacing-3 $lions-spacing-5; + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: $lions-spacing-3; + + // Current page report + .ui-paginator-current { + @include lions-font-size('sm'); + color: $lions-text-secondary; + margin-right: auto; + } + + // Page links container + .ui-paginator-pages { + display: flex; + gap: $lions-spacing-1; + } + + // Page link buttons + .ui-paginator-page, + .ui-paginator-first, + .ui-paginator-prev, + .ui-paginator-next, + .ui-paginator-last { + @include lions-button-base; + min-width: 2.5rem; + height: 2.5rem; + padding: 0; + @include lions-flex-center; + background: $lions-white; + border: 1px solid $lions-gray-300; + color: $lions-text-primary; + @include lions-transition(); + + &:hover:not(.ui-state-disabled):not(.ui-state-active) { + background: $lions-blue-50; + border-color: $lions-blue-500; + color: $lions-blue-700; + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-700; + color: $lions-white; + font-weight: $lions-font-bold; + } + + &.ui-state-disabled { + opacity: 0.5; + cursor: not-allowed; + } + } + + // Rows per page dropdown + .ui-paginator-rpp-options { + @include lions-input-base; + @include lions-input-size('sm'); + min-width: 80px; + } +} + +// ============================================ +// ๐Ÿ” DATATABLE SELECTION +// ============================================ + +.ui-datatable { + // Checkbox selection column + .ui-selection-column { + width: 3rem; + text-align: center; + + .ui-chkbox { + @include lions-flex-center; + } + } + + // Radio selection column + .ui-radiobutton-column { + width: 3rem; + text-align: center; + + .ui-radiobutton { + @include lions-flex-center; + } + } +} + +// ============================================ +// ๐Ÿ“‹ DATAVIEW BASE STYLES +// ============================================ + +.ui-dataview { + .ui-dataview-header { + background: linear-gradient(135deg, rgba($lions-blue-50, 0.5) 0%, rgba($lions-blue-100, 0.3) 100%); + border-bottom: 2px solid $lions-blue-500; + padding: $lions-spacing-4 $lions-spacing-5; + display: flex; + justify-content: space-between; + align-items: center; + + .ui-dataview-layout-options { + display: flex; + gap: $lions-spacing-1; + + .ui-button { + @include lions-button-base; + @include lions-button-size('sm'); + background: $lions-white; + border: 1px solid $lions-gray-300; + color: $lions-text-primary; + + &:hover { + background: $lions-blue-50; + border-color: $lions-blue-500; + color: $lions-blue-700; + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-700; + color: $lions-white; + } + } + } + } + + .ui-dataview-content { + padding: $lions-spacing-5; + background: $lions-white; + } + + // List layout + .ui-dataview-list { + .ui-dataview-row { + padding: $lions-spacing-4; + border-bottom: 1px solid $lions-gray-200; + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-50, 0.4); + } + + &:last-child { + border-bottom: none; + } + } + } + + // Grid layout + .ui-dataview-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); + gap: $lions-spacing-5; + + @media (max-width: $lions-breakpoint-md) { + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: $lions-spacing-4; + } + + @media (max-width: $lions-breakpoint-sm) { + grid-template-columns: 1fr; + } + } + + // Empty message + .ui-dataview-emptymessage { + text-align: center; + padding: $lions-spacing-8; + color: $lions-text-secondary; + @include lions-font-size('lg'); + } +} + +// ============================================ +// ๐Ÿ“Š SCROLLABLE DATATABLE +// ============================================ + +.ui-datatable-scrollable { + .ui-datatable-scrollable-header, + .ui-datatable-scrollable-footer { + background: linear-gradient(135deg, rgba($lions-blue-50, 0.5) 0%, rgba($lions-blue-100, 0.3) 100%); + border-bottom: 2px solid $lions-blue-500; + } + + .ui-datatable-scrollable-body { + overflow: auto; + + // Custom scrollbar + &::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + &::-webkit-scrollbar-track { + background: $lions-gray-100; + } + + &::-webkit-scrollbar-thumb { + background: $lions-gray-400; + @include lions-rounded('full'); + + &:hover { + background: $lions-blue-500; + } + } + } +} + +// ============================================ +// ๐Ÿ”„ RESIZABLE & REORDERABLE COLUMNS +// ============================================ + +.ui-datatable { + // Column resizer + .ui-column-resizer { + width: 2px; + background: $lions-blue-500; + cursor: col-resize; + position: absolute; + right: 0; + top: 0; + height: 100%; + opacity: 0; + @include lions-transition(); + + &:hover { + opacity: 1; + } + } + + th:hover .ui-column-resizer { + opacity: 0.5; + } + + // Reorderable column indicator + .ui-datatable-reorderablerow-handle { + cursor: move; + color: $lions-gray-500; + padding: 0 $lions-spacing-2; + + &:hover { + color: $lions-blue-500; + } + } +} + +// ============================================ +// ๐ŸŽฏ ROW EXPANSION +// ============================================ + +.ui-datatable { + .ui-row-toggler { + cursor: pointer; + color: $lions-blue-500; + @include lions-transition(); + + &:hover { + color: $lions-blue-700; + } + } + + .ui-expanded-row-content { + td { + background: rgba($lions-blue-50, 0.2); + border-left: 4px solid $lions-blue-500; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE DATATABLE +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-datatable { + th, td { + padding: $lions-spacing-3 $lions-spacing-4; + @include lions-font-size('sm'); + } + } + + .ui-paginator { + flex-direction: column; + align-items: stretch; + + .ui-paginator-current { + text-align: center; + margin: 0 0 $lions-spacing-2 0; + } + + .ui-paginator-pages { + justify-content: center; + } + } + + .ui-dataview-grid { + grid-template-columns: 1fr; + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-datatable, +.ui-dataview { + // Focus visible + th:focus-visible, + td:focus-visible, + .ui-paginator-page:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + th, td { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + tr, th, td, .ui-paginator-page { + transition: none !important; + } + } +} + +// ============================================ +// ๐ŸŽจ DATATABLE SEVERITY ROW STYLES +// ============================================ + +.ui-datatable-data { + tr { + &.row-success { + background: rgba($lions-success-50, 0.3); + border-left: 4px solid $lions-success-500; + } + + &.row-warning { + background: rgba($lions-warning-50, 0.3); + border-left: 4px solid $lions-warning-500; + } + + &.row-danger { + background: rgba($lions-danger-50, 0.3); + border-left: 4px solid $lions-danger-500; + } + + &.row-info { + background: rgba($lions-info-50, 0.3); + border-left: 4px solid $lions-info-500; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_display.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_display.scss new file mode 100644 index 0000000..1d1e217 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_display.scss @@ -0,0 +1,577 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Display Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Avatar, Badge, Tag et composants d'affichage + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: HAUTE #34-36 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ‘ค AVATAR STYLES +// ============================================ + +.ui-avatar { + display: inline-flex; + align-items: center; + justify-content: center; + overflow: hidden; + position: relative; + vertical-align: middle; + @include lions-transition(); + + // Base avatar (40px) + width: 2.5rem; + height: 2.5rem; + @include lions-rounded('full'); + @include lions-gradient-blue; + color: $lions-white; + @include lions-font-weight('semibold'); + @include lions-font-size('base'); + + // Avatar image + img { + width: 100%; + height: 100%; + object-fit: cover; + } + + // Avatar label/initials + .ui-avatar-text { + @include lions-font-weight('semibold'); + text-transform: uppercase; + user-select: none; + } + + // Avatar icon + .ui-avatar-icon { + font-size: 1.25rem; + } + + // Size variants + &.ui-avatar-xs { + width: 1.5rem; + height: 1.5rem; + @include lions-font-size('xs'); + + .ui-avatar-icon { + font-size: 0.75rem; + } + } + + &.ui-avatar-sm { + width: 2rem; + height: 2rem; + @include lions-font-size('sm'); + + .ui-avatar-icon { + font-size: 1rem; + } + } + + &.ui-avatar-lg { + width: 3rem; + height: 3rem; + @include lions-font-size('lg'); + + .ui-avatar-icon { + font-size: 1.5rem; + } + } + + &.ui-avatar-xl { + width: 4rem; + height: 4rem; + @include lions-font-size('xl'); + + .ui-avatar-icon { + font-size: 2rem; + } + } + + // Shape variants + &.ui-avatar-circle { + @include lions-rounded('full'); + } + + &.ui-avatar-square { + @include lions-rounded(0); + } + + &.ui-avatar-rounded { + @include lions-rounded('lg'); + } + + // Severity variants + &.ui-avatar-secondary { + background: $lions-gray-500; + } + + &.ui-avatar-success { + @include lions-gradient-success; + } + + &.ui-avatar-info { + @include lions-gradient-info; + } + + &.ui-avatar-warning { + @include lions-gradient-warning; + } + + &.ui-avatar-danger { + @include lions-gradient-danger; + } + + // Avatar group + &-group { + display: inline-flex; + + .ui-avatar { + margin-left: -0.5rem; + border: 2px solid $lions-white; + @include lions-shadow('sm'); + + &:first-child { + margin-left: 0; + } + + &:hover { + z-index: 10; + transform: scale(1.1); + } + } + } + + // Status indicator + &-status { + position: absolute; + bottom: 0; + right: 0; + width: 0.75rem; + height: 0.75rem; + @include lions-rounded('full'); + border: 2px solid $lions-white; + + &-online { + background: $lions-success-500; + } + + &-offline { + background: $lions-gray-400; + } + + &-busy { + background: $lions-danger-500; + } + + &-away { + background: $lions-warning-500; + } + } +} + +// ============================================ +// ๐Ÿท๏ธ BADGE STYLES +// ============================================ + +.ui-badge { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0.25rem 0.5rem; + @include lions-rounded('md'); + @include lions-font-size('xs'); + @include lions-font-weight('semibold'); + line-height: 1; + white-space: nowrap; + vertical-align: middle; + @include lions-transition(); + + // Default (primary) + background: $lions-blue-100; + color: $lions-blue-700; + + // Severity variants + &.ui-badge-secondary { + background: $lions-gray-100; + color: $lions-gray-700; + } + + &.ui-badge-success { + background: $lions-success-100; + color: $lions-success-700; + } + + &.ui-badge-info { + background: $lions-info-100; + color: $lions-info-700; + } + + &.ui-badge-warning { + background: $lions-warning-100; + color: $lions-warning-700; + } + + &.ui-badge-danger { + background: $lions-danger-100; + color: $lions-danger-700; + } + + // Size variants + &.ui-badge-sm { + padding: 0.125rem 0.375rem; + @include lions-font-size('2xs'); + } + + &.ui-badge-lg { + padding: 0.375rem 0.75rem; + @include lions-font-size('sm'); + } + + // Pill variant + &.ui-badge-pill { + @include lions-rounded('full'); + } + + // Dot variant + &.ui-badge-dot { + padding: 0; + width: 0.5rem; + height: 0.5rem; + @include lions-rounded('full'); + + &.ui-badge-sm { + width: 0.375rem; + height: 0.375rem; + } + + &.ui-badge-lg { + width: 0.625rem; + height: 0.625rem; + } + } + + // Outlined variant + &.ui-badge-outlined { + background: transparent; + border: 1px solid currentColor; + + &.ui-badge-primary { + color: $lions-blue-600; + border-color: $lions-blue-600; + } + + &.ui-badge-secondary { + color: $lions-gray-600; + border-color: $lions-gray-600; + } + + &.ui-badge-success { + color: $lions-success-600; + border-color: $lions-success-600; + } + + &.ui-badge-info { + color: $lions-info-600; + border-color: $lions-info-600; + } + + &.ui-badge-warning { + color: $lions-warning-600; + border-color: $lions-warning-600; + } + + &.ui-badge-danger { + color: $lions-danger-600; + border-color: $lions-danger-600; + } + } + + // Overlay badge (for icons, avatars) + &-overlay { + position: absolute; + top: -0.25rem; + right: -0.25rem; + min-width: 1.25rem; + height: 1.25rem; + padding: 0 0.375rem; + @include lions-rounded('full'); + @include lions-shadow('sm'); + } +} + +// Badge on button +.ui-button { + position: relative; + + .ui-badge-overlay { + top: -0.5rem; + right: -0.5rem; + } +} + +// ============================================ +// ๐Ÿ”– TAG STYLES +// ============================================ + +.ui-tag { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + padding: 0.375rem 0.75rem; + @include lions-rounded('md'); + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + line-height: 1.5; + vertical-align: middle; + @include lions-transition(); + + // Default (primary) + background: $lions-blue-100; + color: $lions-blue-700; + + // Tag icon + .ui-tag-icon { + font-size: 1rem; + line-height: 1; + + &.ui-tag-icon-left { + margin-right: -$lions-spacing-1; + } + + &.ui-tag-icon-right { + margin-left: -$lions-spacing-1; + } + } + + // Tag value + .ui-tag-value { + line-height: 1.5; + } + + // Close button + .ui-tag-close { + @include lions-button-base; + width: 1rem; + height: 1rem; + min-width: 1rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: currentColor; + opacity: 0.6; + cursor: pointer; + @include lions-rounded('full'); + @include lions-transition(); + + &:hover { + opacity: 1; + background: rgba($lions-black, 0.1); + } + + &:active { + transform: scale(0.9); + } + + .ui-icon { + font-size: 0.75rem; + } + } + + // Severity variants + &.ui-tag-secondary { + background: $lions-gray-100; + color: $lions-gray-700; + } + + &.ui-tag-success { + background: $lions-success-100; + color: $lions-success-700; + } + + &.ui-tag-info { + background: $lions-info-100; + color: $lions-info-700; + } + + &.ui-tag-warning { + background: $lions-warning-100; + color: $lions-warning-700; + } + + &.ui-tag-danger { + background: $lions-danger-100; + color: $lions-danger-700; + } + + // Size variants + &.ui-tag-sm { + padding: 0.25rem 0.5rem; + @include lions-font-size('xs'); + + .ui-tag-icon { + font-size: 0.875rem; + } + + .ui-tag-close { + width: 0.875rem; + height: 0.875rem; + + .ui-icon { + font-size: 0.625rem; + } + } + } + + &.ui-tag-lg { + padding: 0.5rem 1rem; + @include lions-font-size('base'); + + .ui-tag-icon { + font-size: 1.125rem; + } + + .ui-tag-close { + width: 1.125rem; + height: 1.125rem; + + .ui-icon { + font-size: 0.875rem; + } + } + } + + // Pill variant + &.ui-tag-pill { + @include lions-rounded('full'); + } + + // Outlined variant + &.ui-tag-outlined { + background: transparent; + border: 1px solid currentColor; + + &.ui-tag-primary { + color: $lions-blue-600; + border-color: $lions-blue-600; + } + + &.ui-tag-secondary { + color: $lions-gray-600; + border-color: $lions-gray-600; + } + + &.ui-tag-success { + color: $lions-success-600; + border-color: $lions-success-600; + } + + &.ui-tag-info { + color: $lions-info-600; + border-color: $lions-info-600; + } + + &.ui-tag-warning { + color: $lions-warning-600; + border-color: $lions-warning-600; + } + + &.ui-tag-danger { + color: $lions-danger-600; + border-color: $lions-danger-600; + } + + .ui-tag-close:hover { + background: rgba(currentColor, 0.1); + } + } +} + +// Tag group +.ui-tag-group { + display: inline-flex; + flex-wrap: wrap; + gap: $lions-spacing-2; + align-items: center; +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-avatar { + &.ui-avatar-xl { + width: 3rem; + height: 3rem; + @include lions-font-size('lg'); + } + } + + .ui-avatar-group { + .ui-avatar { + margin-left: -0.375rem; + } + } + + .ui-tag-group { + gap: $lions-spacing-1; + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-avatar, +.ui-badge, +.ui-tag { + // High contrast mode + @media (prefers-contrast: high) { + border: 2px solid currentColor !important; + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + transition: none !important; + animation: none !important; + } +} + +// ============================================ +// ๐ŸŽจ UTILITY CLASSES +// ============================================ + +// Avatar with border +.ui-avatar-bordered { + border: 2px solid $lions-white; + @include lions-shadow('md'); +} + +// Badge pulse animation +.ui-badge-pulse { + animation: lions-badge-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} + +@keyframes lions-badge-pulse { + 0%, 100% { + opacity: 1; + } + 50% { + opacity: 0.5; + } +} + +// Tag removable +.ui-tag-removable { + padding-right: $lions-spacing-2; +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_field.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_field.scss new file mode 100644 index 0000000..30714a6 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_field.scss @@ -0,0 +1,789 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Form Field Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Amรฉlioration visuelle complรจte des champs de formulaire avec identitรฉ Lions.dev + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #5-8 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐ŸŽฏ BASE FIELD STYLES +// ============================================ + +.field { + margin-bottom: $lions-spacing-6; + + &:last-child { + margin-bottom: 0; + } +} + +// ============================================ +// ๐Ÿท๏ธ LABEL STYLES +// ============================================ + +.ui-outputlabel, +label { + display: block; + margin-bottom: $lions-spacing-2; + @include lions-font-size('sm'); + @include lions-font-weight('semibold'); + color: $lions-text-primary; + + // Required indicator (red asterisk) + .p-error { + color: $lions-danger-500; + margin-left: 2px; + } +} + +// ============================================ +// ๐Ÿ“ INPUT TEXT BASE STYLES +// ============================================ + +.ui-inputtext, +.ui-inputfield { + @include lions-input-base; + @include lions-input-size('base'); + + // Override PrimeFaces defaults + font-family: $lions-font-family-primary !important; +} + +// ============================================ +// ๐Ÿ“ INPUT SIZES +// ============================================ + +// Small inputs +.ui-inputtext.ui-inputtext-sm, +.ui-inputfield.ui-inputfield-sm, +.field-sm .ui-inputtext, +.field-sm .ui-inputfield { + @include lions-input-size('sm'); +} + +// Large inputs +.ui-inputtext.ui-inputtext-lg, +.ui-inputfield.ui-inputfield-lg, +.field-lg .ui-inputtext, +.field-lg .ui-inputfield { + @include lions-input-size('lg'); +} + +// ============================================ +// โœ… INPUT STATES +// ============================================ + +// Success state (valid input) +.ui-inputtext.ui-state-valid, +.ui-inputfield.ui-state-valid { + @include lions-input-state-success; +} + +// Error state (invalid input) +.ui-inputtext.ui-state-error, +.ui-inputfield.ui-state-error, +.ui-inputtext.ui-state-invalid, +.ui-inputfield.ui-state-invalid { + @include lions-input-state-error; +} + +// ============================================ +// ๐Ÿ“ TEXTAREA STYLES +// ============================================ + +.ui-inputtextarea { + @include lions-input-base; + min-height: 80px; + padding: $lions-input-padding-y $lions-input-padding-x; + resize: vertical; + line-height: $lions-line-height-normal; + + // Size variants + &.ui-inputtextarea-sm { + @include lions-font-size('sm'); + padding: $lions-spacing-2 $lions-spacing-3; + } + + &.ui-inputtextarea-lg { + @include lions-font-size('lg'); + padding: $lions-spacing-4 $lions-spacing-5; + } + + // States + &.ui-state-error { + @include lions-input-state-error; + } + + &.ui-state-valid { + @include lions-input-state-success; + } +} + +// ============================================ +// ๐Ÿ”ฝ SELECT / DROPDOWN STYLES +// ============================================ + +.ui-selectonemenu { + width: 100%; + + .ui-selectonemenu-trigger { + @include lions-flex-center; + background: $lions-gray-50; + border-left: 1px solid $lions-gray-300; + width: $lions-button-height-base; + color: $lions-gray-600; + @include lions-transition(); + + &:hover { + background: $lions-gray-100; + color: $lions-blue-500; + } + } + + .ui-selectonemenu-label { + @include lions-input-base; + @include lions-input-size('base'); + border-radius: $lions-radius-base 0 0 $lions-radius-base !important; + } + + &.ui-state-focus { + .ui-selectonemenu-label { + outline: none; + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + .ui-selectonemenu-trigger { + border-color: $lions-blue-500; + } + } + + &.ui-state-error { + .ui-selectonemenu-label { + @include lions-input-state-error; + border-radius: $lions-radius-base 0 0 $lions-radius-base !important; + } + + .ui-selectonemenu-trigger { + border-color: $lions-danger-500; + } + } + + // Size variants + &.ui-selectonemenu-sm { + .ui-selectonemenu-label { + @include lions-input-size('sm'); + } + + .ui-selectonemenu-trigger { + width: $lions-button-height-sm; + } + } + + &.ui-selectonemenu-lg { + .ui-selectonemenu-label { + @include lions-input-size('lg'); + } + + .ui-selectonemenu-trigger { + width: $lions-button-height-lg; + } + } +} + +// Dropdown panel +.ui-selectonemenu-panel { + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('lg'); + background: $lions-white; + margin-top: $lions-spacing-1; + + .ui-selectonemenu-items { + padding: $lions-spacing-1 0; + + .ui-selectonemenu-item { + padding: $lions-spacing-3 $lions-spacing-4; + color: $lions-text-primary; + @include lions-transition(); + cursor: pointer; + + &:hover, + &.ui-state-highlight { + background: rgba($lions-blue-50, 0.8); + color: $lions-blue-700; + } + + &.ui-state-highlight { + @include lions-font-weight('semibold'); + } + } + } + + .ui-selectonemenu-filter-container { + padding: $lions-spacing-2; + border-bottom: 1px solid $lions-gray-200; + + .ui-selectonemenu-filter { + @include lions-input-base; + @include lions-input-size('sm'); + width: 100%; + } + } +} + +// ============================================ +// ๐Ÿ”’ PASSWORD INPUT STYLES +// ============================================ + +.ui-password { + width: 100%; + + .ui-inputtext { + width: 100%; + } + + // Password strength meter + .ui-password-panel { + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('md'); + padding: $lions-spacing-4; + margin-top: $lions-spacing-2; + + .ui-password-meter { + height: 8px; + background: $lions-gray-200; + @include lions-rounded('full'); + overflow: hidden; + margin-bottom: $lions-spacing-3; + + .ui-password-strength { + height: 100%; + @include lions-transition(width); + + &.weak { + width: 33%; + background: $lions-danger-500; + } + + &.medium { + width: 66%; + background: $lions-warning-500; + } + + &.strong { + width: 100%; + background: $lions-success-500; + } + } + } + + .ui-password-info { + @include lions-font-size('xs'); + color: $lions-text-secondary; + margin-top: $lions-spacing-2; + } + } +} + +// ============================================ +// ๐Ÿ“… CALENDAR / DATE PICKER STYLES +// ============================================ + +.ui-calendar { + .ui-inputtext { + width: 100%; + } + + .ui-datepicker-trigger { + @include lions-button-base; + @include lions-button-size('base'); + @include lions-button-solid($lions-blue-500, $lions-blue-700); + margin-left: $lions-spacing-2; + width: auto; + min-width: $lions-button-height-base; + } +} + +// ============================================ +// ๐Ÿ”ข NUMBER INPUT (InputNumber) +// ============================================ + +.ui-inputnumber { + .ui-inputtext { + width: 100%; + } + + .ui-inputnumber-button-group { + .ui-inputnumber-button { + @include lions-button-base; + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-text-primary; + width: 2rem; + height: 50%; + + &:hover { + background: $lions-gray-200; + color: $lions-blue-500; + } + + &:active { + background: $lions-gray-300; + } + } + } +} + +// ============================================ +// ๐Ÿ” AUTOCOMPLETE STYLES +// ============================================ + +.ui-autocomplete { + width: 100%; + + .ui-inputtext { + width: 100%; + } + + .ui-autocomplete-dropdown { + @include lions-button-base; + @include lions-button-size('base'); + @include lions-button-solid($lions-blue-500, $lions-blue-700); + margin-left: $lions-spacing-2; + width: auto; + min-width: $lions-button-height-base; + } + + .ui-autocomplete-multiple-container { + @include lions-input-base; + @include lions-input-size('base'); + display: flex; + flex-wrap: wrap; + gap: $lions-spacing-2; + min-height: $lions-input-height-base; + padding: $lions-spacing-2; + + .ui-autocomplete-token { + @include lions-rounded('md'); + background: $lions-blue-100; + color: $lions-blue-700; + padding: $lions-spacing-1 $lions-spacing-3; + display: flex; + align-items: center; + gap: $lions-spacing-2; + @include lions-font-size('sm'); + @include lions-transition(); + + &:hover { + background: $lions-blue-200; + } + + .ui-autocomplete-token-icon { + cursor: pointer; + color: $lions-blue-600; + + &:hover { + color: $lions-danger-500; + } + } + } + + .ui-autocomplete-input-token { + flex: 1; + min-width: 120px; + + input { + border: none; + outline: none; + background: transparent; + width: 100%; + @include lions-font-size('base'); + color: $lions-text-primary; + } + } + } +} + +// AutoComplete panel +.ui-autocomplete-panel { + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('lg'); + margin-top: $lions-spacing-1; + max-height: 300px; + overflow-y: auto; + + .ui-autocomplete-items { + padding: $lions-spacing-1 0; + list-style: none; + margin: 0; + + .ui-autocomplete-item { + padding: $lions-spacing-3 $lions-spacing-4; + cursor: pointer; + @include lions-transition(); + @include lions-font-size('base'); + color: $lions-text-primary; + + &:hover, + &.ui-state-highlight { + background: rgba($lions-blue-50, 0.8); + color: $lions-blue-700; + } + + &:active { + background: rgba($lions-blue-100, 0.8); + } + } + + .ui-autocomplete-group { + padding: $lions-spacing-2 $lions-spacing-4; + @include lions-font-size('sm'); + @include lions-font-weight('bold'); + color: $lions-text-secondary; + background: $lions-gray-50; + border-bottom: 1px solid $lions-gray-200; + } + } + + .ui-autocomplete-empty-message { + padding: $lions-spacing-4; + @include lions-font-size('sm'); + color: $lions-text-secondary; + text-align: center; + } +} + +// ============================================ +// ๐Ÿ“‹ MULTISELECT STYLES +// ============================================ + +.ui-multiselect { + width: 100%; + + .ui-multiselect-label-container { + .ui-multiselect-label { + @include lions-input-base; + @include lions-input-size('base'); + border-radius: $lions-radius-base 0 0 $lions-radius-base !important; + } + } + + .ui-multiselect-trigger { + @include lions-flex-center; + background: $lions-gray-50; + border-left: 1px solid $lions-gray-300; + width: $lions-button-height-base; + color: $lions-gray-600; + + &:hover { + background: $lions-gray-100; + color: $lions-blue-500; + } + } + + &.ui-state-focus { + .ui-multiselect-label { + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + } +} + +.ui-multiselect-panel { + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('lg'); + + .ui-multiselect-header { + background: $lions-gray-50; + padding: $lions-spacing-3 $lions-spacing-4; + border-bottom: 1px solid $lions-gray-200; + + .ui-chkbox { + margin-right: $lions-spacing-2; + } + } + + .ui-multiselect-items { + padding: $lions-spacing-1 0; + + .ui-multiselect-item { + padding: $lions-spacing-3 $lions-spacing-4; + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-50, 0.8); + } + + .ui-chkbox { + margin-right: $lions-spacing-2; + } + } + } +} + +// ============================================ +// โ˜‘๏ธ CHECKBOX & RADIO STYLES +// ============================================ + +.ui-chkbox, +.ui-radiobutton { + .ui-chkbox-box, + .ui-radiobutton-box { + width: 20px; + height: 20px; + border: 2px solid $lions-gray-400; + background: $lions-white; + @include lions-transition(); + @include lions-flex-center; + + .ui-chkbox-icon, + .ui-radiobutton-icon { + color: $lions-white; + font-size: 12px; + } + + &:hover { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.5); + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-700; + + .ui-chkbox-icon, + .ui-radiobutton-icon { + color: $lions-white; + } + } + + &.ui-state-focus { + @include lions-focus-ring($lions-blue-500); + } + } + + // Checkbox specific + .ui-chkbox-box { + @include lions-rounded('sm'); + } + + // Radio specific + .ui-radiobutton-box { + border-radius: $lions-radius-full; + + &.ui-state-active { + .ui-radiobutton-icon { + width: 8px; + height: 8px; + background: $lions-white; + border-radius: $lions-radius-full; + } + } + } +} + +// ============================================ +// ๐Ÿ”˜ SWITCH / TOGGLE STYLES +// ============================================ + +.ui-inputswitch { + width: 48px; + height: 24px; + background: $lions-gray-300; + @include lions-rounded('full'); + @include lions-transition(); + cursor: pointer; + + .ui-inputswitch-slider { + width: 20px; + height: 20px; + background: $lions-white; + @include lions-rounded('full'); + @include lions-shadow('sm'); + @include lions-transition(); + position: absolute; + top: 2px; + left: 2px; + } + + &.ui-inputswitch-checked { + @include lions-gradient-blue; + + .ui-inputswitch-slider { + left: 26px; + } + } + + &:hover { + background: $lions-gray-400; + } + + &.ui-inputswitch-checked:hover { + background: linear-gradient(135deg, $lions-blue-600 0%, $lions-blue-800 100%); + } + + &.ui-inputswitch-focus { + @include lions-focus-ring($lions-blue-500); + } +} + +// ============================================ +// ๐Ÿ“„ FILE UPLOAD STYLES +// ============================================ + +.ui-fileupload { + border: 2px dashed $lions-gray-300; + @include lions-rounded('md'); + background: $lions-gray-50; + padding: $lions-spacing-6; + @include lions-transition(); + + &:hover { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.3); + } + + .ui-fileupload-buttonbar { + background: transparent; + border: none; + padding: $lions-spacing-4; + + .ui-button { + @include lions-button-solid($lions-blue-500, $lions-blue-700); + } + } + + .ui-fileupload-content { + background: $lions-white; + border: 1px solid $lions-gray-200; + @include lions-rounded('md'); + padding: $lions-spacing-4; + } +} + +// ============================================ +// ๐Ÿ’ฌ VALIDATION MESSAGES +// ============================================ + +.ui-message, +.ui-messages { + @include lions-rounded('md'); + padding: $lions-spacing-3 $lions-spacing-4; + @include lions-font-size('sm'); + margin-top: $lions-spacing-2; + display: flex; + align-items: center; + gap: $lions-spacing-2; + + &.ui-message-error, + &.ui-messages-error { + background: rgba($lions-danger-50, 0.8); + border-left: 4px solid $lions-danger-500; + color: $lions-danger-700; + + .ui-message-icon, + .ui-messages-icon { + color: $lions-danger-500; + } + } + + &.ui-message-warn, + &.ui-messages-warn { + background: rgba($lions-warning-50, 0.8); + border-left: 4px solid $lions-warning-500; + color: $lions-warning-700; + + .ui-message-icon, + .ui-messages-icon { + color: $lions-warning-500; + } + } + + &.ui-message-info, + &.ui-messages-info { + background: rgba($lions-info-50, 0.8); + border-left: 4px solid $lions-info-500; + color: $lions-info-700; + + .ui-message-icon, + .ui-messages-icon { + color: $lions-info-500; + } + } + + &.ui-message-success, + &.ui-messages-success { + background: rgba($lions-success-50, 0.8); + border-left: 4px solid $lions-success-500; + color: $lions-success-700; + + .ui-message-icon, + .ui-messages-icon { + color: $lions-success-500; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +// Focus visible for all inputs +.ui-inputtext, +.ui-inputfield, +.ui-inputtextarea, +.ui-selectonemenu, +.ui-multiselect, +.ui-chkbox-box, +.ui-radiobutton-box { + &:focus-visible { + @include lions-focus-ring(); + } +} + +// High contrast mode +@media (prefers-contrast: high) { + .ui-inputtext, + .ui-inputfield, + .ui-inputtextarea { + border-width: 2px !important; + } +} + +// Reduced motion +@media (prefers-reduced-motion: reduce) { + .ui-inputtext, + .ui-inputfield, + .ui-inputtextarea, + .ui-selectonemenu, + .ui-multiselect { + transition: none !important; + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +// Touch-friendly on mobile +@media (hover: none) and (pointer: coarse) { + .ui-inputtext, + .ui-inputfield { + min-height: 44px; // iOS touch target minimum + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-advanced.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-advanced.scss new file mode 100644 index 0000000..e494820 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-advanced.scss @@ -0,0 +1,890 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Advanced Form Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour composants de formulaire avancรฉs + * Spinner, Mask, Chips, ColorPicker, Editor, FileUpload + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: BASSE #40-44 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ”ข SPINNER STYLES +// ============================================ + +.ui-spinner { + display: inline-flex; + position: relative; + width: 100%; + + .ui-spinner-input { + width: 100%; + height: $lions-input-height-base; + padding: $lions-spacing-3 $lions-spacing-4; + padding-right: 2.5rem; + @include lions-rounded('md'); + border: 1px solid $lions-gray-300; + @include lions-font-size('base'); + color: $lions-text-primary; + background: $lions-white; + @include lions-transition(); + + &:hover { + border-color: $lions-gray-400; + } + + &:focus { + outline: none; + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + &:disabled { + background: $lions-gray-100; + cursor: not-allowed; + opacity: 0.6; + } + } + + .ui-spinner-button-group { + position: absolute; + right: 0; + top: 0; + height: 100%; + display: flex; + flex-direction: column; + } + + .ui-spinner-button { + @include lions-button-base; + width: 2rem; + height: 50%; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: $lions-gray-100; + border: 1px solid $lions-gray-300; + border-left: none; + color: $lions-gray-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-200; + color: $lions-blue-600; + } + + &:active { + background: $lions-gray-300; + } + + &.ui-spinner-up { + border-top-right-radius: $lions-rounded-md; + border-bottom: none; + } + + &.ui-spinner-down { + border-bottom-right-radius: $lions-rounded-md; + } + + .ui-icon { + font-size: 0.75rem; + } + } + + // Size variants + &.ui-spinner-sm { + .ui-spinner-input { + height: $lions-input-height-sm; + padding: $lions-spacing-2 $lions-spacing-3; + padding-right: 2rem; + @include lions-font-size('sm'); + } + + .ui-spinner-button { + width: 1.75rem; + min-width: 1.75rem; + } + } + + &.ui-spinner-lg { + .ui-spinner-input { + height: $lions-input-height-lg; + padding: $lions-spacing-4 $lions-spacing-5; + padding-right: 3rem; + @include lions-font-size('lg'); + } + + .ui-spinner-button { + width: 2.5rem; + min-width: 2.5rem; + + .ui-icon { + font-size: 1rem; + } + } + } +} + +// ============================================ +// ๐ŸŽญ INPUT MASK STYLES +// ============================================ + +.ui-inputmask { + width: 100%; + height: $lions-input-height-base; + padding: $lions-spacing-3 $lions-spacing-4; + @include lions-rounded('md'); + border: 1px solid $lions-gray-300; + @include lions-font-size('base'); + color: $lions-text-primary; + background: $lions-white; + @include lions-transition(); + font-family: $lions-font-family-mono; + + &::placeholder { + color: $lions-gray-400; + font-family: $lions-font-family-primary; + } + + &:hover { + border-color: $lions-gray-400; + } + + &:focus { + outline: none; + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + &:disabled { + background: $lions-gray-100; + cursor: not-allowed; + opacity: 0.6; + } + + // Size variants + &.ui-inputmask-sm { + height: $lions-input-height-sm; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-font-size('sm'); + } + + &.ui-inputmask-lg { + height: $lions-input-height-lg; + padding: $lions-spacing-4 $lions-spacing-5; + @include lions-font-size('lg'); + } +} + +// ============================================ +// ๐Ÿท๏ธ CHIPS STYLES +// ============================================ + +.ui-chips { + display: block; + width: 100%; + + .ui-chips-container { + display: flex; + flex-wrap: wrap; + gap: $lions-spacing-2; + padding: $lions-spacing-2; + @include lions-rounded('md'); + border: 1px solid $lions-gray-300; + background: $lions-white; + min-height: $lions-input-height-base; + @include lions-transition(); + + &:hover { + border-color: $lions-gray-400; + } + + &.ui-state-focus { + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + &.ui-state-disabled { + background: $lions-gray-100; + cursor: not-allowed; + opacity: 0.6; + } + } + + .ui-chips-token { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-rounded('md'); + background: $lions-blue-100; + color: $lions-blue-700; + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + @include lions-transition(); + + &:hover { + background: $lions-blue-200; + } + } + + .ui-chips-token-icon { + @include lions-button-base; + width: 1rem; + height: 1rem; + min-width: 1rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-blue-600; + cursor: pointer; + @include lions-rounded('full'); + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-700, 0.2); + color: $lions-blue-800; + } + + .ui-icon { + font-size: 0.75rem; + } + } + + .ui-chips-input-token { + flex: 1; + min-width: 120px; + + input { + width: 100%; + border: none; + outline: none; + background: transparent; + padding: $lions-spacing-2; + @include lions-font-size('base'); + color: $lions-text-primary; + + &::placeholder { + color: $lions-gray-400; + } + } + } + + // Severity variants + &.ui-chips-success .ui-chips-token { + background: $lions-success-100; + color: $lions-success-700; + + .ui-chips-token-icon { + color: $lions-success-600; + } + } + + &.ui-chips-warning .ui-chips-token { + background: $lions-warning-100; + color: $lions-warning-700; + + .ui-chips-token-icon { + color: $lions-warning-600; + } + } + + &.ui-chips-danger .ui-chips-token { + background: $lions-danger-100; + color: $lions-danger-700; + + .ui-chips-token-icon { + color: $lions-danger-600; + } + } +} + +// ============================================ +// ๐ŸŽจ COLOR PICKER STYLES +// ============================================ + +.ui-colorpicker { + display: inline-flex; + position: relative; + + .ui-colorpicker-preview { + width: 2.5rem; + height: 2.5rem; + @include lions-rounded('md'); + border: 2px solid $lions-gray-300; + cursor: pointer; + @include lions-shadow('sm'); + @include lions-transition(); + position: relative; + overflow: hidden; + + &:hover { + border-color: $lions-blue-400; + transform: scale(1.05); + } + + &:active { + transform: scale(0.98); + } + + .ui-colorpicker-color { + width: 100%; + height: 100%; + } + } + + .ui-colorpicker-panel { + position: absolute; + top: 100%; + left: 0; + margin-top: $lions-spacing-2; + @include lions-rounded('lg'); + @include lions-shadow('xl'); + background: $lions-white; + border: 1px solid $lions-gray-200; + padding: $lions-spacing-4; + z-index: 1000; + + .ui-colorpicker-content { + display: flex; + flex-direction: column; + gap: $lions-spacing-3; + } + + .ui-colorpicker-hue { + width: 100%; + height: 1rem; + @include lions-rounded('md'); + cursor: crosshair; + } + + .ui-colorpicker-color-selector { + width: 200px; + height: 150px; + @include lions-rounded('md'); + cursor: crosshair; + position: relative; + background: linear-gradient(to right, #fff, transparent), + linear-gradient(to top, #000, transparent); + } + + .ui-colorpicker-color-handle { + position: absolute; + width: 12px; + height: 12px; + @include lions-rounded('full'); + border: 2px solid $lions-white; + @include lions-shadow('md'); + transform: translate(-50%, -50%); + pointer-events: none; + } + } + + // Inline variant + &.ui-colorpicker-inline { + .ui-colorpicker-panel { + position: static; + margin-top: 0; + display: block; + } + } + + // Size variants + &.ui-colorpicker-sm .ui-colorpicker-preview { + width: 2rem; + height: 2rem; + } + + &.ui-colorpicker-lg .ui-colorpicker-preview { + width: 3rem; + height: 3rem; + } +} + +// ============================================ +// ๐Ÿ“ RICH TEXT EDITOR STYLES +// ============================================ + +.ui-editor { + display: block; + width: 100%; + @include lions-rounded('lg'); + border: 1px solid $lions-gray-300; + background: $lions-white; + @include lions-shadow('sm'); + overflow: hidden; + + .ui-editor-toolbar { + display: flex; + flex-wrap: wrap; + gap: $lions-spacing-1; + padding: $lions-spacing-3; + background: $lions-gray-50; + border-bottom: 1px solid $lions-gray-200; + } + + .ui-editor-toolbar-group { + display: flex; + gap: $lions-spacing-1; + padding-right: $lions-spacing-2; + border-right: 1px solid $lions-gray-300; + + &:last-child { + border-right: none; + padding-right: 0; + } + } + + .ui-editor-toolbar-button { + @include lions-button-base; + width: 2rem; + height: 2rem; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: 1px solid transparent; + @include lions-rounded('md'); + color: $lions-gray-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-white; + border-color: $lions-gray-300; + color: $lions-blue-600; + } + + &:active, + &.ui-state-active { + background: $lions-blue-100; + border-color: $lions-blue-300; + color: $lions-blue-700; + } + + .ui-icon { + font-size: 1rem; + } + } + + .ui-editor-content { + min-height: 200px; + max-height: 500px; + overflow-y: auto; + padding: $lions-spacing-4; + @include lions-font-size('base'); + line-height: 1.6; + color: $lions-text-primary; + + &:focus { + outline: none; + } + + // Typography inside editor + h1, h2, h3, h4, h5, h6 { + margin-top: $lions-spacing-4; + margin-bottom: $lions-spacing-3; + @include lions-font-weight('bold'); + color: $lions-text-primary; + } + + h1 { @include lions-font-size('3xl'); } + h2 { @include lions-font-size('2xl'); } + h3 { @include lions-font-size('xl'); } + h4 { @include lions-font-size('lg'); } + h5 { @include lions-font-size('base'); } + h6 { @include lions-font-size('sm'); } + + p { + margin-bottom: $lions-spacing-3; + } + + a { + color: $lions-blue-600; + text-decoration: underline; + + &:hover { + color: $lions-blue-700; + } + } + + ul, ol { + margin-left: $lions-spacing-6; + margin-bottom: $lions-spacing-3; + } + + li { + margin-bottom: $lions-spacing-1; + } + + blockquote { + border-left: 4px solid $lions-blue-500; + padding-left: $lions-spacing-4; + margin-left: 0; + margin-bottom: $lions-spacing-3; + color: $lions-gray-600; + font-style: italic; + } + + pre { + background: $lions-gray-100; + @include lions-rounded('md'); + padding: $lions-spacing-4; + margin-bottom: $lions-spacing-3; + overflow-x: auto; + font-family: $lions-font-family-mono; + @include lions-font-size('sm'); + } + + code { + background: $lions-gray-100; + padding: $lions-spacing-1 $lions-spacing-2; + @include lions-rounded('sm'); + font-family: $lions-font-family-mono; + @include lions-font-size('sm'); + color: $lions-danger-600; + } + + img { + max-width: 100%; + height: auto; + @include lions-rounded('md'); + margin: $lions-spacing-3 0; + } + + table { + width: 100%; + border-collapse: collapse; + margin-bottom: $lions-spacing-3; + + th, td { + border: 1px solid $lions-gray-300; + padding: $lions-spacing-3; + text-align: left; + } + + th { + background: $lions-gray-100; + @include lions-font-weight('semibold'); + } + } + } + + // Focused state + &.ui-state-focus { + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + // Disabled state + &.ui-state-disabled { + opacity: 0.6; + cursor: not-allowed; + + .ui-editor-toolbar, + .ui-editor-content { + pointer-events: none; + } + } + + // Size variants + &.ui-editor-sm { + .ui-editor-toolbar { + padding: $lions-spacing-2; + } + + .ui-editor-toolbar-button { + width: 1.75rem; + height: 1.75rem; + min-width: 1.75rem; + + .ui-icon { + font-size: 0.875rem; + } + } + + .ui-editor-content { + min-height: 150px; + padding: $lions-spacing-3; + @include lions-font-size('sm'); + } + } + + &.ui-editor-lg { + .ui-editor-toolbar { + padding: $lions-spacing-4; + } + + .ui-editor-toolbar-button { + width: 2.5rem; + height: 2.5rem; + min-width: 2.5rem; + + .ui-icon { + font-size: 1.125rem; + } + } + + .ui-editor-content { + min-height: 300px; + padding: $lions-spacing-5; + @include lions-font-size('lg'); + } + } +} + +// ============================================ +// ๐Ÿ“‚ FILE UPLOAD STYLES +// ============================================ + +.ui-fileupload { + display: block; + width: 100%; + @include lions-rounded('lg'); + border: 1px solid $lions-gray-300; + background: $lions-white; + overflow: hidden; + + .ui-fileupload-buttonbar { + display: flex; + gap: $lions-spacing-3; + padding: $lions-spacing-4; + background: $lions-gray-50; + border-bottom: 1px solid $lions-gray-200; + } + + .ui-fileupload-choose { + @include lions-button-primary; + } + + .ui-fileupload-upload, + .ui-fileupload-cancel { + @include lions-button-base; + padding: $lions-spacing-3 $lions-spacing-5; + @include lions-rounded('md'); + @include lions-font-weight('semibold'); + @include lions-transition(); + } + + .ui-fileupload-upload { + background: $lions-success-500; + color: $lions-white; + + &:hover { + background: $lions-success-600; + } + } + + .ui-fileupload-cancel { + background: $lions-gray-200; + color: $lions-gray-700; + + &:hover { + background: $lions-gray-300; + } + } + + .ui-fileupload-content { + padding: $lions-spacing-4; + } + + .ui-fileupload-files { + display: flex; + flex-direction: column; + gap: $lions-spacing-3; + } + + .ui-fileupload-row { + display: flex; + align-items: center; + gap: $lions-spacing-3; + padding: $lions-spacing-3; + @include lions-rounded('md'); + background: $lions-gray-50; + border: 1px solid $lions-gray-200; + @include lions-transition(); + + &:hover { + background: $lions-gray-100; + } + } + + .ui-fileupload-filename { + flex: 1; + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + color: $lions-text-primary; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .ui-fileupload-size { + @include lions-font-size('xs'); + color: $lions-gray-600; + } + + .ui-fileupload-remove { + @include lions-button-base; + width: 2rem; + height: 2rem; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + color: $lions-danger-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-danger-50; + border-color: $lions-danger-300; + } + + .ui-icon { + font-size: 1rem; + } + } + + // Drag & Drop zone + &.ui-fileupload-advanced { + .ui-fileupload-content { + position: relative; + min-height: 200px; + display: flex; + align-items: center; + justify-content: center; + border: 2px dashed $lions-gray-300; + @include lions-rounded('lg'); + margin: $lions-spacing-4; + @include lions-transition(); + + &.ui-fileupload-highlight { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.5); + } + } + + .ui-fileupload-empty { + text-align: center; + padding: $lions-spacing-6; + + .ui-fileupload-drag-icon { + font-size: 3rem; + color: $lions-gray-400; + margin-bottom: $lions-spacing-3; + } + + .ui-fileupload-drag-text { + @include lions-font-size('base'); + color: $lions-gray-600; + margin-bottom: $lions-spacing-2; + } + + .ui-fileupload-drag-hint { + @include lions-font-size('sm'); + color: $lions-gray-500; + } + } + } + + // Progress bar + .ui-fileupload-progress { + height: 0.5rem; + @include lions-rounded('full'); + background: $lions-gray-200; + overflow: hidden; + margin-top: $lions-spacing-2; + + .ui-fileupload-progress-bar { + height: 100%; + @include lions-gradient-blue; + @include lions-transition(); + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-editor { + .ui-editor-toolbar { + padding: $lions-spacing-2; + } + + .ui-editor-toolbar-button { + width: 1.75rem; + height: 1.75rem; + min-width: 1.75rem; + } + + .ui-editor-content { + min-height: 150px; + } + } + + .ui-fileupload { + .ui-fileupload-buttonbar { + flex-wrap: wrap; + } + + &.ui-fileupload-advanced .ui-fileupload-content { + min-height: 150px; + } + } + + .ui-colorpicker-panel { + .ui-colorpicker-color-selector { + width: 150px; + height: 120px; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-spinner, +.ui-inputmask, +.ui-chips, +.ui-colorpicker, +.ui-editor, +.ui-fileupload { + // Focus visible + &:focus-visible, + .ui-state-focus { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + button, + .ui-button { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-controls.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-controls.scss new file mode 100644 index 0000000..81c0a18 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_form-controls.scss @@ -0,0 +1,980 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Form Controls Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Checkbox, Radio, Switch, Toggle, Slider, Rating + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #28-33 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// โ˜‘๏ธ CHECKBOX STYLES +// ============================================ + +.ui-chkbox { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + cursor: pointer; + @include lions-transition(); + + .ui-chkbox-box { + width: 1.25rem; + height: 1.25rem; + @include lions-rounded('md'); + border: 2px solid $lions-gray-400; + background: $lions-white; + @include lions-flex-center; + @include lions-transition(); + flex-shrink: 0; + + .ui-chkbox-icon { + font-size: 0.875rem; + color: $lions-white; + opacity: 0; + transform: scale(0.5); + @include lions-transition(); + } + + &:hover { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.3); + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-600; + box-shadow: 0 2px 4px rgba($lions-blue-500, 0.2); + + .ui-chkbox-icon { + opacity: 1; + transform: scale(1); + } + } + + &.ui-state-disabled { + background: $lions-gray-100; + border-color: $lions-gray-300; + cursor: not-allowed; + opacity: 0.6; + } + } + + .ui-chkbox-label { + cursor: pointer; + color: $lions-text-primary; + @include lions-font-size('base'); + @include lions-font-weight('medium'); + user-select: none; + @include lions-transition(); + + &:hover { + color: $lions-blue-700; + } + } + + // Size variants + &.ui-chkbox-sm { + .ui-chkbox-box { + width: 1rem; + height: 1rem; + + .ui-chkbox-icon { + font-size: 0.75rem; + } + } + + .ui-chkbox-label { + @include lions-font-size('sm'); + } + } + + &.ui-chkbox-lg { + .ui-chkbox-box { + width: 1.5rem; + height: 1.5rem; + + .ui-chkbox-icon { + font-size: 1rem; + } + } + + .ui-chkbox-label { + @include lions-font-size('lg'); + } + } + + // State error + &.ui-state-error { + .ui-chkbox-box { + border-color: $lions-danger-500; + + &.ui-state-active { + @include lions-gradient-danger; + } + } + + .ui-chkbox-label { + color: $lions-danger-700; + } + } + + // State disabled + &.ui-state-disabled { + cursor: not-allowed; + opacity: 0.6; + + .ui-chkbox-label { + cursor: not-allowed; + color: $lions-gray-500; + } + } +} + +// ============================================ +// ๐Ÿ”˜ RADIO BUTTON STYLES +// ============================================ + +.ui-radiobutton { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + cursor: pointer; + @include lions-transition(); + + .ui-radiobutton-box { + width: 1.25rem; + height: 1.25rem; + @include lions-rounded('full'); + border: 2px solid $lions-gray-400; + background: $lions-white; + @include lions-flex-center; + @include lions-transition(); + flex-shrink: 0; + + .ui-radiobutton-icon { + width: 0.625rem; + height: 0.625rem; + @include lions-rounded('full'); + background: $lions-white; + opacity: 0; + transform: scale(0); + @include lions-transition(); + } + + &:hover { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.3); + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-600; + box-shadow: 0 2px 4px rgba($lions-blue-500, 0.2); + + .ui-radiobutton-icon { + opacity: 1; + transform: scale(1); + } + } + + &.ui-state-disabled { + background: $lions-gray-100; + border-color: $lions-gray-300; + cursor: not-allowed; + opacity: 0.6; + } + } + + .ui-radiobutton-label { + cursor: pointer; + color: $lions-text-primary; + @include lions-font-size('base'); + @include lions-font-weight('medium'); + user-select: none; + @include lions-transition(); + + &:hover { + color: $lions-blue-700; + } + } + + // Size variants + &.ui-radiobutton-sm { + .ui-radiobutton-box { + width: 1rem; + height: 1rem; + + .ui-radiobutton-icon { + width: 0.5rem; + height: 0.5rem; + } + } + + .ui-radiobutton-label { + @include lions-font-size('sm'); + } + } + + &.ui-radiobutton-lg { + .ui-radiobutton-box { + width: 1.5rem; + height: 1.5rem; + + .ui-radiobutton-icon { + width: 0.75rem; + height: 0.75rem; + } + } + + .ui-radiobutton-label { + @include lions-font-size('lg'); + } + } + + // State error + &.ui-state-error { + .ui-radiobutton-box { + border-color: $lions-danger-500; + + &.ui-state-active { + @include lions-gradient-danger; + } + } + + .ui-radiobutton-label { + color: $lions-danger-700; + } + } + + // State disabled + &.ui-state-disabled { + cursor: not-allowed; + opacity: 0.6; + + .ui-radiobutton-label { + cursor: not-allowed; + color: $lions-gray-500; + } + } +} + +// ============================================ +// ๐Ÿ”€ SWITCH TOGGLE STYLES +// ============================================ + +.ui-inputswitch { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + + .ui-inputswitch-slider { + width: 2.75rem; + height: 1.5rem; + @include lions-rounded('full'); + background: $lions-gray-300; + border: 2px solid $lions-gray-400; + position: relative; + cursor: pointer; + @include lions-transition(); + flex-shrink: 0; + + &::before { + content: ''; + position: absolute; + top: 2px; + left: 2px; + width: 1.125rem; + height: 1.125rem; + @include lions-rounded('full'); + background: $lions-white; + @include lions-shadow('sm'); + @include lions-transition(); + } + + &:hover { + background: $lions-gray-400; + border-color: $lions-gray-500; + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-inputswitch-checked { + @include lions-gradient-blue; + border-color: $lions-blue-600; + + &::before { + left: calc(100% - 1.125rem - 2px); + } + + &:hover { + background: linear-gradient(135deg, darken($lions-blue-500, 5%) 0%, darken($lions-blue-700, 5%) 100%); + } + } + + &.ui-state-disabled { + background: $lions-gray-200; + border-color: $lions-gray-300; + cursor: not-allowed; + opacity: 0.6; + + &::before { + background: $lions-gray-300; + } + } + } + + // Size variants + &.ui-inputswitch-sm { + .ui-inputswitch-slider { + width: 2.25rem; + height: 1.25rem; + + &::before { + width: 0.875rem; + height: 0.875rem; + } + + &.ui-inputswitch-checked::before { + left: calc(100% - 0.875rem - 2px); + } + } + } + + &.ui-inputswitch-lg { + .ui-inputswitch-slider { + width: 3.25rem; + height: 1.75rem; + + &::before { + width: 1.375rem; + height: 1.375rem; + } + + &.ui-inputswitch-checked::before { + left: calc(100% - 1.375rem - 2px); + } + } + } + + // Success variant + &.ui-inputswitch-success { + .ui-inputswitch-slider.ui-inputswitch-checked { + @include lions-gradient-success; + border-color: $lions-success-600; + } + } + + // Danger variant + &.ui-inputswitch-danger { + .ui-inputswitch-slider.ui-inputswitch-checked { + @include lions-gradient-danger; + border-color: $lions-danger-600; + } + } +} + +// ============================================ +// ๐ŸŽš๏ธ SLIDER STYLES +// ============================================ + +.ui-slider { + background: $lions-gray-200; + border: none; + @include lions-rounded('full'); + position: relative; + height: 0.5rem; + cursor: pointer; + + .ui-slider-range { + @include lions-gradient-blue; + @include lions-rounded('full'); + position: absolute; + height: 100%; + } + + .ui-slider-handle { + width: 1.25rem; + height: 1.25rem; + @include lions-rounded('full'); + background: $lions-white; + border: 3px solid $lions-blue-500; + position: absolute; + top: 50%; + transform: translateY(-50%); + cursor: grab; + @include lions-shadow('md'); + @include lions-transition(); + + &:hover { + transform: translateY(-50%) scale(1.1); + border-color: $lions-blue-600; + @include lions-shadow('lg'); + } + + &:active { + cursor: grabbing; + transform: translateY(-50%) scale(1.15); + @include lions-shadow('xl'); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + + // Horizontal slider + &.ui-slider-horizontal { + width: 100%; + + .ui-slider-handle { + left: 0; + margin-left: -0.625rem; + } + + .ui-slider-range { + left: 0; + } + } + + // Vertical slider + &.ui-slider-vertical { + width: 0.5rem; + height: 200px; + + .ui-slider-handle { + left: 50%; + bottom: 0; + margin-left: -0.625rem; + margin-bottom: -0.625rem; + } + + .ui-slider-range { + bottom: 0; + width: 100%; + } + } + + // Size variants + &.ui-slider-sm { + height: 0.375rem; + + .ui-slider-handle { + width: 1rem; + height: 1rem; + } + + &.ui-slider-horizontal .ui-slider-handle { + margin-left: -0.5rem; + } + + &.ui-slider-vertical { + width: 0.375rem; + + .ui-slider-handle { + margin-left: -0.5rem; + margin-bottom: -0.5rem; + } + } + } + + &.ui-slider-lg { + height: 0.625rem; + + .ui-slider-handle { + width: 1.5rem; + height: 1.5rem; + } + + &.ui-slider-horizontal .ui-slider-handle { + margin-left: -0.75rem; + } + + &.ui-slider-vertical { + width: 0.625rem; + + .ui-slider-handle { + margin-left: -0.75rem; + margin-bottom: -0.75rem; + } + } + } + + // State disabled + &.ui-state-disabled { + opacity: 0.6; + cursor: not-allowed; + + .ui-slider-handle { + cursor: not-allowed; + background: $lions-gray-200; + border-color: $lions-gray-400; + } + + .ui-slider-range { + background: $lions-gray-400; + } + } + + // Color variants + &.ui-slider-success { + .ui-slider-range { + @include lions-gradient-success; + } + + .ui-slider-handle { + border-color: $lions-success-500; + } + } + + &.ui-slider-danger { + .ui-slider-range { + @include lions-gradient-danger; + } + + .ui-slider-handle { + border-color: $lions-danger-500; + } + } + + &.ui-slider-warning { + .ui-slider-range { + @include lions-gradient-warning; + } + + .ui-slider-handle { + border-color: $lions-warning-500; + } + } +} + +// ============================================ +// โญ RATING STYLES +// ============================================ + +.ui-rating { + display: inline-flex; + align-items: center; + gap: $lions-spacing-1; + + .ui-rating-icon { + font-size: 1.5rem; + color: $lions-gray-300; + cursor: pointer; + @include lions-transition(); + + &:hover { + color: $lions-gold-400; + transform: scale(1.15); + } + + &:active { + transform: scale(1.05); + } + + &.ui-rating-icon-active { + color: $lions-gold-500; + text-shadow: 0 2px 4px rgba($lions-gold-500, 0.3); + } + + &.ui-rating-icon-hover { + color: $lions-gold-400; + } + } + + .ui-rating-cancel { + color: $lions-danger-500; + margin-right: $lions-spacing-2; + + &:hover { + color: $lions-danger-600; + transform: scale(1.15); + } + } + + // Size variants + &.ui-rating-sm { + .ui-rating-icon { + font-size: 1.125rem; + } + } + + &.ui-rating-lg { + .ui-rating-icon { + font-size: 2rem; + } + } + + // State disabled + &.ui-state-disabled { + opacity: 0.6; + + .ui-rating-icon { + cursor: not-allowed; + + &:hover { + transform: none; + color: $lions-gray-300; + } + + &.ui-rating-icon-active { + color: $lions-gold-500; + } + } + } + + // Readonly + &.ui-rating-readonly { + .ui-rating-icon { + cursor: default; + + &:hover { + transform: none; + } + + &.ui-rating-icon-active { + color: $lions-gold-500; + } + } + } + + // Heart variant + &.ui-rating-hearts { + .ui-rating-icon { + color: $lions-gray-300; + + &.ui-rating-icon-active { + color: $lions-danger-500; + text-shadow: 0 2px 4px rgba($lions-danger-500, 0.3); + } + + &:hover { + color: $lions-danger-400; + } + } + } +} + +// ============================================ +// ๐Ÿ”ข SPINNER STYLES +// ============================================ + +.ui-spinner { + display: inline-flex; + align-items: stretch; + @include lions-rounded('md'); + overflow: hidden; + border: 1px solid $lions-gray-300; + background: $lions-white; + @include lions-transition(); + + &:hover { + border-color: $lions-gray-400; + } + + &:focus-within { + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + + .ui-spinner-input { + flex: 1; + border: none; + padding: $lions-spacing-3 $lions-spacing-4; + font-family: $lions-font-family-primary; + @include lions-font-size('base'); + color: $lions-text-primary; + text-align: center; + min-width: 80px; + + &:focus { + outline: none; + } + + &::placeholder { + color: $lions-gray-400; + } + } + + .ui-spinner-button { + @include lions-button-base; + width: 2.5rem; + background: $lions-gray-100; + border: none; + border-left: 1px solid $lions-gray-300; + color: $lions-gray-700; + @include lions-flex-center; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-blue-50; + color: $lions-blue-600; + } + + &:active { + background: $lions-blue-100; + } + + &:first-of-type { + border-right: 1px solid $lions-gray-300; + border-left: none; + } + + .ui-icon { + font-size: 1rem; + } + } + + // Vertical layout + &.ui-spinner-vertical { + flex-direction: column; + + .ui-spinner-button { + border-left: none; + border-top: 1px solid $lions-gray-300; + width: 100%; + height: 1.5rem; + + &:first-of-type { + border-top: none; + border-bottom: 1px solid $lions-gray-300; + } + } + } + + // Size variants + &.ui-spinner-sm { + .ui-spinner-input { + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-font-size('sm'); + min-width: 60px; + } + + .ui-spinner-button { + width: 2rem; + } + } + + &.ui-spinner-lg { + .ui-spinner-input { + padding: $lions-spacing-4 $lions-spacing-5; + @include lions-font-size('lg'); + min-width: 100px; + } + + .ui-spinner-button { + width: 3rem; + } + } + + // State disabled + &.ui-state-disabled { + background: $lions-gray-100; + opacity: 0.6; + cursor: not-allowed; + + .ui-spinner-input { + cursor: not-allowed; + color: $lions-gray-500; + } + + .ui-spinner-button { + cursor: not-allowed; + background: $lions-gray-100; + color: $lions-gray-400; + + &:hover { + background: $lions-gray-100; + color: $lions-gray-400; + } + } + } + + // State error + &.ui-state-error { + border-color: $lions-danger-500; + + &:focus-within { + box-shadow: 0 0 0 3px rgba($lions-danger-500, 0.15); + } + } +} + +// ============================================ +// ๐Ÿ”„ TOGGLE BUTTON STYLES +// ============================================ + +.ui-togglebutton { + @include lions-button-base; + padding: $lions-spacing-3 $lions-spacing-5; + @include lions-rounded('md'); + border: 2px solid $lions-gray-400; + background: $lions-white; + color: $lions-text-primary; + @include lions-font-weight('medium'); + cursor: pointer; + @include lions-transition(); + + .ui-button-icon-left { + margin-right: $lions-spacing-2; + @include lions-transition(); + } + + .ui-button-text { + @include lions-font-size('base'); + } + + &:hover { + border-color: $lions-blue-500; + background: rgba($lions-blue-50, 0.5); + color: $lions-blue-700; + } + + &:active { + transform: scale(0.98); + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-600; + color: $lions-white; + @include lions-shadow('md'); + + .ui-button-icon-left { + color: $lions-white; + } + + &:hover { + background: linear-gradient(135deg, darken($lions-blue-500, 5%) 0%, darken($lions-blue-700, 5%) 100%); + } + } + + // Size variants + &.ui-togglebutton-sm { + padding: $lions-spacing-2 $lions-spacing-4; + + .ui-button-text { + @include lions-font-size('sm'); + } + + .ui-button-icon-left { + font-size: 0.875rem; + } + } + + &.ui-togglebutton-lg { + padding: $lions-spacing-4 $lions-spacing-6; + + .ui-button-text { + @include lions-font-size('lg'); + } + + .ui-button-icon-left { + font-size: 1.25rem; + } + } + + // State disabled + &.ui-state-disabled { + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-gray-500; + cursor: not-allowed; + opacity: 0.6; + + &:hover { + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-gray-500; + transform: none; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-chkbox, + .ui-radiobutton { + gap: $lions-spacing-3; + + .ui-chkbox-box, + .ui-radiobutton-box { + width: 1.375rem; + height: 1.375rem; + } + } + + .ui-rating { + .ui-rating-icon { + font-size: 1.25rem; + } + } + + .ui-slider { + &.ui-slider-vertical { + height: 150px; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-chkbox, +.ui-radiobutton, +.ui-inputswitch, +.ui-slider, +.ui-rating, +.ui-spinner, +.ui-togglebutton { + // Focus visible + *:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + .ui-chkbox-box, + .ui-radiobutton-box, + .ui-inputswitch-slider, + .ui-slider-handle { + border-width: 3px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_messages.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_messages.scss new file mode 100644 index 0000000..fef72b0 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_messages.scss @@ -0,0 +1,608 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Messages & Notifications Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Messages, Toast, Growl et composants de notification + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #18-20 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ’ฌ MESSAGES BASE STYLES +// ============================================ + +.ui-messages, +.ui-message { + @include lions-rounded('md'); + padding: $lions-spacing-4 $lions-spacing-5; + margin-bottom: $lions-spacing-3; + display: flex; + align-items: flex-start; + gap: $lions-spacing-3; + @include lions-transition(); + border-left: 4px solid; + @include lions-shadow('sm'); + + // Icon + .ui-messages-icon, + .ui-message-icon { + font-size: 1.5rem; + margin-top: 2px; + flex-shrink: 0; + } + + // Content + .ui-messages-detail, + .ui-message-detail, + .ui-messages-summary, + .ui-message-summary { + @include lions-font-size('base'); + margin: 0; + line-height: $lions-line-height-normal; + } + + .ui-messages-summary, + .ui-message-summary { + @include lions-font-weight('bold'); + margin-bottom: $lions-spacing-1; + } + + .ui-messages-detail, + .ui-message-detail { + @include lions-font-weight('normal'); + } + + // Close button + .ui-messages-close, + .ui-message-close { + @include lions-button-base; + width: 2rem; + height: 2rem; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + margin-left: auto; + flex-shrink: 0; + @include lions-transition(); + + &:hover { + transform: scale(1.1); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } +} + +// ============================================ +// ๐ŸŽจ MESSAGE SEVERITY VARIANTS +// ============================================ + +// Info messages +.ui-messages-info, +.ui-message-info { + background: rgba($lions-info-50, 0.9); + border-left-color: $lions-info-500; + color: $lions-info-900; + + .ui-messages-icon, + .ui-message-icon { + color: $lions-info-600; + } + + .ui-messages-close, + .ui-message-close { + color: $lions-info-700; + + &:hover { + background: rgba($lions-info-200, 0.8); + } + } +} + +// Success messages +.ui-messages-success, +.ui-message-success { + background: rgba($lions-success-50, 0.9); + border-left-color: $lions-success-500; + color: $lions-success-900; + + .ui-messages-icon, + .ui-message-icon { + color: $lions-success-600; + } + + .ui-messages-close, + .ui-message-close { + color: $lions-success-700; + + &:hover { + background: rgba($lions-success-200, 0.8); + } + } +} + +// Warning messages +.ui-messages-warn, +.ui-message-warn { + background: rgba($lions-warning-50, 0.9); + border-left-color: $lions-warning-500; + color: $lions-warning-900; + + .ui-messages-icon, + .ui-message-icon { + color: $lions-warning-600; + } + + .ui-messages-close, + .ui-message-close { + color: $lions-warning-700; + + &:hover { + background: rgba($lions-warning-200, 0.8); + } + } +} + +// Error messages +.ui-messages-error, +.ui-message-error { + background: rgba($lions-danger-50, 0.9); + border-left-color: $lions-danger-500; + color: $lions-danger-900; + + .ui-messages-icon, + .ui-message-icon { + color: $lions-danger-600; + } + + .ui-messages-close, + .ui-message-close { + color: $lions-danger-700; + + &:hover { + background: rgba($lions-danger-200, 0.8); + } + } +} + +// ============================================ +// ๐Ÿ”” TOAST / GROWL NOTIFICATIONS +// ============================================ + +.ui-toast, +.ui-growl { + position: fixed; + z-index: 9999; + + .ui-toast-message, + .ui-growl-item { + @include lions-rounded('lg'); + @include lions-shadow('xl'); + margin-bottom: $lions-spacing-3; + overflow: hidden; + background: $lions-white; + border-left: 6px solid; + min-width: 300px; + max-width: 400px; + @include lions-transition(all, 300ms); + + &:hover { + @include lions-shadow('2xl'); + transform: translateY(-2px); + } + } + + .ui-toast-message-content, + .ui-growl-item-container { + padding: $lions-spacing-4 $lions-spacing-5; + display: flex; + align-items: flex-start; + gap: $lions-spacing-3; + } + + // Icon + .ui-toast-icon, + .ui-growl-icon { + font-size: 1.75rem; + flex-shrink: 0; + margin-top: 2px; + } + + // Text container + .ui-toast-message-text, + .ui-growl-message { + flex: 1; + min-width: 0; + + .ui-toast-summary, + .ui-growl-title { + @include lions-font-size('lg'); + @include lions-font-weight('bold'); + margin: 0 0 $lions-spacing-1 0; + line-height: $lions-line-height-tight; + } + + .ui-toast-detail, + .ui-growl-detail { + @include lions-font-size('base'); + margin: 0; + line-height: $lions-line-height-normal; + color: $lions-text-secondary; + } + } + + // Close button + .ui-toast-icon-close, + .ui-growl-icon-close { + @include lions-button-base; + width: 2rem; + height: 2rem; + min-width: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + flex-shrink: 0; + @include lions-transition(); + cursor: pointer; + + &:hover { + transform: scale(1.15) rotate(90deg); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } +} + +// ============================================ +// ๐ŸŽจ TOAST/GROWL SEVERITY VARIANTS +// ============================================ + +.ui-toast, +.ui-growl { + // Info notifications + .ui-toast-message-info, + .ui-growl-item-info { + border-left-color: $lions-info-500; + background: linear-gradient(135deg, rgba($lions-info-50, 0.95) 0%, $lions-white 100%); + + .ui-toast-icon, + .ui-growl-icon { + color: $lions-info-600; + } + + .ui-toast-summary, + .ui-growl-title { + color: $lions-info-800; + } + + .ui-toast-icon-close, + .ui-growl-icon-close { + color: $lions-info-700; + + &:hover { + background: rgba($lions-info-200, 0.6); + } + } + } + + // Success notifications + .ui-toast-message-success, + .ui-growl-item-success { + border-left-color: $lions-success-500; + background: linear-gradient(135deg, rgba($lions-success-50, 0.95) 0%, $lions-white 100%); + + .ui-toast-icon, + .ui-growl-icon { + color: $lions-success-600; + } + + .ui-toast-summary, + .ui-growl-title { + color: $lions-success-800; + } + + .ui-toast-icon-close, + .ui-growl-icon-close { + color: $lions-success-700; + + &:hover { + background: rgba($lions-success-200, 0.6); + } + } + } + + // Warning notifications + .ui-toast-message-warn, + .ui-growl-item-warn { + border-left-color: $lions-warning-500; + background: linear-gradient(135deg, rgba($lions-warning-50, 0.95) 0%, $lions-white 100%); + + .ui-toast-icon, + .ui-growl-icon { + color: $lions-warning-600; + } + + .ui-toast-summary, + .ui-growl-title { + color: $lions-warning-800; + } + + .ui-toast-icon-close, + .ui-growl-icon-close { + color: $lions-warning-700; + + &:hover { + background: rgba($lions-warning-200, 0.6); + } + } + } + + // Error notifications + .ui-toast-message-error, + .ui-growl-item-error { + border-left-color: $lions-danger-500; + background: linear-gradient(135deg, rgba($lions-danger-50, 0.95) 0%, $lions-white 100%); + + .ui-toast-icon, + .ui-growl-icon { + color: $lions-danger-600; + } + + .ui-toast-summary, + .ui-growl-title { + color: $lions-danger-800; + } + + .ui-toast-icon-close, + .ui-growl-icon-close { + color: $lions-danger-700; + + &:hover { + background: rgba($lions-danger-200, 0.6); + } + } + } +} + +// ============================================ +// ๐Ÿ“ TOAST/GROWL POSITIONS +// ============================================ + +.ui-toast, +.ui-growl { + &.ui-toast-top-right, + &.ui-growl-top-right { + top: $lions-spacing-5; + right: $lions-spacing-5; + } + + &.ui-toast-top-left, + &.ui-growl-top-left { + top: $lions-spacing-5; + left: $lions-spacing-5; + } + + &.ui-toast-bottom-right, + &.ui-growl-bottom-right { + bottom: $lions-spacing-5; + right: $lions-spacing-5; + } + + &.ui-toast-bottom-left, + &.ui-growl-bottom-left { + bottom: $lions-spacing-5; + left: $lions-spacing-5; + } + + &.ui-toast-top-center, + &.ui-growl-top-center { + top: $lions-spacing-5; + left: 50%; + transform: translateX(-50%); + } + + &.ui-toast-bottom-center, + &.ui-growl-bottom-center { + bottom: $lions-spacing-5; + left: 50%; + transform: translateX(-50%); + } + + &.ui-toast-center, + &.ui-growl-center { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } +} + +// ============================================ +// โœจ TOAST/GROWL ANIMATIONS +// ============================================ + +@keyframes lions-toast-fade-in { + from { + opacity: 0; + transform: translateY(-20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes lions-toast-fade-out { + from { + opacity: 1; + transform: translateY(0); + } + to { + opacity: 0; + transform: translateY(-20px); + } +} + +.ui-toast-message, +.ui-growl-item { + animation: lions-toast-fade-in 300ms ease-out; + + &.ui-toast-message-exit, + &.ui-state-leaving { + animation: lions-toast-fade-out 200ms ease-in; + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-toast, + .ui-growl { + &.ui-toast-top-right, + &.ui-toast-top-left, + &.ui-toast-bottom-right, + &.ui-toast-bottom-left, + &.ui-growl-top-right, + &.ui-growl-top-left, + &.ui-growl-bottom-right, + &.ui-growl-bottom-left { + left: $lions-spacing-3 !important; + right: $lions-spacing-3 !important; + transform: none !important; + } + + .ui-toast-message, + .ui-growl-item { + min-width: auto; + max-width: none; + } + } + + .ui-messages, + .ui-message { + padding: $lions-spacing-3 $lions-spacing-4; + @include lions-font-size('sm'); + + .ui-messages-icon, + .ui-message-icon { + font-size: 1.25rem; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-messages, +.ui-message, +.ui-toast-message, +.ui-growl-item { + // High contrast mode + @media (prefers-contrast: high) { + border-width: 3px !important; + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + transition: none !important; + animation: none !important; + + &:hover { + transform: none !important; + } + } +} + +// ARIA live regions +[role="alert"], +[aria-live] { + // Ensure screen readers can access messages + &:empty { + display: none; + } +} + +// ============================================ +// ๐ŸŽฏ MESSAGE LIST STYLES +// ============================================ + +.ui-messages { + &.ui-messages-list { + .ui-messages-item { + margin-bottom: $lions-spacing-2; + + &:last-child { + margin-bottom: 0; + } + } + } +} + +// ============================================ +// ๐Ÿ”ง UTILITY CLASSES +// ============================================ + +// Compact messages +.ui-messages-compact, +.ui-message-compact { + padding: $lions-spacing-2 $lions-spacing-3; + + .ui-messages-icon, + .ui-message-icon { + font-size: 1.25rem; + } + + .ui-messages-summary, + .ui-message-summary { + @include lions-font-size('sm'); + } + + .ui-messages-detail, + .ui-message-detail { + @include lions-font-size('xs'); + } +} + +// Large messages +.ui-messages-large, +.ui-message-large { + padding: $lions-spacing-5 $lions-spacing-6; + + .ui-messages-icon, + .ui-message-icon { + font-size: 2rem; + } + + .ui-messages-summary, + .ui-message-summary { + @include lions-font-size('xl'); + } + + .ui-messages-detail, + .ui-message-detail { + @include lions-font-size('lg'); + } +} + +// Inline messages (no margin) +.ui-messages-inline, +.ui-message-inline { + margin: 0; + display: inline-flex; +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_navigation.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_navigation.scss new file mode 100644 index 0000000..c778ec7 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_navigation.scss @@ -0,0 +1,633 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Navigation Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Menu, Menubar, TabView et composants de navigation + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #25-27 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ“‹ MENU VERTICAL STYLES +// ============================================ + +.ui-menu { + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('md'); + padding: $lions-spacing-2 0; + + .ui-menuitem { + .ui-menuitem-link { + padding: $lions-spacing-3 $lions-spacing-5; + display: flex; + align-items: center; + gap: $lions-spacing-3; + color: $lions-text-primary; + text-decoration: none; + @include lions-transition(); + cursor: pointer; + + .ui-menuitem-icon { + font-size: 1.125rem; + color: $lions-gray-600; + @include lions-transition(); + } + + .ui-menuitem-text { + @include lions-font-size('base'); + @include lions-font-weight('medium'); + } + + &:hover { + background: rgba($lions-blue-50, 0.8); + color: $lions-blue-700; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-state-active, + &.ui-state-highlight { + background: linear-gradient(135deg, rgba($lions-blue-100, 0.8) 0%, rgba($lions-blue-50, 0.6) 100%); + color: $lions-blue-800; + border-left: 4px solid $lions-blue-500; + padding-left: calc(#{$lions-spacing-5} - 4px); + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + } + + // Submenu indicator + &.ui-menu-parent { + .ui-menuitem-link { + position: relative; + + &::after { + content: '\e902'; // PrimeIcons chevron-right + font-family: 'primeicons'; + position: absolute; + right: $lions-spacing-4; + color: $lions-gray-500; + @include lions-transition(); + } + + &:hover::after { + color: $lions-blue-600; + } + } + } + } + + // Submenu + .ui-menu-child { + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('lg'); + padding: $lions-spacing-2 0; + margin-left: $lions-spacing-2; + + .ui-menuitem-link { + padding-left: $lions-spacing-6; + } + } + + // Separator + .ui-menu-separator { + border-top: 1px solid $lions-gray-300; + margin: $lions-spacing-2 0; + } +} + +// ============================================ +// ๐Ÿ“Š MENUBAR HORIZONTAL STYLES +// ============================================ + +.ui-menubar { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.08) 0%, rgba($lions-blue-700, 0.04) 100%); + border: 1px solid $lions-gray-300; + border-left: none; + border-right: none; + padding: $lions-spacing-2 $lions-spacing-5; + @include lions-shadow('sm'); + + .ui-menubar-root-list { + display: flex; + align-items: center; + gap: $lions-spacing-1; + list-style: none; + margin: 0; + padding: 0; + + > .ui-menuitem { + > .ui-menuitem-link { + padding: $lions-spacing-3 $lions-spacing-4; + display: flex; + align-items: center; + gap: $lions-spacing-2; + color: $lions-text-primary; + text-decoration: none; + @include lions-rounded('md'); + @include lions-transition(); + cursor: pointer; + @include lions-font-weight('medium'); + + .ui-menuitem-icon { + font-size: 1.125rem; + color: $lions-gray-600; + @include lions-transition(); + } + + .ui-menuitem-text { + @include lions-font-size('base'); + } + + &:hover { + background: rgba($lions-blue-100, 0.6); + color: $lions-blue-700; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + + &:focus-visible { + @include lions-focus-ring(); + } + + &.ui-state-active, + &.ui-state-highlight { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.15) 0%, rgba($lions-blue-600, 0.1) 100%); + color: $lions-blue-800; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + } + + // Submenu indicator + &.ui-menu-parent { + > .ui-menuitem-link { + &::after { + content: '\e933'; // PrimeIcons chevron-down + font-family: 'primeicons'; + margin-left: $lions-spacing-1; + color: $lions-gray-500; + @include lions-transition(); + } + + &:hover::after { + color: $lions-blue-600; + } + } + } + } + } + + // Dropdown submenu + .ui-menu-child { + background: $lions-white; + border: 1px solid $lions-gray-300; + @include lions-rounded('md'); + @include lions-shadow('xl'); + padding: $lions-spacing-2 0; + margin-top: $lions-spacing-1; + min-width: 200px; + + .ui-menuitem-link { + padding: $lions-spacing-3 $lions-spacing-5; + display: flex; + align-items: center; + gap: $lions-spacing-3; + color: $lions-text-primary; + text-decoration: none; + @include lions-transition(); + + .ui-menuitem-icon { + font-size: 1rem; + color: $lions-gray-600; + } + + &:hover { + background: rgba($lions-blue-50, 0.8); + color: $lions-blue-700; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + } + } + + .ui-menu-separator { + border-top: 1px solid $lions-gray-300; + margin: $lions-spacing-2 0; + } + } + + // Right-aligned items + .ui-menubar-options { + margin-left: auto; + display: flex; + align-items: center; + gap: $lions-spacing-2; + } +} + +// ============================================ +// ๐Ÿ“‘ TABVIEW STYLES +// ============================================ + +.ui-tabview { + background: $lions-white; + @include lions-rounded('md'); + @include lions-shadow('sm'); + overflow: hidden; + + // Tab navigation + .ui-tabview-nav { + background: linear-gradient(135deg, rgba($lions-gray-100, 0.8) 0%, rgba($lions-gray-50, 0.6) 100%); + border-bottom: 2px solid $lions-gray-300; + padding: 0; + margin: 0; + list-style: none; + display: flex; + gap: $lions-spacing-1; + padding: $lions-spacing-2 $lions-spacing-4; + + .ui-tabview-nav-link { + padding: $lions-spacing-3 $lions-spacing-5; + display: flex; + align-items: center; + gap: $lions-spacing-2; + color: $lions-text-secondary; + text-decoration: none; + @include lions-rounded('md'); + @include lions-rounded-bottom(0); + @include lions-transition(); + cursor: pointer; + border: 1px solid transparent; + border-bottom: none; + position: relative; + @include lions-font-weight('medium'); + + .ui-tabview-left-icon { + font-size: 1.125rem; + color: $lions-gray-600; + @include lions-transition(); + } + + .ui-tabview-title { + @include lions-font-size('base'); + } + + &:hover { + background: rgba($lions-blue-50, 0.6); + color: $lions-blue-700; + + .ui-tabview-left-icon { + color: $lions-blue-600; + } + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + + .ui-state-active { + .ui-tabview-nav-link { + background: $lions-white; + color: $lions-blue-700; + border-color: $lions-gray-300; + border-bottom-color: $lions-white; + @include lions-font-weight('bold'); + + &::after { + content: ''; + position: absolute; + bottom: -2px; + left: 0; + right: 0; + height: 3px; + background: $lions-blue-500; + @include lions-rounded('full'); + } + + .ui-tabview-left-icon { + color: $lions-blue-600; + } + } + } + + // Close icon + .ui-tabview-close { + @include lions-button-base; + width: 1.5rem; + height: 1.5rem; + min-width: 1.5rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-gray-500; + @include lions-transition(); + margin-left: $lions-spacing-2; + + &:hover { + background: rgba($lions-danger-500, 0.1); + color: $lions-danger-600; + transform: scale(1.1); + } + } + } + + // Tab panels + .ui-tabview-panels { + padding: $lions-spacing-6; + background: $lions-white; + + .ui-tabview-panel { + &:not(.ui-state-active) { + display: none; + } + } + } + + // Position variants + &.ui-tabview-top { + .ui-tabview-nav { + border-bottom: 2px solid $lions-gray-300; + + .ui-state-active .ui-tabview-nav-link::after { + bottom: -2px; + } + } + } + + &.ui-tabview-bottom { + display: flex; + flex-direction: column-reverse; + + .ui-tabview-nav { + border-top: 2px solid $lions-gray-300; + border-bottom: none; + + .ui-tabview-nav-link { + @include lions-rounded('md'); + @include lions-rounded-top(0); + } + + .ui-state-active .ui-tabview-nav-link { + border-bottom-color: $lions-gray-300; + border-top-color: $lions-white; + + &::after { + bottom: auto; + top: -2px; + } + } + } + } + + &.ui-tabview-left { + display: flex; + + .ui-tabview-nav { + border-right: 2px solid $lions-gray-300; + border-bottom: none; + flex-direction: column; + padding: $lions-spacing-4 $lions-spacing-2; + + .ui-tabview-nav-link { + @include lions-rounded('md'); + @include lions-rounded-right(0); + } + + .ui-state-active .ui-tabview-nav-link { + border-right-color: $lions-white; + + &::after { + right: -2px; + left: auto; + top: 0; + bottom: 0; + width: 3px; + height: auto; + } + } + } + } + + &.ui-tabview-right { + display: flex; + flex-direction: row-reverse; + + .ui-tabview-nav { + border-left: 2px solid $lions-gray-300; + border-bottom: none; + flex-direction: column; + padding: $lions-spacing-4 $lions-spacing-2; + + .ui-tabview-nav-link { + @include lions-rounded('md'); + @include lions-rounded-left(0); + } + + .ui-state-active .ui-tabview-nav-link { + border-left-color: $lions-white; + + &::after { + left: -2px; + right: auto; + top: 0; + bottom: 0; + width: 3px; + height: auto; + } + } + } + } +} + +// ============================================ +// ๐ŸŽจ MENU SEVERITY VARIANTS +// ============================================ + +.ui-menu, +.ui-menubar { + // Primary menu items + .ui-menuitem-primary { + .ui-menuitem-link { + background: rgba($lions-blue-100, 0.3); + color: $lions-blue-700; + + .ui-menuitem-icon { + color: $lions-blue-600; + } + + &:hover { + background: rgba($lions-blue-100, 0.6); + } + } + } + + // Success menu items + .ui-menuitem-success { + .ui-menuitem-link { + background: rgba($lions-success-100, 0.3); + color: $lions-success-700; + + .ui-menuitem-icon { + color: $lions-success-600; + } + + &:hover { + background: rgba($lions-success-100, 0.6); + } + } + } + + // Danger menu items + .ui-menuitem-danger { + .ui-menuitem-link { + background: rgba($lions-danger-100, 0.3); + color: $lions-danger-700; + + .ui-menuitem-icon { + color: $lions-danger-600; + } + + &:hover { + background: rgba($lions-danger-100, 0.6); + } + } + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-menubar { + .ui-menubar-root-list { + flex-direction: column; + align-items: stretch; + gap: $lions-spacing-1; + + > .ui-menuitem { + > .ui-menuitem-link { + width: 100%; + } + } + } + + .ui-menubar-options { + margin-left: 0; + margin-top: $lions-spacing-2; + padding-top: $lions-spacing-2; + border-top: 1px solid $lions-gray-300; + } + } + + .ui-tabview { + .ui-tabview-nav { + overflow-x: auto; + flex-wrap: nowrap; + + &::-webkit-scrollbar { + height: 4px; + } + + &::-webkit-scrollbar-track { + background: $lions-gray-100; + } + + &::-webkit-scrollbar-thumb { + background: $lions-gray-400; + @include lions-rounded('full'); + } + } + + .ui-tabview-panels { + padding: $lions-spacing-4; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-menu, +.ui-menubar, +.ui-tabview { + // Focus visible + .ui-menuitem-link:focus-visible, + .ui-tabview-nav-link:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + .ui-menuitem-link, + .ui-tabview-nav-link { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + } +} + +// ============================================ +// ๐ŸŽฏ UTILITY CLASSES +// ============================================ + +// Compact menus +.ui-menu-compact { + .ui-menuitem-link { + padding: $lions-spacing-2 $lions-spacing-4; + @include lions-font-size('sm'); + } +} + +// Large menus +.ui-menu-large { + .ui-menuitem-link { + padding: $lions-spacing-4 $lions-spacing-6; + @include lions-font-size('lg'); + } +} + +// Vertical menubar (stacked) +.ui-menubar-vertical { + .ui-menubar-root-list { + flex-direction: column; + align-items: stretch; + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_overlays.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_overlays.scss new file mode 100644 index 0000000..38222fe --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_overlays.scss @@ -0,0 +1,704 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Overlay Components Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Dialog, ConfirmDialog, Sidebar, OverlayPanel + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * Priority: CRITIQUE #21-24 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐ŸŒ‘ OVERLAY MASK (BACKDROP) +// ============================================ + +.ui-dialog-mask, +.ui-confirmdialog-mask, +.ui-sidebar-mask, +.ui-overlaypanel-mask { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + z-index: 1000; + backdrop-filter: blur(3px); + @include lions-transition(opacity, 200ms); + + &.ui-dialog-mask-scrollblocker { + overflow: hidden; + } +} + +// ============================================ +// ๐Ÿ’ฌ DIALOG STYLES +// ============================================ + +.ui-dialog { + position: fixed; + background: $lions-white; + @include lions-rounded('lg'); + @include lions-shadow('2xl'); + z-index: 1001; + overflow: hidden; + max-height: 90vh; + display: flex; + flex-direction: column; + @include lions-transition(transform, 300ms); + + // Dialog header + .ui-dialog-titlebar { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.1) 0%, rgba($lions-blue-700, 0.05) 100%); + border-bottom: 2px solid $lions-blue-500; + padding: $lions-spacing-5 $lions-spacing-6; + display: flex; + justify-content: space-between; + align-items: center; + + .ui-dialog-title { + @include lions-font-size('xl'); + @include lions-font-weight('bold'); + color: $lions-text-primary; + margin: 0; + display: flex; + align-items: center; + gap: $lions-spacing-3; + + i { + color: $lions-blue-500; + font-size: 1.5rem; + } + } + + .ui-dialog-titlebar-icon { + @include lions-button-base; + width: 2.5rem; + height: 2.5rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-gray-600; + @include lions-transition(); + + &:hover { + background: rgba($lions-danger-500, 0.1); + color: $lions-danger-600; + transform: scale(1.1) rotate(90deg); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + } + + // Dialog content + .ui-dialog-content { + padding: $lions-spacing-6; + overflow-y: auto; + flex: 1; + color: $lions-text-primary; + line-height: $lions-line-height-normal; + + // Custom scrollbar + &::-webkit-scrollbar { + width: 8px; + } + + &::-webkit-scrollbar-track { + background: $lions-gray-100; + } + + &::-webkit-scrollbar-thumb { + background: $lions-gray-400; + @include lions-rounded('full'); + + &:hover { + background: $lions-blue-500; + } + } + } + + // Dialog footer + .ui-dialog-footer { + background: linear-gradient(135deg, rgba($lions-gray-50, 0.8) 0%, rgba($lions-gray-100, 0.5) 100%); + border-top: 1px solid $lions-gray-300; + padding: $lions-spacing-4 $lions-spacing-6; + display: flex; + justify-content: flex-end; + gap: $lions-spacing-3; + } + + // Resizable handle + .ui-resizable-handle { + position: absolute; + background: transparent; + + &.ui-resizable-se { + bottom: 0; + right: 0; + width: 20px; + height: 20px; + cursor: se-resize; + + &::after { + content: ''; + position: absolute; + bottom: 4px; + right: 4px; + width: 12px; + height: 12px; + border-right: 2px solid $lions-gray-400; + border-bottom: 2px solid $lions-gray-400; + } + } + } +} + +// ============================================ +// โœ… CONFIRM DIALOG STYLES +// ============================================ + +.ui-confirmdialog { + @extend .ui-dialog; + max-width: 500px; + + .ui-confirmdialog-icon { + font-size: 3rem; + margin-right: $lions-spacing-4; + flex-shrink: 0; + } + + .ui-confirmdialog-message { + flex: 1; + @include lions-font-size('lg'); + color: $lions-text-primary; + line-height: $lions-line-height-relaxed; + } + + // Severity variants + &.ui-confirmdialog-info { + .ui-dialog-titlebar { + background: linear-gradient(135deg, rgba($lions-info-500, 0.1) 0%, rgba($lions-info-700, 0.05) 100%); + border-bottom-color: $lions-info-500; + } + + .ui-confirmdialog-icon { + color: $lions-info-600; + } + } + + &.ui-confirmdialog-warn { + .ui-dialog-titlebar { + background: linear-gradient(135deg, rgba($lions-warning-500, 0.1) 0%, rgba($lions-warning-700, 0.05) 100%); + border-bottom-color: $lions-warning-500; + } + + .ui-confirmdialog-icon { + color: $lions-warning-600; + } + } + + &.ui-confirmdialog-error { + .ui-dialog-titlebar { + background: linear-gradient(135deg, rgba($lions-danger-500, 0.1) 0%, rgba($lions-danger-700, 0.05) 100%); + border-bottom-color: $lions-danger-500; + } + + .ui-confirmdialog-icon { + color: $lions-danger-600; + } + } +} + +// ============================================ +// ๐Ÿ“ฑ SIDEBAR STYLES +// ============================================ + +.ui-sidebar { + position: fixed; + background: $lions-white; + @include lions-shadow('2xl'); + z-index: 1001; + overflow: hidden; + display: flex; + flex-direction: column; + @include lions-transition(transform, 300ms); + + // Sidebar header + .ui-sidebar-header { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.1) 0%, rgba($lions-blue-700, 0.05) 100%); + border-bottom: 2px solid $lions-blue-500; + padding: $lions-spacing-5 $lions-spacing-6; + display: flex; + justify-content: space-between; + align-items: center; + + h3, h4, h5 { + margin: 0; + @include lions-font-weight('bold'); + color: $lions-text-primary; + } + + .ui-sidebar-close { + @include lions-button-base; + width: 2.5rem; + height: 2.5rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-gray-600; + @include lions-transition(); + + &:hover { + background: rgba($lions-danger-500, 0.1); + color: $lions-danger-600; + transform: scale(1.1) rotate(90deg); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + } + + // Sidebar content + .ui-sidebar-content { + padding: $lions-spacing-6; + overflow-y: auto; + flex: 1; + + // Custom scrollbar + &::-webkit-scrollbar { + width: 8px; + } + + &::-webkit-scrollbar-track { + background: $lions-gray-100; + } + + &::-webkit-scrollbar-thumb { + background: $lions-gray-400; + @include lions-rounded('full'); + + &:hover { + background: $lions-blue-500; + } + } + } + + // Sidebar footer + .ui-sidebar-footer { + background: linear-gradient(135deg, rgba($lions-gray-50, 0.8) 0%, rgba($lions-gray-100, 0.5) 100%); + border-top: 1px solid $lions-gray-300; + padding: $lions-spacing-4 $lions-spacing-6; + } + + // Position variants + &.ui-sidebar-left { + top: 0; + left: 0; + height: 100%; + width: 400px; + border-right: 1px solid $lions-gray-300; + + &.ui-sidebar-active { + transform: translateX(0); + } + + &:not(.ui-sidebar-active) { + transform: translateX(-100%); + } + } + + &.ui-sidebar-right { + top: 0; + right: 0; + height: 100%; + width: 400px; + border-left: 1px solid $lions-gray-300; + + &.ui-sidebar-active { + transform: translateX(0); + } + + &:not(.ui-sidebar-active) { + transform: translateX(100%); + } + } + + &.ui-sidebar-top { + top: 0; + left: 0; + width: 100%; + height: 300px; + border-bottom: 1px solid $lions-gray-300; + + &.ui-sidebar-active { + transform: translateY(0); + } + + &:not(.ui-sidebar-active) { + transform: translateY(-100%); + } + } + + &.ui-sidebar-bottom { + bottom: 0; + left: 0; + width: 100%; + height: 300px; + border-top: 1px solid $lions-gray-300; + + &.ui-sidebar-active { + transform: translateY(0); + } + + &:not(.ui-sidebar-active) { + transform: translateY(100%); + } + } + + &.ui-sidebar-full { + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + +// ============================================ +// ๐Ÿ“Œ OVERLAY PANEL STYLES +// ============================================ + +.ui-overlaypanel { + position: absolute; + background: $lions-white; + @include lions-rounded('lg'); + @include lions-shadow('xl'); + z-index: 1002; + padding: 0; + @include lions-transition(opacity, 200ms); + + // Arrow pointer + &::before, + &::after { + content: ''; + position: absolute; + width: 0; + height: 0; + border: solid transparent; + } + + &::before { + border-width: 11px; + } + + &::after { + border-width: 10px; + } + + // Arrow positions + &.ui-overlaypanel-flipped { + &::before, + &::after { + bottom: 100%; + left: 50%; + } + + &::before { + margin-left: -11px; + border-bottom-color: $lions-gray-300; + } + + &::after { + margin-left: -10px; + border-bottom-color: $lions-white; + } + } + + &:not(.ui-overlaypanel-flipped) { + &::before, + &::after { + top: 100%; + left: 50%; + } + + &::before { + margin-left: -11px; + border-top-color: $lions-gray-300; + } + + &::after { + margin-left: -10px; + border-top-color: $lions-white; + } + } + + // Header + .ui-overlaypanel-header { + background: linear-gradient(135deg, rgba($lions-blue-500, 0.1) 0%, rgba($lions-blue-700, 0.05) 100%); + border-bottom: 2px solid $lions-blue-500; + padding: $lions-spacing-4 $lions-spacing-5; + @include lions-rounded('lg'); + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + display: flex; + justify-content: space-between; + align-items: center; + + h5, h6 { + margin: 0; + @include lions-font-weight('bold'); + color: $lions-text-primary; + } + + .ui-overlaypanel-close { + @include lions-button-base; + width: 2rem; + height: 2rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: none; + color: $lions-gray-600; + @include lions-transition(); + + &:hover { + background: rgba($lions-danger-500, 0.1); + color: $lions-danger-600; + transform: scale(1.1); + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + } + + // Content + .ui-overlaypanel-content { + padding: $lions-spacing-5; + max-height: 400px; + overflow-y: auto; + color: $lions-text-primary; + + // Custom scrollbar + &::-webkit-scrollbar { + width: 6px; + } + + &::-webkit-scrollbar-track { + background: $lions-gray-100; + } + + &::-webkit-scrollbar-thumb { + background: $lions-gray-400; + @include lions-rounded('full'); + + &:hover { + background: $lions-blue-500; + } + } + } + + // Footer + .ui-overlaypanel-footer { + background: linear-gradient(135deg, rgba($lions-gray-50, 0.8) 0%, rgba($lions-gray-100, 0.5) 100%); + border-top: 1px solid $lions-gray-300; + padding: $lions-spacing-3 $lions-spacing-5; + @include lions-rounded('lg'); + border-top-left-radius: 0; + border-top-right-radius: 0; + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-dialog { + max-width: 95vw !important; + max-height: 95vh !important; + margin: $lions-spacing-3 !important; + + .ui-dialog-titlebar { + padding: $lions-spacing-4 $lions-spacing-5; + + .ui-dialog-title { + @include lions-font-size('lg'); + } + } + + .ui-dialog-content { + padding: $lions-spacing-5; + } + + .ui-dialog-footer { + padding: $lions-spacing-3 $lions-spacing-5; + flex-wrap: wrap; + } + } + + .ui-sidebar { + &.ui-sidebar-left, + &.ui-sidebar-right { + width: 85vw !important; + } + + &.ui-sidebar-top, + &.ui-sidebar-bottom { + height: 50vh !important; + } + + .ui-sidebar-header, + .ui-sidebar-content, + .ui-sidebar-footer { + padding: $lions-spacing-4 $lions-spacing-5; + } + } + + .ui-overlaypanel { + max-width: 90vw !important; + + .ui-overlaypanel-content { + max-height: 300px; + padding: $lions-spacing-4; + } + } +} + +// ============================================ +// โœจ ANIMATIONS +// ============================================ + +@keyframes lions-dialog-fade-in { + from { + opacity: 0; + transform: scale(0.9) translateY(-20px); + } + to { + opacity: 1; + transform: scale(1) translateY(0); + } +} + +@keyframes lions-dialog-fade-out { + from { + opacity: 1; + transform: scale(1) translateY(0); + } + to { + opacity: 0; + transform: scale(0.9) translateY(-20px); + } +} + +.ui-dialog, +.ui-confirmdialog { + animation: lions-dialog-fade-in 300ms ease-out; + + &.ui-dialog-exit { + animation: lions-dialog-fade-out 200ms ease-in; + } +} + +.ui-overlaypanel { + animation: lions-dialog-fade-in 200ms ease-out; +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-dialog, +.ui-confirmdialog, +.ui-sidebar, +.ui-overlaypanel { + // Focus trap + &[aria-modal="true"] { + outline: none; + } + + // High contrast mode + @media (prefers-contrast: high) { + border: 3px solid currentColor !important; + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + animation: none !important; + transition: none !important; + + * { + animation: none !important; + transition: none !important; + } + } +} + +// ============================================ +// ๐ŸŽฏ DIALOG POSITIONS +// ============================================ + +.ui-dialog { + &.ui-dialog-center { + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + + &.ui-dialog-top { + top: $lions-spacing-6; + left: 50%; + transform: translateX(-50%); + } + + &.ui-dialog-bottom { + bottom: $lions-spacing-6; + left: 50%; + transform: translateX(-50%); + } + + &.ui-dialog-left { + top: 50%; + left: $lions-spacing-6; + transform: translateY(-50%); + } + + &.ui-dialog-right { + top: 50%; + right: $lions-spacing-6; + transform: translateY(-50%); + } + + &.ui-dialog-top-left { + top: $lions-spacing-6; + left: $lions-spacing-6; + } + + &.ui-dialog-top-right { + top: $lions-spacing-6; + right: $lions-spacing-6; + } + + &.ui-dialog-bottom-left { + bottom: $lions-spacing-6; + left: $lions-spacing-6; + } + + &.ui-dialog-bottom-right { + bottom: $lions-spacing-6; + right: $lions-spacing-6; + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_progress.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_progress.scss new file mode 100644 index 0000000..577531d --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_progress.scss @@ -0,0 +1,229 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Progress Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour ProgressBar (barre de progression) + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: MOYENNE #39 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐Ÿ“Š PROGRESSBAR STYLES +// ============================================ + +.ui-progressbar { + position: relative; + overflow: hidden; + height: 1rem; + @include lions-rounded('md'); + background: $lions-gray-200; + @include lions-shadow('sm'); + + .ui-progressbar-value { + height: 100%; + @include lions-gradient-blue; + @include lions-rounded('md'); + @include lions-transition(); + position: relative; + overflow: hidden; + + // Animated stripes + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background-image: linear-gradient( + 45deg, + rgba($lions-white, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba($lions-white, 0.15) 50%, + rgba($lions-white, 0.15) 75%, + transparent 75%, + transparent + ); + background-size: 1rem 1rem; + } + } + + .ui-progressbar-label { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + @include lions-font-size('xs'); + @include lions-font-weight('semibold'); + color: $lions-white; + text-shadow: 0 1px 2px rgba($lions-black, 0.3); + z-index: 2; + white-space: nowrap; + } + + // Severity variants + &.ui-progressbar-success { + .ui-progressbar-value { + @include lions-gradient-success; + } + } + + &.ui-progressbar-info { + .ui-progressbar-value { + @include lions-gradient-info; + } + } + + &.ui-progressbar-warning { + .ui-progressbar-value { + @include lions-gradient-warning; + } + } + + &.ui-progressbar-danger { + .ui-progressbar-value { + @include lions-gradient-danger; + } + } + + // Size variants + &.ui-progressbar-sm { + height: 0.5rem; + + .ui-progressbar-label { + @include lions-font-size('2xs'); + } + + .ui-progressbar-value::after { + background-size: 0.75rem 0.75rem; + } + } + + &.ui-progressbar-lg { + height: 1.5rem; + + .ui-progressbar-label { + @include lions-font-size('sm'); + } + + .ui-progressbar-value::after { + background-size: 1.5rem 1.5rem; + } + } + + // Animated stripes + &.ui-progressbar-striped { + .ui-progressbar-value::after { + animation: lions-progress-stripes 1s linear infinite; + } + } + + // Indeterminate mode + &.ui-progressbar-indeterminate { + .ui-progressbar-value { + width: 100% !important; + background: $lions-gray-200; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 30%; + @include lions-gradient-blue; + animation: lions-progress-indeterminate 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + } + + &::after { + display: none; + } + } + + &.ui-progressbar-success .ui-progressbar-value::before { + @include lions-gradient-success; + } + + &.ui-progressbar-info .ui-progressbar-value::before { + @include lions-gradient-info; + } + + &.ui-progressbar-warning .ui-progressbar-value::before { + @include lions-gradient-warning; + } + + &.ui-progressbar-danger .ui-progressbar-value::before { + @include lions-gradient-danger; + } + } +} + +// ============================================ +// ๐ŸŽฌ ANIMATIONS +// ============================================ + +@keyframes lions-progress-stripes { + 0% { + background-position: 1rem 0; + } + 100% { + background-position: 0 0; + } +} + +@keyframes lions-progress-indeterminate { + 0% { + left: -30%; + } + 100% { + left: 100%; + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-progressbar { + &.ui-progressbar-lg { + height: 1.25rem; + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-progressbar { + // High contrast mode + @media (prefers-contrast: high) { + border: 2px solid currentColor; + + .ui-progressbar-value { + border: 1px solid currentColor; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + .ui-progressbar-value::after { + animation: none !important; + } + + &.ui-progressbar-indeterminate .ui-progressbar-value::before { + animation: none !important; + left: 0; + width: 100%; + } + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_tree.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_tree.scss new file mode 100644 index 0000000..0831509 --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_tree.scss @@ -0,0 +1,677 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Tree Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour Tree et TreeTable (affichage hiรฉrarchique) + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: MOYENNE #31-32 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// ๐ŸŒณ TREE STYLES +// ============================================ + +.ui-tree { + @include lions-rounded('lg'); + border: 1px solid $lions-gray-200; + background: $lions-white; + padding: $lions-spacing-3; + @include lions-shadow('sm'); + + .ui-tree-container { + list-style: none; + margin: 0; + padding: 0; + } + + .ui-treenode { + margin: 0; + padding: 0; + list-style: none; + + .ui-treenode-content { + display: flex; + align-items: center; + gap: $lions-spacing-2; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-rounded('md'); + @include lions-transition(); + cursor: pointer; + position: relative; + + &:hover { + background: $lions-gray-50; + } + + &.ui-treenode-selectable { + &.ui-state-highlight { + background: $lions-blue-50; + color: $lions-blue-700; + @include lions-font-weight('semibold'); + + .ui-treenode-icon { + color: $lions-blue-600; + } + } + } + + &:focus-visible { + @include lions-focus-ring(); + } + } + + .ui-tree-toggler { + @include lions-button-base; + width: 1.5rem; + height: 1.5rem; + min-width: 1.5rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: 1px solid transparent; + @include lions-rounded('sm'); + color: $lions-gray-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-blue-600; + } + + .ui-tree-toggler-icon { + font-size: 0.875rem; + @include lions-transition(); + } + + &.ui-tree-toggler-expanded { + .ui-tree-toggler-icon { + transform: rotate(90deg); + } + } + } + + .ui-treenode-icon { + font-size: 1rem; + color: $lions-gray-500; + @include lions-transition(); + } + + .ui-treenode-label { + flex: 1; + @include lions-font-size('base'); + color: $lions-text-primary; + @include lions-transition(); + } + + // Child nodes + .ui-treenode-children { + list-style: none; + margin: 0; + padding-left: $lions-spacing-6; + position: relative; + + // Indent guide lines + &::before { + content: ''; + position: absolute; + left: $lions-spacing-3; + top: 0; + bottom: $lions-spacing-2; + width: 1px; + background: $lions-gray-200; + } + } + + // Leaf nodes (no children) + &.ui-treenode-leaf { + .ui-tree-toggler { + visibility: hidden; + } + } + } + + // Drag & Drop support + &.ui-tree-dragdrop { + .ui-treenode-content { + &.ui-treenode-droppable-active { + background: rgba($lions-blue-50, 0.5); + border: 2px dashed $lions-blue-400; + } + } + + .ui-treenode-droppoint { + height: 2px; + background: $lions-blue-500; + margin: $lions-spacing-1 0; + @include lions-rounded('full'); + opacity: 0; + @include lions-transition(); + + &.ui-treenode-droppoint-active { + opacity: 1; + } + } + } + + // Filter input + .ui-tree-filter-container { + margin-bottom: $lions-spacing-3; + + .ui-tree-filter { + width: 100%; + height: $lions-input-height-base; + padding: $lions-spacing-3 $lions-spacing-4; + padding-left: 2.5rem; + @include lions-rounded('md'); + border: 1px solid $lions-gray-300; + @include lions-font-size('base'); + color: $lions-text-primary; + background: $lions-white; + @include lions-transition(); + + &::placeholder { + color: $lions-gray-400; + } + + &:focus { + outline: none; + border-color: $lions-blue-500; + box-shadow: 0 0 0 3px rgba($lions-blue-500, 0.15); + } + } + + .ui-tree-filter-icon { + position: absolute; + left: $lions-spacing-3; + top: 50%; + transform: translateY(-50%); + color: $lions-gray-500; + font-size: 1rem; + } + } + + // Checkbox variant + &.ui-tree-checkbox { + .ui-chkbox { + margin-right: $lions-spacing-2; + + .ui-chkbox-box { + width: 1.125rem; + height: 1.125rem; + @include lions-rounded('sm'); + border: 2px solid $lions-gray-400; + background: $lions-white; + @include lions-transition(); + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-600; + + .ui-chkbox-icon { + color: $lions-white; + font-size: 0.75rem; + } + } + } + } + } + + // Loading state + &.ui-tree-loading { + position: relative; + + &::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba($lions-white, 0.8); + @include lions-flex-center; + z-index: 10; + } + } +} + +// ============================================ +// ๐Ÿ“Š TREE TABLE STYLES +// ============================================ + +.ui-treetable { + @include lions-rounded('lg'); + border: 1px solid $lions-gray-200; + background: $lions-white; + overflow: hidden; + @include lions-shadow('sm'); + + .ui-treetable-header { + background: $lions-gray-100; + border-bottom: 2px solid $lions-gray-300; + } + + .ui-treetable-thead { + th { + padding: $lions-spacing-4; + @include lions-font-size('sm'); + @include lions-font-weight('semibold'); + color: $lions-text-primary; + text-align: left; + background: $lions-gray-100; + border-bottom: 2px solid $lions-gray-300; + @include lions-transition(); + + &.ui-sortable-column { + cursor: pointer; + + &:hover { + background: $lions-gray-200; + } + } + + &.ui-state-active { + background: $lions-blue-50; + color: $lions-blue-700; + + .ui-sortable-column-icon { + color: $lions-blue-600; + } + } + + .ui-sortable-column-icon { + margin-left: $lions-spacing-2; + color: $lions-gray-400; + font-size: 0.875rem; + @include lions-transition(); + } + } + } + + .ui-treetable-tbody { + tr { + @include lions-transition(); + + &:hover { + background: rgba($lions-blue-50, 0.3); + } + + &.ui-state-highlight { + background: $lions-blue-50; + + td { + color: $lions-blue-700; + @include lions-font-weight('medium'); + } + } + + &.ui-treetable-row-selected { + background: $lions-blue-50; + border-left: 3px solid $lions-blue-500; + } + } + + td { + padding: $lions-spacing-4; + border-bottom: 1px solid $lions-gray-200; + @include lions-font-size('base'); + color: $lions-text-primary; + @include lions-transition(); + + &.ui-treetable-toggler { + width: 3rem; + } + } + + .ui-treetable-toggler { + @include lions-button-base; + width: 1.75rem; + height: 1.75rem; + min-width: 1.75rem; + padding: 0; + @include lions-flex-center; + background: transparent; + border: 1px solid transparent; + @include lions-rounded('md'); + color: $lions-gray-600; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-100; + border-color: $lions-gray-300; + color: $lions-blue-600; + } + + .ui-treetable-toggler-icon { + font-size: 0.875rem; + @include lions-transition(); + } + + &.ui-icon-triangle-1-e { + .ui-treetable-toggler-icon { + transform: rotate(0deg); + } + } + + &.ui-icon-triangle-1-s { + .ui-treetable-toggler-icon { + transform: rotate(90deg); + } + } + } + + // Indent for child rows + tr[data-level="1"] .ui-treetable-indent { + padding-left: $lions-spacing-6; + } + + tr[data-level="2"] .ui-treetable-indent { + padding-left: calc(#{$lions-spacing-6} * 2); + } + + tr[data-level="3"] .ui-treetable-indent { + padding-left: calc(#{$lions-spacing-6} * 3); + } + + tr[data-level="4"] .ui-treetable-indent { + padding-left: calc(#{$lions-spacing-6} * 4); + } + } + + .ui-treetable-footer { + padding: $lions-spacing-4; + background: $lions-gray-50; + border-top: 1px solid $lions-gray-200; + @include lions-font-size('sm'); + color: $lions-gray-600; + } + + // Scrollable variant + &.ui-treetable-scrollable { + .ui-treetable-scrollable-header, + .ui-treetable-scrollable-footer { + overflow: hidden; + } + + .ui-treetable-scrollable-body { + overflow: auto; + position: relative; + } + + .ui-treetable-scrollable-header-box { + border-right: 1px solid $lions-gray-200; + } + } + + // Striped rows + &.ui-treetable-striped { + .ui-treetable-tbody { + tr:nth-child(odd) { + background: $lions-gray-50; + + &:hover { + background: rgba($lions-blue-50, 0.5); + } + } + } + } + + // Resizable columns + &.ui-treetable-resizable { + .ui-treetable-thead { + th { + position: relative; + + .ui-column-resizer { + position: absolute; + top: 0; + right: 0; + width: 8px; + height: 100%; + cursor: col-resize; + background: transparent; + @include lions-transition(); + + &:hover { + background: $lions-blue-200; + } + } + } + } + } + + // Checkbox selection + &.ui-treetable-checkbox { + .ui-chkbox { + .ui-chkbox-box { + width: 1.125rem; + height: 1.125rem; + @include lions-rounded('sm'); + border: 2px solid $lions-gray-400; + background: $lions-white; + @include lions-transition(); + + &.ui-state-active { + @include lions-gradient-blue; + border-color: $lions-blue-600; + + .ui-chkbox-icon { + color: $lions-white; + font-size: 0.75rem; + } + } + } + } + } + + // Loading overlay + .ui-treetable-loading-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba($lions-white, 0.8); + @include lions-flex-center; + z-index: 10; + + .ui-treetable-loading-icon { + font-size: 2rem; + color: $lions-blue-500; + animation: lions-spin 1s linear infinite; + } + } + + // Empty message + .ui-treetable-emptymessage { + padding: $lions-spacing-8; + text-align: center; + color: $lions-gray-500; + @include lions-font-size('base'); + } +} + +// ============================================ +// ๐ŸŽฌ ANIMATIONS +// ============================================ + +@keyframes lions-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes lions-tree-expand { + 0% { + opacity: 0; + transform: translateY(-10px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} + +// Tree node expand animation +.ui-treenode-children { + animation: lions-tree-expand 0.2s ease-out; +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-tree { + .ui-treenode-content { + padding: $lions-spacing-2; + } + + .ui-treenode-children { + padding-left: $lions-spacing-4; + } + + .ui-tree-filter-container { + .ui-tree-filter { + @include lions-font-size('sm'); + } + } + } + + .ui-treetable { + .ui-treetable-thead th, + .ui-treetable-tbody td { + padding: $lions-spacing-3; + @include lions-font-size('sm'); + } + + // Responsive table mode + &.ui-treetable-responsive { + .ui-treetable-thead { + display: none; + } + + .ui-treetable-tbody { + tr { + display: block; + margin-bottom: $lions-spacing-3; + border: 1px solid $lions-gray-200; + @include lions-rounded('md'); + } + + td { + display: block; + text-align: right; + padding: $lions-spacing-3; + border-bottom: 1px solid $lions-gray-100; + + &::before { + content: attr(data-label); + float: left; + font-weight: $lions-font-semibold; + color: $lions-gray-700; + } + + &:last-child { + border-bottom: none; + } + } + } + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-tree, +.ui-treetable { + // Focus visible + .ui-treenode-content:focus-visible, + .ui-tree-toggler:focus-visible, + .ui-treetable-toggler:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + .ui-treenode-content, + .ui-tree-toggler, + .ui-treetable-toggler, + th, + td { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + + .ui-tree-toggler-icon, + .ui-treetable-toggler-icon { + transform: none !important; + } + } +} + +// ============================================ +// ๐ŸŽจ UTILITY CLASSES +// ============================================ + +// Compact tree +.ui-tree-compact { + .ui-treenode-content { + padding: $lions-spacing-1 $lions-spacing-2; + } + + .ui-treenode-label { + @include lions-font-size('sm'); + } + + .ui-treenode-children { + padding-left: $lions-spacing-4; + } +} + +// Large tree +.ui-tree-lg { + .ui-treenode-content { + padding: $lions-spacing-3 $lions-spacing-4; + } + + .ui-treenode-label { + @include lions-font-size('lg'); + } + + .ui-tree-toggler { + width: 2rem; + height: 2rem; + min-width: 2rem; + } +} + +// Borderless tree +.ui-tree-borderless { + border: none; + box-shadow: none; + padding: 0; +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/components/_utilities.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_utilities.scss new file mode 100644 index 0000000..7cfca8d --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/components/_utilities.scss @@ -0,0 +1,670 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Utility Component Styles + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Styles pour composants utilitaires + * Divider, Spacer, Inplace, ThemeSelector + * + * Version: 1.0.0 + * Date: 2 Janvier 2026 + * Author: Lions Development Team + * Priority: BASSE #27-28, #45-46 + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +@import '../variables'; +@import '../mixins'; + +// ============================================ +// โž– DIVIDER STYLES +// ============================================ + +.ui-divider { + display: flex; + align-items: center; + margin: $lions-spacing-5 0; + @include lions-transition(); + + // Horizontal divider (default) + &.ui-divider-horizontal { + flex-direction: row; + + &::before, + &::after { + content: ''; + flex: 1; + height: 1px; + background: $lions-gray-300; + } + + &.ui-divider-left::before { + flex: 0; + margin-right: $lions-spacing-4; + } + + &.ui-divider-right::after { + flex: 0; + margin-left: $lions-spacing-4; + } + + &.ui-divider-center { + &::before { + margin-right: $lions-spacing-4; + } + + &::after { + margin-left: $lions-spacing-4; + } + } + + // No content variant + &.ui-divider-no-content { + &::before { + margin-right: 0; + } + + &::after { + display: none; + } + } + } + + // Vertical divider + &.ui-divider-vertical { + flex-direction: column; + min-height: 100px; + margin: 0 $lions-spacing-5; + + &::before, + &::after { + content: ''; + flex: 1; + width: 1px; + background: $lions-gray-300; + } + + &.ui-divider-top::before { + flex: 0; + margin-bottom: $lions-spacing-4; + } + + &.ui-divider-bottom::after { + flex: 0; + margin-top: $lions-spacing-4; + } + + &.ui-divider-center { + &::before { + margin-bottom: $lions-spacing-4; + } + + &::after { + margin-top: $lions-spacing-4; + } + } + } + + // Content + .ui-divider-content { + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + color: $lions-gray-600; + padding: 0 $lions-spacing-3; + white-space: nowrap; + } + + // Style variants + &.ui-divider-solid { + &::before, + &::after { + border-style: solid; + } + } + + &.ui-divider-dashed { + &::before, + &::after { + border-style: dashed; + background: none; + border-width: 1px 0 0 0; + height: 0; + } + + &.ui-divider-vertical { + &::before, + &::after { + border-width: 0 0 0 1px; + width: 0; + } + } + } + + &.ui-divider-dotted { + &::before, + &::after { + border-style: dotted; + background: none; + border-width: 1px 0 0 0; + height: 0; + } + + &.ui-divider-vertical { + &::before, + &::after { + border-width: 0 0 0 1px; + width: 0; + } + } + } + + // Color variants + &.ui-divider-primary { + &::before, + &::after { + background: $lions-blue-300; + border-color: $lions-blue-300; + } + + .ui-divider-content { + color: $lions-blue-700; + } + } + + &.ui-divider-success { + &::before, + &::after { + background: $lions-success-300; + border-color: $lions-success-300; + } + + .ui-divider-content { + color: $lions-success-700; + } + } + + &.ui-divider-warning { + &::before, + &::after { + background: $lions-warning-300; + border-color: $lions-warning-300; + } + + .ui-divider-content { + color: $lions-warning-700; + } + } + + &.ui-divider-danger { + &::before, + &::after { + background: $lions-danger-300; + border-color: $lions-danger-300; + } + + .ui-divider-content { + color: $lions-danger-700; + } + } +} + +// ============================================ +// โฌœ SPACER STYLES +// ============================================ + +.ui-spacer { + display: block; + + // Default spacing + &.ui-spacer-horizontal { + width: 100%; + height: $lions-spacing-5; + } + + &.ui-spacer-vertical { + display: inline-block; + width: $lions-spacing-5; + height: auto; + min-height: 1px; + } + + // Size variants + &.ui-spacer-xs { + &.ui-spacer-horizontal { + height: $lions-spacing-1; + } + + &.ui-spacer-vertical { + width: $lions-spacing-1; + } + } + + &.ui-spacer-sm { + &.ui-spacer-horizontal { + height: $lions-spacing-3; + } + + &.ui-spacer-vertical { + width: $lions-spacing-3; + } + } + + &.ui-spacer-md { + &.ui-spacer-horizontal { + height: $lions-spacing-5; + } + + &.ui-spacer-vertical { + width: $lions-spacing-5; + } + } + + &.ui-spacer-lg { + &.ui-spacer-horizontal { + height: $lions-spacing-8; + } + + &.ui-spacer-vertical { + width: $lions-spacing-8; + } + } + + &.ui-spacer-xl { + &.ui-spacer-horizontal { + height: $lions-spacing-12; + } + + &.ui-spacer-vertical { + width: $lions-spacing-12; + } + } +} + +// ============================================ +// โœ๏ธ INPLACE STYLES +// ============================================ + +.ui-inplace { + display: inline-block; + position: relative; + + .ui-inplace-display { + display: inline-flex; + align-items: center; + gap: $lions-spacing-2; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-rounded('md'); + cursor: pointer; + @include lions-transition(); + @include lions-font-size('base'); + color: $lions-text-primary; + + &:hover { + background: $lions-gray-50; + } + + &:focus-visible { + @include lions-focus-ring(); + } + + .ui-inplace-display-icon { + font-size: 1rem; + color: $lions-gray-500; + margin-left: $lions-spacing-2; + } + } + + .ui-inplace-content { + display: inline-block; + padding: $lions-spacing-2; + + .ui-inplace-save, + .ui-inplace-cancel { + @include lions-button-base; + padding: $lions-spacing-2 $lions-spacing-3; + @include lions-rounded('md'); + @include lions-font-weight('semibold'); + @include lions-font-size('sm'); + margin-left: $lions-spacing-2; + cursor: pointer; + @include lions-transition(); + } + + .ui-inplace-save { + @include lions-gradient-blue; + color: $lions-white; + border: none; + + &:hover { + @include lions-shadow('md'); + transform: translateY(-1px); + } + } + + .ui-inplace-cancel { + background: $lions-gray-200; + color: $lions-gray-700; + border: 1px solid $lions-gray-300; + + &:hover { + background: $lions-gray-300; + } + } + } + + &.ui-inplace-disabled { + .ui-inplace-display { + cursor: not-allowed; + opacity: 0.6; + + &:hover { + background: transparent; + } + } + } +} + +// ============================================ +// ๐ŸŽจ THEME SELECTOR STYLES +// ============================================ + +.ui-theme-selector { + position: relative; + display: inline-block; + + .ui-theme-selector-button { + @include lions-button-base; + padding: $lions-spacing-2 $lions-spacing-4; + @include lions-rounded('md'); + background: $lions-gray-100; + border: 1px solid $lions-gray-300; + color: $lions-gray-700; + @include lions-flex-center; + gap: $lions-spacing-2; + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-200; + border-color: $lions-gray-400; + } + + &:focus-visible { + @include lions-focus-ring(); + } + + .ui-theme-selector-icon { + font-size: 1.125rem; + color: $lions-blue-600; + } + + .ui-theme-selector-label { + @include lions-font-size('sm'); + @include lions-font-weight('medium'); + } + + .ui-theme-selector-chevron { + font-size: 0.875rem; + color: $lions-gray-500; + @include lions-transition(); + } + + &.ui-state-active { + .ui-theme-selector-chevron { + transform: rotate(180deg); + } + } + } + + .ui-theme-selector-panel { + position: absolute; + top: calc(100% + $lions-spacing-2); + right: 0; + min-width: 200px; + background: $lions-white; + @include lions-rounded('lg'); + @include lions-shadow('xl'); + border: 1px solid $lions-gray-200; + padding: $lions-spacing-2; + z-index: 1000; + opacity: 0; + visibility: hidden; + transform: translateY(-10px); + @include lions-transition(); + + &.ui-state-active { + opacity: 1; + visibility: visible; + transform: translateY(0); + } + } + + .ui-theme-selector-list { + list-style: none; + margin: 0; + padding: 0; + } + + .ui-theme-selector-item { + display: flex; + align-items: center; + gap: $lions-spacing-3; + padding: $lions-spacing-3; + @include lions-rounded('md'); + cursor: pointer; + @include lions-transition(); + + &:hover { + background: $lions-gray-50; + } + + &.ui-state-active { + background: $lions-blue-50; + + .ui-theme-selector-item-label { + color: $lions-blue-700; + @include lions-font-weight('semibold'); + } + + .ui-theme-selector-item-check { + opacity: 1; + } + } + + .ui-theme-selector-item-preview { + width: 2rem; + height: 2rem; + @include lions-rounded('md'); + border: 2px solid $lions-gray-300; + display: flex; + overflow: hidden; + + .ui-theme-color { + flex: 1; + height: 100%; + } + } + + .ui-theme-selector-item-label { + flex: 1; + @include lions-font-size('sm'); + color: $lions-text-primary; + } + + .ui-theme-selector-item-check { + font-size: 1rem; + color: $lions-blue-600; + opacity: 0; + @include lions-transition(); + } + } +} + +// ============================================ +// ๐ŸŽฏ SKELETON LOADER (Bonus Utility) +// ============================================ + +.ui-skeleton { + background: linear-gradient( + 90deg, + $lions-gray-200 0%, + $lions-gray-100 50%, + $lions-gray-200 100% + ); + background-size: 200% 100%; + animation: lions-skeleton-loading 1.5s ease-in-out infinite; + @include lions-rounded('md'); + + &.ui-skeleton-circle { + @include lions-rounded('full'); + width: 3rem; + height: 3rem; + } + + &.ui-skeleton-text { + height: 1rem; + width: 100%; + + &.ui-skeleton-sm { + height: 0.75rem; + } + + &.ui-skeleton-lg { + height: 1.25rem; + } + } + + &.ui-skeleton-rect { + width: 100%; + height: 10rem; + } + + &.ui-skeleton-button { + width: 8rem; + height: 2.5rem; + } + + &.ui-skeleton-card { + width: 100%; + height: 15rem; + } +} + +@keyframes lions-skeleton-loading { + 0% { + background-position: 200% 0; + } + 100% { + background-position: -200% 0; + } +} + +// ============================================ +// ๐Ÿ“ฑ RESPONSIVE ADJUSTMENTS +// ============================================ + +@media (max-width: $lions-breakpoint-md) { + .ui-divider { + &.ui-divider-horizontal { + margin: $lions-spacing-4 0; + + .ui-divider-content { + @include lions-font-size('xs'); + } + } + + &.ui-divider-vertical { + min-height: 60px; + margin: 0 $lions-spacing-3; + } + } + + .ui-theme-selector { + .ui-theme-selector-panel { + right: auto; + left: 0; + } + } + + .ui-inplace { + .ui-inplace-display { + padding: $lions-spacing-2; + @include lions-font-size('sm'); + } + } +} + +// ============================================ +// โ™ฟ ACCESSIBILITY ENHANCEMENTS +// ============================================ + +.ui-inplace, +.ui-theme-selector { + // Focus visible + button:focus-visible, + .ui-inplace-display:focus-visible, + .ui-theme-selector-button:focus-visible { + @include lions-focus-ring(); + } + + // High contrast mode + @media (prefers-contrast: high) { + border-width: 2px !important; + + button, + .ui-inplace-display, + .ui-theme-selector-button { + border-width: 2px !important; + } + } + + // Reduced motion + @media (prefers-reduced-motion: reduce) { + * { + transition: none !important; + animation: none !important; + } + } +} + +// Skeleton - Reduced motion +@media (prefers-reduced-motion: reduce) { + .ui-skeleton { + animation: none !important; + background: $lions-gray-200; + } +} + +// ============================================ +// ๐ŸŽจ UTILITY CLASSES +// ============================================ + +// Hidden divider (just for spacing) +.ui-divider-hidden { + &::before, + &::after { + display: none !important; + } +} + +// Thick divider +.ui-divider-thick { + &::before, + &::after { + height: 2px !important; + + &.ui-divider-vertical { + width: 2px !important; + height: auto !important; + } + } +} + +// Inplace full width +.ui-inplace-fullwidth { + display: block; + width: 100%; + + .ui-inplace-display { + width: 100%; + } +} diff --git a/runtime/src/main/resources/META-INF/resources/sass/lions/lions.scss b/runtime/src/main/resources/META-INF/resources/sass/lions/lions.scss new file mode 100644 index 0000000..8a7e16d --- /dev/null +++ b/runtime/src/main/resources/META-INF/resources/sass/lions/lions.scss @@ -0,0 +1,73 @@ +/* + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Lions.dev - Main SCSS Entry Point + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + * Systรจme de design complet Lions.dev pour Freya Extension + * + * Version: 1.0.0 + * Date: 1er Janvier 2026 + * Author: Lions Development Team + * โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• + */ + +// ============================================ +// ๐Ÿ—๏ธ FONDATIONS +// ============================================ + +// Variables globales +@import 'variables'; + +// Mixins utilitaires +@import 'mixins'; + +// ============================================ +// ๐Ÿงฉ COMPOSANTS +// ============================================ + +// Boutons (โœ… COMPLร‰Tร‰ - Priority #1-4) +@import 'components/button'; + +// Champs de formulaire (โœ… COMPLร‰Tร‰ - Priority #5-8) +@import 'components/field'; + +// Layout - Card & Panel (โœ… COMPLร‰Tร‰ - Priority #9-10) +@import 'components/card'; + +// Data Display - DataTable & DataView (โœ… COMPLร‰Tร‰ - Priority #16-17) +@import 'components/data'; + +// Messages & Notifications - Messages, Toast, Growl (โœ… COMPLร‰Tร‰ - Priority #18-20) +@import 'components/messages'; + +// Overlays - Dialog, ConfirmDialog, Sidebar, OverlayPanel (โœ… COMPLร‰Tร‰ - Priority #21-24) +@import 'components/overlays'; + +// Navigation - Menu, Menubar, TabView (โœ… COMPLร‰Tร‰ - Priority #25-27) +@import 'components/navigation'; + +// Form Controls - Checkbox, Radio, Switch, Toggle, Slider, Rating (โœ… COMPLร‰Tร‰ - Priority #28-33) +@import 'components/form-controls'; + +// Display - Avatar, Badge, Tag (โœ… COMPLร‰Tร‰ - Priority #34-36) +@import 'components/display'; + +// Breadcrumb & Steps - Navigation secondaire (โœ… COMPLร‰Tร‰ - Priority #37-38) +@import 'components/breadcrumb-steps'; + +// Progress - Barre de progression (โœ… COMPLร‰Tร‰ - Priority #39) +@import 'components/progress'; + +// Form Advanced - Spinner, Mask, Chips, ColorPicker, Editor, FileUpload (โœ… COMPLร‰Tร‰ - Priority #40-44) +@import 'components/form-advanced'; + +// Tree & TreeTable - Affichage hiรฉrarchique (โœ… COMPLร‰Tร‰ - Priority #31-32) +@import 'components/tree'; + +// Utilities - Divider, Spacer, Inplace, ThemeSelector (โœ… COMPLร‰Tร‰ - Priority #27-28, #45-46) +@import 'components/utilities'; + +// Chart - Visualisation de donnรฉes avec Chart.js (โœ… COMPLร‰Tร‰ - Priority #44) +@import 'components/chart'; + +// โœ… TOUS LES COMPOSANTS LIONS.DEV COMPLร‰Tร‰S! +// Total: 46 composants avec styles complets