decidim-design 0.28.6 → 0.29.0.rc1

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.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/decidim/design/activities_helper.rb +23 -23
  3. data/app/helpers/decidim/design/address_helper.rb +45 -20
  4. data/app/helpers/decidim/design/announcement_helper.rb +45 -21
  5. data/app/helpers/decidim/design/application_helper.rb +28 -9
  6. data/app/helpers/decidim/design/author_helper.rb +28 -35
  7. data/app/helpers/decidim/design/buttons_helper.rb +67 -11
  8. data/app/helpers/decidim/design/cards_helper.rb +504 -64
  9. data/app/helpers/decidim/design/colors_helper.rb +33 -29
  10. data/app/helpers/decidim/design/follow_helper.rb +6 -17
  11. data/app/helpers/decidim/design/report_helper.rb +6 -13
  12. data/app/helpers/decidim/design/share_helper.rb +6 -13
  13. data/app/helpers/decidim/design/tab_panels_helper.rb +57 -13
  14. data/app/helpers/decidim/design/typography_helper.rb +4 -3
  15. data/app/packs/entrypoints/decidim_design.js +1 -0
  16. data/app/packs/stylesheets/_datepicker.scss +9 -0
  17. data/app/packs/stylesheets/design.scss +6 -0
  18. data/app/views/decidim/design/components/accordions.html.erb +19 -17
  19. data/app/views/decidim/design/components/activities/_static-activities.html.erb +1 -1
  20. data/app/views/decidim/design/components/activities/_static-activity.html.erb +1 -1
  21. data/app/views/decidim/design/components/activities.html.erb +1 -1
  22. data/app/views/decidim/design/components/address.html.erb +1 -1
  23. data/app/views/decidim/design/components/announcement.html.erb +1 -1
  24. data/app/views/decidim/design/components/author.html.erb +1 -1
  25. data/app/views/decidim/design/components/buttons.html.erb +2 -2
  26. data/app/views/decidim/design/components/cards/_static-card-l-extra-data-2.html.erb +1 -1
  27. data/app/views/decidim/design/components/cards/_static-card-l-image.html.erb +1 -1
  28. data/app/views/decidim/design/components/cards/_static-card-l.html.erb +1 -1
  29. data/app/views/decidim/design/components/cards.html.erb +1 -1
  30. data/app/views/decidim/design/components/dialogs.html.erb +21 -21
  31. data/app/views/decidim/design/components/dropdowns.html.erb +14 -14
  32. data/app/views/decidim/design/components/follow.html.erb +1 -1
  33. data/app/views/decidim/design/components/forms.html.erb +35 -21
  34. data/app/views/decidim/design/components/report.html.erb +1 -1
  35. data/app/views/decidim/design/components/share.html.erb +1 -1
  36. data/app/views/decidim/design/components/tab_panels.html.erb +1 -1
  37. data/app/views/decidim/design/components/tooltips.html.erb +104 -0
  38. data/app/views/decidim/design/foundations/accessibility.html.erb +41 -41
  39. data/app/views/decidim/design/foundations/color.html.erb +6 -3
  40. data/app/views/decidim/design/foundations/iconography.html.erb +4 -3
  41. data/app/views/decidim/design/foundations/layout.html.erb +31 -30
  42. data/app/views/decidim/design/foundations/typography.html.erb +2 -2
  43. data/app/views/decidim/design/home/index.html.erb +6 -6
  44. data/app/views/decidim/design/shared/_cell_call_textarea.html.erb +5 -0
  45. data/app/views/decidim/design/shared/_cell_snippet.html.erb +1 -3
  46. data/app/views/decidim/design/shared/_cell_table.html.erb +12 -0
  47. data/app/views/decidim/design/shared/_table.html.erb +1 -1
  48. data/config/locales/am-ET.yml +1 -0
  49. data/config/locales/ar.yml +7 -0
  50. data/config/locales/bg.yml +309 -0
  51. data/config/locales/ca.yml +309 -0
  52. data/config/locales/cs.yml +258 -0
  53. data/config/locales/da.yml +1 -0
  54. data/config/locales/de.yml +309 -0
  55. data/config/locales/el.yml +1 -0
  56. data/config/locales/en.yml +309 -0
  57. data/config/locales/eo.yml +1 -0
  58. data/config/locales/es-MX.yml +309 -0
  59. data/config/locales/es-PY.yml +309 -0
  60. data/config/locales/es.yml +309 -0
  61. data/config/locales/et.yml +1 -0
  62. data/config/locales/eu.yml +309 -0
  63. data/config/locales/fa-IR.yml +1 -0
  64. data/config/locales/fi-plain.yml +309 -0
  65. data/config/locales/fi.yml +309 -0
  66. data/config/locales/fr-CA.yml +309 -0
  67. data/config/locales/fr.yml +309 -0
  68. data/config/locales/ga-IE.yml +1 -0
  69. data/config/locales/gl.yml +1 -0
  70. data/config/locales/gn-PY.yml +1 -0
  71. data/config/locales/he-IL.yml +1 -0
  72. data/config/locales/hr.yml +1 -0
  73. data/config/locales/hu.yml +1 -0
  74. data/config/locales/id-ID.yml +1 -0
  75. data/config/locales/is-IS.yml +1 -0
  76. data/config/locales/it.yml +1 -0
  77. data/config/locales/ja.yml +309 -0
  78. data/config/locales/ka-GE.yml +1 -0
  79. data/config/locales/kaa.yml +1 -0
  80. data/config/locales/ko.yml +1 -0
  81. data/config/locales/lb.yml +1 -0
  82. data/config/locales/lo-LA.yml +1 -0
  83. data/config/locales/lt.yml +1 -0
  84. data/config/locales/lv.yml +1 -0
  85. data/config/locales/mt.yml +1 -0
  86. data/config/locales/nl.yml +1 -0
  87. data/config/locales/no.yml +9 -0
  88. data/config/locales/oc-FR.yml +1 -0
  89. data/config/locales/om-ET.yml +1 -0
  90. data/config/locales/pl.yml +309 -0
  91. data/config/locales/pt-BR.yml +1 -0
  92. data/config/locales/pt.yml +1 -0
  93. data/config/locales/ro-RO.yml +45 -0
  94. data/config/locales/ru.yml +1 -0
  95. data/config/locales/si-LK.yml +1 -0
  96. data/config/locales/sk.yml +1 -0
  97. data/config/locales/sl.yml +1 -0
  98. data/config/locales/so-SO.yml +1 -0
  99. data/config/locales/sq-AL.yml +1 -0
  100. data/config/locales/sr-CS.yml +1 -0
  101. data/config/locales/sv.yml +1 -0
  102. data/config/locales/sw-KE.yml +1 -0
  103. data/config/locales/th-TH.yml +1 -0
  104. data/config/locales/ti-ER.yml +1 -0
  105. data/config/locales/tr-TR.yml +78 -0
  106. data/config/locales/uk.yml +1 -0
  107. data/config/locales/val-ES.yml +1 -0
  108. data/config/locales/vi.yml +1 -0
  109. data/config/locales/zh-CN.yml +1 -0
  110. data/config/locales/zh-TW.yml +1 -0
  111. data/decidim-design.gemspec +2 -2
  112. data/lib/decidim/design/version.rb +1 -1
  113. metadata +78 -19
  114. data/app/views/decidim/design/components/address/_static-address-online.html.erb +0 -26
  115. data/app/views/decidim/design/components/address/_static-address-person.html.erb +0 -25
  116. data/app/views/decidim/design/components/author/_static-avatar.html.erb +0 -38
  117. data/app/views/decidim/design/components/author/_static-compact.html.erb +0 -46
  118. data/app/views/decidim/design/components/author/_static-default.html.erb +0 -35
  119. data/app/views/decidim/design/components/follow/_static-follow-default.html.erb +0 -4
  120. data/app/views/decidim/design/components/follow/_static-follow-unfollow.html.erb +0 -4
  121. data/app/views/decidim/design/components/report/_static-report.html.erb +0 -34
@@ -7,6 +7,7 @@ module Decidim
7
7
  [
8
8
  {
9
9
  id: "sizes",
10
+ title: t("decidim.design.helpers.sizes"),
10
11
  contents: [
11
12
  {
12
13
  type: :table,
@@ -17,12 +18,22 @@ module Decidim
17
18
  { button_classes: "button button__primary button__lg" },
18
19
  { button_classes: "button button__primary button__xl" }
19
20
  ),
20
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send" }, { button_classes: "button button__primary button__xs" }] }
21
+ cell_snippet: {
22
+ cell: "decidim/button",
23
+ args: [{ text: t("decidim.design.helpers.send") }, { button_classes: "button button__primary button__xs" }],
24
+ call_string: [
25
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__primary button__xs" })},
26
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__primary button__sm" })},
27
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__primary button__lg" })},
28
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__primary button__xl" })}
29
+ ]
30
+ }
21
31
  }
22
32
  ]
23
33
  },
24
34
  {
25
35
  id: "colors",
36
+ title: t("decidim.design.helpers.colors"),
26
37
  contents: [
27
38
  {
28
39
  type: :table,
@@ -32,12 +43,21 @@ module Decidim
32
43
  { button_classes: "button button__lg button__secondary" },
33
44
  { button_classes: "button button__lg button__tertiary" }
34
45
  ),
35
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send" }, { button_classes: "button button__lg button__primary" }] }
46
+ cell_snippet: {
47
+ cell: "decidim/button",
48
+ args: [{ text: t("decidim.design.helpers.send") }, { button_classes: "button button__lg button__primary" }],
49
+ call_string: [
50
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__primary" })},
51
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__secondary" })},
52
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__tertiary" })}
53
+ ]
54
+ }
36
55
  }
37
56
  ]
38
57
  },
39
58
  {
40
59
  id: "transparent",
60
+ title: t("decidim.design.helpers.transparent"),
41
61
  contents: [
42
62
  {
43
63
  type: :table,
@@ -47,11 +67,19 @@ module Decidim
47
67
  { button_classes: "button button__lg button__transparent-secondary" },
48
68
  { button_classes: "button button__lg button__transparent-tertiary" }
49
69
  ),
50
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send" }, { button_classes: "button button__lg button__transparent-primary" }] }
70
+ cell_snippet: {
71
+ cell: "decidim/button",
72
+ args: [{ text: t("decidim.design.helpers.send") }, { button_classes: "button button__lg button__transparent-primary" }],
73
+ call_string: [
74
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__transparent-primary" })},
75
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__transparent-secondary" })},
76
+ %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__transparent-tertiary" })}
77
+ ]
78
+ }
51
79
  },
52
80
  {
53
81
  type: :text,
54
- values: ["In case of a darker background:"]
82
+ values: [t("decidim.design.helpers.transparent_description")]
55
83
  },
56
84
  {
57
85
  type: :table,
@@ -60,12 +88,17 @@ module Decidim
60
88
  { button_classes: "button button__lg button__transparent" },
61
89
  background: true
62
90
  ),
63
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send" }, { button_classes: "button button__lg button__transparent" }] }
91
+ cell_snippet: {
92
+ cell: "decidim/button",
93
+ args: [{ text: t("decidim.design.helpers.send") }, { button_classes: "button button__lg button__transparent" }],
94
+ call_string: %{cell("decidim/button", { text: "Send" }, { button_classes: "button button__lg button__transparent" })}
95
+ }
64
96
  }
65
97
  ]
66
98
  },
67
99
  {
68
100
  id: "text",
101
+ title: t("decidim.design.helpers.text"),
69
102
  contents: [
70
103
  {
71
104
  type: :table,
@@ -76,12 +109,22 @@ module Decidim
76
109
  { button_classes: "button button__lg button__text-secondary" },
77
110
  { button_classes: "button button__lg button__text-tertiary" }
78
111
  ),
79
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send" }, { button_classes: "button button__lg button__text" }] }
112
+ cell_snippet: {
113
+ cell: "decidim/button",
114
+ args: [{ text: t("decidim.design.helpers.send") }, { button_classes: "button button__lg button__text" }],
115
+ call_string: [
116
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")} }, { button_classes: "button button__lg button__text" })},
117
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")} }, { button_classes: "button button__lg button__text-primary" })},
118
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")} }, { button_classes: "button button__lg button__text-secondary" })},
119
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")} }, { button_classes: "button button__lg button__text-tertiary" })}
120
+ ]
121
+ }
80
122
  }
81
123
  ]
82
124
  },
83
125
  {
84
126
  id: "icons",
127
+ title: t("decidim.design.helpers.icons"),
85
128
  contents: [
86
129
  {
87
130
  type: :table,
@@ -90,12 +133,21 @@ module Decidim
90
133
  { button_classes: "button button__lg button__secondary", icon: "question-line" },
91
134
  { button_classes: "button button__lg button__transparent-secondary", icon: "question-line" }
92
135
  ),
93
- cell_snippet: { cell: "decidim/button", args: [{ text: "Send", icon: "question-line" }, { button_classes: "button button__lg button__secondary" }] }
136
+ cell_snippet: {
137
+ cell: "decidim/button",
138
+ args: [{ text: t("decidim.design.helpers.send"), icon: "question-line" }, { button_classes: "button button__lg button__secondary" }],
139
+ call_string: [
140
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")}, icon: "question-line" }, { button_classes: "button button__lg button__secondary" })},
141
+ %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")}, icon: "question-line" },
142
+ { button_classes: "button button__lg button__transparent-secondary" })}
143
+ ]
144
+ }
94
145
  }
95
146
  ]
96
147
  },
97
148
  {
98
149
  id: "disabled",
150
+ title: t("decidim.design.helpers.disabled"),
99
151
  contents: [
100
152
  {
101
153
  type: :table,
@@ -110,9 +162,11 @@ module Decidim
110
162
  cell_snippet: {
111
163
  cell: "decidim/button",
112
164
  args: [
113
- { text: "Send" },
165
+ { text: t("decidim.design.helpers.send") },
114
166
  { button_classes: "button button__lg button__secondary", html_options: { disabled: true } }
115
- ]
167
+ ],
168
+ call_string: %{cell("decidim/button", { text: #{t("decidim.design.helpers.send")} },
169
+ { button_classes: "button button__lg button__secondary", html_options: { disabled: true } })}
116
170
  }
117
171
  }
118
172
  ]
@@ -121,15 +175,17 @@ module Decidim
121
175
  end
122
176
 
123
177
  def button_row(button_args)
178
+ cell_args = { cell: "decidim/button", args: [button_args.slice(:icon).merge(text: t("decidim.design.helpers.send")), button_args] }
124
179
  [
125
- { method: :cell, args: ["decidim/button", button_args.slice(:icon).merge(text: "Send"), button_args] },
180
+ { method: :cell, args: [cell_args[:cell], *cell_args[:args]] },
126
181
  button_args[:description] || button_args[:button_classes]
127
182
  ]
128
183
  end
129
184
 
130
185
  def background_button_row(button_args)
186
+ cell_args = { cell: "decidim/button", args: [button_args.slice(:icon).merge(text: t("decidim.design.helpers.send")), button_args] }
131
187
  [
132
- content_tag(:div, cell("decidim/button", button_args.slice(:icon_name).merge(text: "Send"), button_args), class: "bg-primary p-4 rounded"),
188
+ content_tag(:div, cell(cell_args[:cell], *cell_args[:args]), class: "bg-primary p-4 rounded"),
133
189
  button_args[:description] || button_args[:button_classes]
134
190
  ]
135
191
  end