From 07478f005d18eb688f7ed4c00063111c4786236d Mon Sep 17 00:00:00 2001
From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com>
Date: Tue, 30 Sep 2025 16:47:49 +0200
Subject: [PATCH 1/5] added table view component
---
components/table-view/Component.php | 44 +++++++++++++++++++
components/table-view/style.scss | 39 +++++++++++++++++
components/table-view/view.blade.php | 10 +++++
src/Components/Publishers/TableView.php | 56 +++++++++++++++++++++++++
4 files changed, 149 insertions(+)
create mode 100644 components/table-view/Component.php
create mode 100644 components/table-view/style.scss
create mode 100644 components/table-view/view.blade.php
create mode 100644 src/Components/Publishers/TableView.php
diff --git a/components/table-view/Component.php b/components/table-view/Component.php
new file mode 100644
index 0000000..2424086
--- /dev/null
+++ b/components/table-view/Component.php
@@ -0,0 +1,44 @@
+ColumnTitle = $ColumnTitle;
+ $this->columns = $columns;
+ $this->link = $link;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ */
+ public function render(): View|Closure|string
+ {
+ return view('components.table-view');
+ }
+}
diff --git a/components/table-view/style.scss b/components/table-view/style.scss
new file mode 100644
index 0000000..b0cff3a
--- /dev/null
+++ b/components/table-view/style.scss
@@ -0,0 +1,39 @@
+.list-item {
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ padding: 1.5rem 8.5277777778% 1.5rem 0;
+ position: relative;
+
+ &__title {
+ color: #212236;
+ font-family: false semibold, Helvetica, Arial, sans-serif;
+ font-size: 1.25rem;
+ font-style: normal;
+ font-weight: 600;
+ min-width: 57.3611111111%;
+ width: 50%;
+ }
+
+ &__infos {
+ align-items: center;
+ display: flex;
+ flex: 1;
+ flex-shrink: 0;
+ flex-wrap: wrap;
+ gap: 1rem;
+ justify-content: space-between;
+ min-width: 300px;
+ }
+
+ &__info {
+ color: rgba(33, 34, 54, .5);
+ flex-shrink: 0;
+ font-family: IBM Plex Mono, Helvetica, Arial, sans-serif;
+ font-size: .75rem;
+ font-style: normal;
+ font-weight: 400;
+ text-transform: uppercase;
+ }
+}
diff --git a/components/table-view/view.blade.php b/components/table-view/view.blade.php
new file mode 100644
index 0000000..998d6dc
--- /dev/null
+++ b/components/table-view/view.blade.php
@@ -0,0 +1,10 @@
+
+
+ {{ $ColumnTitle }}
+
+
+ @foreach($columns as $column)
+ - {{ $column }}
+ @endforeach
+
+
diff --git a/src/Components/Publishers/TableView.php b/src/Components/Publishers/TableView.php
new file mode 100644
index 0000000..d1207b5
--- /dev/null
+++ b/src/Components/Publishers/TableView.php
@@ -0,0 +1,56 @@
+columns = [
+ "Première colonne",
+ "Deuxième colonne",
+ "Troisième colonne",
+ ];
+ return "1. Add `@import 'parts/table-view';` to `resources/sass/app.scss`\r\n2. Use the blade component: `columns\" link=\"#\" />`";
+ }
+}
From 1633572b668f085ccd2d6d1561e22aeda32cc6fc Mon Sep 17 00:00:00 2001
From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com>
Date: Tue, 30 Sep 2025 17:10:37 +0200
Subject: [PATCH 2/5] fix array use in prompt
---
src/Components/Publishers/TableView.php | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/Components/Publishers/TableView.php b/src/Components/Publishers/TableView.php
index d1207b5..1a9dfdd 100644
--- a/src/Components/Publishers/TableView.php
+++ b/src/Components/Publishers/TableView.php
@@ -46,11 +46,6 @@ public function handle(): FilesCollection
*/
public function instructions(): ?string
{
- $this->columns = [
- "Première colonne",
- "Deuxième colonne",
- "Troisième colonne",
- ];
- return "1. Add `@import 'parts/table-view';` to `resources/sass/app.scss`\r\n2. Use the blade component: `columns\" link=\"#\" />`";
+ return "1. Add `@import 'parts/table-view';` to `resources/sass/app.scss`\r\n2. Use the blade component: ``";
}
}
From d100ac5a81c129a4d4e132683824b2238ac4674d Mon Sep 17 00:00:00 2001
From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com>
Date: Tue, 30 Sep 2025 17:24:23 +0200
Subject: [PATCH 3/5] fix case
---
components/table-view/Component.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/table-view/Component.php b/components/table-view/Component.php
index 2424086..478e545 100644
--- a/components/table-view/Component.php
+++ b/components/table-view/Component.php
@@ -27,9 +27,9 @@ class TableView extends Component
/**
* Create a new component instance.
*/
- public function __construct(string $ColumnTitle, array $columns, string $link)
+ public function __construct(string $column_title, array $columns, string $link)
{
- $this->ColumnTitle = $ColumnTitle;
+ $this->ColumnTitle = $column_title;
$this->columns = $columns;
$this->link = $link;
}
From 060882a5a73b7d993a0fef9f2aed09c3004bd278 Mon Sep 17 00:00:00 2001
From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com>
Date: Tue, 30 Sep 2025 17:42:48 +0200
Subject: [PATCH 4/5] fix case
---
components/table-view/Component.php | 5 +++--
src/Components/Publishers/TableView.php | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/table-view/Component.php b/components/table-view/Component.php
index 478e545..e291a00 100644
--- a/components/table-view/Component.php
+++ b/components/table-view/Component.php
@@ -13,7 +13,7 @@ class TableView extends Component
/**
* The Table Row main column text
*/
- public string $ColumnTitle;
+ public string $column_title;
/**
* The Table Row other columns
@@ -29,11 +29,12 @@ class TableView extends Component
*/
public function __construct(string $column_title, array $columns, string $link)
{
- $this->ColumnTitle = $column_title;
+ $this->column_title = $column_title;
$this->columns = $columns;
$this->link = $link;
}
+
/**
* Get the view / contents that represent the component.
*/
diff --git a/src/Components/Publishers/TableView.php b/src/Components/Publishers/TableView.php
index 1a9dfdd..5b3d5d6 100644
--- a/src/Components/Publishers/TableView.php
+++ b/src/Components/Publishers/TableView.php
@@ -46,6 +46,6 @@ public function handle(): FilesCollection
*/
public function instructions(): ?string
{
- return "1. Add `@import 'parts/table-view';` to `resources/sass/app.scss`\r\n2. Use the blade component: ``";
+ return "1. Add `@import 'parts/table-view';` to `resources/sass/app.scss`\r\n2. Use the blade component: ``";
}
}
From 14ee378475896f6b62666ea5476bba2aae4fb0d0 Mon Sep 17 00:00:00 2001
From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com>
Date: Wed, 1 Oct 2025 10:08:25 +0200
Subject: [PATCH 5/5] fix component and add link and icon on table row
---
components/table-view/Component.php | 7 +++---
components/table-view/style.scss | 36 ++++++++++++++++++++++++++++
components/table-view/view.blade.php | 4 +++-
3 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/components/table-view/Component.php b/components/table-view/Component.php
index e291a00..7f29592 100644
--- a/components/table-view/Component.php
+++ b/components/table-view/Component.php
@@ -13,7 +13,7 @@ class TableView extends Component
/**
* The Table Row main column text
*/
- public string $column_title;
+ public string $rowTitle;
/**
* The Table Row other columns
@@ -24,12 +24,13 @@ class TableView extends Component
* The Table Row link
*/
public string $link;
+
/**
* Create a new component instance.
*/
- public function __construct(string $column_title, array $columns, string $link)
+ public function __construct(string $rowTitle, array $columns, string $link)
{
- $this->column_title = $column_title;
+ $this->rowTitle = $rowTitle;
$this->columns = $columns;
$this->link = $link;
}
diff --git a/components/table-view/style.scss b/components/table-view/style.scss
index b0cff3a..f9c46ad 100644
--- a/components/table-view/style.scss
+++ b/components/table-view/style.scss
@@ -5,6 +5,8 @@
justify-content: space-between;
padding: 1.5rem 8.5277777778% 1.5rem 0;
position: relative;
+ width: 100%;
+ border-bottom: 0.1rem solid rgba(33, 34, 54, .1);
&__title {
color: #212236;
@@ -36,4 +38,38 @@
font-weight: 400;
text-transform: uppercase;
}
+ &__link{
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ text-indent: -999999px;
+ top: 0;
+ z-index: 1;
+ }
+ &__icon{
+ background-color: #fff;
+ border-radius: 100vw;
+ box-shadow: inset 0 0 0 1px #f1f1f2;
+ display: block;
+ height: 2.75rem;
+ margin-left: auto;
+ position: absolute;
+ right: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ transition: all .2s cubic-bezier(.25,.46,.45,.94);
+ width: 2.75rem;
+
+ &:after{
+ align-items: center;
+ content: url("../../icons/arrow-right.svg");
+ scale: 30%;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ justify-content: center;
+ line-height: 1;
+ }
+ }
}
diff --git a/components/table-view/view.blade.php b/components/table-view/view.blade.php
index 998d6dc..2e11f14 100644
--- a/components/table-view/view.blade.php
+++ b/components/table-view/view.blade.php
@@ -1,10 +1,12 @@
- {{ $ColumnTitle }}
+ {{ $rowTitle }}
@foreach($columns as $column)
- {{ $column }}
@endforeach
+ Voir la ressource
+