keystone_ui 0.10.0 → 0.11.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 002fac505b8658ac84ead1730a24efc02aaf7b1ada50fca184408e95ef166a77
4
- data.tar.gz: 06b2c641c7af8d6b06999a3e5d7c65fcf40bf84e85a2a9bb80bd772b89439df4
3
+ metadata.gz: 779c5876ab225f8e81effa23a748805e832b8521081de86b1a64759f81876190
4
+ data.tar.gz: 62adc4c320cef40f09b1c0ca677e45a03cf9af3e46e7ac87e7854d9cea4b917b
5
5
  SHA512:
6
- metadata.gz: c380a81162057aa27c4305e2530c493ba69ad42dd627a74bd01bc5eaabee67fa883558e4dad53a3d7a9f245bc5ad2fb0ebaf50ac6ef50c6ca8ab061b2c9eb49b
7
- data.tar.gz: 22447d5c5e4c19057112ccbae4604ccb77b1a106915639221b8dacb3eb4b4ee9449fd2e69aecf74d5c8bc2f62a7c1c73c18ac0e9ae33cf4c4714c2d772161463
6
+ metadata.gz: 7e2111385ae219156f7ddebc22ffbc064fe804a36ba7699b1828e368fc75b19e133fdedd3c95cab3f270262d7d7f86744972c66b6e7433bf19505a9a1365e6fe
7
+ data.tar.gz: ab7ea01f423446831a0e88a0b51185741d6099dbb49a655d37f955aa3bc0201b82c2d878e12ed1fb2cfb37948e035c399d288f5e49b4c16e102a7b4ee8943648
@@ -1,6 +1,3 @@
1
- /* Keystone UI components — tells Tailwind to scan for classes in component files */
2
- @source "../../components/**/*.{erb,rb}";
3
-
4
1
  /* Safelist: grid-cols classes built from static constants in GridComponent.
5
2
  Belt-and-suspenders — ensures these classes survive JIT purging even if
6
3
  the scanner misses the Ruby hash literals. */
@@ -3,10 +3,13 @@
3
3
  module KeystoneUi
4
4
  class Configuration
5
5
  attr_accessor :accent, :surface, :theme_mode_supplier
6
+ attr_reader :tailwind_imports, :tailwind_sources
6
7
 
7
8
  def initialize
8
9
  @accent = :blue
9
10
  @surface = :zinc
11
+ @tailwind_imports = []
12
+ @tailwind_sources = []
10
13
  end
11
14
 
12
15
  def supplied_theme_mode(view)
@@ -29,7 +29,7 @@ module KeystoneUi
29
29
  keystone_import = '@import "./keystone_source.css";'
30
30
  next unless css_path.read.include?(keystone_import)
31
31
 
32
- tailwind_dir.join("keystone_source.css").write(KeystoneUi::SourceCss.new(root).to_s)
32
+ tailwind_dir.join("keystone_source.css").write(KeystoneUi::SourceCss.new(root, imports: KeystoneUi.configuration.tailwind_imports, sources: KeystoneUi.configuration.tailwind_sources).to_s)
33
33
  end
34
34
  end
35
35
  end
@@ -5,8 +5,10 @@ require "keystone_ui/styles"
5
5
 
6
6
  module KeystoneUi
7
7
  class SourceCss
8
- def initialize(root)
8
+ def initialize(root, imports: [], sources: [])
9
9
  @root = Pathname.new(root)
10
+ @imports = imports
11
+ @sources = sources
10
12
  end
11
13
 
12
14
  def to_s
@@ -15,16 +17,15 @@ module KeystoneUi
15
17
 
16
18
  private
17
19
 
18
- def styles_entry
19
- KeystoneUi::Styles::Engine.root.join("app/assets/tailwind/keystone_ui_styles/engine.css")
20
- end
21
-
22
20
  def lines
23
21
  [
24
- %(@import "#{styles_entry}";),
22
+ %(@import "#{KeystoneUi::Styles.tailwind_file}";),
25
23
  %(@source "#{@root}/app/components/**/*.{erb,rb}";),
26
24
  %(@import "#{@root}/app/assets/tailwind/keystone_ui_engine/nav.css";),
27
- %(@import "#{@root}/app/assets/tailwind/keystone_ui_engine/color_picker.css";)
25
+ %(@import "#{@root}/app/assets/tailwind/keystone_ui_engine/color_picker.css";),
26
+ %(@import "#{@root}/app/assets/tailwind/keystone_ui_engine/grid_safelist.css";),
27
+ *@imports.map { |import| %(@import "#{import}";) },
28
+ *@sources.map { |source| %(@source "#{source}";) }
28
29
  ]
29
30
  end
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KeystoneUi
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keystone_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Schneider
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0
19
+ version: 0.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.0
26
+ version: 0.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: view_component
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -70,7 +70,7 @@ files:
70
70
  - app/assets/javascripts/keystone_ui/tab_switcher_controller.js
71
71
  - app/assets/javascripts/keystone_ui/theme_toggle_controller.js
72
72
  - app/assets/tailwind/keystone_ui_engine/color_picker.css
73
- - app/assets/tailwind/keystone_ui_engine/engine.css
73
+ - app/assets/tailwind/keystone_ui_engine/grid_safelist.css
74
74
  - app/assets/tailwind/keystone_ui_engine/nav.css
75
75
  - app/components/keystone/ui/accordion_component.html.erb
76
76
  - app/components/keystone/ui/accordion_component.rb