Skip to content

Commit 1a3e97f

Browse files
committed
Merge branch '4.x' into 5.x
2 parents b4d1400 + 7062ee7 commit 1a3e97f

4 files changed

Lines changed: 68 additions & 1 deletion

File tree

docs/12-components/03-avatar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ You can also pass your own custom size classes into the `size` attribute:
5252
alt="Dan Harrin"
5353
size="w-12 h-12"
5454
/>
55+
```

packages/forms/resources/lang/en/components.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,35 @@
548548

549549
'color' => [
550550
'label' => 'Color',
551+
552+
'options' => [
553+
'slate' => 'Slate',
554+
'gray' => 'Gray',
555+
'zinc' => 'Zinc',
556+
'neutral' => 'Neutral',
557+
'stone' => 'Stone',
558+
'mauve' => 'Mauve',
559+
'olive' => 'Olive',
560+
'mist' => 'Mist',
561+
'taupe' => 'Taupe',
562+
'red' => 'Red',
563+
'orange' => 'Orange',
564+
'amber' => 'Amber',
565+
'yellow' => 'Yellow',
566+
'lime' => 'Lime',
567+
'green' => 'Green',
568+
'emerald' => 'Emerald',
569+
'teal' => 'Teal',
570+
'cyan' => 'Cyan',
571+
'sky' => 'Sky',
572+
'blue' => 'Blue',
573+
'indigo' => 'Indigo',
574+
'violet' => 'Violet',
575+
'purple' => 'Purple',
576+
'fuchsia' => 'Fuchsia',
577+
'pink' => 'Pink',
578+
'rose' => 'Rose',
579+
],
551580
],
552581

553582
'custom_color' => [

packages/forms/resources/lang/fr/components.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,35 @@
548548

549549
'color' => [
550550
'label' => 'Couleur',
551+
552+
'options' => [
553+
'slate' => 'Ardoise',
554+
'gray' => 'Gris',
555+
'zinc' => 'Zinc',
556+
'neutral' => 'Neutre',
557+
'stone' => 'Pierre',
558+
'mauve' => 'Mauve',
559+
'olive' => 'Olive',
560+
'mist' => 'Brume',
561+
'taupe' => 'Taupe',
562+
'red' => 'Rouge',
563+
'orange' => 'Orange',
564+
'amber' => 'Ambre',
565+
'yellow' => 'Jaune',
566+
'lime' => 'Citron vert',
567+
'green' => 'Vert',
568+
'emerald' => 'Émeraude',
569+
'teal' => 'Sarcelle',
570+
'cyan' => 'Cyan',
571+
'sky' => 'Ciel',
572+
'blue' => 'Bleu',
573+
'indigo' => 'Indigo',
574+
'violet' => 'Violet',
575+
'purple' => 'Pourpre',
576+
'fuchsia' => 'Fuchsia',
577+
'pink' => 'Rose',
578+
'rose' => 'Rosé',
579+
],
551580
],
552581

553582
'custom_color' => [

packages/forms/src/Components/RichEditor/TextColor.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,17 @@ public function getDarkColor(): ?string
4848
*/
4949
public static function getDefaults(): array
5050
{
51+
$translations = __('filament-forms::components.rich_editor.actions.text_color.modal.form.color.options');
52+
5153
return Arr::mapWithKeys(
5254
Color::all(),
53-
fn (array $color, string $name): array => [$name => TextColor::make(Str::ucwords($name), $color['600'], $color['400'] ?? null)],
55+
static fn (array $color, string $name): array => [$name => TextColor::make(
56+
is_array($translations) && array_key_exists($name, $translations)
57+
? $translations[$name]
58+
: Str::ucwords($name),
59+
$color['600'],
60+
$color['400'] ?? null,
61+
)],
5462
);
5563
}
5664
}

0 commit comments

Comments
 (0)