cafe_car 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +682 -8
- data/Rakefile +21 -0
- data/app/assets/fonts/Lexend.css +7 -0
- data/app/assets/fonts/Lexend.ttf +0 -0
- data/app/assets/images/noise.svg +16 -0
- data/app/assets/stylesheets/actiontext.css +31 -0
- data/app/assets/stylesheets/application.css +1 -0
- data/app/assets/stylesheets/cafe_car/code/base16-dark.css +89 -0
- data/app/assets/stylesheets/cafe_car/code/base16-light.css +90 -0
- data/app/assets/stylesheets/cafe_car/pagination.css +5 -0
- data/app/assets/stylesheets/cafe_car/themes/cool.css +32 -0
- data/app/assets/stylesheets/cafe_car/themes/cool2.css +31 -0
- data/app/assets/stylesheets/cafe_car/themes/defaults.css +60 -0
- data/app/assets/stylesheets/cafe_car/themes/warm-dark.css +29 -0
- data/app/assets/stylesheets/cafe_car/themes/warm.css +24 -0
- data/app/assets/stylesheets/cafe_car/tooltips.css +20 -0
- data/app/assets/stylesheets/cafe_car/trix.css +56 -0
- data/app/assets/stylesheets/cafe_car/utility.css +63 -0
- data/app/assets/stylesheets/cafe_car.css +96 -0
- data/app/assets/stylesheets/iconoir.css +22 -0
- data/app/assets/stylesheets/ui/Alert.css +25 -0
- data/app/assets/stylesheets/ui/Article.css +11 -0
- data/app/assets/stylesheets/ui/Button.css +42 -0
- data/app/assets/stylesheets/ui/Card.css +74 -0
- data/app/assets/stylesheets/ui/Chat.css +33 -0
- data/app/assets/stylesheets/ui/Close.css +11 -0
- data/app/assets/stylesheets/ui/Code.css +4 -0
- data/app/assets/stylesheets/ui/Controls.css +16 -0
- data/app/assets/stylesheets/ui/Error.css +3 -0
- data/app/assets/stylesheets/ui/Example.css +45 -0
- data/app/assets/stylesheets/ui/Field.css +31 -0
- data/app/assets/stylesheets/ui/Grid.css +6 -0
- data/app/assets/stylesheets/ui/Group.css +16 -0
- data/app/assets/stylesheets/ui/Icon.css +27 -0
- data/app/assets/stylesheets/ui/Image.css +14 -0
- data/app/assets/stylesheets/ui/InfoCircle.css +11 -0
- data/app/assets/stylesheets/ui/Input.css +36 -0
- data/app/assets/stylesheets/ui/Layout.css +100 -0
- data/app/assets/stylesheets/ui/Menu.css +38 -0
- data/app/assets/stylesheets/ui/Modal.css +26 -0
- data/app/assets/stylesheets/ui/Navigation.css +37 -0
- data/app/assets/stylesheets/ui/Page.css +105 -0
- data/app/assets/stylesheets/ui/Row.css +9 -0
- data/app/assets/stylesheets/ui/Table.css +101 -0
- data/app/assets/stylesheets/ui/components.css +24 -0
- data/app/controllers/cafe_car/application_controller.rb +9 -0
- data/app/controllers/cafe_car/examples_controller.rb +22 -0
- data/app/controllers/cafe_car/sessions_controller.rb +30 -0
- data/app/controllers/concerns/cafe_car/authentication.rb +61 -0
- data/app/javascript/application.js +5 -0
- data/app/javascript/cafe_car.js +174 -0
- data/app/models/cafe_car/session.rb +18 -0
- data/app/policies/cafe_car/application_policy.rb +42 -0
- data/app/policies/cafe_car/session_policy.rb +19 -0
- data/app/presenters/cafe_car/action_text/rich_text_presenter.rb +7 -0
- data/app/presenters/cafe_car/active_record/base_presenter.rb +6 -0
- data/app/presenters/cafe_car/active_record/relation_presenter.rb +17 -0
- data/app/presenters/cafe_car/active_storage/attached/one_presenter.rb +9 -0
- data/app/presenters/cafe_car/active_storage/attachment_presenter.rb +18 -0
- data/app/presenters/cafe_car/basic_object_presenter.rb +5 -0
- data/app/presenters/cafe_car/code_presenter.rb +18 -0
- data/app/presenters/cafe_car/currency_presenter.rb +5 -0
- data/app/presenters/cafe_car/date_and_time/compatibility_presenter.rb +6 -0
- data/app/presenters/cafe_car/date_presenter.rb +5 -0
- data/app/presenters/cafe_car/date_time_presenter.rb +11 -0
- data/app/presenters/cafe_car/enumerable_presenter.rb +13 -0
- data/app/presenters/cafe_car/false_class_presenter.rb +5 -0
- data/app/presenters/cafe_car/hash_presenter.rb +6 -0
- data/app/presenters/cafe_car/nil_class_presenter.rb +13 -0
- data/app/presenters/cafe_car/presenter.rb +157 -0
- data/app/presenters/cafe_car/range_presenter.rb +16 -0
- data/app/presenters/cafe_car/record_presenter.rb +5 -0
- data/app/presenters/cafe_car/string_presenter.rb +20 -0
- data/app/presenters/cafe_car/symbol_presenter.rb +5 -0
- data/app/presenters/cafe_car/true_class_presenter.rb +5 -0
- data/app/ui/cafe_car/ui/button.rb +9 -0
- data/app/ui/cafe_car/ui/card.rb +18 -0
- data/app/ui/cafe_car/ui/field.rb +11 -0
- data/app/ui/cafe_car/ui/grid.rb +30 -0
- data/app/ui/cafe_car/ui/layout.rb +7 -0
- data/app/ui/cafe_car/ui/page.rb +14 -0
- data/app/views/application/_actions.html.haml +1 -0
- data/app/views/application/_alerts.html.haml +2 -0
- data/app/views/application/_body.html.haml +7 -0
- data/app/views/application/_controls.html.haml +12 -0
- data/app/views/application/_debug.html.haml +18 -0
- data/app/views/application/_empty.html.haml +1 -0
- data/app/views/application/_errors.html.haml +4 -0
- data/app/views/application/_field.html.haml +5 -0
- data/app/views/application/_fields.html.haml +1 -0
- data/app/views/application/_filters.html.haml +8 -0
- data/app/views/application/_form.html.haml +6 -0
- data/app/views/application/_grid.html.haml +3 -0
- data/app/views/application/_grid_item.html.haml +1 -0
- data/app/views/application/_head.html.haml +17 -0
- data/app/views/application/_index.html.haml +8 -0
- data/app/views/application/_index_actions.html.haml +7 -0
- data/app/views/application/_navigation.html.haml +9 -0
- data/app/views/application/_navigation_links.html.haml +5 -0
- data/app/views/application/_notes.html.haml +10 -0
- data/app/views/application/_popup.html.haml +7 -0
- data/app/views/application/_show.html.haml +9 -0
- data/app/views/application/_submit.html.haml +1 -0
- data/app/views/application/_table.html.haml +6 -0
- data/app/views/cafe_car/application/create.turbo_stream.haml +2 -0
- data/app/views/cafe_car/application/destroy.turbo_stream.haml +1 -0
- data/app/views/cafe_car/application/edit.html.haml +18 -0
- data/app/views/cafe_car/application/edit.turbo_stream.haml +7 -0
- data/app/views/cafe_car/application/index.html.haml +15 -0
- data/app/views/cafe_car/application/new.html.haml +8 -0
- data/app/views/cafe_car/application/new.turbo_stream.haml +8 -0
- data/app/views/cafe_car/application/show.html.haml +36 -0
- data/app/views/cafe_car/application/update.turbo_stream.haml +2 -0
- data/app/views/cafe_car/examples/_example.html.haml +12 -0
- data/app/views/cafe_car/examples/_index.html.haml +16 -0
- data/app/views/cafe_car/examples/_navigation_links.html.haml +2 -0
- data/app/views/cafe_car/examples/ui/_alert.html.haml +4 -0
- data/app/views/cafe_car/examples/ui/_button.html.haml +3 -0
- data/app/views/cafe_car/examples/ui/_card.html.haml +6 -0
- data/app/views/cafe_car/examples/ui/_chat.html.haml +3 -0
- data/app/views/cafe_car/examples/ui/_controls.html.haml +3 -0
- data/app/views/cafe_car/examples/ui/_error.html.haml +1 -0
- data/app/views/cafe_car/examples/ui/_field.html.haml +9 -0
- data/app/views/cafe_car/examples/ui/_grid.html.haml +11 -0
- data/app/views/cafe_car/examples/ui/_group.html.haml +21 -0
- data/app/views/cafe_car/examples/ui/_info_circle.html.haml +1 -0
- data/app/views/cafe_car/examples/ui/_menu.html.haml +5 -0
- data/app/views/cafe_car/examples/ui/_modal.html.haml +4 -0
- data/app/views/cafe_car/examples/ui/_navigation.html.haml +4 -0
- data/app/views/cafe_car/examples/ui/_page.html.haml +4 -0
- data/app/views/cafe_car/examples/ui/_table.html.haml +13 -0
- data/app/views/cafe_car/layouts/mailer.html.haml +8 -0
- data/app/views/cafe_car/layouts/mailer.text.erb +1 -0
- data/app/views/layouts/action_text/contents/_content.html.erb +3 -0
- data/app/views/layouts/application.html.haml +4 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/notes/_fields.html.haml +1 -0
- data/app/views/passwords_mailer/reset.html.haml +5 -0
- data/app/views/passwords_mailer/reset.text.erb +4 -0
- data/app/views/ui/_card.html.haml +8 -0
- data/app/views/ui/_field.html.haml +1 -0
- data/app/views/ui/_modal_close.html.haml +1 -0
- data/app/views/ui/_page.html.haml +7 -0
- data/config/brakeman.ignore +77 -0
- data/config/importmap.rb +12 -0
- data/config/locales/en.yml +63 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20251005220017_create_slugs.rb +13 -0
- data/lib/cafe_car/active_record.rb +21 -0
- data/lib/cafe_car/application_responder.rb +17 -0
- data/lib/cafe_car/attributes.rb +23 -0
- data/lib/cafe_car/auto_resolver.rb +49 -0
- data/lib/cafe_car/caching.rb +20 -0
- data/lib/cafe_car/component.rb +155 -0
- data/lib/cafe_car/context.rb +17 -0
- data/lib/cafe_car/controller/filtering.rb +30 -0
- data/lib/cafe_car/controller.rb +218 -0
- data/lib/cafe_car/core_ext/array.rb +24 -0
- data/lib/cafe_car/core_ext/hash.rb +15 -0
- data/lib/cafe_car/core_ext/module.rb +15 -0
- data/lib/cafe_car/core_ext.rb +5 -0
- data/lib/cafe_car/current.rb +9 -0
- data/lib/cafe_car/engine.rb +107 -0
- data/lib/cafe_car/field_builder.rb +44 -0
- data/lib/cafe_car/field_info.rb +144 -0
- data/lib/cafe_car/fields.rb +21 -0
- data/lib/cafe_car/filter/field_builder.rb +4 -0
- data/lib/cafe_car/filter/field_info.rb +22 -0
- data/lib/cafe_car/filter/form_builder.rb +21 -0
- data/lib/cafe_car/filter.rb +5 -0
- data/lib/cafe_car/filter_builder.rb +20 -0
- data/lib/cafe_car/form_builder.rb +105 -0
- data/lib/cafe_car/generators.rb +30 -0
- data/lib/cafe_car/helpers.rb +178 -0
- data/lib/cafe_car/href_builder.rb +97 -0
- data/lib/cafe_car/informable.rb +9 -0
- data/lib/cafe_car/input_builder.rb +25 -0
- data/lib/cafe_car/inputs/association_builder.rb +6 -0
- data/lib/cafe_car/inputs/base_input.rb +19 -0
- data/lib/cafe_car/inputs/belongs_to_builder.rb +6 -0
- data/lib/cafe_car/inputs/password_input.rb +7 -0
- data/lib/cafe_car/inputs/string_input.rb +7 -0
- data/lib/cafe_car/link_builder.rb +65 -0
- data/lib/cafe_car/model.rb +23 -0
- data/lib/cafe_car/model_info.rb +24 -0
- data/lib/cafe_car/name_patch.rb +17 -0
- data/lib/cafe_car/navigation.rb +76 -0
- data/lib/cafe_car/option_helpers.rb +53 -0
- data/lib/cafe_car/param_parser.rb +45 -0
- data/lib/cafe_car/pluralization.rb +15 -0
- data/lib/cafe_car/policy.rb +77 -0
- data/lib/cafe_car/proc_helpers.rb +13 -0
- data/lib/cafe_car/query_builder.rb +186 -0
- data/lib/cafe_car/queryable.rb +29 -0
- data/lib/cafe_car/resolver.rb +27 -0
- data/lib/cafe_car/routing.rb +17 -0
- data/lib/cafe_car/table/body_builder.rb +12 -0
- data/lib/cafe_car/table/builder.rb +52 -0
- data/lib/cafe_car/table/foot_builder.rb +14 -0
- data/lib/cafe_car/table/head_builder.rb +26 -0
- data/lib/cafe_car/table/label_builder.rb +48 -0
- data/lib/cafe_car/table/objects_builder.rb +8 -0
- data/lib/cafe_car/table/row_builder.rb +39 -0
- data/lib/cafe_car/table_builder.rb +13 -0
- data/lib/cafe_car/turbo_tag_builder.rb +7 -0
- data/lib/cafe_car/ui.rb +11 -0
- data/lib/cafe_car/version.rb +1 -1
- data/lib/cafe_car/visitors.rb +21 -0
- data/lib/cafe_car.rb +25 -168
- data/lib/generators/cafe_car/controller/USAGE +11 -0
- data/lib/generators/cafe_car/controller/controller_generator.rb +26 -0
- data/lib/generators/cafe_car/controller/templates/controller.rb.tt +5 -0
- data/lib/generators/cafe_car/install/USAGE +8 -0
- data/lib/generators/cafe_car/install/install_generator.rb +46 -0
- data/lib/generators/cafe_car/install/templates/application_policy.rb.tt +7 -0
- data/lib/generators/cafe_car/notes/USAGE +12 -0
- data/lib/generators/cafe_car/notes/notes_generator.rb +13 -0
- data/lib/generators/cafe_car/notes/templates/create_notes.rb.tt +12 -0
- data/lib/generators/cafe_car/notes/templates/notable.rb.tt +7 -0
- data/lib/generators/cafe_car/notes/templates/note.rb.tt +6 -0
- data/lib/generators/cafe_car/policy/USAGE +8 -0
- data/lib/generators/cafe_car/policy/policy_generator.rb +39 -0
- data/lib/generators/cafe_car/policy/templates/policy.rb.tt +20 -0
- data/lib/generators/cafe_car/resource/USAGE +13 -0
- data/lib/generators/cafe_car/resource/resource_generator.rb +32 -0
- data/lib/generators/cafe_car/sessions/USAGE +17 -0
- data/lib/generators/cafe_car/sessions/sessions_generator.rb +29 -0
- data/lib/generators/cafe_car/sessions/templates/create_sessions.rb.tt +12 -0
- data/lib/tasks/holdco_tasks.rake +532 -0
- data/lib/tasks/templates/tasks_header.md +37 -0
- metadata +444 -21
- data/app/views/cafe_car/application/_fields.html.erb +0 -7
- data/app/views/cafe_car/application/_filters.html.erb +0 -0
- data/app/views/cafe_car/application/_form.html.erb +0 -22
- data/lib/cafe_car/railtie.rb +0 -4
- /data/app/views/{cafe_car/application/_actions.html.erb → application/_aside.html.haml} +0 -0
- /data/app/views/{cafe_car/application/_aside.html.erb → application/_footer.html.haml} +0 -0
- /data/app/views/cafe_car/{application/_extra_fields.html.erb → examples/_index_actions.html.haml} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.Alert {
|
|
2
|
+
--color: white;
|
|
3
|
+
--background: color-mix(in lab, var(--color) 20%, transparent);
|
|
4
|
+
color: var(--color);
|
|
5
|
+
background: var(--background);
|
|
6
|
+
padding: var(--gap);
|
|
7
|
+
border-radius: var(--radius);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.Alert-success {
|
|
11
|
+
--color: var(--success);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Alert-error {
|
|
15
|
+
--color: var(--error);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Alert-info,
|
|
19
|
+
.Alert-notice {
|
|
20
|
+
--color: var(--info);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Alert-warning {
|
|
24
|
+
--color: var(--warning);
|
|
25
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.Button {
|
|
2
|
+
--background: var(--button);
|
|
3
|
+
--color: var(--color);
|
|
4
|
+
--darken: rgb(0 0 0 / 0.2);
|
|
5
|
+
--lighten: rgb(255 255 255 / 0.2);
|
|
6
|
+
background: var(--background);
|
|
7
|
+
color: var(--color);
|
|
8
|
+
border-radius: var(--control-radius);
|
|
9
|
+
padding: var(--half-gap);
|
|
10
|
+
box-shadow: inset var(--darken) 0 -1px 0 1px;
|
|
11
|
+
border: 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 0.5em;
|
|
15
|
+
user-select: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Button:where(:not(.Button-current)):hover {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
box-shadow: inset var(--darken) 0 -2px 0 1px;
|
|
22
|
+
filter: brightness(1.05);
|
|
23
|
+
z-index: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Button:active,
|
|
27
|
+
.Button-current {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
filter: brightness(0.95);
|
|
30
|
+
border-bottom-width: 1px;
|
|
31
|
+
box-shadow: inset var(--darken) 0 1px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Button-primary {
|
|
35
|
+
--background: var(--primary);
|
|
36
|
+
--color: white;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Button-danger {
|
|
40
|
+
--background: var(--danger);
|
|
41
|
+
--color: white;
|
|
42
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.Card {
|
|
2
|
+
container: Card;
|
|
3
|
+
box-shadow: var(--box-shadow);
|
|
4
|
+
border-radius: var(--radius);
|
|
5
|
+
background: var(--card);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.Card_Image {
|
|
9
|
+
display: block;
|
|
10
|
+
aspect-ratio: 5/4;
|
|
11
|
+
object-position: center;
|
|
12
|
+
object-fit: cover;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
width: 100%;
|
|
15
|
+
border-top-left-radius: var(--radius);
|
|
16
|
+
border-top-right-radius: var(--radius);
|
|
17
|
+
/* &::before {
|
|
18
|
+
display: block;
|
|
19
|
+
content: '';
|
|
20
|
+
margin-top: 30%;
|
|
21
|
+
} */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Card_Head,
|
|
25
|
+
.Card_Foot {
|
|
26
|
+
display: flex;
|
|
27
|
+
gap: var(--gap);
|
|
28
|
+
align-items: baseline;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.Card_Title {
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Card_Head,
|
|
37
|
+
.Card_Foot,
|
|
38
|
+
.Card_Section {
|
|
39
|
+
padding: var(--gap);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.Card_Section {
|
|
43
|
+
display: grid;
|
|
44
|
+
gap: var(--gap);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:is(.Card_Head, .Card_Section, .Card_Foot) {
|
|
48
|
+
& + &,
|
|
49
|
+
& + form > &,
|
|
50
|
+
form > & + & {
|
|
51
|
+
border-top: 1px solid var(--border);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.Card:not(:has(.Card_Head, .Card_Foot, .Card_Section)) {
|
|
56
|
+
padding: var(--gap);
|
|
57
|
+
display: grid;
|
|
58
|
+
gap: var(--gap);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.Card-sticky {
|
|
62
|
+
position: sticky;
|
|
63
|
+
top: var(--gap);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.Card-block {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (prefers-color-scheme: dark) {
|
|
71
|
+
.Card {
|
|
72
|
+
border: 1px solid var(--border);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.Chat {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--gap);
|
|
5
|
+
padding: var(--gap);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.Chat_Message {
|
|
9
|
+
padding: var(--gap);
|
|
10
|
+
border-radius: var(--radius);
|
|
11
|
+
box-shadow: var(--box-shadow);
|
|
12
|
+
max-width: 80%;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.Chat_Message-local,
|
|
17
|
+
.Chat_Message-right {
|
|
18
|
+
align-self: end;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.Chat_Message-remote,
|
|
22
|
+
.Chat_Message-left {
|
|
23
|
+
align-self: start;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.Chat_Message-local {
|
|
27
|
+
background-color: var(--blue);
|
|
28
|
+
color: var(--white);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.Chat_Message-remote {
|
|
32
|
+
background-color: var(--gray);
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.Example {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: grid;
|
|
4
|
+
grid: auto 1fr / auto auto;
|
|
5
|
+
border-bottom: 1px solid var(--border);
|
|
6
|
+
clip-path: rect(0 auto auto 0);
|
|
7
|
+
padding-bottom: 5vh;
|
|
8
|
+
color-scheme: dark;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.Example_Head {
|
|
12
|
+
position: sticky;
|
|
13
|
+
grid-column: span 2;
|
|
14
|
+
top: 0;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.Example_Title {
|
|
20
|
+
color: inherit;
|
|
21
|
+
background: var(--background);
|
|
22
|
+
padding: .2em .5em;
|
|
23
|
+
border-radius: var(--radius);
|
|
24
|
+
margin: 3px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.Example_Body {
|
|
28
|
+
align-self: center;
|
|
29
|
+
grid-column: 1;
|
|
30
|
+
justify-self: center;
|
|
31
|
+
position: relative;
|
|
32
|
+
border: 1px dashed var(--border);
|
|
33
|
+
padding: var(--gap);
|
|
34
|
+
display: grid;
|
|
35
|
+
gap: var(--gap);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.Example_Source {
|
|
39
|
+
grid-column: 2;
|
|
40
|
+
align-self: center;
|
|
41
|
+
/*justify-self: center;*/
|
|
42
|
+
position: relative;
|
|
43
|
+
padding: var(--gap);
|
|
44
|
+
overflow: auto;
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.Field {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid: auto / auto 1fr;
|
|
4
|
+
gap: .1em .5em;
|
|
5
|
+
align-items: baseline;
|
|
6
|
+
flex-grow: 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Field > :not(.Field_Label, .Field_Error) {
|
|
10
|
+
grid-column: span 2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.Field_Label {
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Field_Error {
|
|
19
|
+
grid-column: 2;
|
|
20
|
+
color: var(--error);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Field_Error ~ .Input:not(:focus),
|
|
24
|
+
.Field_Error ~ * .Input:not(:focus) {
|
|
25
|
+
background: var(--invalid);
|
|
26
|
+
border-color: var(--red);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Field_Hint {
|
|
30
|
+
color: var(--dim);
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
.Icon {
|
|
4
|
+
vertical-align: text-bottom;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
gap: var(--half-gap);
|
|
7
|
+
font-style: inherit;
|
|
8
|
+
|
|
9
|
+
&::before {
|
|
10
|
+
display: block;
|
|
11
|
+
content: "";
|
|
12
|
+
height: 1.5em;
|
|
13
|
+
width: 1.5em;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Icon-before {
|
|
18
|
+
margin-right: 0.5em;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.Icon-after {
|
|
22
|
+
margin-left: 0.5em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.Icon-dim {
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.Input,
|
|
2
|
+
input,
|
|
3
|
+
textarea,
|
|
4
|
+
select {
|
|
5
|
+
background: var(--input);
|
|
6
|
+
border: 1px solid var(--border);
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
border-radius: var(--control-radius);
|
|
9
|
+
padding: 6px;
|
|
10
|
+
box-shadow: rgba(34, 32, 29, 0.05) 0px 1px 2px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
input,
|
|
14
|
+
textarea,
|
|
15
|
+
select {
|
|
16
|
+
color: inherit;
|
|
17
|
+
font: inherit;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
textarea {
|
|
21
|
+
field-sizing: content;
|
|
22
|
+
resize: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
select {
|
|
26
|
+
box-shadow: rgba(34, 32, 29, 0.05) 0px 1px 2px;
|
|
27
|
+
|
|
28
|
+
&::after {
|
|
29
|
+
content: "hi";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
::placeholder {
|
|
34
|
+
color: inherit;
|
|
35
|
+
opacity: .3;
|
|
36
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--sidebar-width: 250px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.Layout {
|
|
6
|
+
/* display: flex; */
|
|
7
|
+
/* align-items: stretch; */
|
|
8
|
+
flex-grow: 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.Layout_Sidebar {
|
|
12
|
+
--indent: 0.7rem;
|
|
13
|
+
|
|
14
|
+
width: var(--sidebar-width);
|
|
15
|
+
/* position: sticky; */
|
|
16
|
+
position: fixed;
|
|
17
|
+
inset: 0;
|
|
18
|
+
|
|
19
|
+
overflow: auto;
|
|
20
|
+
max-height: 100dvh;
|
|
21
|
+
height: 100%;
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-flow: column;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
align-self: start;
|
|
27
|
+
|
|
28
|
+
padding: var(--gap);
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
transition:
|
|
31
|
+
margin var(--duration),
|
|
32
|
+
width var(--duration);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.Layout_Main {
|
|
36
|
+
transition: transform var(--duration);
|
|
37
|
+
margin-left: var(--sidebar-width);
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-flow: column;
|
|
40
|
+
align-items: stretch;
|
|
41
|
+
flex-grow: 1;
|
|
42
|
+
padding: var(--gap);
|
|
43
|
+
position: relative;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.Layout_Menu {
|
|
48
|
+
display: none;
|
|
49
|
+
appearance: none;
|
|
50
|
+
border-radius: 99px;
|
|
51
|
+
width: 40px;
|
|
52
|
+
height: 40px;
|
|
53
|
+
text-align: center;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
border-color: transparent;
|
|
56
|
+
background: none;
|
|
57
|
+
|
|
58
|
+
&:hover {
|
|
59
|
+
border-color: var(--border);
|
|
60
|
+
box-shadow: var(--box-shadow);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:checked {
|
|
64
|
+
border-color: var(--border);
|
|
65
|
+
box-shadow: inset var(--box-shadow);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
content: "𑁔";
|
|
70
|
+
display: block;
|
|
71
|
+
font-size: 30px;
|
|
72
|
+
line-height: 1;
|
|
73
|
+
margin-top: -1px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (width < 720px) {
|
|
78
|
+
.Layout_Main {
|
|
79
|
+
margin-left: 0;
|
|
80
|
+
transform: translateX(var(--sidebar-width));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.Layout_Sidebar {
|
|
84
|
+
margin-left: calc(-1 * var(--sidebar-width));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
body:has(.Layout_Menu:checked) {
|
|
88
|
+
overflow-x: hidden;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
body:not(:has(.Layout_Menu:checked)) {
|
|
92
|
+
.Layout_Main {
|
|
93
|
+
transform: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.Layout:has(.Layout_Sidebar) .Layout_Menu {
|
|
98
|
+
display: inline-block;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.Menu {
|
|
2
|
+
container: Menu;
|
|
3
|
+
box-shadow: var(--box-shadow);
|
|
4
|
+
border-radius: var(--menu-radius);
|
|
5
|
+
background: var(--menu);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.Menu_Item {
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: var(--half-gap);
|
|
11
|
+
padding: var(--half-gap) var(--gap);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Menu_Item:any-link {
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
color: inherit;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
color: var(--white);
|
|
20
|
+
|
|
21
|
+
&::before {
|
|
22
|
+
content: '';
|
|
23
|
+
display: block;
|
|
24
|
+
border-radius: var(--menu-radius);
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 4px;
|
|
27
|
+
background: var(--link);
|
|
28
|
+
z-index: -1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
.Menu_Item {
|
|
35
|
+
& + & {
|
|
36
|
+
border-top: 1px solid var(--border);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.Modal {
|
|
2
|
+
z-index: 9;
|
|
3
|
+
inset: 0;
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: fit-content(var(--modal-width));
|
|
6
|
+
background: var(--backdrop);
|
|
7
|
+
overscroll-behavior: contain;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
overflow: auto;
|
|
11
|
+
backdrop-filter: blur(8px);
|
|
12
|
+
padding: var(--gap);
|
|
13
|
+
animation: fade-in var(--duration);
|
|
14
|
+
|
|
15
|
+
& > * {
|
|
16
|
+
min-width: 250px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.Modal-fixed {
|
|
21
|
+
position: fixed;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body:has(> .Modal-fixed) {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.Navigation {
|
|
2
|
+
--indent: 0.7em;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-flow: column;
|
|
5
|
+
flex-grow: 1;
|
|
6
|
+
align-content: start;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Navigation_Link {
|
|
10
|
+
padding: 0.7em;
|
|
11
|
+
position: relative;
|
|
12
|
+
color: inherit;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Navigation_Link-bottom {
|
|
18
|
+
margin-top: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.Navigation_Link:is(a):hover,
|
|
22
|
+
.Navigation_Link-current,
|
|
23
|
+
.Navigation_Link-ancestor,
|
|
24
|
+
.Navigation_Link.current {
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
|
|
27
|
+
&::after {
|
|
28
|
+
content: "";
|
|
29
|
+
display: block;
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 3px 0;
|
|
32
|
+
border-radius: var(--control-radius);
|
|
33
|
+
box-shadow: inset rgb(0 0 0 / 0.2) 0 -2px;
|
|
34
|
+
background: var(--hover);
|
|
35
|
+
z-index: -1;
|
|
36
|
+
}
|
|
37
|
+
}
|