diff --git a/Gemfile b/Gemfile index 306022b64..6b081cd73 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem 'turbo-rails' gem 'sprockets-rails' gem 'importmap-rails' gem 'initials' -gem 'tailwindcss-rails' +gem 'tailwindcss-rails', '~> 4.6' gem 'view_component' # Schedulers diff --git a/Gemfile.lock b/Gemfile.lock index 2ad1e05ec..eb250be13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -429,16 +429,14 @@ GEM stimulus-rails (1.3.3) railties (>= 6.0.0) stringio (3.1.0) - tailwindcss-rails (2.3.0) - railties (>= 6.0.0) - tailwindcss-rails (2.3.0-aarch64-linux) - railties (>= 6.0.0) - tailwindcss-rails (2.3.0-arm64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.3.0-x86_64-darwin) - railties (>= 6.0.0) - tailwindcss-rails (2.3.0-x86_64-linux) - railties (>= 6.0.0) + tailwindcss-rails (4.6.0) + railties (>= 7.0.0) + tailwindcss-ruby (~> 4.0) + tailwindcss-ruby (4.3.3) + tailwindcss-ruby (4.3.3-aarch64-linux-gnu) + tailwindcss-ruby (4.3.3-arm64-darwin) + tailwindcss-ruby (4.3.3-x86_64-darwin) + tailwindcss-ruby (4.3.3-x86_64-linux-gnu) thor (1.3.1) timeout (0.4.1) tsort (0.2.0) @@ -531,7 +529,7 @@ DEPENDENCIES simplecov sprockets-rails stimulus-rails - tailwindcss-rails + tailwindcss-rails (~> 4.6) turbo-rails view_component web-console diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 9ea9309f5..e8fcf826f 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,4 +1,5 @@ //= link_tree ../images +//= link_directory ../fonts .woff2 //= link_directory ../stylesheets .css //= link_tree ../builds //= link tailwind.css diff --git a/app/assets/fonts/Inter-italic.latin-ext.var.woff2 b/app/assets/fonts/Inter-italic.latin-ext.var.woff2 new file mode 100644 index 000000000..be543c421 Binary files /dev/null and b/app/assets/fonts/Inter-italic.latin-ext.var.woff2 differ diff --git a/app/assets/fonts/Inter-italic.latin.var.woff2 b/app/assets/fonts/Inter-italic.latin.var.woff2 new file mode 100644 index 000000000..5066cfdf3 Binary files /dev/null and b/app/assets/fonts/Inter-italic.latin.var.woff2 differ diff --git a/app/assets/fonts/Inter-roman.latin-ext.var.woff2 b/app/assets/fonts/Inter-roman.latin-ext.var.woff2 new file mode 100644 index 000000000..ac92ffba4 Binary files /dev/null and b/app/assets/fonts/Inter-roman.latin-ext.var.woff2 differ diff --git a/app/assets/fonts/Inter-roman.latin.var.woff2 b/app/assets/fonts/Inter-roman.latin.var.woff2 new file mode 100644 index 000000000..9503ba17f Binary files /dev/null and b/app/assets/fonts/Inter-roman.latin.var.woff2 differ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 81bfdc67b..57bcedb42 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -15,9 +15,9 @@ */ :target { - // TODO + /* TODO */ } input[type="submit"] { cursor: pointer; -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css deleted file mode 100644 index 3d2117cd2..000000000 --- a/app/assets/stylesheets/application.tailwind.css +++ /dev/null @@ -1,33 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* - -@layer components { - .btn-primary { - @apply py-2 px-4 bg-blue-200; - } -} - -*/ - -input:-webkit-autofill, -input:-webkit-autofill:enabled, -input:-webkit-autofill:hover, -input:-webkit-autofill:focus, -textarea:-webkit-autofill, -textarea:-webkit-autofill:enabled, -textarea:-webkit-autofill:hover, -textarea:-webkit-autofill:focus, -select:-webkit-autofill, -select:-webkit-autofill:enabled, -select:-webkit-autofill:hover, -select:-webkit-autofill:focus { - -webkit-box-shadow: 0 0 0px 30px #ffffff inset; -} -.todo:after { - @apply hidden hover:block absolute bg-gray-700 text-white rounded p-1 text-xs; - content: 'Zatial neimplementovane'; - /* Additional styles for positioning and visibility */ -} \ No newline at end of file diff --git a/app/assets/tailwind/application.css b/app/assets/tailwind/application.css new file mode 100644 index 000000000..1df951bc1 --- /dev/null +++ b/app/assets/tailwind/application.css @@ -0,0 +1,86 @@ +@import 'tailwindcss' source(none); +@import './fonts.css'; + +/* Keep the same source scope as the former JavaScript configuration. */ +@source '../../../public/*.html'; +@source '../../../app/helpers/**/*.rb'; +@source '../../../app/javascript/**/*.js'; +@source '../../../app/views/**/*.{erb,haml,html,slim}'; +@source '../../../app/components/**/*.{rb,erb,haml,html,slim}'; + +/* Colour utilities composed at runtime from Colorized.colors (tags, boxes, + filter colour pickers). Add any new dynamically composed colour utilities here. */ +@source inline("bg-{slate,gray,zinc,neutral,stone,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-{50,100}"); +@source inline("text-{slate,gray,zinc,neutral,stone,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-600"); +@source inline("border-{slate,gray,zinc,neutral,stone,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-400"); +@source inline("ring-{slate,gray,zinc,neutral,stone,red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose}-500/10"); + +@plugin '@tailwindcss/forms'; +@plugin '@tailwindcss/typography'; + +@theme { + --font-sans: + 'Inter var', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + + --color-yellow-50: #fefce8; + --color-yellow-100: #fef9c3; + --color-yellow-200: #fef08a; + --color-yellow-300: #fde047; + --color-yellow-400: #facc15; + --color-yellow-500: #eab308; + --color-yellow-600: #ca8a04; + --color-yellow-700: #a16207; + --color-yellow-800: #854d0e; + --color-yellow-900: #713f12; + --color-yellow-950: #422006; +} + +/* + The default border color has changed to `currentcolor` in Tailwind CSS v4, + so we've added these compatibility styles to make sure everything still + looks the same as it did with Tailwind CSS v3. + + If we ever want to remove these styles, we need to add an explicit border + color utility to any element that depends on these defaults. +*/ +@layer base { + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + border-color: var(--color-gray-200, currentcolor); + } +} + +/* + +@layer components { + .btn-primary { + @apply py-2 px-4 bg-blue-200; + } +} + +*/ + +input:-webkit-autofill, +input:-webkit-autofill:enabled, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +textarea:-webkit-autofill, +textarea:-webkit-autofill:enabled, +textarea:-webkit-autofill:hover, +textarea:-webkit-autofill:focus, +select:-webkit-autofill, +select:-webkit-autofill:enabled, +select:-webkit-autofill:hover, +select:-webkit-autofill:focus { + -webkit-box-shadow: 0 0 0px 30px #ffffff inset; +} +.todo:after { + @apply hidden hover:block absolute bg-gray-700 text-white rounded-sm p-1 text-xs; + content: 'Zatial neimplementovane'; + /* Additional styles for positioning and visibility */ +} diff --git a/app/assets/tailwind/fonts.css b/app/assets/tailwind/fonts.css new file mode 100644 index 000000000..c65ee37a7 --- /dev/null +++ b/app/assets/tailwind/fonts.css @@ -0,0 +1,35 @@ +/* Inter's original Latin and Latin Extended subsets from tailwindcss-rails 2.3.0. + Self-hosted to preserve the font and Slovak glyphs without an external CDN. + See vendor/fonts/Inter-LICENSE.txt. */ +@font-face { + font-family: 'Inter var'; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url('Inter-roman.latin.var.woff2') format('woff2'); + unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF; +} +@font-face { + font-family: 'Inter var'; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url('Inter-roman.latin-ext.var.woff2') format('woff2'); + unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF; +} +@font-face { + font-family: 'Inter var'; + font-style: italic; + font-weight: 100 900; + font-display: swap; + src: url('Inter-italic.latin.var.woff2') format('woff2'); + unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF; +} +@font-face { + font-family: 'Inter var'; + font-style: italic; + font-weight: 100 900; + font-display: swap; + src: url('Inter-italic.latin-ext.var.woff2') format('woff2'); + unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF; +} diff --git a/app/components/admin/audit_logs/audit_log_table_component.html.erb b/app/components/admin/audit_logs/audit_log_table_component.html.erb index 92007185e..4cc7e55d9 100644 --- a/app/components/admin/audit_logs/audit_log_table_component.html.erb +++ b/app/components/admin/audit_logs/audit_log_table_component.html.erb @@ -13,9 +13,9 @@
<% if @actor %> - <%= link_to 'Export CSV', admin_audit_logs_path(actor: @actor, format: 'csv'), class: "block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" %> + <%= link_to 'Export CSV', admin_audit_logs_path(actor: @actor, format: 'csv'), class: "block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" %> <% elsif @message_thread %> - <%= link_to 'Export CSV', admin_audit_logs_path(message_thread: @message_thread, format: 'csv'), class: "block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" %> + <%= link_to 'Export CSV', admin_audit_logs_path(message_thread: @message_thread, format: 'csv'), class: "block rounded-md bg-indigo-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" %> <% end %>
diff --git a/app/components/admin/feature_flags/feature_flags_list_row_component.html.erb b/app/components/admin/feature_flags/feature_flags_list_row_component.html.erb index 310de9247..24e1bdaaf 100644 --- a/app/components/admin/feature_flags/feature_flags_list_row_component.html.erb +++ b/app/components/admin/feature_flags/feature_flags_list_row_component.html.erb @@ -13,9 +13,9 @@ <%= form_with model: Current.tenant, url: admin_tenant_feature_flag_path(Current.tenant, @feature_flag), title: "Toggle feature state", method: :patch do |form| %> <%= form.hidden_field :enabled, value: !@enabled %> - <%= form.button name: @feature_flag, class: "#{@enabled ? "bg-indigo-600" : "bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2", role: :switch, aria: { checked: @enabled } do %> + <%= form.button name: @feature_flag, class: "#{@enabled ? "bg-indigo-600" : "bg-gray-200"} relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-hidden focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2", role: :switch, aria: { checked: @enabled } do %> Use setting - + <% end %> <% end %> diff --git a/app/components/admin/groups/group_form_component.html.erb b/app/components/admin/groups/group_form_component.html.erb index 110dac189..9ab7eb914 100644 --- a/app/components/admin/groups/group_form_component.html.erb +++ b/app/components/admin/groups/group_form_component.html.erb @@ -1,17 +1,17 @@
-
-
-

<%= @group.name %>

-

Používatelia v skupine

+
+
+

<%= @group.name %>

+

Používatelia v skupine

-
+
<% if !@readonly %> <%= form_with url: search_non_members_admin_tenant_group_path(Current.tenant, @group), data: { controller: 'debounce', debounce_target: 'form'}, - class: "flex justify-start items-center self-stretch flex-grow-0 flex-shrink-0 gap-4 p-6 border-t-0 border-r-0 border-b border-l-0 border-gray-200" do |form| %> -
+ class: "flex justify-start items-center self-stretch grow-0 shrink-0 gap-4 p-6 border-t-0 border-r-0 border-b border-l-0 border-gray-200" do |form| %> +
<%= render Icons::MagnifyingGlassComponent.gray(size: "5") %>
diff --git a/app/components/admin/groups/member_add_popup_component.html.erb b/app/components/admin/groups/member_add_popup_component.html.erb index 1d45d93fd..1fc449d81 100644 --- a/app/components/admin/groups/member_add_popup_component.html.erb +++ b/app/components/admin/groups/member_add_popup_component.html.erb @@ -1,13 +1,13 @@ -