keystone_ui 0.58.0 → 0.59.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: 8c9ad83a2a5881bc553774b36f62fe5509470caed7fcd74dd79972c1ee4936e3
4
- data.tar.gz: 698cdaadc0c5c9244862e60cc76b02a0fd273a1a5c5e70acc75247c39fbd5b9c
3
+ metadata.gz: fa286726a479f478774e33da15f8ec93767df8e20227a6280e3835e575740333
4
+ data.tar.gz: f1e259b398cca001b2174f90ebfe5ed0a9810ea7a9fc5f965d8c7c8abf55eb58
5
5
  SHA512:
6
- metadata.gz: de6f443de49b13769218d2bb0bacd47b85bb37b4d7d6bb478bb0c0f925a1e930f3e849cdaef9ebe65f4bf8039c6e820aa5f0ef8336ef718eb7195f33d90b42db
7
- data.tar.gz: e30496556e65b64b211a8a95580dcee1fcfcf6d51b7a92f5020dbfb20e88c7e38abb1f648e676ed8399a1829ce9b729c02333fe8869eee5f200a7289340cc755
6
+ metadata.gz: b6ae5646277a7ddac4b926f709efaac74f4f3097c83cbb07ac8d24ac7a468e31086ba91327eef2da4b9fcaedfb384b8c64f4c22f663343294c3051481ec013e2
7
+ data.tar.gz: f27bd1e717b7e0604480eec0d8500f18dfcbcac1dbe4ca8489fe468c0b1e33c1cde6aa807b8fbd6a71513afe2c3cc4ec4d50e73da9135d02eea0623fa28b3199
@@ -15,10 +15,10 @@ module Keystone
15
15
  </svg>
16
16
  SVG
17
17
 
18
- WRAPPER_CLASSES = "lg:hidden print:hidden"
18
+ WRAPPER_CLASSES = "flex items-center lg:hidden print:hidden"
19
19
  BACK_LINK_CLASSES = "ks-mobile-header-back"
20
- TITLE_CLASSES = "ks-mobile-header-title absolute left-1/2 -translate-x-1/2 lg:hidden truncate max-w-[60%]"
21
- SUBTITLE_CLASSES = "ks-mobile-header-subtitle block text-xs truncate text-center"
20
+ TITLE_CLASSES = "ks-mobile-header-title flex-[1_1_6rem] min-w-0 self-center lg:hidden truncate"
21
+ SUBTITLE_CLASSES = "ks-mobile-header-subtitle block text-xs truncate"
22
22
  DROPDOWN_CLASSES = "ks-action-menu hidden absolute right-0 z-50 w-48 origin-top-right"
23
23
 
24
24
  # Renders the left-side and title of the mobile header.
@@ -3,14 +3,14 @@
3
3
  module Keystone
4
4
  module Ui
5
5
  class NavbarComponent < ViewComponent::Base
6
- NAV_BASE = "top-nav print:hidden"
6
+ NAV_BASE = "top-nav print:hidden max-lg:has-[.ks-mobile-header-title]:flex-wrap"
7
7
  NAV_STICKY = "sticky top-0 z-40"
8
- MOBILE_LEFT_CLASSES = "lg:hidden flex items-center"
8
+ MOBILE_LEFT_CLASSES = "lg:hidden flex items-center max-lg:has-[.ks-mobile-header-title]:contents"
9
9
  LOGO_CLASSES = "logo"
10
10
  LOGO_MOBILE_HIDDEN_CLASSES = "hidden lg:flex"
11
11
  MOBILE_CENTER_CLASSES = "ks-navbar-title absolute left-1/2 -translate-x-1/2 lg:hidden truncate max-w-[60%]"
12
12
  DESKTOP_LINKS_CLASSES = "nav-container hidden lg:flex"
13
- MOBILE_RIGHT_CLASSES = "nav-user-controls ml-auto"
13
+ MOBILE_RIGHT_CLASSES = "nav-user-controls ml-auto max-lg:in-[.top-nav:has(.ks-mobile-header-title)]:flex-wrap max-lg:in-[.top-nav:has(.ks-mobile-header-title)]:justify-end"
14
14
 
15
15
  renders_one :logo
16
16
  renders_one :desktop_links
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KeystoneUi
4
- VERSION = "0.58.0"
4
+ VERSION = "0.59.0"
5
5
  end
@@ -40,7 +40,7 @@ not available in the app yet, that is `keystone_ui-install`'s job.
40
40
  - `ui_nav_dropdown` — a navbar dropdown menu.
41
41
  - `ui_bottom_nav` — the mobile bottom tab bar.
42
42
  - `ui_bottom_nav_item` — one tab in the bottom tab bar.
43
- - `ui_mobile_header` — a mobile back arrow and centred title.
43
+ - `ui_mobile_header` — a mobile back arrow and a title beside it.
44
44
  - `ui_mobile_actions` — an ellipsis menu of actions shown only below `lg:`.
45
45
  - `ui_mobile_action` — a plus icon link to the action a screen's page header publishes, for the phone top bar.
46
46
  - `ui_action_menu` — an ellipsis menu of actions shown at every screen size.
@@ -257,7 +257,13 @@ two exceptions: `ui_page`'s `padding:` treats any value other than `:none` as
257
257
  Hotwire Native web view.
258
258
  - `ui_mobile_header(title:, back_url:, subtitle: nil)` is hidden from `lg:`
259
259
  up and goes in the navbar's `mobile_left` slot. `back_url:` must be
260
- passed, and `nil` renders the title with no back arrow.
260
+ passed, and `nil` renders the title with no back arrow. The title and
261
+ subtitle sit between the arrow and the right-side controls, start at the
262
+ left, and end in an ellipsis when too long. In `ui_navbar`, controls that
263
+ leave less than 6rem for the title move to a second row under it. In a
264
+ hand-written top bar, make the header a direct child of the bar's flex
265
+ row, and add `max-lg:has-[.ks-mobile-header-title]:flex-wrap` to the bar if
266
+ its controls can fill its width.
261
267
  - `ui_mobile_action` takes no keywords and no block, and goes in the top
262
268
  bar's right side, such as the navbar's `mobile_right` slot. It draws a plus
263
269
  icon linking to the `action_url:` a screen gives `ui_page_header`, named
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.58.0
4
+ version: 0.59.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Schneider