plutonium 0.14.1 → 0.15.0.pre.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README copy.md +1 -1
- data/README.md +1 -1
- data/app/assets/plutonium.css +1 -1
- data/app/views/{application → plutonium}/_resource_header.html copy.erb +1 -1
- data/app/views/{application → plutonium}/_resource_header.html.erb +1 -1
- data/app/views/{application → plutonium}/_resource_sidebar.html.erb +2 -0
- data/app/views/resource/_resource_details.html.erb +1 -36
- data/app/views/resource/_resource_form.html.erb +1 -5
- data/app/views/resource/_resource_table.html.erb +315 -85
- data/app/views/resource/edit.html.erb +1 -5
- data/app/views/resource/index.html.erb +1 -5
- data/app/views/resource/new.html.erb +1 -5
- data/app/views/resource/show.html.erb +1 -5
- data/config/initializers/pagy.rb +1 -0
- data/config/initializers/rabl.rb +27 -20
- data/gemfiles/rails_7.gemfile.lock +5 -1
- data/lib/generators/pu/core/install/templates/app/controllers/plutonium_controller.rb.tt +2 -0
- data/lib/generators/pu/core/install/templates/app/controllers/resource_controller.rb.tt +21 -1
- data/lib/generators/pu/core/install/templates/app/definitions/resource_definition.rb.tt +2 -0
- data/lib/generators/pu/core/install/templates/app/models/resource_record.rb.tt +0 -2
- data/lib/generators/pu/core/install/templates/config/initializers/plutonium.rb +1 -8
- data/lib/generators/pu/eject/shell/shell_generator.rb +2 -2
- data/lib/generators/pu/lib/plutonium_generators/concerns/actions.rb +1 -1
- data/lib/generators/pu/lib/plutonium_generators/concerns/logger.rb +1 -1
- data/lib/generators/pu/lib/plutonium_generators/generator.rb +5 -3
- data/lib/generators/pu/lib/plutonium_generators/model_generator_base.rb +26 -2
- data/lib/generators/pu/pkg/{feature/feature_generator.rb → package/package_generator.rb} +4 -4
- data/lib/generators/pu/pkg/{feature → package}/templates/app/controllers/resource_controller.rb.tt +0 -2
- data/lib/generators/pu/pkg/package/templates/app/definitions/resource_definition.rb.tt +4 -0
- data/lib/generators/pu/pkg/package/templates/app/query_objects/resource_query_object.rb.tt +4 -0
- data/lib/generators/pu/pkg/{app/app_generator.rb → portal/portal_generator.rb} +10 -8
- data/lib/generators/pu/pkg/{app → portal}/templates/app/controllers/concerns/controller.rb.tt +3 -7
- data/lib/generators/pu/pkg/{app → portal}/templates/app/controllers/dashboard_controller.rb.tt +1 -1
- data/lib/generators/pu/pkg/portal/templates/app/controllers/plutonium_controller.rb.tt +5 -0
- data/lib/generators/pu/pkg/{app/templates/app/controllers/controller.rb.tt → portal/templates/app/controllers/resource_controller.rb.tt} +1 -1
- data/lib/generators/pu/pkg/portal/templates/app/definitions/resource_definition.rb.tt +4 -0
- data/lib/generators/pu/pkg/{app → portal}/templates/app/views/package/dashboard/index.html.erb +2 -1
- data/lib/generators/pu/res/conn/conn_generator.rb +78 -3
- data/lib/generators/pu/res/conn/templates/app/controllers/resource_controller.rb.tt +1 -1
- data/lib/generators/pu/res/conn/templates/app/definitions/resource_definition.rb.tt +3 -0
- data/lib/generators/pu/res/conn/templates/app/policies/resource_policy.rb.tt +29 -1
- data/lib/generators/pu/res/conn/templates/app/presenters/resource_presenter.rb.tt +1 -1
- data/lib/generators/pu/res/conn/templates/app/query_objects/resource_query_object.rb.tt +1 -1
- data/lib/generators/pu/res/model/model_generator.rb +0 -7
- data/lib/generators/pu/res/model/templates/model.rb.tt +4 -1
- data/lib/generators/pu/res/scaffold/scaffold_generator.rb +22 -4
- data/lib/generators/pu/res/scaffold/templates/controller.rb.tt +0 -1
- data/lib/generators/pu/res/scaffold/templates/definition.rb.tt +4 -0
- data/lib/generators/pu/res/scaffold/templates/policy.rb.tt +2 -2
- data/lib/generators/pu/rodauth/templates/app/controllers/rodauth_controller.rb.tt +1 -1
- data/lib/generators/pu/rodauth/templates/app/rodauth/account_rodauth_plugin.rb.tt +270 -0
- data/lib/plutonium/action/README.md +0 -0
- data/lib/plutonium/action/base.rb +103 -0
- data/lib/plutonium/action/interactive.rb +117 -0
- data/lib/plutonium/action/route_options.rb +65 -0
- data/lib/plutonium/action/simple.rb +8 -0
- data/lib/plutonium/auth.rb +1 -1
- data/lib/plutonium/configuration.rb +0 -8
- data/lib/plutonium/core/actions/collection.rb +1 -1
- data/lib/plutonium/core/associations/renderers/factory.rb +3 -1
- data/lib/plutonium/core/controller.rb +110 -0
- data/lib/plutonium/core/controllers/authorizable.rb +12 -35
- data/lib/plutonium/core/controllers/bootable.rb +38 -7
- data/lib/plutonium/core/controllers/entity_scoping.rb +6 -2
- data/lib/plutonium/core/fields/renderers/association_renderer.rb +1 -1
- data/lib/plutonium/core/ui/collection.rb +1 -1
- data/lib/plutonium/core/ui/detail.rb +1 -1
- data/lib/plutonium/core/ui/form.rb +1 -1
- data/lib/plutonium/definition/actions.rb +50 -0
- data/lib/plutonium/definition/base.rb +92 -0
- data/lib/plutonium/definition/config_attr.rb +30 -0
- data/lib/plutonium/definition/defineable_props.rb +96 -0
- data/lib/plutonium/definition/search.rb +21 -0
- data/lib/plutonium/engine/validator.rb +30 -0
- data/lib/plutonium/engine.rb +25 -0
- data/lib/plutonium/helpers/form_helper.rb +1 -3
- data/lib/plutonium/interaction/README.md +369 -0
- data/lib/plutonium/interaction/base.rb +75 -0
- data/lib/plutonium/interaction/concerns/presentable.rb +61 -0
- data/lib/plutonium/interaction/concerns/workflow_dsl.rb +82 -0
- data/lib/plutonium/interaction/outcome.rb +129 -0
- data/lib/plutonium/interaction/response/base.rb +63 -0
- data/lib/plutonium/interaction/response/null.rb +33 -0
- data/lib/plutonium/interaction/response/redirect.rb +30 -0
- data/lib/plutonium/interaction/response/render.rb +28 -0
- data/lib/plutonium/lib/bit_flags.rb +70 -9
- data/lib/plutonium/{config → lib}/overlayed_hash.rb +1 -1
- data/lib/plutonium/lib/smart_cache.rb +171 -0
- data/lib/plutonium/models/has_cents.rb +170 -0
- data/lib/plutonium/{pkg/base.rb → package/engine.rb} +10 -2
- data/lib/plutonium/{application → portal}/controller.rb +3 -11
- data/lib/plutonium/{application → portal}/dynamic_controllers.rb +4 -4
- data/lib/plutonium/portal/engine.rb +15 -0
- data/lib/plutonium/railtie.rb +33 -1
- data/lib/plutonium/reloader.rb +5 -5
- data/lib/plutonium/resource/controller.rb +51 -34
- data/lib/plutonium/resource/controllers/authorizable.rb +128 -0
- data/lib/plutonium/{core → resource}/controllers/crud_actions.rb +23 -22
- data/lib/plutonium/resource/controllers/defineable.rb +26 -0
- data/lib/plutonium/{core → resource}/controllers/interactive_actions.rb +12 -12
- data/lib/plutonium/resource/controllers/presentable.rb +41 -0
- data/lib/plutonium/resource/controllers/queryable.rb +44 -0
- data/lib/plutonium/resource/definition.rb +6 -0
- data/lib/plutonium/resource/policy.rb +25 -13
- data/lib/plutonium/resource/query_object.rb +50 -51
- data/lib/plutonium/resource/record.rb +6 -89
- data/lib/plutonium/resource/register.rb +82 -0
- data/lib/plutonium/routing/mapper_extensions.rb +1 -1
- data/lib/plutonium/routing/resource_registration.rb +1 -1
- data/lib/plutonium/routing/route_set_extensions.rb +6 -18
- data/lib/plutonium/ui/action_button.rb +125 -0
- data/lib/plutonium/ui/breadcrumbs.rb +163 -0
- data/lib/plutonium/ui/component/base.rb +13 -0
- data/lib/plutonium/ui/component/behaviour.rb +38 -0
- data/lib/plutonium/ui/component/kit.rb +31 -0
- data/lib/plutonium/ui/component/methods.rb +54 -0
- data/lib/plutonium/ui/display/base.rb +25 -0
- data/lib/plutonium/ui/display/component/association.rb +26 -0
- data/lib/plutonium/ui/display/resource.rb +77 -0
- data/lib/plutonium/ui/display/theme.rb +27 -0
- data/lib/plutonium/ui/dyna_frame/content.rb +20 -0
- data/lib/plutonium/ui/empty_card.rb +20 -0
- data/lib/plutonium/ui/form/base.rb +37 -0
- data/lib/plutonium/ui/form/resource.rb +75 -0
- data/lib/plutonium/ui/form/theme.rb +42 -0
- data/lib/plutonium/ui/page/base.rb +112 -0
- data/lib/plutonium/ui/page/edit.rb +23 -0
- data/lib/plutonium/ui/page/index.rb +27 -0
- data/lib/plutonium/ui/page/new.rb +23 -0
- data/lib/plutonium/ui/page/show.rb +27 -0
- data/lib/plutonium/ui/page_header.rb +49 -0
- data/lib/plutonium/ui/table/base.rb +13 -0
- data/lib/plutonium/ui/table/components/pagy_info.rb +70 -0
- data/lib/plutonium/ui/table/components/pagy_page_info.rb +70 -0
- data/lib/plutonium/ui/table/components/pagy_pagination.rb +105 -0
- data/lib/plutonium/ui/table/components/scopes_bar.rb +136 -0
- data/lib/plutonium/ui/table/components/search_bar.rb +158 -0
- data/lib/plutonium/ui/table/display_theme.rb +21 -0
- data/lib/plutonium/ui/table/resource.rb +98 -0
- data/lib/plutonium/ui/table/theme.rb +35 -0
- data/lib/plutonium/ui.rb +9 -0
- data/lib/plutonium/version.rb +5 -1
- data/lib/plutonium.rb +14 -1
- data/package-lock.json +19 -22
- data/package.json +4 -4
- data/src/css/plutonium.css +15 -0
- data/tailwind.options.js +11 -3
- metadata +218 -81
- data/lib/generators/pu/core/install/templates/app/presenters/resource_presenter.rb.tt +0 -2
- data/lib/generators/pu/core/install/templates/app/query_objects/resource_query_object.rb.tt +0 -2
- data/lib/generators/pu/pkg/feature/templates/app/query_objects/resource_query_object.rb.tt +0 -4
- data/lib/plutonium/concerns/resource_validatable.rb +0 -34
- data/lib/plutonium/config.rb +0 -9
- data/lib/plutonium/core/controllers/base.rb +0 -101
- data/lib/plutonium/core/controllers/presentable.rb +0 -65
- data/lib/plutonium/core/controllers/queryable.rb +0 -28
- data/lib/plutonium/pkg/app.rb +0 -35
- data/lib/plutonium/pkg/concerns/resource_validatable.rb +0 -36
- data/lib/plutonium/pkg/feature.rb +0 -18
- data/lib/plutonium/policy/initializer.rb +0 -22
- data/lib/plutonium/policy/scope.rb +0 -19
- data/lib/plutonium/pundit/context.rb +0 -18
- data/lib/plutonium/pundit/policy_finder.rb +0 -25
- data/lib/plutonium/resource/policy_context.rb +0 -5
- data/lib/plutonium/resource_register.rb +0 -83
- data/lib/plutonium/smart_cache.rb +0 -151
- /data/app/views/{application → plutonium}/_flash.html.erb +0 -0
- /data/app/views/{application → plutonium}/_flash_alerts.html.erb +0 -0
- /data/app/views/{application → plutonium}/_flash_toasts.html.erb +0 -0
- /data/lib/generators/pu/pkg/{app/templates/app/views/package → package/templates}/.keep +0 -0
- /data/lib/generators/pu/pkg/{feature → package}/templates/app/interactions/resource_interaction.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{feature → package}/templates/app/models/resource_record.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{feature → package}/templates/app/policies/resource_policy.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{feature → package}/templates/app/presenters/resource_presenter.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{feature → package}/templates/lib/engine.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{app → portal}/templates/app/policies/resource_policy.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{app → portal}/templates/app/presenters/resource_presenter.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{app → portal}/templates/app/query_objects/resource_query_object.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{feature/templates → portal/templates/app/views/package}/.keep +0 -0
- /data/lib/generators/pu/pkg/{app → portal}/templates/config/routes.rb.tt +0 -0
- /data/lib/generators/pu/pkg/{app → portal}/templates/lib/engine.rb.tt +0 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Plutonium
|
4
|
+
module UI
|
5
|
+
module Table
|
6
|
+
class Theme < Phlexi::Table::Theme
|
7
|
+
def self.theme
|
8
|
+
super.merge({
|
9
|
+
selection_checkbox: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600",
|
10
|
+
name_column: "font-medium text-gray-900 whitespace-nowrap dark:text-white",
|
11
|
+
align_start: "text-start",
|
12
|
+
align_end: "text-end",
|
13
|
+
wrapper: "relative overflow-x-auto shadow-md sm:rounded-lg",
|
14
|
+
base: "w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400",
|
15
|
+
caption: "p-5 text-lg font-semibold text-left rtl:text-right text-gray-900 bg-white dark:text-white dark:bg-gray-800",
|
16
|
+
description: "mt-1 text-sm font-normal text-gray-500 dark:text-gray-400",
|
17
|
+
header: "text-xs text-gray-700 uppercase bg-gray-200 dark:bg-gray-700 dark:text-gray-400",
|
18
|
+
header_grouping_cell: "px-6 py-3 text-center text-sm border-b border-t border-r last:border-r-0 dark:border-gray-800",
|
19
|
+
header_cell: "px-6 py-3",
|
20
|
+
header_cell_content_wrapper: "inline-flex items-center",
|
21
|
+
header_cell_sort_wrapper: "flex items-center",
|
22
|
+
header_cell_sort_indicator: "ml-1.5",
|
23
|
+
body_row: "bg-white border-b last:border-none dark:bg-gray-800 dark:border-gray-700",
|
24
|
+
body_cell: "px-6 py-4 whitespace-pre max-w-[310px] hover:max-w-[600px] overflow-hidden text-ellipsis transition-all duration-300 ease-in-out",
|
25
|
+
sort_icon: "w-3 h-3",
|
26
|
+
sort_icon_active: "text-primary-600",
|
27
|
+
sort_index_clear_link: "ml-2",
|
28
|
+
sort_index_clear_link_text: "text-xs font-bold",
|
29
|
+
sort_index_clear_link_icon: "ml-1 text-red-600"
|
30
|
+
})
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/plutonium/ui.rb
ADDED
data/lib/plutonium/version.rb
CHANGED
data/lib/plutonium.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "zeitwerk"
|
4
|
+
require "action_policy"
|
5
|
+
require "phlex"
|
6
|
+
require "phlex-rails"
|
7
|
+
require "phlex/tabler_icons"
|
8
|
+
require "phlexi-display"
|
9
|
+
require "phlexi-form"
|
10
|
+
require "phlexi-table"
|
11
|
+
|
4
12
|
require_relative "plutonium/configuration"
|
5
13
|
|
6
14
|
# Plutonium module
|
@@ -14,14 +22,19 @@ module Plutonium
|
|
14
22
|
|
15
23
|
# Set up Zeitwerk loader for the Plutonium gem
|
16
24
|
# @return [Zeitwerk::Loader] configured Zeitwerk loader instance
|
17
|
-
|
25
|
+
Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
|
18
26
|
loader.ignore("#{__dir__}/generators")
|
19
27
|
loader.ignore("#{__dir__}/plutonium/railtie.rb")
|
28
|
+
loader.inflector.inflect("ui" => "UI")
|
20
29
|
loader.enable_reloading if defined?(Rails.env) && Rails.env.development?
|
21
30
|
loader.setup
|
22
31
|
end
|
23
32
|
|
24
33
|
class << self
|
34
|
+
def deprecator
|
35
|
+
@deprecator ||= ActiveSupport::Deprecation.new("1.0", "Plutonium")
|
36
|
+
end
|
37
|
+
|
25
38
|
# Get the root directory of the gem
|
26
39
|
#
|
27
40
|
# @return [Pathname] the root directory path
|
data/package-lock.json
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
{
|
2
|
-
"name": "@
|
3
|
-
"version": "0.1.
|
2
|
+
"name": "@radioactive-labs/plutonium",
|
3
|
+
"version": "0.1.3",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
|
-
"name": "@
|
9
|
-
"version": "0.1.
|
8
|
+
"name": "@radioactive-labs/plutonium",
|
9
|
+
"version": "0.1.3",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
12
|
"@hotwired/stimulus": "^3.2.2",
|
13
13
|
"@hotwired/turbo": "^8.0.4",
|
14
|
+
"flowbite": "^2.3.0",
|
14
15
|
"lodash.debounce": "^4.0.8"
|
15
16
|
},
|
16
17
|
"devDependencies": {
|
@@ -20,7 +21,6 @@
|
|
20
21
|
"cssnano": "^7.0.2",
|
21
22
|
"esbuild": "^0.20.1",
|
22
23
|
"esbuild-plugin-manifest": "^1.0.3",
|
23
|
-
"flowbite": "^2.3.0",
|
24
24
|
"postcss": "^8.4.35",
|
25
25
|
"postcss-cli": "^11.0.0",
|
26
26
|
"postcss-hash": "^3.0.0",
|
@@ -546,7 +546,6 @@
|
|
546
546
|
"version": "2.11.8",
|
547
547
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
548
548
|
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
549
|
-
"dev": true,
|
550
549
|
"funding": {
|
551
550
|
"type": "opencollective",
|
552
551
|
"url": "https://opencollective.com/popperjs"
|
@@ -702,12 +701,12 @@
|
|
702
701
|
}
|
703
702
|
},
|
704
703
|
"node_modules/braces": {
|
705
|
-
"version": "3.0.
|
706
|
-
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.
|
707
|
-
"integrity": "sha512-
|
704
|
+
"version": "3.0.3",
|
705
|
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
706
|
+
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
708
707
|
"dev": true,
|
709
708
|
"dependencies": {
|
710
|
-
"fill-range": "^7.
|
709
|
+
"fill-range": "^7.1.1"
|
711
710
|
},
|
712
711
|
"engines": {
|
713
712
|
"node": ">=8"
|
@@ -767,9 +766,9 @@
|
|
767
766
|
}
|
768
767
|
},
|
769
768
|
"node_modules/caniuse-lite": {
|
770
|
-
"version": "1.0.
|
771
|
-
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.
|
772
|
-
"integrity": "sha512-
|
769
|
+
"version": "1.0.30001658",
|
770
|
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001658.tgz",
|
771
|
+
"integrity": "sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw==",
|
773
772
|
"dev": true,
|
774
773
|
"funding": [
|
775
774
|
{
|
@@ -1431,9 +1430,9 @@
|
|
1431
1430
|
}
|
1432
1431
|
},
|
1433
1432
|
"node_modules/fill-range": {
|
1434
|
-
"version": "7.
|
1435
|
-
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.
|
1436
|
-
"integrity": "sha512-
|
1433
|
+
"version": "7.1.1",
|
1434
|
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
1435
|
+
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
1437
1436
|
"dev": true,
|
1438
1437
|
"dependencies": {
|
1439
1438
|
"to-regex-range": "^5.0.1"
|
@@ -1446,7 +1445,6 @@
|
|
1446
1445
|
"version": "2.3.0",
|
1447
1446
|
"resolved": "https://registry.npmjs.org/flowbite/-/flowbite-2.3.0.tgz",
|
1448
1447
|
"integrity": "sha512-pm3JRo8OIJHGfFYWgaGpPv8E+UdWy0Z3gEAGufw+G/1dusaU/P1zoBLiQpf2/+bYAi+GBQtPVG86KYlV0W+AFQ==",
|
1449
|
-
"dev": true,
|
1450
1448
|
"dependencies": {
|
1451
1449
|
"@popperjs/core": "^2.9.3",
|
1452
1450
|
"mini-svg-data-uri": "^1.4.3"
|
@@ -1800,12 +1798,12 @@
|
|
1800
1798
|
}
|
1801
1799
|
},
|
1802
1800
|
"node_modules/micromatch": {
|
1803
|
-
"version": "4.0.
|
1804
|
-
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.
|
1805
|
-
"integrity": "sha512-
|
1801
|
+
"version": "4.0.8",
|
1802
|
+
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
1803
|
+
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
1806
1804
|
"dev": true,
|
1807
1805
|
"dependencies": {
|
1808
|
-
"braces": "^3.0.
|
1806
|
+
"braces": "^3.0.3",
|
1809
1807
|
"picomatch": "^2.3.1"
|
1810
1808
|
},
|
1811
1809
|
"engines": {
|
@@ -1816,7 +1814,6 @@
|
|
1816
1814
|
"version": "1.4.4",
|
1817
1815
|
"resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz",
|
1818
1816
|
"integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==",
|
1819
|
-
"dev": true,
|
1820
1817
|
"bin": {
|
1821
1818
|
"mini-svg-data-uri": "cli.js"
|
1822
1819
|
}
|
data/package.json
CHANGED
@@ -19,21 +19,21 @@
|
|
19
19
|
"homepage": "https://github.com/radioactive-labs/plutonium-core#readme",
|
20
20
|
"dependencies": {
|
21
21
|
"@hotwired/stimulus": "^3.2.2",
|
22
|
-
"lodash.debounce": "^4.0.8",
|
23
22
|
"@hotwired/turbo": "^8.0.4",
|
24
|
-
"flowbite": "^2.3.0"
|
23
|
+
"flowbite": "^2.3.0",
|
24
|
+
"lodash.debounce": "^4.0.8"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@tailwindcss/forms": "^0.5.7",
|
28
28
|
"autoprefixer": "^10.4.18",
|
29
29
|
"concurrently": "^8.2.2",
|
30
|
+
"cssnano": "^7.0.2",
|
30
31
|
"esbuild": "^0.20.1",
|
31
32
|
"esbuild-plugin-manifest": "^1.0.3",
|
32
33
|
"postcss": "^8.4.35",
|
33
34
|
"postcss-cli": "^11.0.0",
|
34
35
|
"postcss-hash": "^3.0.0",
|
35
|
-
"tailwindcss": "^3.4.1"
|
36
|
-
"cssnano": "^7.0.2"
|
36
|
+
"tailwindcss": "^3.4.1"
|
37
37
|
},
|
38
38
|
"scripts": {
|
39
39
|
"build": "npm run js:prod && npm run css:prod",
|
data/src/css/plutonium.css
CHANGED
@@ -1,3 +1,18 @@
|
|
1
1
|
@tailwind base;
|
2
2
|
@tailwind components;
|
3
3
|
@tailwind utilities;
|
4
|
+
|
5
|
+
|
6
|
+
@layer components {
|
7
|
+
.pu-color-input::-webkit-color-swatch-wrapper {
|
8
|
+
@apply p-0;
|
9
|
+
}
|
10
|
+
|
11
|
+
.pu-color-input::-webkit-color-swatch {
|
12
|
+
@apply border-none rounded-lg;
|
13
|
+
}
|
14
|
+
|
15
|
+
.pu-color-input::-moz-color-swatch {
|
16
|
+
@apply border-none rounded-lg;
|
17
|
+
}
|
18
|
+
}
|
data/tailwind.options.js
CHANGED
@@ -2,13 +2,11 @@ export const content = [
|
|
2
2
|
`${__dirname}/src/**/*.{css,js}`,
|
3
3
|
`${__dirname}/app/views/**/*.{rb,erb,js}`,
|
4
4
|
`${__dirname}/config/initializers/simple_form.rb`,
|
5
|
+
`${__dirname}/lib/plutonium/**/*.rb`,
|
5
6
|
|
6
7
|
// node modules are not packaged as part of the gem.
|
7
8
|
// requires users to have flowbite installed in their own project.
|
8
9
|
'./node_modules/flowbite/**/*.js',
|
9
|
-
// TODO: temporary workaround for legacy components.
|
10
|
-
// To be removed after converting buttons_helper and other files containing tailwind to components .
|
11
|
-
// `${__dirname}/lib/plutonium/**/*.{rb,erb}`
|
12
10
|
];
|
13
11
|
export const darkMode = "selector";
|
14
12
|
export const plugins = [
|
@@ -71,6 +69,16 @@ export const theme = {
|
|
71
69
|
'Segoe UI Emoji',
|
72
70
|
'Segoe UI Symbol',
|
73
71
|
'Noto Color Emoji'
|
72
|
+
],
|
73
|
+
'mono': [
|
74
|
+
'ui-monospace',
|
75
|
+
'SFMono-Regular',
|
76
|
+
'Menlo',
|
77
|
+
'Monaco',
|
78
|
+
'Consolas',
|
79
|
+
'Liberation Mono',
|
80
|
+
'Courier New',
|
81
|
+
'monospace'
|
74
82
|
]
|
75
83
|
}
|
76
84
|
};
|