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
@@ -6,73 +6,77 @@ module Decidim
6
6
  def colors_sections
7
7
  [
8
8
  {
9
- id: "base",
9
+ id: t("decidim.design.helpers.base"),
10
10
  contents: [
11
11
  {
12
12
  type: :table,
13
- options: { headings: ["Value", "Tailwind name", "Usage"] },
13
+ options: { headings: [t("decidim.design.helpers.value"), t("decidim.design.helpers.tailwind"), t("decidim.design.helpers.usage")] },
14
14
  items: colors_table(
15
- { value: "var(--primary)", name: "primary", usage: "Main nav component background\nNav menus in homepage and space home" },
16
- { value: "var(--secondary)", name: "secondary", usage: "Main color for links and buttons" },
17
- { value: "var(--tertiary)", name: "tertiary", usage: "Graphic ornaments and accent color\nCards and list items hover state border" }
15
+ { value: "var(--primary)", name: "primary", usage: t("decidim.design.helpers.usage_base_1") },
16
+ { value: "var(--secondary)", name: "secondary", usage: t("decidim.design.helpers.usage_base_2") },
17
+ { value: "var(--tertiary)", name: "tertiary", usage: t("decidim.design.helpers.usage_base_3") }
18
18
  )
19
19
  }
20
20
  ]
21
21
  },
22
22
  {
23
- id: "state",
23
+ id: t("decidim.design.helpers.state"),
24
24
  contents: [
25
25
  {
26
26
  type: :table,
27
- options: { headings: ["Value", "Tailwind name", "Hex code", "RGBA code", "Usage"] },
27
+ options: { headings: [t("decidim.design.helpers.value"), t("decidim.design.helpers.tailwind"), t("decidim.design.helpers.hex_code"),
28
+ t("decidim.design.helpers.rgba_code"), t("decidim.design.helpers.usage")] },
28
29
  items: colors_table(
29
- { value: "#28A745", name: "success", rgba: "rgba(40,167,69,1)", usage: "Success notice border\nAlert notice icon fill\nButton background on success message" },
30
- { value: "#FFB703", name: "warning", rgba: "rgba(255,183,3,1)", usage: "Warning notice border" },
31
- { value: "#ED1C24", name: "alert", rgba: "rgba(237,28,36,1)", usage: "Alert notice border\nAlert notice icon fill" }
30
+ { value: "#28A745", name: "success", rgba: "rgba(40,167,69,1)", usage: t("decidim.design.helpers.usage_state_1") },
31
+ { value: "#FFB703", name: "warning", rgba: "rgba(255,183,3,1)", usage: t("decidim.design.helpers.usage_state_2") },
32
+ { value: "#ED1C24", name: "alert", rgba: "rgba(237,28,36,1)", usage: t("decidim.design.helpers.usage_state_3") }
32
33
  )
33
34
  }
34
35
  ]
35
36
  },
36
37
  {
37
- id: "main_colors",
38
+ id: t("decidim.design.helpers.main_colors"),
38
39
  contents: [
39
40
  {
40
- values: section_subtitle(title: "Typography and texts")
41
+ values: section_subtitle(title: t("decidim.design.helpers.typography_texts"))
41
42
  },
42
43
  {
43
44
  type: :table,
44
- options: { headings: ["Value", "Tailwind name", "Hex code", "RGBA code", "Usage"] },
45
+ options: { headings: [t("decidim.design.helpers.value"), t("decidim.design.helpers.tailwind"), t("decidim.design.helpers.hex_code"),
46
+ t("decidim.design.helpers.rgba_code"), t("decidim.design.helpers.usage")] },
45
47
  items: colors_table(
46
- { value: "#020203", name: "black", rgba: "rgba(2,2,3,1)", usage: "Headings and section titles" },
47
- { value: "#3E4C5C", name: "gray-2", rgba: "rgba(62,76,92,1)", usage: "Inline text" },
48
- { value: "#FFFFFF", name: "white", rgba: "rgba(255,255,255,1)", usage: "Text over dark background" },
49
- { value: "#155ABF", name: "secondary", rgba: "rgba(21,90,191,1)", usage: "Links and buttons" }
48
+ { value: "#020203", name: "black", rgba: "rgba(2,2,3,1)", usage: t("decidim.design.helpers.usage_typography_1") },
49
+ { value: "#3E4C5C", name: "gray-2", rgba: "rgba(62,76,92,1)", usage: t("decidim.design.helpers.usage_typography_2") },
50
+ { value: "#FFFFFF", name: "white", rgba: "rgba(255,255,255,1)", usage: t("decidim.design.helpers.usage_typography_3") },
51
+ { value: "#155ABF", name: "secondary", rgba: "rgba(21,90,191,1)", usage: t("decidim.design.helpers.usage_typography_4") }
50
52
  )
51
53
  },
52
54
  {
53
- values: section_subtitle(title: "Background and borders")
55
+ values: section_subtitle(title: t("decidim.design.helpers.background"))
54
56
  },
55
57
  {
56
58
  type: :table,
57
- options: { headings: ["Value", "Tailwind name", "Hex code", "RGBA code", "Usage"] },
59
+ options: { headings: [t("decidim.design.helpers.value"), t("decidim.design.helpers.tailwind"), t("decidim.design.helpers.hex_code"),
60
+ t("decidim.design.helpers.rgba_code"), t("decidim.design.helpers.usage")] },
58
61
  items: colors_table(
59
- { value: "#F3F4F7", name: "background", rgba: "rgba(243,244,247,1)", usage: "Aside background" },
60
- { value: "#E4EEFF99", name: "background-4", rgba: "rgba(228,238,255,0.8)", usage: "Selected sidebar filter background" },
61
- { value: "#6B7280CC", name: "gray", rgba: "rgba(107,114,128,0.3)", usage: "Default icon color" },
62
- { value: "#E1E5EF", name: "gray-3", rgba: "rgba(225,229,239,1)", usage: "Lines and separators" },
63
- { value: "#242424", name: "gray-4", rgba: "rgba(36,36,36,1)", usage: "Footer background" },
64
- { value: "#F6F8FA", name: "gray-5", rgba: "rgb(246,248,250,1)", usage: "Admin layout background" }
62
+ { value: "#F3F4F7", name: "background", rgba: "rgba(243,244,247,1)", usage: t("decidim.design.helpers.usage_background_1") },
63
+ { value: "#E4EEFF99", name: "background-4", rgba: "rgba(228,238,255,0.8)", usage: t("decidim.design.helpers.usage_background_2") },
64
+ { value: "#6B7280CC", name: "gray", rgba: "rgba(107,114,128,0.3)", usage: t("decidim.design.helpers.usage_background_3") },
65
+ { value: "#E1E5EF", name: "gray-3", rgba: "rgba(225,229,239,1)", usage: t("decidim.design.helpers.usage_background_4") },
66
+ { value: "#242424", name: "gray-4", rgba: "rgba(36,36,36,1)", usage: t("decidim.design.helpers.usage_background_5") },
67
+ { value: "#F6F8FA", name: "gray-5", rgba: "rgb(246,248,250,1)", usage: t("decidim.design.helpers.usage_background_6") }
65
68
  )
66
69
  },
67
70
  {
68
- values: section_subtitle(title: "Form elements")
71
+ values: section_subtitle(title: t("decidim.design.helpers.form_elements"))
69
72
  },
70
73
  {
71
74
  type: :table,
72
- options: { headings: ["Value", "Tailwind name", "Hex code", "RGBA code", "Usage"] },
75
+ options: { headings: [t("decidim.design.helpers.value"), t("decidim.design.helpers.tailwind"), t("decidim.design.helpers.hex_code"),
76
+ t("decidim.design.helpers.rgba_code"), t("decidim.design.helpers.usage")] },
73
77
  items: colors_table(
74
- { value: "#FAFBFC", name: "background-2", rgba: "rgba(250,251,252,1)", usage: "Input elements default background" },
75
- { value: "#EFEFEF", name: "background-3", rgba: "rgba(239,239,239,1))", usage: "Input elements disabled state background" }
78
+ { value: "#FAFBFC", name: "background-2", rgba: "rgba(250,251,252,1)", usage: t("decidim.design.helpers.usage_formelements_1") },
79
+ { value: "#EFEFEF", name: "background-3", rgba: "rgba(239,239,239,1))", usage: t("decidim.design.helpers.usage_formelements_2") }
76
80
  )
77
81
  }
78
82
  ]
@@ -7,36 +7,25 @@ module Decidim
7
7
  [
8
8
  {
9
9
  id: "usage",
10
+ title: t("decidim.design.helpers.usage"),
10
11
  contents: [
11
12
  {
12
13
  type: :text,
13
- values: ["Make sure the partial <code>decidim/shared/login_modal</code> is present in the DOM.
14
- This partial is placed in the application layout when the user is logged in."]
14
+ values: [t("decidim.design.helpers.follower_description_html")]
15
15
  },
16
16
  {
17
- type: :table,
18
- options: { headings: ["Follow Button"] },
19
- items: follow_table(
20
- { partial: "decidim/design/components/follow/static-follow-default" },
21
- { partial: "decidim/design/components/follow/static-follow-unfollow" }
22
- ),
17
+ type: :cell_table,
18
+ options: { headings: [t("decidim.design.helpers.follow_button")] },
23
19
  cell_snippet: {
24
20
  cell: "decidim/follow_button",
25
- args: [Decidim::User.first]
21
+ args: [Decidim::User.where.not(id: current_user&.id).first],
22
+ call_string: 'cell("decidim/follow_button", _FOLLOWABLE_RESOURCE_)'
26
23
  }
27
24
  }
28
25
  ]
29
26
  }
30
27
  ]
31
28
  end
32
-
33
- def follow_table(*table_rows, **_opts)
34
- table_rows.map do |table_cell|
35
- row = []
36
- row << render(partial: table_cell[:partial])
37
- row
38
- end
39
- end
40
29
  end
41
30
  end
42
31
  end
@@ -7,32 +7,25 @@ module Decidim
7
7
  [
8
8
  {
9
9
  id: "usage",
10
+ title: t("decidim.design.helpers.usage"),
10
11
  contents: [
11
12
  {
12
13
  type: :text,
13
- values: ["Report button launches a modal window to flag the current resource."]
14
+ values: [t("decidim.design.helpers.report_usage_description")]
14
15
  },
15
16
  {
16
- type: :table,
17
- options: { headings: ["Report Button"] },
18
- items: report_table({}),
17
+ type: :cell_table,
18
+ options: { headings: [t("decidim.design.helpers.report_button")] },
19
19
  cell_snippet: {
20
20
  cell: "decidim/report_button",
21
- args: [Decidim::User.first]
21
+ args: [Decidim::User.first],
22
+ call_string: 'cell("decidim/report_button", _REPORTABLE_RESOURCE_)'
22
23
  }
23
24
  }
24
25
  ]
25
26
  }
26
27
  ]
27
28
  end
28
-
29
- def report_table(*table_rows, **_opts)
30
- table_rows.each_with_index.map do
31
- row = []
32
- row << render(partial: "decidim/design/components/report/static-report")
33
- row
34
- end
35
- end
36
29
  end
37
30
  end
38
31
  end
@@ -7,32 +7,25 @@ module Decidim
7
7
  [
8
8
  {
9
9
  id: "usage",
10
+ title: t("decidim.design.helpers.usage"),
10
11
  contents: [
11
12
  {
12
13
  type: :text,
13
- values: ["Make sure the partial <code>decidim/shared/share_modal</code> is present in the DOM. This partial is placed in the application layout."]
14
+ values: [t("decidim.design.helpers.share_usage_description_html")]
14
15
  },
15
16
  {
16
- type: :table,
17
- options: { headings: ["Share Button"] },
18
- items: share_table({}),
17
+ type: :cell_table,
18
+ options: { headings: [t("decidim.design.helpers.share_button")] },
19
19
  cell_snippet: {
20
20
  cell: "decidim/share_button",
21
- args: []
21
+ args: [],
22
+ call_string: 'cell("decidim/share_button", nil)'
22
23
  }
23
24
  }
24
25
  ]
25
26
  }
26
27
  ]
27
28
  end
28
-
29
- def share_table(*table_rows, **_opts)
30
- table_rows.each_with_index.map do
31
- row = []
32
- row << { method: :cell, args: ["decidim/share_button", nil] }
33
- row
34
- end
35
- end
36
29
  end
37
30
  end
38
31
  end
@@ -7,30 +7,31 @@ module Decidim
7
7
  [
8
8
  {
9
9
  id: "context",
10
+ title: t("decidim.design.helpers.context"),
10
11
  contents: [
11
12
  {
12
13
  type: :text,
13
14
  values: [
14
- "This tab-panel component gathers all the related contents or another resources of the main element displayed,
15
- in order to save vertical space. Clicking on the tab will activate the reated panel to show the content.",
16
- "Mainly is used within the <i>layout_item</i> or the <i>layout_center</i>, after the main content of the resource."
15
+ t("decidim.design.helpers.tab_panels_context_description"),
16
+ t("decidim.design.helpers.tab_panels_context_description_html")
17
17
  ]
18
18
  }
19
19
  ]
20
20
  },
21
21
  {
22
22
  id: "usage",
23
+ title: t("decidim.design.helpers.usage"),
23
24
  contents: [
24
25
  {
25
26
  type: :text,
26
27
  values: [
27
- "This component receives an array of hashes, and rearrange the output of each item into a tab-panel structure. Available properties for each panel:",
28
- "<strong>enabled</strong>: <i>Boolean</i>. Conditionally render the tab",
29
- "<strong>id</strong>: <i>String</i>. Unique id",
30
- "<strong>text</strong>: <i>String</i>. Tab title",
31
- "<strong>icon</strong>: <i>String</i>. Remixicon key",
32
- "<strong>method</strong>: <i>Symbol</i>. Any function rails understands",
33
- "<strong>args</strong>: <i>Array</i>. Arguments for the previous method"
28
+ t("decidim.design.helpers.tab_panels_usage_description"),
29
+ t("decidim.design.helpers.tab_panels_usage_description_html"),
30
+ t("decidim.design.helpers.tab_panels_usage_description_id_html"),
31
+ t("decidim.design.helpers.tab_panels_usage_description_tab_html"),
32
+ t("decidim.design.helpers.tab_panels_usage_description_remixicon_html"),
33
+ t("decidim.design.helpers.tab_panels_usage_description_rails_html"),
34
+ t("decidim.design.helpers.tab_panels_usage_description_arguments_html")
34
35
  ]
35
36
  },
36
37
  {
@@ -42,7 +43,50 @@ module Decidim
42
43
  ),
43
44
  cell_snippet: {
44
45
  cell: "decidim/tab_panels",
45
- args: [tab_panels_items]
46
+ args: [tab_panels_items],
47
+ call_string: [<<-TEXT1, <<-TEXT2]
48
+ cell(
49
+ "decidim/tab_panels",
50
+ [
51
+ {
52
+ enabled: true,
53
+ id: "button",
54
+ text: "Button",
55
+ icon: resource_type_icon_key("images"),
56
+ method: :cell,
57
+ args: ["decidim/button", { text: "Send" }]
58
+ },
59
+ {
60
+ enabled: true,
61
+ id: "announce",
62
+ text: "Announcement",
63
+ icon: resource_type_icon_key("documents"),
64
+ method: :cell,
65
+ args: ["decidim/announcement", "I am an announcement"]
66
+ }
67
+ ]
68
+ )
69
+ TEXT1
70
+ cell(
71
+ "decidim/tab_panels",
72
+ [
73
+ {
74
+ enabled: true,
75
+ id: "icon",
76
+ text: "Icon",
77
+ method: :icon,
78
+ args: ["question-line", { class: "w-4 h-4" }]
79
+ },
80
+ {
81
+ enabled: true,
82
+ id: "text",
83
+ text: "Plain",
84
+ method: :content_tag,
85
+ args: ["p", "plain text", { class: "text-left" }]
86
+ }
87
+ ]
88
+ )
89
+ TEXT2
46
90
  }
47
91
  }
48
92
  ]
@@ -67,7 +111,7 @@ module Decidim
67
111
  text: "Button",
68
112
  icon: resource_type_icon_key("images"),
69
113
  method: :cell,
70
- args: ["decidim/button", { text: "Send" }]
114
+ args: ["decidim/button", { text: t("decidim.design.helpers.send") }]
71
115
  },
72
116
  {
73
117
  enabled: true,
@@ -75,7 +119,7 @@ module Decidim
75
119
  text: "Announcement",
76
120
  icon: resource_type_icon_key("documents"),
77
121
  method: :cell,
78
- args: ["decidim/announcement", "I am an annoucement"]
122
+ args: ["decidim/announcement", t("decidim.design.components.announcement.iam_an_announcement")]
79
123
  }
80
124
  ]
81
125
  end
@@ -11,8 +11,8 @@ module Decidim
11
11
  {
12
12
  type: :text,
13
13
  values: [
14
- "Decidim uses Source Sans Pro as primary typeface. This typeface supports 310 languages",
15
- "This fonts are licensed under the Open Font License"
14
+ t("decidim.design.foundations.typography.typefaces_description_1"),
15
+ t("decidim.design.foundations.typography.typefaces_description_2")
16
16
  ]
17
17
  },
18
18
  {
@@ -65,7 +65,8 @@ module Decidim
65
65
  contents: [
66
66
  {
67
67
  type: :table,
68
- options: { headings: ["Size", "Layout cols", "~ Characters per line"] },
68
+ options: { headings: [t("decidim.design.foundations.typography.headings.size"), t("decidim.design.foundations.typography.headings.layout"),
69
+ t("decidim.design.foundations.typography.headings.characters")] },
69
70
  items: typography_table(
70
71
  { type: "readability", size: "text-xl", layout: 6, chars: 81 },
71
72
  { type: "readability", size: "text-lg", layout: 6, chars: 90 },
@@ -1,2 +1,3 @@
1
1
  // CSS
2
2
  import "stylesheets/design.scss"
3
+ import "stylesheets/_datepicker.scss"
@@ -0,0 +1,9 @@
1
+ .datepicker {
2
+ &__datepicker-row {
3
+ @apply bottom-10 relative h-0;
4
+ }
5
+
6
+ &__help-text-container {
7
+ @apply bottom-10 h-0;
8
+ }
9
+ }
@@ -1,3 +1,5 @@
1
+ @import "tom-select/dist/scss/tom-select";
2
+
1
3
  .design__layout {
2
4
  @apply grid md:grid-cols-12 container min-h-screen before:content-[''] before:absolute before:-z-10 before:w-1/2 before:h-full before:inset-0 before:bg-background;
3
5
 
@@ -105,6 +107,10 @@
105
107
  .design__table {
106
108
  @apply w-full text-center text-sm text-gray-2;
107
109
 
110
+ [class*="card"] {
111
+ @apply text-left;
112
+ }
113
+
108
114
  --cell-width: ;
109
115
 
110
116
  thead {
@@ -1,27 +1,28 @@
1
1
  <% content_for :heading do %>
2
- Accordions
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :description do %>
6
- Accordions are a javascript feature available thanks to an external library called <a href="https://github.com/jonathanlevaillant/a11y-accordion-component" target="_blank" rel="noopener noreferrer">a11y-accordion-component</a>.
6
+ <% accordions_description_link = "https://github.com/jonathanlevaillant/a11y-accordion-component" %>
7
+ <%= t(".description_accordions_html", link_code: link_to(accordions_description_link, accordions_description_link, target: "_blank", rel: "noopener noreferrer")) %>
7
8
  <% end %>
8
9
 
9
10
  <% content_for :toc do %>
10
- <a href="#example">Demo</a>
11
- <a href="#usage">Usage</a>
11
+ <a href="#example"><%= t(".demo") %></a>
12
+ <a href="#usage"><%= t(".usage") %></a>
12
13
  <% end %>
13
14
 
14
15
  <section id="demo" class="design__section">
15
- <h2>Demo</h2>
16
+ <h2><%= t(".demo") %></h2>
16
17
 
17
- <p>Throughout the application the accordions are used, mainly, to show/hide content in tabs or fold/unfold visible texts.</p>
18
+ <p><%= t(".demo_description") %></p>
18
19
 
19
20
  <div data-component="accordion" data-multiselectable="false" id="example-accordion-1">
20
21
  <ul class="tab-x-container">
21
22
  <% 3.times do |tab| %>
22
23
  <li>
23
24
  <button id="trigger-1-<%= tab %>" class="tab-x" data-controls="panel-1-<%= tab %>" <%= "data-open=true" if tab.zero? %>>
24
- Trigger <%= tab %>
25
+ <%= t(".trigger") %> <%= tab %>
25
26
  </button>
26
27
  </li>
27
28
  <% end %>
@@ -29,35 +30,36 @@
29
30
 
30
31
  <% 3.times do |panel| %>
31
32
  <div id="panel-1-<%= panel %>" class="py-8 text-sm font-italic">
32
- Content of the panel <%= panel %>
33
+ <%= t(".content_panel") %> <%= panel %>
33
34
  </div>
34
35
  <% end %>
35
36
  </div>
36
37
  </section>
37
38
 
38
39
  <section id="usage" class="design__section">
39
- <h2>Usage</h2>
40
+ <h2><%= t(".usage") %></h2>
40
41
 
41
- <p>An accordion requires at least three elements:</p>
42
+ <p><%= t(".usage_p") %></p>
42
43
 
43
- <p>1. A wrapper <code>div</code>, with the data-attribute <code>data-component="accordion"</code>, over all the available triggers and panels.</p>
44
+ <p><%= t(".usage_p_1_html") %></p>
44
45
 
45
- <p>2. A trigger element, user actionable (as a button), pointing to the collapsable element through <code>data-controls="panel"</code>, where <i>panel</i> is the <code>id</code> of the panel.</p>
46
+ <p><%= t(".usage_p_2_html") %></p>
46
47
 
47
- <p>3. A hideable element, whose <code>id</code> matches the data-controls value the trigger refers to.</p>
48
+ <p><%= t(".usage_p_3_html") %></p>
48
49
 
49
50
  <div class="design__section-snippet" style="margin-top: inherit;">
50
- <p>Source code on GitHub: <%= link_to("decidim-core/app/packs/src/decidim/a11y.js", "https://github.com/decidim/decidim/blob/develop/decidim-core/app/packs/src/decidim/a11y.js", target: "_blank", rel: "noopener noreferrer") %></p>
51
+ <% github_link = "https://github.com/decidim/decidim/blob/develop/decidim-core/app/packs/src/decidim/a11y.js" %>
52
+ <p><%= t(".github_source_html", github_link: link_to("decidim-core/app/packs/src/decidim/a11y.js", github_link, target: "_blank", rel: "noopener noreferrer")) %></p>
51
53
 
52
54
  <code>
53
- <textarea rows="8">
55
+ <textarea spellcheck="false" rows="8">
54
56
  <div data-component="accordion" id="example-accordion">
55
57
  <button id="trigger" data-controls="panel">
56
- Trigger
58
+ <%= t(".trigger") %>
57
59
  </button>
58
60
 
59
61
  <div id="panel" aria-hidden="true">
60
- Panel
62
+ <%= t(".panel") %>
61
63
  </div>
62
64
  </div>
63
65
  </textarea>
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
  <div class="activity__author">
21
21
  <div class="author" data-author="">
22
- <div class="author__container has-tip" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
22
+ <div class="author__container" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
23
23
  <div class=&quot;author__container&quot;>
24
24
  <span class=&quot;author__avatar-container&quot;>
25
25
  <a href=&quot;#&quot;>
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  <div class="activity__author">
20
20
  <div class="author" data-author="">
21
- <div class="author__container has-tip" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
21
+ <div class="author__container" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
22
22
  <div class=&quot;author__container&quot;>
23
23
  <span class=&quot;author__avatar-container&quot;>
24
24
  <a href=&quot;#&quot;>
@@ -1,5 +1,5 @@
1
1
  <% content_for :heading do %>
2
- Activities
2
+ <%= t(".activities") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :toc do %>
@@ -1,5 +1,5 @@
1
1
  <% content_for :heading do %>
2
- Address
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :toc do %>
@@ -1,5 +1,5 @@
1
1
  <% content_for :heading do %>
2
- Announcement
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :toc do %>
@@ -1,5 +1,5 @@
1
1
  <% content_for :heading do %>
2
- Author
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :toc do %>
@@ -1,9 +1,9 @@
1
1
  <% content_for :heading do %>
2
- Buttons
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :description do %>
6
- Buttons are built using different combinations of CSS classes: the <code>button</code> class, a size and a color.
6
+ <%= t(".description_html") %>
7
7
  <% end %>
8
8
 
9
9
  <% content_for :toc do %>
@@ -20,7 +20,7 @@
20
20
  €15,233,687
21
21
  </span>
22
22
  <form class="button_to" method="post" action="/processes/corpse-curriculum/f/4/budgets/1/order/line_item?project_id=1&amp;show_only_added=false" data-remote="true">
23
- <button class="button w-full hollow button__transparent-secondary button__sm budget-list__action" id="project-vote-button-1" data-add="true" data-disable="true" data-budget="15233687" data-allocation="15233687" data-redirect-url="/processes/corpse-curriculum/f/4/budgets/1/projects/1" title="Add project Sed harum. to your vote." type="submit">
23
+ <button class="button w-full button__transparent-secondary button__sm" id="project-vote-button-1" data-add="true" data-disable="true" data-budget="15233687" data-allocation="15233687" data-redirect-url="/processes/corpse-curriculum/f/4/budgets/1/projects/1" title="Add project Sed harum. to your vote." type="submit">
24
24
  Add
25
25
  <%= icon("add-fill") %>
26
26
  </button>
@@ -13,7 +13,7 @@
13
13
  <span>
14
14
  <!-- linthtml-disable -->
15
15
  <div class="author" data-author="">
16
- <div class="author__container has-tip" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
16
+ <div class="author__container" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
17
17
  <div class=&quot;author__container&quot;>
18
18
  <span class=&quot;author__avatar-container&quot;>
19
19
  <img alt=&quot;Avatar: Terica MacGyver Sr.&quot; class=&quot;author__avatar&quot; src=&quot;<%= asset_pack_path("media/images/default-avatar.svg") %>&quot; />
@@ -7,7 +7,7 @@
7
7
  <span>
8
8
  <!-- linthtml-disable -->
9
9
  <div class="author" data-author="">
10
- <div class="author__container has-tip" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
10
+ <div class="author__container" data-tooltip="<div class=&quot;author__tooltip bottom&quot; role=&quot;tooltip&quot;>
11
11
  <div class=&quot;author__container&quot;>
12
12
  <span class=&quot;author__avatar-container&quot;>
13
13
  <img alt=&quot;Avatar: Tammy Lesch VM&quot; class=&quot;author__avatar&quot; src=&quot;<%= asset_pack_path("media/images/default-avatar.svg") %>&quot; />
@@ -1,5 +1,5 @@
1
1
  <% content_for :heading do %>
2
- Cards
2
+ <%= t(".title") %>
3
3
  <% end %>
4
4
 
5
5
  <% content_for :toc do %>