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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9104fc7211aff5782480099369c68f1d501b1fa0b928de5e76dde02236e17c91
4
- data.tar.gz: 65f7d2ee26f6b1b248beafbfd1049b15a354f0f20c8c2f26d65f41dcac7d2c34
3
+ metadata.gz: 41ae2dca9a546a5e3b919785de08f06c4a69312610d5b8b8e8f802a50ed5e824
4
+ data.tar.gz: 52348bb3a4c799acc1e8a8cdb6c80e6d10e4e37d0493f3eeef06a5e977fabb42
5
5
  SHA512:
6
- metadata.gz: c095f4ae076c31a5df33bcbd031371bc815b8735d8fee48027811c3af5d261e1858e2669de44b1459971d073e75c210f51ca066baa097897e0d7bbbee7a76d76
7
- data.tar.gz: 3eefdb4baf96619379e8818fda00ef4bde02f4db030e60218406f6dc84fc68c2097af6f82cb6c765d55c92503182e651ac82300ce9d5f57e36720e0d3324eab1
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)) {
@@ -38,4 +38,13 @@ html[class~="Polaris-Summer-Editions-2023"] .Polaris-LegacyCard {
38
38
  padding-top: var(--p-space-400);
39
39
  }
40
40
  }
41
+
42
+ &.Polaris-LegacyCard--borderless {
43
+ border: none;
44
+ box-shadow: none;
45
+
46
+ &::before {
47
+ content: none;
48
+ }
49
+ }
41
50
  }
@@ -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: 0.1rem solid var(--p-color-border-subdued) !important;
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: 0.1rem solid var(--p-color-border-subdued) !important;
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: 0.1rem solid var(--p-color-border-subdued) !important;
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: 0.1rem solid var(--p-color-border-subdued) !important;
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
@@ -4,7 +4,7 @@
4
4
  <% if image.present? %>
5
5
  <div><%= image %></div>
6
6
  <% end %>
7
- <%= polaris_display_text(size: :small) do %>
7
+ <%= polaris_display_text do %>
8
8
  <%= @title %>
9
9
  <% end %>
10
10
  <% if @description.present? %>
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  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.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-03-18 00:00:00.000000000 Z
12
+ date: 2024-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails