polaris_view_components 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/polaris_view_components/dropzone_controller.js +1 -1
- data/app/assets/javascripts/polaris_view_components.js +1 -1
- data/app/assets/stylesheets/polaris_view_components/card.pcss +9 -0
- data/app/assets/stylesheets/polaris_view_components/custom.pcss +2 -2
- data/app/assets/stylesheets/polaris_view_components.css +7 -2
- data/app/components/polaris/card_component.rb +4 -1
- data/app/components/polaris/empty_search_results_component.html.erb +1 -1
- data/lib/polaris/view_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41ae2dca9a546a5e3b919785de08f06c4a69312610d5b8b8e8f802a50ed5e824
|
4
|
+
data.tar.gz: 52348bb3a4c799acc1e8a8cdb6c80e6d10e4e37d0493f3eeef06a5e977fabb42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48361c39b6d1ba7c4c0081130ccc4813e736382507f4ae4835da1c92d0ef73fd2e05731d5f3d3eabbcb9240f4e62b5b3ac1a4445ad57f4eec7c0bc8001b6ac25
|
7
|
+
data.tar.gz: 3efca47b17182223025d1f7ce1d38b34f8aa94ac34fa0cbe8a1a99096cc90b0fbf8dc51845bfea248cd5fe6d5530839bcff4a14a2ef716f5f368962a328c7a09
|
@@ -332,7 +332,7 @@ export default class extends Controller {
|
|
332
332
|
}
|
333
333
|
|
334
334
|
renderFile (file) {
|
335
|
-
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png']
|
335
|
+
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml']
|
336
336
|
const clone = this.itemTemplateTarget.content.cloneNode(true)
|
337
337
|
const [icon, thumbnail, content, fileSize] = [
|
338
338
|
clone.querySelector('[data-target="icon"]'),
|
@@ -639,7 +639,7 @@ class Dropzone extends Controller {
|
|
639
639
|
this.element.classList.toggle("Polaris-DropZone--hasError", show);
|
640
640
|
}
|
641
641
|
renderFile(file) {
|
642
|
-
const validImageTypes = [ "image/gif", "image/jpeg", "image/png" ];
|
642
|
+
const validImageTypes = [ "image/gif", "image/jpeg", "image/png", "image/svg+xml" ];
|
643
643
|
const clone = this.itemTemplateTarget.content.cloneNode(true);
|
644
644
|
const [icon, thumbnail, content, fileSize] = [ clone.querySelector('[data-target="icon"]'), clone.querySelector('[data-target="thumbnail"]'), clone.querySelector('[data-target="content"]'), clone.querySelector('[data-target="file-size"]') ];
|
645
645
|
if (validImageTypes.includes(file.type)) {
|
@@ -29,7 +29,7 @@ a.Polaris-Tag__Button {
|
|
29
29
|
|
30
30
|
html[class~="Polaris-Summer-Editions-2023"] {
|
31
31
|
.Polaris-LegacyCard__Section--borderTop {
|
32
|
-
border-top:
|
32
|
+
border-top: 1px solid var(--p-color-border-subdued) !important;
|
33
33
|
padding-top: var(--p-space-300) !important;
|
34
34
|
}
|
35
35
|
|
@@ -38,7 +38,7 @@ html[class~="Polaris-Summer-Editions-2023"] {
|
|
38
38
|
}
|
39
39
|
|
40
40
|
.Polaris-LegacyCard__Section--borderBottom {
|
41
|
-
border-bottom:
|
41
|
+
border-bottom: 1px solid var(--p-color-border-subdued) !important;
|
42
42
|
padding-bottom: var(--p-space-300) !important;
|
43
43
|
|
44
44
|
& + .Polaris-LegacyCard__Section {
|
@@ -361,6 +361,11 @@
|
|
361
361
|
padding-top: var(--p-space-100);
|
362
362
|
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard.Polaris-LegacyCard--withoutTitle .Polaris-LegacyCard__Section:first-child {
|
363
363
|
padding-top: var(--p-space-400);
|
364
|
+
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard.Polaris-LegacyCard--borderless {
|
365
|
+
border: none;
|
366
|
+
box-shadow: none;
|
367
|
+
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard.Polaris-LegacyCard--borderless::before {
|
368
|
+
content: none;
|
364
369
|
}.Polaris--hidden {
|
365
370
|
display: none !important;
|
366
371
|
}/* Add missing 1/4 section for layout */@media (min-width: 30.625em) {
|
@@ -375,12 +380,12 @@
|
|
375
380
|
}/* Card */.Polaris-LegacyCard {
|
376
381
|
overflow: initial;
|
377
382
|
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard__Section--borderTop {
|
378
|
-
border-top:
|
383
|
+
border-top: 1px solid var(--p-color-border-subdued) !important;
|
379
384
|
padding-top: var(--p-space-300) !important;
|
380
385
|
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard__Section:has(+.Polaris-LegacyCard__Section--borderTop) {
|
381
386
|
padding-bottom: var(--p-space-300) !important;
|
382
387
|
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard__Section--borderBottom {
|
383
|
-
border-bottom:
|
388
|
+
border-bottom: 1px solid var(--p-color-border-subdued) !important;
|
384
389
|
padding-bottom: var(--p-space-300) !important;
|
385
390
|
}html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard__Section--borderBottom + .Polaris-LegacyCard__Section {
|
386
391
|
padding-top: var(--p-space-300) !important;
|
@@ -22,6 +22,7 @@ module Polaris
|
|
22
22
|
actions: [],
|
23
23
|
sectioned: true,
|
24
24
|
subdued: false,
|
25
|
+
borders: true,
|
25
26
|
footer_action_alignment: FOOTER_ACTION_ALIGNMENT_DEFAULT,
|
26
27
|
**system_arguments
|
27
28
|
)
|
@@ -29,6 +30,7 @@ module Polaris
|
|
29
30
|
@actions = actions
|
30
31
|
@sectioned = sectioned
|
31
32
|
@subdued = subdued
|
33
|
+
@borders = borders
|
32
34
|
@footer_action_alignment = footer_action_alignment
|
33
35
|
@system_arguments = system_arguments
|
34
36
|
end
|
@@ -40,7 +42,8 @@ module Polaris
|
|
40
42
|
opts[:classes],
|
41
43
|
"Polaris-LegacyCard",
|
42
44
|
"Polaris-LegacyCard--subdued": @subdued,
|
43
|
-
"Polaris-LegacyCard--withoutTitle": @title.blank
|
45
|
+
"Polaris-LegacyCard--withoutTitle": @title.blank?,
|
46
|
+
"Polaris-LegacyCard--borderless": !@borders
|
44
47
|
)
|
45
48
|
end
|
46
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polaris_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gamble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|