keystone_ui 0.30.0 → 0.32.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 +4 -4
- data/app/components/keystone/ui/data_table_component.rb +2 -2
- data/app/components/keystone/ui/figure_component.html.erb +1 -0
- data/app/components/keystone/ui/figure_component.rb +24 -0
- data/app/components/keystone/ui/funnel_component.html.erb +33 -12
- data/app/components/keystone/ui/funnel_component.rb +27 -4
- data/app/components/keystone/ui/info_component.html.erb +1 -1
- data/app/components/keystone/ui/info_component.rb +6 -0
- data/app/helpers/keystone_ui_helper.rb +4 -0
- data/lib/keystone_ui/safelist.rb +1 -0
- data/lib/keystone_ui/version.rb +1 -1
- data/the_local/agents/keystone_ui-develop.md +40 -10
- data/the_local/agents/keystone_ui-info.md +20 -3
- data/the_local/agents/keystone_ui-install.md +2 -2
- data/the_local/interface.yml +3 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 530dc14cf871e579dcccc21f769b304974a36af552e10e2a9eee6f0b90e531ae
|
|
4
|
+
data.tar.gz: 69ed4079d0a6fb130e50ba08afdf4b6c1ba37d8f25b035b06e686bdccdd5f1a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d2f5fc1618dbe5b16114c4475d8b0e987f8e0516ed80aecfaace0741ccdad791214ffa758dd65c742d946285b26277c1345963ff9e1fa7175b9b1ff67d21f67
|
|
7
|
+
data.tar.gz: bb6877b8c6e890e4010b679ad81fa07e00bde9ccbfc73d983d666c0a97ed8182833d150c7e4535e095e1ff5d98ffe7aa3c8cab067b366e2db7c313e6b29baa00
|
|
@@ -6,10 +6,10 @@ module Keystone
|
|
|
6
6
|
EMPTY_CELL_CLASSES = "ks-table-cell-middle text-sm"
|
|
7
7
|
BODY_CLASSES = "ks-table-body"
|
|
8
8
|
HEAD_CLASSES = "ks-table-head"
|
|
9
|
-
WRAPPER_CLASSES = "ks-table overflow-
|
|
9
|
+
WRAPPER_CLASSES = "ks-table overflow-x-auto"
|
|
10
10
|
HEADER_CLASSES_FIRST = "ks-table-header ks-table-header-first text-left text-sm"
|
|
11
11
|
HEADER_CLASSES_MIDDLE = "ks-table-header ks-table-header-middle text-left text-sm"
|
|
12
|
-
HEADER_CLASSES_LAST = "ks-table-header-last"
|
|
12
|
+
HEADER_CLASSES_LAST = "ks-table-header ks-table-header-last text-right text-sm"
|
|
13
13
|
|
|
14
14
|
ROW_CLASSES_FIRST = "ks-table-cell-first text-sm whitespace-nowrap"
|
|
15
15
|
ROW_CLASSES_MIDDLE = "ks-table-cell-middle text-sm whitespace-nowrap"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="<%= classes %>"><%= text %></span>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Keystone
|
|
4
|
+
module Ui
|
|
5
|
+
class FigureComponent < ViewComponent::Base
|
|
6
|
+
TONES = {
|
|
7
|
+
neutral: nil,
|
|
8
|
+
success: "ks-tone-success",
|
|
9
|
+
danger: "ks-tone-danger"
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
def initialize(text:, tone: :neutral)
|
|
13
|
+
@text = text
|
|
14
|
+
@tone = tone
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
attr_reader :text
|
|
18
|
+
|
|
19
|
+
def classes
|
|
20
|
+
[ "ks-figure", TONES.fetch(@tone) ].compact.join(" ")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<%
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<% if joined? %>
|
|
2
|
+
<div class="<%= JOINED_CLASSES %>">
|
|
3
|
+
<% layers.each do |layer| %>
|
|
4
|
+
<% if layer.conversion_percent %>
|
|
5
|
+
<div></div>
|
|
6
|
+
<div class="<%= BAND_ROW_CLASSES %>">
|
|
7
|
+
<div class="<%= BAND_CLASSES %>" style="clip-path: <%= band_clip_path(layer) %>"></div>
|
|
8
|
+
<div class="<%= BAND_LABEL_ROW_CLASSES %>"><span class="<%= BAND_LABEL_CLASSES %>"><%= layer.conversion_percent %>%</span></div>
|
|
9
|
+
</div>
|
|
10
|
+
<% end %>
|
|
11
|
+
<div class="<%= WORDS_CLASSES %>">
|
|
9
12
|
<span class="<%= value_classes %>"><%= layer.value %></span>
|
|
13
|
+
<span class="<%= label_classes %>"><%= layer.label %></span>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="<%= BLOCK_CLASSES %>">
|
|
16
|
+
<div class="<%= BLOCK_FILL_CLASSES %> <%= layer.color_classes %>" style="width: <%= layer.width_percent %>%"></div>
|
|
10
17
|
</div>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
<% end %>
|
|
19
|
+
</div>
|
|
20
|
+
<% else %>
|
|
21
|
+
<div class="<%= container_classes %>">
|
|
22
|
+
<% layers.each do |layer| %>
|
|
23
|
+
<% if layer.conversion_percent %>
|
|
24
|
+
<div class="<%= transition_classes %>">↓ <%= layer.conversion_percent %>%</div>
|
|
25
|
+
<% end %>
|
|
26
|
+
<div class="<%= layer_classes %>">
|
|
27
|
+
<div class="<%= row_classes %>">
|
|
28
|
+
<span class="<%= label_classes %>"><%= layer.label %></span>
|
|
29
|
+
<span class="<%= value_classes %>"><%= layer.value %></span>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="<%= bar_classes %> <%= layer.color_classes %>" style="width: <%= layer.width_percent %>%"></div>
|
|
32
|
+
</div>
|
|
33
|
+
<% end %>
|
|
34
|
+
</div>
|
|
35
|
+
<% end %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Keystone
|
|
4
4
|
module Ui
|
|
5
5
|
class FunnelComponent < ViewComponent::Base
|
|
6
|
-
Layer = Struct.new(:label, :value, :width_percent, :conversion_percent, :color_classes, keyword_init: true)
|
|
6
|
+
Layer = Struct.new(:label, :value, :width_percent, :conversion_percent, :color_classes, :previous_width_percent, keyword_init: true)
|
|
7
7
|
|
|
8
8
|
CONTAINER_CLASSES = "ks-funnel"
|
|
9
9
|
LAYER_CLASSES = "ks-funnel-layer"
|
|
@@ -12,6 +12,14 @@ module Keystone
|
|
|
12
12
|
VALUE_CLASSES = "ks-funnel-value text-sm tabular-nums"
|
|
13
13
|
BAR_CLASSES = "ks-funnel-bar h-8 transition-all"
|
|
14
14
|
TRANSITION_CLASSES = "ks-funnel-transition text-center text-xs"
|
|
15
|
+
BAND_LABEL_ROW_CLASSES = "absolute inset-0 flex items-center justify-center"
|
|
16
|
+
BAND_ROW_CLASSES = "relative h-7"
|
|
17
|
+
BLOCK_FILL_CLASSES = "h-full"
|
|
18
|
+
BLOCK_CLASSES = "flex justify-center h-12"
|
|
19
|
+
WORDS_CLASSES = "flex flex-col justify-center"
|
|
20
|
+
BAND_LABEL_CLASSES = "ks-funnel-band-label text-xs"
|
|
21
|
+
BAND_CLASSES = "ks-funnel-band absolute inset-0"
|
|
22
|
+
JOINED_CLASSES = "ks-funnel-joined grid grid-cols-[max-content_1fr]"
|
|
15
23
|
STEP_COLOR_CLASSES = {
|
|
16
24
|
accent: "ks-funnel-bar-accent",
|
|
17
25
|
sky: "ks-funnel-bar-sky",
|
|
@@ -20,10 +28,24 @@ module Keystone
|
|
|
20
28
|
rose: "ks-funnel-bar-rose"
|
|
21
29
|
}.freeze
|
|
22
30
|
|
|
23
|
-
attr_reader :steps
|
|
31
|
+
attr_reader :steps, :shape
|
|
32
|
+
|
|
33
|
+
def initialize(steps:, shape: :bars)
|
|
34
|
+
raise ArgumentError, "a funnel's shape is :bars or :joined, got #{shape.inspect}" unless %i[bars joined].include?(shape)
|
|
24
35
|
|
|
25
|
-
def initialize(steps:)
|
|
26
36
|
@steps = steps
|
|
37
|
+
@shape = shape
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def joined?
|
|
41
|
+
shape == :joined
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def band_clip_path(layer)
|
|
45
|
+
top = (100 - layer.previous_width_percent) / 2.0
|
|
46
|
+
bottom = (100 - layer.width_percent) / 2.0
|
|
47
|
+
|
|
48
|
+
"polygon(#{format("%g%%", top)} 0, #{format("%g%%", 100 - top)} 0, #{format("%g%%", 100 - bottom)} 100%, #{format("%g%%", bottom)} 100%)"
|
|
27
49
|
end
|
|
28
50
|
|
|
29
51
|
def layers
|
|
@@ -35,7 +57,8 @@ module Keystone
|
|
|
35
57
|
value: step[:value],
|
|
36
58
|
width_percent: width_percent(step[:value]),
|
|
37
59
|
conversion_percent: conversion_percent(step[:value], previous),
|
|
38
|
-
color_classes: color_classes(step[:color], index)
|
|
60
|
+
color_classes: color_classes(step[:color], index),
|
|
61
|
+
previous_width_percent: previous && width_percent(previous)
|
|
39
62
|
)
|
|
40
63
|
previous = step[:value]
|
|
41
64
|
layer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<span class="
|
|
1
|
+
<span class="<%= wrapper_classes %>" data-controller="info" data-action="click@window->info#hide scroll@window->info#close">
|
|
2
2
|
<button type="button" class="<%= button_classes %>" data-info-target="button" data-action="mouseenter->info#peek mouseleave->info#unpeek click->info#toggle" aria-label="More about this"><%= icon.html_safe %></button>
|
|
3
3
|
<span class="<%= summary_classes %>" data-info-target="summary"><%= summary %></span>
|
|
4
4
|
<% if content? %>
|
|
@@ -229,6 +229,10 @@ module KeystoneUiHelper
|
|
|
229
229
|
render Keystone::Ui::CalculationComponent.new(**args)
|
|
230
230
|
end
|
|
231
231
|
|
|
232
|
+
def ui_figure(**args)
|
|
233
|
+
render Keystone::Ui::FigureComponent.new(**args)
|
|
234
|
+
end
|
|
235
|
+
|
|
232
236
|
def ui_info(**args, &block)
|
|
233
237
|
render(Keystone::Ui::InfoComponent.new(**args), &block)
|
|
234
238
|
end
|
data/lib/keystone_ui/safelist.rb
CHANGED
data/lib/keystone_ui/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: keystone_ui-develop
|
|
3
|
-
description: Use PROACTIVELY for building or editing screens in a Rails app that has Keystone UI — pages, forms, tables, navigation, action menus for a record's Edit and Delete, dashboards, charts, marketing sections, a light/dark theme switch — MUST BE USED instead of hand-writing ERB and Tailwind for UI.
|
|
3
|
+
description: Use PROACTIVELY for building or editing screens in a Rails app that has Keystone UI — pages, forms, tables, navigation, action menus for a record's Edit and Delete, dashboards, charts, amounts shown in green or red as a gain or loss, marketing sections, a light/dark theme switch — MUST BE USED instead of hand-writing ERB and Tailwind for UI.
|
|
4
4
|
tools: Read, Write, Edit, Grep
|
|
5
5
|
scope: UI — pages, forms, tables, navigation, dashboards
|
|
6
6
|
---
|
|
@@ -213,7 +213,9 @@ outer element. See Conventions before using it.
|
|
|
213
213
|
`columns:` accepts plain `{ key: "Label" }` hashes or `Keystone::Ui::Column`
|
|
214
214
|
objects. In the block, `table.link(:column_key) { |item| url }` turns that
|
|
215
215
|
column's cells into links and `table.actions { |item| ... }` appends a
|
|
216
|
-
right-aligned actions column.
|
|
216
|
+
right-aligned actions column. With no actions column, the last data
|
|
217
|
+
column's header and cells are both right-aligned, so put the column of
|
|
218
|
+
amounts last to line them up under their header. Each row's actions render inside an action
|
|
217
219
|
menu, so the `actions` block holds `ui_action_menu_item` calls and nothing
|
|
218
220
|
else, never buttons or bare links. Sorting requires all three of `sort:` (the
|
|
219
221
|
current column key), `sort_direction:` (`:asc`/`:desc`), and `sort_url:` (a
|
|
@@ -238,6 +240,13 @@ outer element. See Conventions before using it.
|
|
|
238
240
|
only to the button form.
|
|
239
241
|
- `ui_badge(label:, variant: :neutral, class: nil)` — a pill. `variant:`
|
|
240
242
|
`:neutral` `:success` `:danger` `:warning` `:info`.
|
|
243
|
+
- `ui_figure(text:, tone: :neutral)` — no block. One figure, such as an amount,
|
|
244
|
+
as inline text with no pill or box around it. `tone:` `:neutral` prints it in
|
|
245
|
+
the surrounding text colour, `:success` in green and `:danger` in red; any
|
|
246
|
+
other symbol raises `KeyError`. `text:` is printed as given, so format
|
|
247
|
+
numbers, currency and any minus sign before passing it. Its output can be
|
|
248
|
+
passed anywhere a string is shown, such as a `ui_data_table` cell value or
|
|
249
|
+
column label.
|
|
241
250
|
- `ui_alert(message:, type: :info, title: nil, dismissible: false, class: nil)` —
|
|
242
251
|
a banner.
|
|
243
252
|
`type:` `:info` `:success` `:warning` `:error`. `dismissible: true` adds a
|
|
@@ -270,7 +279,8 @@ outer element. See Conventions before using it.
|
|
|
270
279
|
numbers and currency before passing them. Place it directly under the figure
|
|
271
280
|
it explains, such as a `ui_stat_card`.
|
|
272
281
|
- `ui_info(summary:)` — an info button, named "More about this" for screen
|
|
273
|
-
readers, placed inline beside the thing it explains
|
|
282
|
+
readers, placed inline beside the thing it explains, and sits level with the
|
|
283
|
+
middle of the text beside it. `summary:` is a short
|
|
274
284
|
line of text shown in a floating panel while the button is hovered. The block
|
|
275
285
|
is optional and holds the full detail. With a block, tapping or clicking the
|
|
276
286
|
button toggles a second floating panel holding the block's content, and the
|
|
@@ -337,13 +347,20 @@ outer element. See Conventions before using it.
|
|
|
337
347
|
the last, marks only whole days, and reads each day as a date such as
|
|
338
348
|
"Oct 2, 2026", which is also the heading a hovered point shows. The time of
|
|
339
349
|
day is dropped, so pass one value per day.
|
|
340
|
-
- `ui_funnel(steps:)` — a conversion funnel. `steps:` is
|
|
341
|
-
`[{ label:, value:, color: }, ...]` in order, with `color:` optional.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
350
|
+
- `ui_funnel(steps:, shape: :bars)` — a conversion funnel. `steps:` is
|
|
351
|
+
`[{ label:, value:, color: }, ...]` in order, with `color:` optional. Each
|
|
352
|
+
step's width is its value as a share of the first step's value, and the
|
|
353
|
+
percent shown between two steps is the second step's value divided by the
|
|
354
|
+
first's. Each step takes the next colour in the order `:accent` `:sky`
|
|
355
|
+
`:violet` `:amber` `:rose`, starting again after `:rose`; a step passing one
|
|
356
|
+
of those symbols as `color:` uses it instead, and any other symbol raises.
|
|
357
|
+
Values are printed as given. Divide-by-zero safe, no JavaScript. `shape:`
|
|
358
|
+
`:bars` draws one bar per step, left-aligned, with the label and value on a
|
|
359
|
+
row above it and a `↓ N%` caption between two bars. `shape: :joined` draws
|
|
360
|
+
one shape: each step's value over its label in a column on the left, each
|
|
361
|
+
step's block centred at its width, and between two blocks a neutral band
|
|
362
|
+
that narrows from the block above to the block below, with the percent on it.
|
|
363
|
+
Any other `shape:` raises `ArgumentError`.
|
|
347
364
|
- `ui_bucket(goal:, actual:, label: nil, over: :success)` — an upright container
|
|
348
365
|
for one target, filled from the bottom toward `goal:`. It shows the optional
|
|
349
366
|
`label` on top, then `goal`, the container, `actual`, and the percent reached.
|
|
@@ -446,6 +463,13 @@ outer element. See Conventions before using it.
|
|
|
446
463
|
text with no columns and no separate total, the app's keystone_ui-styles
|
|
447
464
|
version does not define the `ks-breakdown` classes, so stop and hand that
|
|
448
465
|
part to `keystone_ui-install` as well, and add no classes to fix it.
|
|
466
|
+
To show an amount as a gain or a loss, use `ui_figure` with `tone:` rather
|
|
467
|
+
than a `ui_badge` or a colour class. Which amounts are coloured, and whether
|
|
468
|
+
a value counts as a gain or a loss, is the app's own rule, so ask the
|
|
469
|
+
developer rather than pick. If a figure with `:success` or `:danger` shows in
|
|
470
|
+
the plain text colour, the app's keystone_ui-styles version does not define
|
|
471
|
+
the `ks-figure` and `ks-tone-*` classes, so stop and hand that part to
|
|
472
|
+
`keystone_ui-install`, and add no classes to fix it.
|
|
449
473
|
A field whose value must be one of a fixed list is a `:select` with
|
|
450
474
|
`options:`, and a field that accepts any text and offers common values is a
|
|
451
475
|
text field with `suggestions:`. Which one a field is, and which values it
|
|
@@ -459,6 +483,12 @@ outer element. See Conventions before using it.
|
|
|
459
483
|
its neighbours rather than a point at zero. Whether a missing day is left
|
|
460
484
|
out or passed as a zero is the app's own rule, so ask the developer rather
|
|
461
485
|
than pick. Never format dates into strings and pass them as `labels:`.
|
|
486
|
+
For a funnel, whether it is drawn as separate bars or as one joined shape
|
|
487
|
+
is the developer's choice, so ask before passing `shape:`. If a joined
|
|
488
|
+
funnel shows its blocks but no band between them, the app's
|
|
489
|
+
keystone_ui-styles version does not define the `ks-funnel-band` classes, so
|
|
490
|
+
stop and hand that part to `keystone_ui-install`, and add no classes to fix
|
|
491
|
+
it.
|
|
462
492
|
Put the actions on a record, such as Edit and Delete, in an action menu
|
|
463
493
|
rather than in a row of buttons: `menu:` on the `ui_section` that shows the
|
|
464
494
|
record, `table.actions` for a table row, or `ui_action_menu` anywhere else.
|
|
@@ -15,7 +15,7 @@ library of view helpers built on ViewComponent. Screens are built from named
|
|
|
15
15
|
pieces — page shells, sections, panels, grids, form fields, data tables,
|
|
16
16
|
navigation bars, breadcrumbs, cards, stat tiles, charts, funnels, goal buckets, pipelines,
|
|
17
17
|
banners, the calculation behind a figure, a breakdown of amounts and their
|
|
18
|
-
total, an info button — instead of hand-written ERB and
|
|
18
|
+
total, a figure coloured as a gain or a loss, an info button — instead of hand-written ERB and
|
|
19
19
|
Tailwind. Every class the UI renders lives inside the gem, in frozen constants,
|
|
20
20
|
so the look is defined in one place.
|
|
21
21
|
|
|
@@ -88,7 +88,8 @@ holds the catalog.
|
|
|
88
88
|
extra text about themselves. Given that text, the piece shows an info button,
|
|
89
89
|
and the text stays hidden until the button is hovered or tapped. A piece
|
|
90
90
|
given no such text shows no button. On a radio card and a checkbox row the
|
|
91
|
-
button sits on the line with the label.
|
|
91
|
+
button sits on the line with the label. Wherever it is placed, the button
|
|
92
|
+
sits level with the text beside it.
|
|
92
93
|
- **Standalone info button.** The same info button can be placed on its own,
|
|
93
94
|
beside anything. It takes a short summary, which is required, and shows it
|
|
94
95
|
when the button is hovered. Given nothing more, a tap shows the summary too.
|
|
@@ -113,6 +114,15 @@ holds the catalog.
|
|
|
113
114
|
of its own, so a breakdown looks right only with a keystone_ui-styles version
|
|
114
115
|
that defines those classes. It has no button and no hidden state of
|
|
115
116
|
its own, and it can be placed inside an info button's detail.
|
|
117
|
+
- **A toned figure is text.** A figure shows one amount inline, in plain text
|
|
118
|
+
or in the success or danger colour, so it reads as a gain or a loss without a
|
|
119
|
+
badge around it. The amount is passed as already-formatted text and shown as
|
|
120
|
+
written, and the tone is chosen by name. An unknown tone raises at render
|
|
121
|
+
time. The colours come from keystone_ui-styles, so a figure shows its tone
|
|
122
|
+
only with a keystone_ui-styles version that defines those classes.
|
|
123
|
+
- **The last table column is right-aligned.** In a data table with no actions
|
|
124
|
+
column, the last column's header is right-aligned like the cells beneath it,
|
|
125
|
+
so a figure or total placed in that header lines up with the figures below.
|
|
116
126
|
- **Suggestions.** A form field can carry a list of suggested values. The
|
|
117
127
|
browser offers them while the field's text is typed, and the user can still
|
|
118
128
|
enter a value that is not on the list. This applies to a field with a typed
|
|
@@ -126,9 +136,16 @@ holds the catalog.
|
|
|
126
136
|
different symbols, and the develop local carries the real values. Most
|
|
127
137
|
components raise on a symbol they do not know, so a wrong guess fails at
|
|
128
138
|
render time.
|
|
129
|
-
- **
|
|
139
|
+
- **Measured values are numbers.** Components that measure or compare values, such as
|
|
130
140
|
progress bars, funnels and buckets, do arithmetic on them. Pass a number, not
|
|
131
141
|
a formatted string such as `"9,000"`. A bucket raises on one.
|
|
142
|
+
- **A funnel has two shapes.** Both size each step against the first step and
|
|
143
|
+
show the percent carried from one step to the next. The default draws one bar
|
|
144
|
+
per step, each with its label and value on a row above it. The joined shape
|
|
145
|
+
draws the steps as one figure: each step's value and label sit in a column on
|
|
146
|
+
the left, each step is a block centred at its width, and a neutral band
|
|
147
|
+
between two blocks narrows from one width to the next and holds the percent.
|
|
148
|
+
Any other shape raises `ArgumentError`. Neither shape needs JavaScript.
|
|
132
149
|
- **A line chart is labelled or dated.** A line chart draws one line per
|
|
133
150
|
series, and each series is a name and its values, with an optional colour
|
|
134
151
|
and an optional dashed line. Its horizontal axis is given one of two ways,
|
|
@@ -40,7 +40,7 @@ built on ViewComponent; hook it in before building any screen with those helpers
|
|
|
40
40
|
## How to use it
|
|
41
41
|
|
|
42
42
|
1. Confirm the prerequisites: Ruby >= 3.2 and **tailwindcss-rails v4+** in the
|
|
43
|
-
host app. The gem brings ViewComponent and keystone_ui-styles 0.
|
|
43
|
+
host app. The gem brings ViewComponent and keystone_ui-styles 0.10.0 or later with it.
|
|
44
44
|
Tailwind does not have to be initialized first, because the generator creates
|
|
45
45
|
the stylesheet if it is missing.
|
|
46
46
|
|
|
@@ -153,7 +153,7 @@ built on ViewComponent; hook it in before building any screen with those helpers
|
|
|
153
153
|
checkbox row, radio card, option card, file upload and colour picker read
|
|
154
154
|
these variables. So do the data display components: stat card, chart card,
|
|
155
155
|
card link, CTA banner, feature grid, hero, data table, code, accordion,
|
|
156
|
-
disclosure, calculation, info button, breakdown, tab switcher, progress,
|
|
156
|
+
disclosure, calculation, info button, breakdown, figure, tab switcher, progress,
|
|
157
157
|
funnel, bucket, pipeline and swipe deck.
|
|
158
158
|
So do the navigation components: navbar, nav item, nav dropdown, bottom nav,
|
|
159
159
|
mobile header and settings link. The desktop "Back" link and the breadcrumbs
|
data/the_local/interface.yml
CHANGED
|
@@ -62,11 +62,13 @@ develop:
|
|
|
62
62
|
- ui_disclosure
|
|
63
63
|
- ui_calculation
|
|
64
64
|
- ui_info
|
|
65
|
+
- ui_figure
|
|
65
66
|
- ui_breakdown
|
|
66
67
|
- ui_theme_toggle
|
|
67
68
|
- Keystone::Ui::Column
|
|
68
69
|
|
|
69
70
|
sources:
|
|
71
|
+
- app/components/keystone/ui/figure_component.rb
|
|
70
72
|
- lib/generators/keystone/install_generator.rb
|
|
71
73
|
- lib/keystone_ui/configuration.rb
|
|
72
74
|
- lib/keystone_ui/missing_back_link.rb
|
|
@@ -112,6 +114,7 @@ sources:
|
|
|
112
114
|
- app/components/keystone/ui/breadcrumbs_component.rb
|
|
113
115
|
- app/components/keystone/ui/breadcrumbs_component.html.erb
|
|
114
116
|
- app/components/keystone/ui/funnel_component.rb
|
|
117
|
+
- app/components/keystone/ui/funnel_component.html.erb
|
|
115
118
|
- app/components/keystone/ui/bucket_component.rb
|
|
116
119
|
- app/components/keystone/ui/bucket_series_component.rb
|
|
117
120
|
- app/components/keystone/ui/grid_component.rb
|
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.
|
|
4
|
+
version: 0.32.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tyler Schneider
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.10.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.10.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: view_component
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -125,6 +125,8 @@ files:
|
|
|
125
125
|
- app/components/keystone/ui/disclosure_component.rb
|
|
126
126
|
- app/components/keystone/ui/feature_grid_component.html.erb
|
|
127
127
|
- app/components/keystone/ui/feature_grid_component.rb
|
|
128
|
+
- app/components/keystone/ui/figure_component.html.erb
|
|
129
|
+
- app/components/keystone/ui/figure_component.rb
|
|
128
130
|
- app/components/keystone/ui/file_upload_component.html.erb
|
|
129
131
|
- app/components/keystone/ui/file_upload_component.rb
|
|
130
132
|
- app/components/keystone/ui/form_component.html.erb
|