Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/assets/stylesheets/satis/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@import '../../../components/satis/sidebar_menu/component.css';
@import '../../../components/satis/sidebar_menu_item/component.css';
@import '../../../components/satis/tabs/component.css';
@import '../../../components/satis/navigation/component.css';

@import 'components/diffy.css';
@import 'components/form.css';
Expand Down
2 changes: 1 addition & 1 deletion app/components/satis/card/component.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.sts-card {
@apply bg-white h-full sm:rounded-lg sm:shadow dark:bg-gray-800 overflow-hidden;
@apply bg-white h-full sm:rounded-lg sm:shadow dark:bg-gray-800 overflow-hidden dark:text-gray-300;

&__header {
@apply px-4 py-5 sm:px-6 dark:bg-gray-900 dark:border-gray-700 dark:text-gray-300;
Expand Down
22 changes: 22 additions & 0 deletions app/components/satis/navigation/component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.navigation-form {
@apply flex bg-white w-2/6 rounded-md dark:bg-gray-800 shadow place-self-center border-2;
}

form {
@apply w-full;
}

.navigation-form .navigation-input input[type="text"] {
@apply rounded-md bg-white dark:bg-gray-800 w-full dark:text-gray-300 text-gray-700 border-gray-300 dark:border-gray-500;
}

.result-item {
@apply py-2 dark:text-gray-300 px-3 dark:border-gray-600 text-gray-700 cursor-pointer border-b border-gray-200;
}

.result-item:hover {
@apply bg-gray-100 dark:bg-gray-700;
}



11 changes: 11 additions & 0 deletions app/components/satis/navigation/component.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.navigation-form
= form_with url: '#', method: :get, remote: true, id: 'search-form' do
.navigation-input
input type="text" id="search-input" placeholder="Search..."
.test-result
.result-item Test Result 1
.result-item Test Result 2
.result-item Test Result 3
.result-item Test Result 4
.result-item Test Result 5
.result-item Test Result 6
18 changes: 18 additions & 0 deletions app/components/satis/navigation/component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Satis
module Navigation
class Component < Satis::ApplicationComponent
attr_reader :menu, :menu_options, :commands

renders_many :items

def initialize(menu, **options)
super
@menu = menu
@menu_options = options
@commands = []
end


end
end
end
2 changes: 1 addition & 1 deletion lib/satis/forms/concerns/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def file_input(method, options = {})
tag.div(class: 'overflow-hidden relative inline-block -mb-2') do
safe_join [
tag.button((options[:multiple] ? ct('choose_files') : ct('choose_file')), type: 'button',
class: 'bg-white py-3 px-4 border border-gray-300 rounded-md shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500'),
class: 'bg-white py-3 px-4 border border-gray-300 rounded-md shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:bg-gray-800 dark:border-gray-300 dark:text-gray-300 dark:hover:bg-gray-200'),
file_field(method,
options.merge(class: 'w-full cursor-pointer absolute block opacity-0 inset-0',
data: { 'satis-file-target': 'input' }))
Expand Down