vipassana-design-standards 0.0.16 → 0.0.17

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 (39) hide show
  1. package/HOW_TO_PUBLISH.md +1 -1
  2. package/README.md +5 -0
  3. package/demo/app/views/demo/index.html.erb +9 -0
  4. package/demo/app/views/layouts/application.html.erb +2 -1
  5. package/dist/0.0.17/css/bootstrap5-theme.css +12629 -0
  6. package/dist/0.0.17/css/bootstrap5-theme.css.map +1 -0
  7. package/dist/0.0.17/css/bootstrap5-theme.min.css +6 -0
  8. package/dist/0.0.17/css/bootstrap5-theme.rtl.css +12592 -0
  9. package/dist/0.0.17/css/bootstrap5-theme.rtl.min.css +6 -0
  10. package/dist/0.0.17/css/fonts-gu.css +65 -0
  11. package/dist/0.0.17/css/fonts-gu.min.css +1 -0
  12. package/dist/0.0.17/css/fonts-ja.css +2399 -0
  13. package/dist/0.0.17/css/fonts-ja.min.css +1 -0
  14. package/dist/0.0.17/css/fonts-km.css +2399 -0
  15. package/dist/0.0.17/css/fonts-km.min.css +1 -0
  16. package/dist/0.0.17/css/fonts.css +472 -0
  17. package/dist/0.0.17/css/fonts.css.map +1 -0
  18. package/dist/0.0.17/css/fonts.min.css +1 -0
  19. package/dist/0.0.17/css/logo.css +135 -0
  20. package/dist/0.0.17/css/logo.css.map +1 -0
  21. package/dist/0.0.17/css/logo.min.css +1 -0
  22. package/dist/{js/bootstrap.bundle.min.js → 0.0.17/js/bootstrap5-theme.min.js} +31 -1
  23. package/dist/css/bootstrap5-theme.css +18 -12
  24. package/dist/css/bootstrap5-theme.css.map +1 -1
  25. package/dist/css/bootstrap5-theme.min.css +1 -1
  26. package/dist/css/bootstrap5-theme.rtl.css +18 -12
  27. package/dist/css/bootstrap5-theme.rtl.min.css +1 -1
  28. package/dist/js/bootstrap5-theme.min.js +37 -0
  29. package/dist/js/bootstrap5-theme.min.js.map +1 -0
  30. package/lib/vipassana/design_standards_helper.rb +1 -1
  31. package/package.json +2 -2
  32. package/src/javascripts/auto-resize.js +30 -0
  33. package/src/javascripts/i18n.js +7 -0
  34. package/src/stylesheets/custom-bootstrap.scss +19 -11
  35. package/src/stylesheets/layout/vds-header.scss +0 -1
  36. package/vipassana-design-standards.gemspec +1 -1
  37. package/dist/js/bootstrap.bundle.js +0 -7075
  38. package/dist/js/bootstrap.bundle.js.map +0 -1
  39. /package/dist/{js/bootstrap.bundle.min.js.map → 0.0.17/js/bootstrap5-theme.min.js.map} +0 -0
@@ -31,7 +31,7 @@ module Vipassana
31
31
  end
32
32
 
33
33
  def vds_bootstrap_theme_js_tag(locale: I18n.locale, localhost: false)
34
- javascript_include_tag vds_asset_url("js/bootstrap.bundle.min.js", localhost)
34
+ javascript_include_tag vds_asset_url("js/bootstrap5-theme.min.js", localhost)
35
35
  end
36
36
 
37
37
  def vds_logo_svg(locale: I18n.locale, disposition: "default", tagline: true, height: nil, width: nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vipassana-design-standards",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Vipassana design standards materials",
5
5
  "homepage": "https://design-standards.dhamma.org",
6
6
  "author": "Dhamma Workers",
@@ -16,7 +16,7 @@
16
16
  "build-fonts": "cp src/stylesheets/specific-fonts/* dist/css/",
17
17
  "build-min": "cleancss --batch --batch-suffix '.min' dist/css/*.css",
18
18
  "build-css": "rm -f dist/css/* && npm run build-fonts && npm run build-sass && npm run build-rtl && npm run build-min",
19
- "build-js": "rm -f dist/js/* && cp node_modules/bootstrap5/dist/js/bootstrap.bundle* dist/js/",
19
+ "build-js": "rm -f dist/js/* && concat -o dist/js/bootstrap5-theme.min.js node_modules/bootstrap5/dist/js/bootstrap.bundle.min.js src/javascripts/auto-resize.js && cp node_modules/bootstrap5/dist/js/bootstrap.bundle.min.js.map dist/js/bootstrap5-theme.min.js.map",
20
20
  "build": "npm run build-css && npm run build-js",
21
21
  "dist": "npm run build && npm run dist-version-folder && npm publish",
22
22
  "dist-version-folder": "mkdir -p dist/$npm_package_version/css && mkdir -p dist/$npm_package_version/js && cp dist/css/* dist/$npm_package_version/css && cp dist/js/* dist/$npm_package_version/js"
@@ -0,0 +1,30 @@
1
+ // Auto resize a select so it takes only the selected option width
2
+
3
+ document.addEventListener('DOMContentLoaded', () => {
4
+ // resize on initial load
5
+ document.querySelectorAll("select.auto-resize").forEach(resizeSelect)
6
+
7
+ // delegated listener on change
8
+ document.body.addEventListener("change", (e) => {
9
+ if (e.target.matches("select.auto-resize")) {
10
+ resizeSelect(e.target)
11
+ }
12
+ })
13
+ })
14
+
15
+ function resizeSelect(sel) {
16
+ let tempOption = document.createElement('option');
17
+ tempOption.textContent = sel.selectedOptions[0].textContent;
18
+
19
+ let tempSelect = document.createElement('select');
20
+ tempSelect.classList.add('form-select', 'w-auto', 'p-0')
21
+ tempSelect.style.visibility = "hidden";
22
+ tempSelect.style.position = "fixed"
23
+ tempSelect.appendChild(tempOption);
24
+
25
+ sel.after(tempSelect);
26
+ const paddingL = window.getComputedStyle(sel, null).getPropertyValue('padding-left')
27
+ const paddingR = window.getComputedStyle(sel, null).getPropertyValue('padding-right')
28
+ sel.style.width = `calc(${+tempSelect.clientWidth}px + 4px + ${paddingL} + ${paddingR})`;
29
+ tempSelect.remove();
30
+ }
@@ -13,6 +13,13 @@ export default {
13
13
  "in_the_tradition": "в Традицията на Саяджи У Ба Кин",
14
14
  "full": "Випассана Медитация, както се преподава от С. Н. Гоенка, в традицията на Саяджи У Ба Кин",
15
15
  },
16
+ "ca": {
17
+ "language": "Catalan",
18
+ "vipassana_meditation": "Meditació Vipassana",
19
+ "as_taught": "tal com l’ensenya S.N. Goenka",
20
+ "in_the_tradition": "en la tradició de Sayagyi U Ba Khin",
21
+ "full": "Meditació Vipassana tal com l’ensenya S.N. Goenka en la tradició de Sayagyi U Ba Khin"
22
+ },
16
23
  "cs": {
17
24
  "language": "Czech",
18
25
  "vipassana_meditation": "Meditace Vipassana",
@@ -38,6 +38,19 @@
38
38
  .btn-outline-secondary:hover {
39
39
  color: white;
40
40
  }
41
+ .btn-with-icon {
42
+ display: inline-flex;
43
+ align-items: center;
44
+
45
+ img, i {
46
+ margin-right: .5rem;
47
+ }
48
+
49
+ img {
50
+ height: 1rem;
51
+ }
52
+ }
53
+
41
54
  .text-bg-secondary {
42
55
  color: white !important;
43
56
  }
@@ -80,12 +93,12 @@
80
93
  }
81
94
 
82
95
  // Form
96
+ .form-group {
97
+ margin-bottom: 1rem;
98
+ }
83
99
  .form-check-input, .form-check-label {
84
100
  cursor: pointer;
85
101
  }
86
- .form-floating > label {
87
- width: 100%;
88
- }
89
102
  .form-label {
90
103
  font-size: .9rem;
91
104
  opacity: .8;
@@ -93,18 +106,13 @@
93
106
  }
94
107
  .form-select {
95
108
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 18'%3e%3cpath fill='none' stroke='%23a1a1a1' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
109
+ &.auto-resize {
110
+ padding-right: 2.3em;
111
+ }
96
112
  }
97
113
  .form-check {
98
114
  margin-bottom: .25rem;
99
115
  }
100
- [dir="rtl"] {
101
- .form-floating > .form-control ~ label {
102
- transform-origin: right;
103
- }
104
- .form-floating > .form-control:focus ~ label {
105
- transform: scale(0.85) translateY(-1rem) translateX(-0.15rem);
106
- }
107
- }
108
116
  .input-group-text {
109
117
  background-color: var(--bs-light);
110
118
  }
@@ -35,7 +35,6 @@
35
35
 
36
36
  .vds-locale-picker {
37
37
  border: none;
38
- padding-right: 2.3em;
39
38
  padding-left: 0.7em;
40
39
  color: $primary;
41
40
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 18'%3e%3cpath fill='none' stroke='%231e3461' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'vipassana-design-standards'
5
- gem.version = '0.0.16'
5
+ gem.version = '0.0.17'
6
6
  # gem.license = 'MIT'
7
7
  gem.summary = 'Include Vipassana SVG logos in your pages'
8
8
  gem.description = 'A ruby module to offer inline SVG images for each language'