lookbook 2.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/components/lookbook/base_component.rb +1 -1
  3. data/app/components/lookbook/embed/inspector/component.html.erb +19 -4
  4. data/app/components/lookbook/embed/inspector/component.rb +1 -1
  5. data/app/components/lookbook/header/component.html.erb +4 -3
  6. data/app/components/lookbook/tag_component.rb +8 -1
  7. data/app/controllers/lookbook/embeds_controller.rb +3 -3
  8. data/app/controllers/lookbook/inspector_controller.rb +1 -1
  9. data/app/controllers/lookbook/pages_controller.rb +1 -1
  10. data/app/controllers/lookbook/previews_controller.rb +1 -1
  11. data/app/views/layouts/lookbook/embed.html.erb +6 -0
  12. data/app/views/lookbook/inspector/show.html.erb +3 -3
  13. data/app/views/lookbook/previews/group.html.erb +1 -0
  14. data/assets/css/lookbook.css +2 -2
  15. data/assets/js/app.js +6 -0
  16. data/lib/lookbook/cable/cable.rb +2 -2
  17. data/lib/lookbook/engine.rb +5 -3
  18. data/lib/lookbook/entities/collections/concerns/hierarchical_collection.rb +5 -3
  19. data/lib/lookbook/entities/collections/preview_collection.rb +4 -0
  20. data/lib/lookbook/entities/entity.rb +4 -0
  21. data/lib/lookbook/entities/scenario_entity.rb +1 -1
  22. data/lib/lookbook/entities/scenario_group_entity.rb +1 -1
  23. data/lib/lookbook/file_watcher.rb +1 -1
  24. data/lib/lookbook/helpers/class_names_helper.rb +2 -2
  25. data/lib/lookbook/helpers/ui_elements_helper.rb +6 -6
  26. data/lib/lookbook/param.rb +1 -1
  27. data/lib/lookbook/preview_controller_actions.rb +1 -1
  28. data/lib/lookbook/stores/input_store.rb +2 -2
  29. data/lib/lookbook/stores/panel_store.rb +2 -2
  30. data/lib/lookbook/support/service.rb +2 -2
  31. data/lib/lookbook/version.rb +1 -1
  32. data/lib/lookbook/websocket.rb +3 -3
  33. data/public/lookbook-assets/css/lookbook.css +28 -10
  34. data/public/lookbook-assets/css/lookbook.css.map +1 -1
  35. data/public/lookbook-assets/js/iframe.js.map +1 -1
  36. data/public/lookbook-assets/js/index.js +676 -1183
  37. data/public/lookbook-assets/js/index.js.map +1 -1
  38. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23c9ebbf01e8228763851357baeb33218efefdeebbe03f1ffe9be340ad9e22d8
4
- data.tar.gz: 0af47c23f936c11f782d611f52e113f006ba323afd61d3f6c7598cea9ac7ee0c
3
+ metadata.gz: 19ab9c7f446b482d3fca35d243e8c998b2bc6eed27315b88a27e76ff0efd5da2
4
+ data.tar.gz: 254235a524acd72521176f195ffb6e2ec4fa972e4590bc495aca6026366a17a3
5
5
  SHA512:
6
- metadata.gz: 2c0c8d14d894301fb289defc7f61f1886ec2e2da17d958bafe8e880cbdd6232a44a1d91d2db9ecb37cf970908a4b600d80fba1fdf0199d8dfd2bd0fdf133ad8e
7
- data.tar.gz: 830455b5818b67bcc5245898ce2e2c0eda5b99117b8fbe2f20898dc839e28a7d8c12901575d31d7653c0daab23aee3fe314c6348746f8e12754b4ed9f7d8599f
6
+ metadata.gz: 5c25ff635a176b8973155be10c3b5bc89dbb5a8bfd75f9427198b9ab6b1ac57fab5a85af4f6a0028c87e5600105d7cebe299997f81d3fb16a03b175424770bbd
7
+ data.tar.gz: 3022e8109efafbc70e6e04fffef56694caa6b44be75edf6568c7127b51145ab110bf8baea411e869e790a11405567e3d6da436de12bcf811b076fbf543e6321b
@@ -1,6 +1,6 @@
1
1
  module Lookbook
2
2
  class BaseComponent < ViewComponent::Base
3
- include Lookbook::Engine.routes.url_helpers
3
+ send(:include, Lookbook::Engine.routes.url_helpers) # YARD parsing workaround: https://github.com/lsegal/yard/issues/546
4
4
  include Lookbook::UiElementsHelper
5
5
  include Lookbook::ClassNamesHelper if Engine.runtime_context.rails_older_than?("6.1.0")
6
6
 
@@ -9,7 +9,7 @@
9
9
  <h3 class="flex items-center space-x-1">
10
10
  <strong class="text-lookbook-embed-title"><%= target.preview.label %></strong>
11
11
  <% if scenarios.many? %>
12
- <%= select_tag("target", options_for_select(scenario_select_options, helpers.lookbook_embed_path(target.path)), "x-model": "targetPath", class: "!ml-2 compact") %>
12
+ <%= select_tag("target", options_for_select(scenario_select_options, helpers.lookbook_embed_path(target.lookup_path)), "x-model": "targetPath", class: "!ml-2 compact") %>
13
13
  <% else %>
14
14
  <span>(<%= target.label %>) </span>
15
15
  <% end %>
@@ -31,13 +31,13 @@
31
31
  <%= lookbook_render :button_group do |group| %>
32
32
  <% if display_action?(:inspect) %>
33
33
  <% group.with_button icon: :eye,
34
- href: helpers.lookbook_inspect_url(target.path, params),
34
+ href: helpers.lookbook_inspect_url(target.lookup_path, params),
35
35
  tooltip: "View in Inspector",
36
36
  target: "_top" %>
37
37
  <% end %>
38
38
  <% if display_action?(:open) %>
39
39
  <% group.with_button icon: :external_link,
40
- href: helpers.lookbook_preview_url(target.path, params),
40
+ href: helpers.lookbook_preview_url(target.lookup_path, params),
41
41
  tooltip: "Open in new window",
42
42
  target: "_blank" %>
43
43
  <% end %>
@@ -57,7 +57,7 @@
57
57
  x-ref="viewportWrapper">
58
58
  <%= lookbook_render :viewport,
59
59
  iframe_id: "#{id}-viewport",
60
- src: helpers.lookbook_preview_path(target.path, request.query_parameters.merge(lookbook_timestamp: Time.now, lookbook_embed: true)),
60
+ src: helpers.lookbook_preview_path(target.lookup_path, request.query_parameters.merge(lookbook_timestamp: Time.now, lookbook_embed: true)),
61
61
  alpine_data: "store",
62
62
  resize_height: false,
63
63
  class: "mb-[-2px] transition-[height] duration-150",
@@ -82,6 +82,21 @@
82
82
  <% end %>
83
83
  <% end %>
84
84
  <% end %>
85
+
86
+ <% toolbar.with_section align: :right, class: "flex-none relative z-10" do %>
87
+ <%= lookbook_render :button_group do |group| %>
88
+ <%= panels.select { |p| !p.disabled && p.copy }.each do |panel| %>
89
+ <% group.with_button id: "copy-panel-contents-button-#{panel.name}",
90
+ icon: :copy,
91
+ tooltip: "Copy panel contents",
92
+ copy: !!panel.copy,
93
+ "x-show": "store.activeTab === '#{panel.name}'",
94
+ cloak: true do %>
95
+ <%= panel.copy ? panel.copy : "" %>
96
+ <% end %>
97
+ <% end %>
98
+ <% end %>
99
+ <% end %>
85
100
  <% end %>
86
101
 
87
102
  <div class="bg-lookbook-drawer-bg">
@@ -40,7 +40,7 @@ module Lookbook
40
40
  end
41
41
 
42
42
  def scenario_select_options
43
- scenarios.map { |scenario| [scenario.label, helpers.lookbook_embed_path(scenario.path)] }
43
+ scenarios.map { |scenario| [scenario.label, helpers.lookbook_embed_path(scenario.lookup_path)] }
44
44
  end
45
45
 
46
46
  def display_option_controls?
@@ -29,6 +29,7 @@
29
29
  <% if @debug_menu %>
30
30
  <% group.with_button id: "debug-menu-button",
31
31
  icon: :help_circle,
32
+ tooltip: "Debug info",
32
33
  class: "!text-lookbook-header-text", "x-show": "!loading" do |button| %>
33
34
  <% menu = lookbook_render :debug_menu,
34
35
  version: Lookbook::VERSION,
@@ -50,8 +51,8 @@
50
51
  "x-show": "$store.layout.mobile && !sidebarHidden",
51
52
  "x-on:keydown.esc.window": "closeMobileSidebar",
52
53
  class: "!text-lookbook-header-text" %>
53
- <% end %>
54
+ <% end %>
54
55
  <% end %>
55
56
  <% end %>
56
-
57
- <% end %>
57
+
58
+ <% end %>
@@ -20,7 +20,14 @@ module Lookbook
20
20
  end
21
21
 
22
22
  def self.escape_attribute_key
23
- @escape_attribute_key ||= (Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")) ? :escape_attributes : :escape
23
+ @escape_attribute_key ||= (
24
+ (
25
+ Gem::Version.new(Rails.version) < Gem::Version.new("5.2.7.1")
26
+ ) || (
27
+ Gem::Version.new(Rails.version) >= Gem::Version.new("6") &&
28
+ Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")
29
+ )
30
+ ) ? :escape_attributes : :escape
24
31
  end
25
32
  end
26
33
  end
@@ -1,5 +1,5 @@
1
1
  module Lookbook
2
- class EmbedsController < ApplicationController
2
+ class EmbedsController < Lookbook::ApplicationController
3
3
  include ActionView::Helpers::SanitizeHelper
4
4
  include TargetableConcern
5
5
  include WithPreviewControllerConcern
@@ -53,7 +53,7 @@ module Lookbook
53
53
  embed_params[:_options] = SearchParamEncoder.call(options)
54
54
  embed_params.symbolize_keys!
55
55
 
56
- return redirect_to lookbook_embed_url(scenario ? scenario.path : preview.path, embed_params)
56
+ return redirect_to lookbook_embed_url(scenario ? scenario.lookup_path : preview.lookup_path, embed_params)
57
57
  end
58
58
  end
59
59
 
@@ -65,7 +65,7 @@ module Lookbook
65
65
  unless @target
66
66
  @target = @scenario_choices.first || @preview&.default_scenario
67
67
  if @target
68
- redirect_to lookbook_embed_path(@target.path, req_params)
68
+ redirect_to lookbook_embed_path(@target.lookup_path, req_params)
69
69
  else
70
70
  raise_not_found("Preview not found")
71
71
  end
@@ -1,5 +1,5 @@
1
1
  module Lookbook
2
- class InspectorController < ApplicationController
2
+ class InspectorController < Lookbook::ApplicationController
3
3
  include TargetableConcern
4
4
  include WithPanelsConcern
5
5
  include WithPreviewControllerConcern
@@ -1,5 +1,5 @@
1
1
  module Lookbook
2
- class PagesController < ApplicationController
2
+ class PagesController < Lookbook::ApplicationController
3
3
  helper_method :page_controller
4
4
 
5
5
  def self.controller_path
@@ -1,5 +1,5 @@
1
1
  module Lookbook
2
- class PreviewsController < ApplicationController
2
+ class PreviewsController < Lookbook::ApplicationController
3
3
  include TargetableConcern
4
4
  include WithPreviewControllerConcern
5
5
 
@@ -11,6 +11,12 @@
11
11
 
12
12
  <%= content_for?(:main) ? yield(:main) : yield %>
13
13
  </div>
14
+
15
+ <% if content_for? :dropdowns %>
16
+ <div class="hidden">
17
+ <%= content_for :dropdowns -%>
18
+ </div>
19
+ <% end %>
14
20
  <% end %>
15
21
 
16
22
  <%= render template: "layouts/lookbook/skeleton" %>
@@ -63,7 +63,7 @@
63
63
  tooltip: "Open preview in new window",
64
64
  target: "_blank" %>
65
65
 
66
- <% group.with_button id: "show-drawer-button",
66
+ <% group.with_button id: "show-vertical-drawer-button",
67
67
  icon: "sidebar",
68
68
  tooltip: "Show drawer",
69
69
  "x-on:click": "$store.inspector.drawer.hidden = false",
@@ -71,7 +71,7 @@
71
71
  "x-show": "$store.inspector.drawer.hidden && vertical",
72
72
  cloak: true %>
73
73
 
74
- <% group.with_button id: "show-drawer-button",
74
+ <% group.with_button id: "show-bottom-drawer-button",
75
75
  icon: "credit-card",
76
76
  tooltip: "Show drawer",
77
77
  "x-on:click": "$store.inspector.drawer.hidden = false",
@@ -166,4 +166,4 @@
166
166
  </div>
167
167
  <% end %>
168
168
  <% end %>
169
- </main>
169
+ </main>
@@ -1,4 +1,5 @@
1
1
  <% if scenarios.many? %>
2
+ <% scenarios = scenarios.filter(&:visible?) %>
2
3
  <%# Render a group of scenarios %>
3
4
  <% scenarios.each do |scenario| %>
4
5
  <div style="margin-bottom: 30px !important; display: block !important;">
@@ -9,7 +9,7 @@
9
9
 
10
10
  @layer base {
11
11
  html {
12
- @apply scroll-smooth h-screen;
12
+ @apply scroll-smooth h-screen w-screen;
13
13
  }
14
14
 
15
15
  @media screen and (prefers-reduced-motion: reduce) {
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  body {
22
- @apply text-lookbook-text font-ui text-sm overflow-hidden;
22
+ @apply text-lookbook-text font-ui text-sm overflow-hidden w-screen;
23
23
  }
24
24
 
25
25
  [x-cloak] {
data/assets/js/app.js CHANGED
@@ -25,6 +25,12 @@ export default function app() {
25
25
  const socket = createSocket(window.SOCKET_PATH);
26
26
  socket.addListener("Lookbook::ReloadChannel", () => this.updateDOM());
27
27
  }
28
+
29
+ this.$watch("$store.layout.mobile", (mobile) => {
30
+ if (!mobile) {
31
+ this.$store.layout.sidebar.hidden = true;
32
+ }
33
+ });
28
34
  },
29
35
 
30
36
  navigateTo(path) {
@@ -1,6 +1,6 @@
1
1
  require "action_cable/engine"
2
- require_relative "./connection"
3
- require_relative "./reload_channel"
2
+ require_relative "connection"
3
+ require_relative "reload_channel"
4
4
 
5
5
  module Lookbook
6
6
  class Cable
@@ -62,7 +62,9 @@ module Lookbook
62
62
  ViewComponent::Preview.extend(Lookbook::PreviewAfterRender)
63
63
  end
64
64
 
65
- opts.reload_on_change = host_config.reload_classes_only_on_change if opts.reload_on_change.nil?
65
+ if opts.reload_on_change.nil?
66
+ opts.reload_on_change = !host_config.cache_classes && host_config.reload_classes_only_on_change
67
+ end
66
68
  end
67
69
 
68
70
  config.after_initialize do
@@ -144,9 +146,9 @@ module Lookbook
144
146
  @_hooks ||= HookStore.new
145
147
  end
146
148
 
147
- def run_hooks(event_name, *args)
149
+ def run_hooks(event_name, *)
148
150
  hooks.for_event(event_name).each do |hook|
149
- hook.call(Lookbook, *args)
151
+ hook.call(Lookbook, *)
150
152
  end
151
153
  end
152
154
 
@@ -17,9 +17,11 @@ module Lookbook
17
17
  protected
18
18
 
19
19
  def collect_ordered_entities(start_node)
20
- start_node.inject([]) do |entities, node|
21
- entities.append(node.content? ? node.content : collect_ordered_entities(node))
22
- end.flatten
20
+ start_node.flat_map do |node|
21
+ node_entity = node.content? ? [node.content] : []
22
+ child_entities = collect_ordered_entities(node)
23
+ [*node_entity, *child_entities]
24
+ end
23
25
  end
24
26
  end
25
27
  end
@@ -43,6 +43,10 @@ module Lookbook
43
43
  clear_cache
44
44
  end
45
45
 
46
+ def entities
47
+ @_cache[:entities] ||= collect_ordered_entities(to_tree(include_hidden: true)).grep(Lookbook::PreviewEntity)
48
+ end
49
+
46
50
  class << self
47
51
  def preview_from_code_object(code_object)
48
52
  klass = code_object.path.constantize
@@ -65,6 +65,10 @@ module Lookbook
65
65
  alias_method :path, :lookup_path
66
66
  deprecate path: :lookup_path, deprecator: Deprecation
67
67
 
68
+ def search_terms
69
+ @_search_terms ||= lookup_path.split("/").map(&:titleize)
70
+ end
71
+
68
72
  # @!endgroup
69
73
 
70
74
  def <=>(other)
@@ -134,7 +134,7 @@ module Lookbook
134
134
 
135
135
  # @api private
136
136
  def search_terms
137
- [parent.label, label]
137
+ [parent.search_terms, parent.label, label]
138
138
  end
139
139
 
140
140
  alias_method :lang, :source_lang
@@ -124,7 +124,7 @@ module Lookbook
124
124
 
125
125
  # @api private
126
126
  def search_terms
127
- [parent.label, label]
127
+ [parent.search_terms, parent.label, label]
128
128
  end
129
129
 
130
130
  # @api private
@@ -13,7 +13,7 @@ module Lookbook
13
13
 
14
14
  def file_watcher
15
15
  @_file_watcher ||= begin
16
- require_relative "./support/evented_file_update_checker"
16
+ require_relative "support/evented_file_update_checker"
17
17
 
18
18
  EventedFileUpdateChecker
19
19
  rescue LoadError
@@ -19,8 +19,8 @@ module Lookbook
19
19
  tag_values
20
20
  end
21
21
 
22
- def class_names(*args)
23
- tokens = build_tag_values(*args).flat_map { |value| value.to_s.split(/\s+/) }.uniq
22
+ def class_names(*)
23
+ tokens = build_tag_values(*).flat_map { |value| value.to_s.split(/\s+/) }.uniq
24
24
 
25
25
  safe_join(tokens, " ")
26
26
  end
@@ -17,8 +17,8 @@ module Lookbook
17
17
  #
18
18
  # @param name [Symbol, String] Name of the icon
19
19
  # @param opts [Hash] Options hash
20
- def icon(name, **opts)
21
- lookbook_render :icon, name: name, **opts
20
+ def icon(name, **)
21
+ lookbook_render(:icon, name: name, **)
22
22
  end
23
23
 
24
24
  # Display a syntax-highlighted block of code.
@@ -35,13 +35,13 @@ module Lookbook
35
35
  end
36
36
 
37
37
  # @api private
38
- def prose(**opts, &block)
39
- lookbook_render :prose, **opts, &block
38
+ def prose(**, &block)
39
+ lookbook_render(:prose, **, &block)
40
40
  end
41
41
 
42
42
  # @api private
43
- def lookbook_tag(tag = :div, **attrs, &block)
44
- lookbook_render :tag, tag: tag, **attrs, &block
43
+ def lookbook_tag(tag = :div, **, &block)
44
+ lookbook_render(:tag, tag: tag, **, &block)
45
45
  end
46
46
 
47
47
  # @api private
@@ -28,7 +28,7 @@ module Lookbook
28
28
  val = @value || value_default
29
29
  if value_type == "datetime"
30
30
  formatter = (input == "datetime-local") ? "%Y-%m-%dT%T" : "%Y-%m-%d"
31
- StringValueCaster.call(val, "datetime").strftime(formatter)
31
+ StringValueCaster.call(val, "datetime")&.strftime(formatter)
32
32
  else
33
33
  val
34
34
  end
@@ -4,7 +4,7 @@ module Lookbook
4
4
 
5
5
  included do
6
6
  helper PreviewHelper
7
- helper Rails.application.routes.url_helpers
7
+ send(:helper, Rails.application.routes.url_helpers) # YARD parsing workaround: https://github.com/lsegal/yard/issues/546
8
8
  prepend_view_path Engine.root.join("app/views")
9
9
 
10
10
  def render_scenario_to_string(preview, scenario)
@@ -16,8 +16,8 @@ module Lookbook
16
16
  end
17
17
  end
18
18
 
19
- def add_input(input, *args)
20
- store[normalize_name(input)] = build_config(input, *args)
19
+ def add_input(input, *)
20
+ store[normalize_name(input)] = build_config(input, *)
21
21
  end
22
22
 
23
23
  def get_input(input)
@@ -19,11 +19,11 @@ module Lookbook
19
19
  load_config(config)
20
20
  end
21
21
 
22
- def add_panel(name, *args)
22
+ def add_panel(name, *)
23
23
  if get_panel(name)
24
24
  raise ConfigError.new("panel with name '#{name}' already exists", scope: "panels.config")
25
25
  else
26
- store[Utils.symbolize_name(name)] = build_config(name, *args)
26
+ store[Utils.symbolize_name(name)] = build_config(name, *)
27
27
  end
28
28
  end
29
29
 
@@ -1,7 +1,7 @@
1
1
  module Lookbook
2
2
  class Service
3
- def self.call(*args, **kwargs, &block)
4
- new(*args, **kwargs).call(&block)
3
+ def self.call(*, **, &block)
4
+ new(*, **).call(&block)
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "2.0.4"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -1,10 +1,10 @@
1
1
  module Lookbook
2
2
  class Websocket
3
3
  class << self
4
- def new(mount_path, **kwargs)
5
- require_relative "./cable/cable"
4
+ def new(mount_path, **)
5
+ require_relative "cable/cable"
6
6
 
7
- Cable.new(mount_path, **kwargs)
7
+ Cable.new(mount_path, **)
8
8
  rescue LoadError
9
9
  NullWebsocket.new
10
10
  end
@@ -112,6 +112,8 @@ table {
112
112
  }
113
113
 
114
114
  button, input, optgroup, select, textarea {
115
+ font-feature-settings: inherit;
116
+ font-variation-settings: inherit;
115
117
  font-family: inherit;
116
118
  font-size: 100%;
117
119
  font-weight: inherit;
@@ -184,6 +186,10 @@ ol, ul, menu {
184
186
  list-style: none;
185
187
  }
186
188
 
189
+ dialog {
190
+ padding: 0;
191
+ }
192
+
187
193
  textarea {
188
194
  resize: vertical;
189
195
  }
@@ -215,7 +221,7 @@ img, video {
215
221
  display: none;
216
222
  }
217
223
 
218
- [type="text"], [type="email"], [type="url"], [type="password"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="search"], [type="tel"], [type="time"], [type="week"], [multiple], textarea, select {
224
+ [type="text"], input:where(:not([type])), [type="email"], [type="url"], [type="password"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="search"], [type="tel"], [type="time"], [type="week"], [multiple], textarea, select {
219
225
  appearance: none;
220
226
  --tw-shadow: 0 0 #0000;
221
227
  background-color: #fff;
@@ -227,7 +233,7 @@ img, video {
227
233
  line-height: 1.5rem;
228
234
  }
229
235
 
230
- [type="text"]:focus, [type="email"]:focus, [type="url"]:focus, [type="password"]:focus, [type="number"]:focus, [type="date"]:focus, [type="datetime-local"]:focus, [type="month"]:focus, [type="search"]:focus, [type="tel"]:focus, [type="time"]:focus, [type="week"]:focus, [multiple]:focus, textarea:focus, select:focus {
236
+ [type="text"]:focus, input:where(:not([type])):focus, [type="email"]:focus, [type="url"]:focus, [type="password"]:focus, [type="number"]:focus, [type="date"]:focus, [type="datetime-local"]:focus, [type="month"]:focus, [type="search"]:focus, [type="tel"]:focus, [type="time"]:focus, [type="week"]:focus, [multiple]:focus, textarea:focus, select:focus {
231
237
  outline-offset: 2px;
232
238
  --tw-ring-inset: var(--tw-empty, );
233
239
  --tw-ring-offset-width: 0px;
@@ -251,6 +257,11 @@ input::placeholder, textarea::placeholder {
251
257
 
252
258
  ::-webkit-date-and-time-value {
253
259
  min-height: 1.5em;
260
+ text-align: inherit;
261
+ }
262
+
263
+ ::-webkit-datetime-edit {
264
+ display: inline-flex;
254
265
  }
255
266
 
256
267
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
@@ -267,7 +278,7 @@ select {
267
278
  padding-right: 2.5rem;
268
279
  }
269
280
 
270
- [multiple] {
281
+ [multiple], [size]:where(select:not([size="1"])) {
271
282
  background-image: initial;
272
283
  background-position: initial;
273
284
  background-repeat: unset;
@@ -367,6 +378,7 @@ select {
367
378
 
368
379
  html {
369
380
  height: 100vh;
381
+ width: 100vw;
370
382
  scroll-behavior: smooth;
371
383
  }
372
384
 
@@ -377,6 +389,7 @@ html {
377
389
  }
378
390
 
379
391
  body {
392
+ width: 100vw;
380
393
  color: var(--lookbook-text);
381
394
  font-family: 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;
382
395
  font-size: .875rem;
@@ -501,6 +514,11 @@ pre[class*="language-"] {
501
514
 
502
515
  .form-input::-webkit-date-and-time-value {
503
516
  min-height: 1.5em;
517
+ text-align: inherit;
518
+ }
519
+
520
+ .form-input::-webkit-datetime-edit {
521
+ display: inline-flex;
504
522
  }
505
523
 
506
524
  .form-input::-webkit-datetime-edit, .form-input::-webkit-datetime-edit-year-field, .form-input::-webkit-datetime-edit-month-field, .form-input::-webkit-datetime-edit-day-field, .form-input::-webkit-datetime-edit-hour-field, .form-input::-webkit-datetime-edit-minute-field, .form-input::-webkit-datetime-edit-second-field, .form-input::-webkit-datetime-edit-millisecond-field, .form-input::-webkit-datetime-edit-meridiem-field {
@@ -1524,7 +1542,7 @@ pre[class*="language-"] {
1524
1542
  display: flex;
1525
1543
  }
1526
1544
 
1527
- @media (min-width: 480px) {
1545
+ @media (width >= 480px) {
1528
1546
  [data-component="message"] {
1529
1547
  padding: 1.5rem;
1530
1548
  }
@@ -1556,7 +1574,7 @@ pre[class*="language-"] {
1556
1574
  display: none;
1557
1575
  }
1558
1576
 
1559
- @media (min-width: 480px) {
1577
+ @media (width >= 480px) {
1560
1578
  [data-component="message"] .message-icon {
1561
1579
  display: block;
1562
1580
  }
@@ -3840,7 +3858,7 @@ select.compact {
3840
3858
  background-color: #0000;
3841
3859
  }
3842
3860
 
3843
- @media (min-width: 1024px) {
3861
+ @media (width >= 1024px) {
3844
3862
  .lg\:prose-base {
3845
3863
  font-size: 1rem;
3846
3864
  line-height: 1.75;
@@ -4130,7 +4148,7 @@ select.compact {
4130
4148
  color: var(--lookbook-prose-link);
4131
4149
  }
4132
4150
 
4133
- @media (min-width: 480px) {
4151
+ @media (width >= 480px) {
4134
4152
  .xs\:mx-auto {
4135
4153
  margin-left: auto;
4136
4154
  margin-right: auto;
@@ -4154,13 +4172,13 @@ select.compact {
4154
4172
  }
4155
4173
  }
4156
4174
 
4157
- @media (min-width: 640px) {
4175
+ @media (width >= 640px) {
4158
4176
  .sm\:p-8 {
4159
4177
  padding: 2rem;
4160
4178
  }
4161
4179
  }
4162
4180
 
4163
- @media (min-width: 768px) {
4181
+ @media (width >= 768px) {
4164
4182
  .md\:-mr-\[2px\] {
4165
4183
  margin-right: -2px;
4166
4184
  }
@@ -4189,7 +4207,7 @@ select.compact {
4189
4207
  }
4190
4208
  }
4191
4209
 
4192
- @media (min-width: 1024px) {
4210
+ @media (width >= 1024px) {
4193
4211
  .lg\:mb-8 {
4194
4212
  margin-bottom: 2rem;
4195
4213
  }