Skip to content

Commit 637a1ee

Browse files
committed
update design
1 parent 4b85d40 commit 637a1ee

File tree

21 files changed

+100
-41
lines changed

21 files changed

+100
-41
lines changed

.github/workflows/elixir.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
permissions:
1010
contents: read
1111

12+
env:
13+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
14+
1215
jobs:
1316
unit-tests:
1417
name: Unit tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }})

e2e/assets/corex/components/data-table.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
@layer components {
44

55
.data-table {
6-
@apply ui-root scrollbar;
6+
@apply scrollbar;
7+
display: block;
78
width: 100%;
89
max-width: 100%;
10+
min-width: 0;
911
overflow-x: auto;
1012
overflow-y: hidden;
1113
border-radius: var(--radius-ui);
1214
border: 1px solid var(--color-ui--border);
1315
}
1416

1517
.data-table [data-scope="data-table"][data-part="root"] {
16-
@apply ui-root;
17-
18-
width: 100%;
18+
display: table;
19+
width: max-content;
20+
min-width: 100%;
1921
max-width: none;
2022
border-collapse: collapse;
21-
gap: 0;
2223
}
2324

2425
.data-table [data-scope="data-table"][data-part="thead"] {
2526
border-bottom: 1px solid var(--color-ui--border);
2627
color: var(--color-ui--text);
2728
text-transform: uppercase;
28-
background-color: var(--color-ui-active);
2929
font-size: var(--text-ui-sm);
3030
}
3131

@@ -37,6 +37,7 @@
3737
font-weight: var(--font-weight-ui-bold);
3838
white-space: nowrap;
3939
width: 1%;
40+
background-color: var(--color-ui-active);
4041
}
4142

4243
.data-table [data-scope="data-table"][data-part="action-header"] {

e2e/assets/corex/components/layout.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
display: flex;
99
flex-direction: column;
1010
min-height: 100vh;
11+
min-width: 0;
1112
color: var(--color-root--text);
1213
background: var(--color-root);
14+
overflow-x: hidden;
1315
overflow-y: scroll;
1416

1517
scrollbar-gutter: stable;
@@ -58,6 +60,7 @@
5860
display: flex;
5961
flex: 1;
6062
width: 100%;
63+
min-width: 0;
6164
justify-content: flex-start;
6265
margin-inline: auto;
6366
background-color: var(--color-root);
@@ -107,6 +110,7 @@
107110
flex-direction: row;
108111
width: 100%;
109112
flex: 1;
113+
min-width: 0;
110114
justify-content: flex-start;
111115
align-items: center;
112116
}
@@ -116,6 +120,7 @@
116120
flex-direction: column;
117121
width: 100%;
118122
flex: 1;
123+
min-width: 0;
119124
justify-content: flex-start;
120125
align-items: center;
121126
padding: var(--spacing-ui-padding);

e2e/assets/corex/components/native-input.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
.native-input [data-scope="native-input"][data-part="error"] {
5757
@apply ui-error;
58+
margin-block-start: var(--spacing-ui-gap);
5859
}
5960

6061
.native-input [data-scope="native-input"][data-part="control"] label[data-part="label"] {

e2e/assets/corex/components/number-input.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@
6565
border-start-end-radius: 0;
6666
border-block-start: 0;
6767
}
68+
69+
.number-input [data-scope="number-input"][data-part="error"] {
70+
@apply ui-error;
71+
}
6872
}

installer/templates/corex_design/components/data-table.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
@layer components {
44

55
.data-table {
6-
@apply ui-root scrollbar;
6+
@apply scrollbar;
7+
display: block;
78
width: 100%;
89
max-width: 100%;
10+
min-width: 0;
911
overflow-x: auto;
1012
overflow-y: hidden;
1113
border-radius: var(--radius-ui);
1214
border: 1px solid var(--color-ui--border);
1315
}
1416

1517
.data-table [data-scope="data-table"][data-part="root"] {
16-
@apply ui-root;
17-
18-
width: 100%;
18+
display: table;
19+
width: max-content;
20+
min-width: 100%;
1921
max-width: none;
2022
border-collapse: collapse;
21-
gap: 0;
2223
}
2324

2425
.data-table [data-scope="data-table"][data-part="thead"] {
2526
border-bottom: 1px solid var(--color-ui--border);
2627
color: var(--color-ui--text);
2728
text-transform: uppercase;
28-
background-color: var(--color-ui-active);
2929
font-size: var(--text-ui-sm);
3030
}
3131

@@ -37,6 +37,7 @@
3737
font-weight: var(--font-weight-ui-bold);
3838
white-space: nowrap;
3939
width: 1%;
40+
background-color: var(--color-ui-active);
4041
}
4142

4243
.data-table [data-scope="data-table"][data-part="action-header"] {

installer/templates/corex_design/components/layout.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
display: flex;
99
flex-direction: column;
1010
min-height: 100vh;
11+
min-width: 0;
1112
color: var(--color-root--text);
1213
background: var(--color-root);
14+
overflow-x: hidden;
1315
overflow-y: scroll;
1416

1517
scrollbar-gutter: stable;
@@ -58,6 +60,7 @@
5860
display: flex;
5961
flex: 1;
6062
width: 100%;
63+
min-width: 0;
6164
justify-content: flex-start;
6265
margin-inline: auto;
6366
background-color: var(--color-root);
@@ -107,6 +110,7 @@
107110
flex-direction: row;
108111
width: 100%;
109112
flex: 1;
113+
min-width: 0;
110114
justify-content: flex-start;
111115
align-items: center;
112116
}
@@ -116,6 +120,7 @@
116120
flex-direction: column;
117121
width: 100%;
118122
flex: 1;
123+
min-width: 0;
119124
justify-content: flex-start;
120125
align-items: center;
121126
padding: var(--spacing-ui-padding);

installer/templates/corex_design/components/native-input.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
.native-input [data-scope="native-input"][data-part="error"] {
5757
@apply ui-error;
58+
margin-block-start: var(--spacing-ui-gap);
5859
}
5960

6061
.native-input [data-scope="native-input"][data-part="control"] label[data-part="label"] {

installer/templates/corex_design/components/number-input.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@
6565
border-start-end-radius: 0;
6666
border-block-start: 0;
6767
}
68+
69+
.number-input [data-scope="number-input"][data-part="error"] {
70+
@apply ui-error;
71+
}
6872
}

lib/mix/tasks/corex.gen.live.ex

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ defmodule Mix.Tasks.Corex.Gen.Live do
266266
if schema.web_namespace do
267267
Mix.shell().info("""
268268
269-
Add the live routes to your #{schema.web_namespace} :browser scope in #{web_path}/router.ex:
269+
#{scope_instruction}
270270
271271
scope "/#{schema.web_path}", #{inspect(prefix)} do
272272
pipe_through :browser
@@ -327,9 +327,6 @@ defmodule Mix.Tasks.Corex.Gen.Live do
327327
schema.attrs
328328
|> Enum.reject(fn {_key, type} -> type == :map end)
329329
|> Enum.map(fn
330-
{_, {:references, _}} ->
331-
nil
332-
333330
{key, :integer} ->
334331
number_input_block(key, nil)
335332

@@ -366,7 +363,6 @@ defmodule Mix.Tasks.Corex.Gen.Live do
366363
{key, _} ->
367364
native_input_block("text", key, error_slot: true)
368365
end)
369-
|> Enum.reject(&is_nil/1)
370366
end
371367

372368
defp number_input_block(key, step) do
@@ -378,7 +374,7 @@ defmodule Mix.Tasks.Corex.Gen.Live do
378374
end
379375

380376
~s"""
381-
<.number_input field={@form[#{inspect(key)}]} controlled class="number-input"#{step_lines}>
377+
<.number_input field={@form[#{inspect(key)}]} class="number-input"#{step_lines}>
382378
<:label>#{label(key)}</:label>
383379
<:decrement_trigger><.heroicon name="hero-chevron-down" class="icon" /></:decrement_trigger>
384380
<:increment_trigger><.heroicon name="hero-chevron-up" class="icon" /></:increment_trigger>
@@ -392,7 +388,7 @@ defmodule Mix.Tasks.Corex.Gen.Live do
392388

393389
defp checkbox_block(key) do
394390
~s"""
395-
<.checkbox field={@form[#{inspect(key)}]} class="checkbox" controlled>
391+
<.checkbox field={@form[#{inspect(key)}]} class="checkbox">
396392
<:label>#{label(key)}</:label>
397393
<:indicator>
398394
<.heroicon name="hero-check" class="data-checked" />
@@ -407,7 +403,7 @@ defmodule Mix.Tasks.Corex.Gen.Live do
407403

408404
defp date_picker_block(key) do
409405
~s"""
410-
<.date_picker field={@form[#{inspect(key)}]} class="date-picker" controlled>
406+
<.date_picker field={@form[#{inspect(key)}]} class="date-picker">
411407
<:label>#{label(key)}</:label>
412408
<:trigger>
413409
<.heroicon name="hero-calendar" class="icon" />

0 commit comments

Comments
 (0)