coveragebook_components 0.17.5 → 0.17.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/build/coco/coco.css +16 -9
- data/app/assets/build/coco/coco.js +53 -27
- data/app/components/coco/buttons/button/button.html.erb +4 -0
- data/app/components/coco/buttons/button/button.rb +12 -2
- data/app/components/coco/buttons/button_to/button_to.rb +13 -3
- data/app/components/coco/messaging/alert/alert.css +2 -2
- data/app/components/coco/messaging/alert/alert.html.erb +7 -5
- data/app/components/coco/messaging/alert/alert.rb +1 -1
- data/app/components/coco/messaging/notice/notice.rb +3 -3
- data/lib/coco.rb +1 -1
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c269c84dcfebd4fc4eb0e9542d17d84e6a6de8295ec20cf7f17d059de7321b77
|
4
|
+
data.tar.gz: 6e9956db055856d5e4a90edb7357543617ceeb4963fdcd8cf6bf897c64c573f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4489238d098216b49e077bd9b6573fc9ebdef9ff6ec0cc0b15d53d28aa91e0ff3a1ae6739a98fca8e646099386201fffc4b450da5279589f5994deac053ff50
|
7
|
+
data.tar.gz: 2a0fbad3e33279253d388c0f82077fbf8bada21323039c3be6ffda78342216f1d89d5db9a3b187677eba4db224fc2c1fb70bdc52ddc08795be67d3a7f0481d5e
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
! tailwindcss v3.4.
|
2
|
+
! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com
|
3
3
|
*//*
|
4
4
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
5
5
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
@@ -179,6 +179,7 @@ textarea {
|
|
179
179
|
font-size: 100%; /* 1 */
|
180
180
|
font-weight: inherit; /* 1 */
|
181
181
|
line-height: inherit; /* 1 */
|
182
|
+
letter-spacing: inherit; /* 1 */
|
182
183
|
color: inherit; /* 1 */
|
183
184
|
margin: 0; /* 2 */
|
184
185
|
padding: 0; /* 3 */
|
@@ -199,9 +200,9 @@ select {
|
|
199
200
|
*/
|
200
201
|
|
201
202
|
button,
|
202
|
-
[type='button'],
|
203
|
-
[type='reset'],
|
204
|
-
[type='submit'] {
|
203
|
+
input:where([type='button']),
|
204
|
+
input:where([type='reset']),
|
205
|
+
input:where([type='submit']) {
|
205
206
|
-webkit-appearance: button; /* 1 */
|
206
207
|
background-color: transparent; /* 2 */
|
207
208
|
background-image: none; /* 2 */
|
@@ -669,7 +670,11 @@ select{
|
|
669
670
|
--tw-backdrop-invert: ;
|
670
671
|
--tw-backdrop-opacity: ;
|
671
672
|
--tw-backdrop-saturate: ;
|
672
|
-
--tw-backdrop-sepia:
|
673
|
+
--tw-backdrop-sepia: ;
|
674
|
+
--tw-contain-size: ;
|
675
|
+
--tw-contain-layout: ;
|
676
|
+
--tw-contain-paint: ;
|
677
|
+
--tw-contain-style:
|
673
678
|
}
|
674
679
|
|
675
680
|
::backdrop{
|
@@ -719,7 +724,11 @@ select{
|
|
719
724
|
--tw-backdrop-invert: ;
|
720
725
|
--tw-backdrop-opacity: ;
|
721
726
|
--tw-backdrop-saturate: ;
|
722
|
-
--tw-backdrop-sepia:
|
727
|
+
--tw-backdrop-sepia: ;
|
728
|
+
--tw-contain-size: ;
|
729
|
+
--tw-contain-layout: ;
|
730
|
+
--tw-contain-paint: ;
|
731
|
+
--tw-contain-style:
|
723
732
|
}
|
724
733
|
|
725
734
|
.coco-button-wrapper{
|
@@ -3870,7 +3879,7 @@ select{
|
|
3870
3879
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
3871
3880
|
}
|
3872
3881
|
|
3873
|
-
@container (min-width:
|
3882
|
+
@container (min-width: 550px){
|
3874
3883
|
[data-coco][data-component="alert"] .alert-container{
|
3875
3884
|
align-items: center;
|
3876
3885
|
padding-top: 0.625rem;
|
@@ -3964,7 +3973,6 @@ select{
|
|
3964
3973
|
}
|
3965
3974
|
|
3966
3975
|
[data-coco][data-component="alert"][data-single-line="true"]:not(.force-multi-line)[data-dismissable="true"] .alert-container{
|
3967
|
-
padding-left: 3rem;
|
3968
3976
|
padding-right: 3rem
|
3969
3977
|
}
|
3970
3978
|
|
@@ -6043,7 +6051,6 @@ select{
|
|
6043
6051
|
}
|
6044
6052
|
|
6045
6053
|
.alert-single-line[data-dismissable="true"] .alert-container{
|
6046
|
-
padding-left: 3rem;
|
6047
6054
|
padding-right: 3rem
|
6048
6055
|
}
|
6049
6056
|
|
@@ -7381,8 +7381,8 @@ var require_module_cjs = __commonJS({
|
|
7381
7381
|
});
|
7382
7382
|
});
|
7383
7383
|
}
|
7384
|
-
function destroyTree(root) {
|
7385
|
-
|
7384
|
+
function destroyTree(root, walker = walk) {
|
7385
|
+
walker(root, (el) => {
|
7386
7386
|
cleanupAttributes(el);
|
7387
7387
|
cleanupElement(el);
|
7388
7388
|
});
|
@@ -7579,7 +7579,7 @@ var require_module_cjs = __commonJS({
|
|
7579
7579
|
if (name == Symbol.unscopables)
|
7580
7580
|
return false;
|
7581
7581
|
return objects.some(
|
7582
|
-
(obj) => Object.prototype.hasOwnProperty.call(obj, name)
|
7582
|
+
(obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name)
|
7583
7583
|
);
|
7584
7584
|
},
|
7585
7585
|
get({ objects }, name, thisProxy) {
|
@@ -7587,7 +7587,7 @@ var require_module_cjs = __commonJS({
|
|
7587
7587
|
return collapseProxies;
|
7588
7588
|
return Reflect.get(
|
7589
7589
|
objects.find(
|
7590
|
-
(obj) =>
|
7590
|
+
(obj) => Reflect.has(obj, name)
|
7591
7591
|
) || {},
|
7592
7592
|
name,
|
7593
7593
|
thisProxy
|
@@ -7616,6 +7616,8 @@ var require_module_cjs = __commonJS({
|
|
7616
7616
|
Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => {
|
7617
7617
|
if (enumerable === false || value === void 0)
|
7618
7618
|
return;
|
7619
|
+
if (typeof value === "object" && value !== null && value.__v_skip)
|
7620
|
+
return;
|
7619
7621
|
let path = basePath === "" ? key : `${basePath}.${key}`;
|
7620
7622
|
if (typeof value === "object" && value !== null && value._x_interceptor) {
|
7621
7623
|
obj[key] = value.initialize(data2, path, key);
|
@@ -8537,7 +8539,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
8537
8539
|
"checked",
|
8538
8540
|
"required",
|
8539
8541
|
"readonly",
|
8540
|
-
"hidden",
|
8541
8542
|
"open",
|
8542
8543
|
"selected",
|
8543
8544
|
"autofocus",
|
@@ -8745,7 +8746,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
8745
8746
|
get raw() {
|
8746
8747
|
return raw;
|
8747
8748
|
},
|
8748
|
-
version: "3.13.
|
8749
|
+
version: "3.13.8",
|
8749
8750
|
flushAndStopDeferringMutations,
|
8750
8751
|
dontAutoEvaluateFunctions,
|
8751
8752
|
disableEffectScheduling,
|
@@ -8828,12 +8829,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
8828
8829
|
});
|
8829
8830
|
function getArrayOfRefObject(el) {
|
8830
8831
|
let refObjects = [];
|
8831
|
-
|
8832
|
-
|
8833
|
-
|
8834
|
-
|
8835
|
-
currentEl = currentEl.parentNode;
|
8836
|
-
}
|
8832
|
+
findClosest(el, (i2) => {
|
8833
|
+
if (i2._x_refs)
|
8834
|
+
refObjects.push(i2._x_refs);
|
8835
|
+
});
|
8837
8836
|
return refObjects;
|
8838
8837
|
}
|
8839
8838
|
var globalIdMemo = {};
|
@@ -9183,7 +9182,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9183
9182
|
});
|
9184
9183
|
if (modifiers.includes("fill")) {
|
9185
9184
|
if ([void 0, null, ""].includes(getValue()) || el.type === "checkbox" && Array.isArray(getValue())) {
|
9186
|
-
|
9185
|
+
setValue(
|
9186
|
+
getInputValue(el, modifiers, { target: el }, getValue())
|
9187
|
+
);
|
9187
9188
|
}
|
9188
9189
|
}
|
9189
9190
|
if (!el._x_removeModelListeners)
|
@@ -9252,12 +9253,25 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9252
9253
|
return option.value || option.text;
|
9253
9254
|
});
|
9254
9255
|
} else {
|
9256
|
+
let newValue;
|
9257
|
+
if (el.type === "radio") {
|
9258
|
+
if (event.target.checked) {
|
9259
|
+
newValue = event.target.value;
|
9260
|
+
} else {
|
9261
|
+
newValue = currentValue;
|
9262
|
+
}
|
9263
|
+
} else {
|
9264
|
+
newValue = event.target.value;
|
9265
|
+
}
|
9255
9266
|
if (modifiers.includes("number")) {
|
9256
|
-
return safeParseNumber(
|
9267
|
+
return safeParseNumber(newValue);
|
9257
9268
|
} else if (modifiers.includes("boolean")) {
|
9258
|
-
return safeParseBoolean(
|
9269
|
+
return safeParseBoolean(newValue);
|
9270
|
+
} else if (modifiers.includes("trim")) {
|
9271
|
+
return newValue.trim();
|
9272
|
+
} else {
|
9273
|
+
return newValue;
|
9259
9274
|
}
|
9260
|
-
return modifiers.includes("trim") ? event.target.value.trim() : event.target.value;
|
9261
9275
|
}
|
9262
9276
|
});
|
9263
9277
|
}
|
@@ -9306,7 +9320,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9306
9320
|
});
|
9307
9321
|
});
|
9308
9322
|
mapAttributes(startingWith(":", into(prefix("bind:"))));
|
9309
|
-
var handler2 = (el, { value, modifiers, expression, original }, { effect: effect3 }) => {
|
9323
|
+
var handler2 = (el, { value, modifiers, expression, original }, { effect: effect3, cleanup }) => {
|
9310
9324
|
if (!value) {
|
9311
9325
|
let bindingProviders = {};
|
9312
9326
|
injectBindingProviders(bindingProviders);
|
@@ -9328,6 +9342,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9328
9342
|
}
|
9329
9343
|
mutateDom(() => bind(el, value, result, modifiers));
|
9330
9344
|
}));
|
9345
|
+
cleanup(() => {
|
9346
|
+
el._x_undoAddedClasses && el._x_undoAddedClasses();
|
9347
|
+
el._x_undoAddedStyles && el._x_undoAddedStyles();
|
9348
|
+
});
|
9331
9349
|
};
|
9332
9350
|
handler2.inline = (el, { value, modifiers, expression }) => {
|
9333
9351
|
if (!value)
|
@@ -9457,13 +9475,21 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9457
9475
|
if (isObject2(items)) {
|
9458
9476
|
items = Object.entries(items).map(([key, value]) => {
|
9459
9477
|
let scope2 = getIterationScopeVariables(iteratorNames, value, key, items);
|
9460
|
-
evaluateKey((value2) =>
|
9478
|
+
evaluateKey((value2) => {
|
9479
|
+
if (keys.includes(value2))
|
9480
|
+
warn("Duplicate key on x-for", el);
|
9481
|
+
keys.push(value2);
|
9482
|
+
}, { scope: { index: key, ...scope2 } });
|
9461
9483
|
scopes.push(scope2);
|
9462
9484
|
});
|
9463
9485
|
} else {
|
9464
9486
|
for (let i2 = 0; i2 < items.length; i2++) {
|
9465
9487
|
let scope2 = getIterationScopeVariables(iteratorNames, items[i2], i2, items);
|
9466
|
-
evaluateKey((value) =>
|
9488
|
+
evaluateKey((value) => {
|
9489
|
+
if (keys.includes(value))
|
9490
|
+
warn("Duplicate key on x-for", el);
|
9491
|
+
keys.push(value);
|
9492
|
+
}, { scope: { index: i2, ...scope2 } });
|
9467
9493
|
scopes.push(scope2);
|
9468
9494
|
}
|
9469
9495
|
}
|
@@ -9511,7 +9537,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9511
9537
|
let marker = document.createElement("div");
|
9512
9538
|
mutateDom(() => {
|
9513
9539
|
if (!elForSpot)
|
9514
|
-
warn(`x-for ":key" is undefined or invalid`, templateEl);
|
9540
|
+
warn(`x-for ":key" is undefined or invalid`, templateEl, keyForSpot, lookup);
|
9515
9541
|
elForSpot.after(marker);
|
9516
9542
|
elInSpot.after(elForSpot);
|
9517
9543
|
elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);
|
@@ -9538,7 +9564,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9538
9564
|
};
|
9539
9565
|
mutateDom(() => {
|
9540
9566
|
lastEl.after(clone2);
|
9541
|
-
initTree(clone2);
|
9567
|
+
skipDuringClone(() => initTree(clone2))();
|
9542
9568
|
});
|
9543
9569
|
if (typeof key === "object") {
|
9544
9570
|
warn("x-for key cannot be an object, it must be a string or an integer", templateEl);
|
@@ -9618,7 +9644,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
9618
9644
|
addScopeToNode(clone2, {}, el);
|
9619
9645
|
mutateDom(() => {
|
9620
9646
|
el.after(clone2);
|
9621
|
-
initTree(clone2);
|
9647
|
+
skipDuringClone(() => initTree(clone2))();
|
9622
9648
|
});
|
9623
9649
|
el._x_currentIfEl = clone2;
|
9624
9650
|
el._x_undoIf = () => {
|
@@ -15415,7 +15441,7 @@ var alpine_default = import_alpinejs.default;
|
|
15415
15441
|
// ../../../package.json
|
15416
15442
|
var package_default = {
|
15417
15443
|
name: "coveragebook-components",
|
15418
|
-
version: "0.17.
|
15444
|
+
version: "0.17.6",
|
15419
15445
|
repository: "git@github.com:coveragebook/coco.git",
|
15420
15446
|
license: "NO LICENSE",
|
15421
15447
|
author: "Mark Perkins <mark@coveragebook.com>",
|
@@ -15464,7 +15490,7 @@ var package_default = {
|
|
15464
15490
|
"@tailwindcss/container-queries": "^0.1.0",
|
15465
15491
|
"@tailwindcss/forms": "^0.5.6",
|
15466
15492
|
"alias-hq": "^6.2.2",
|
15467
|
-
alpinejs: "^3.13.
|
15493
|
+
alpinejs: "^3.13.8",
|
15468
15494
|
autoprefixer: "^10.4.16",
|
15469
15495
|
"container-query-polyfill": "^1.0.2",
|
15470
15496
|
del: "^7.1.0",
|
@@ -15472,7 +15498,7 @@ var package_default = {
|
|
15472
15498
|
"esbuild-plugin-copy": "^2.0.2",
|
15473
15499
|
"fast-glob": "^3.3.1",
|
15474
15500
|
"fast-sort": "^3.2.1",
|
15475
|
-
husky: "^
|
15501
|
+
husky: "^9.0.11",
|
15476
15502
|
"js-cookie": "^3.0.5",
|
15477
15503
|
"lint-staged": "^15.2.2",
|
15478
15504
|
"lodash.camelcase": "^4.3.0",
|
@@ -15483,10 +15509,10 @@ var package_default = {
|
|
15483
15509
|
postcss: "^8.4.31",
|
15484
15510
|
"postcss-cli": "^11.0.0",
|
15485
15511
|
"postcss-value-parser": "^4.2.0",
|
15486
|
-
prettier: "^3.
|
15512
|
+
prettier: "^3.2.5",
|
15487
15513
|
"release-it": "^17.0.1",
|
15488
15514
|
svgo: "^3.0.2",
|
15489
|
-
tailwindcss: "^3.4.
|
15515
|
+
tailwindcss: "^3.4.3",
|
15490
15516
|
"tippy.js": "^6.3.7"
|
15491
15517
|
},
|
15492
15518
|
"release-it": {
|
@@ -11,6 +11,10 @@
|
|
11
11
|
"dropdown:trigger": (true if dropdown?),
|
12
12
|
"dropdown:anchor": (true if dropdown?),
|
13
13
|
"@click": ("#{"checkConfirmation($event);" if confirm?} #{on_click}" if confirm? || on_click.present?)
|
14
|
+
},
|
15
|
+
data: {
|
16
|
+
turbo: turbo_data_attr_value,
|
17
|
+
turbo_frame: turbo_frame
|
14
18
|
}
|
15
19
|
) do %>
|
16
20
|
<span class="button-inner">
|
@@ -72,15 +72,17 @@ module Coco
|
|
72
72
|
@states[name.to_sym] = kwargs.except!(:name)
|
73
73
|
end
|
74
74
|
|
75
|
-
attr_reader :on_click, :resize
|
75
|
+
attr_reader :on_click, :resize, :turbo_frame
|
76
76
|
|
77
|
-
def initialize(click: nil, resize: nil, states: nil, loading: false, active: false, static: nil, **kwargs)
|
77
|
+
def initialize(click: nil, resize: nil, states: nil, loading: false, active: false, static: nil, turbo: nil, turbo_frame: nil, **kwargs)
|
78
78
|
@on_click = click
|
79
79
|
@resize = resize.to_h
|
80
80
|
@states = states.to_h
|
81
81
|
@loading = loading
|
82
82
|
@static = static
|
83
83
|
@active = active
|
84
|
+
@turbo = turbo
|
85
|
+
@turbo_frame = turbo_frame
|
84
86
|
end
|
85
87
|
|
86
88
|
def with_dropdown(...)
|
@@ -186,6 +188,14 @@ module Coco
|
|
186
188
|
{tooltips: state_tooltips} if state_tooltips.present?
|
187
189
|
end
|
188
190
|
|
191
|
+
def turbo_data_attr_value
|
192
|
+
if @turbo == false
|
193
|
+
"false"
|
194
|
+
elsif @turbo == true
|
195
|
+
"true"
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
189
199
|
private
|
190
200
|
|
191
201
|
def default_states
|
@@ -19,14 +19,15 @@ module Coco
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
attr_reader :method
|
22
|
+
attr_reader :method
|
23
23
|
|
24
|
-
def initialize(form: nil, params: nil, method: :post, action: nil, href: nil, turbo: false, **kwargs)
|
24
|
+
def initialize(form: nil, params: nil, method: :post, action: nil, href: nil, turbo: false, turbo_frame: nil, **kwargs)
|
25
25
|
@form_args = form.to_h
|
26
26
|
@action = action || href
|
27
27
|
@method = method
|
28
28
|
@params = params.to_h
|
29
29
|
@turbo = turbo
|
30
|
+
@turbo_frame = turbo_frame
|
30
31
|
end
|
31
32
|
|
32
33
|
def params
|
@@ -38,11 +39,20 @@ module Coco
|
|
38
39
|
url: action,
|
39
40
|
method: method,
|
40
41
|
data: {
|
41
|
-
turbo:
|
42
|
+
turbo: turbo_data_attr_value,
|
43
|
+
turbo_frame: @turbo_frame
|
42
44
|
}
|
43
45
|
}.deep_merge(@form_args)
|
44
46
|
end
|
45
47
|
|
48
|
+
def turbo_data_attr_value
|
49
|
+
if @turbo == false
|
50
|
+
"false"
|
51
|
+
elsif @turbo == true
|
52
|
+
"true"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
46
56
|
def action
|
47
57
|
@action.is_a?(String) ? @action : helpers.url_for(@action)
|
48
58
|
end
|
@@ -103,7 +103,7 @@
|
|
103
103
|
|
104
104
|
/* Layout */
|
105
105
|
|
106
|
-
@apply alert-stacked @[
|
106
|
+
@apply alert-stacked @[550px]:alert-multi-line;
|
107
107
|
|
108
108
|
&[data-single-line="true"]:not(.force-multi-line) {
|
109
109
|
@apply @[1000px]:alert-single-line;
|
@@ -311,7 +311,7 @@
|
|
311
311
|
}
|
312
312
|
|
313
313
|
.alert-container {
|
314
|
-
@apply
|
314
|
+
@apply pr-12;
|
315
315
|
}
|
316
316
|
|
317
317
|
.alert-dismiss {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
show: "!dismissed",
|
5
5
|
cloak: (true if cloak?)
|
6
6
|
}, class: {
|
7
|
-
"with-title": title?,
|
7
|
+
"with-title": title? && title.present?,
|
8
8
|
"with-action": action? || secondary_action?,
|
9
9
|
"vivid": vivid?
|
10
10
|
}) do %>
|
@@ -15,13 +15,15 @@
|
|
15
15
|
|
16
16
|
<div class="alert-body">
|
17
17
|
<div class="alert-content" data-role="content">
|
18
|
-
<% if title? %>
|
18
|
+
<% if title? && title.present? %>
|
19
19
|
<h4 class="alert-title"><%= title %></h4>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
<% if message? || content %>
|
23
|
+
<p class="alert-message"<% if single_line? %> x-dimensions="checkSingleLineWrap(dimensions)"<% end %>>
|
24
|
+
<%= message? ? message : content %>
|
25
|
+
</p>
|
26
|
+
<% end %>
|
25
27
|
|
26
28
|
<% if link? %>
|
27
29
|
<div class="alert-link" data-role="link">
|
@@ -3,10 +3,10 @@ module Coco
|
|
3
3
|
include Concerns::AcceptsOptions
|
4
4
|
include Concerns::WrapsComponent
|
5
5
|
|
6
|
-
accepts_option :dismissable, from: [true, false], default:
|
6
|
+
accepts_option :dismissable, from: [true, false], default: false
|
7
7
|
|
8
8
|
wraps_component :alert do |args|
|
9
|
-
Coco::Alert.new(**args, dismissable: get_option_value(:dismissable))
|
9
|
+
Coco::Alert.new(**args, cloak: false, dismissable: get_option_value(:dismissable))
|
10
10
|
end
|
11
11
|
|
12
12
|
%i[title action secondary_action link].each do |slot_name|
|
@@ -16,7 +16,7 @@ module Coco
|
|
16
16
|
end
|
17
17
|
|
18
18
|
before_render do
|
19
|
-
with_title { @title } unless title?
|
19
|
+
with_title { @title } unless title? || @title.nil?
|
20
20
|
end
|
21
21
|
|
22
22
|
def initialize(title: nil, **kwargs)
|
data/lib/coco.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveragebook_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Perkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: view_component
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.9'
|
34
|
+
- - "<"
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
36
|
+
version: '3.13'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '3.9'
|
44
|
+
- - "<"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.
|
46
|
+
version: '3.13'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: turbo-rails
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|