vipassana-design-standards 1.1.0 → 1.1.1

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.
@@ -24,7 +24,7 @@ function vdsAssetUrl(path, localhost = false) {
24
24
  // For localhost dev, just run vscode liveserver
25
25
  if (localhost) return `http://localhost:5500/dist/${path}`
26
26
 
27
- return `https://design-standards.dhamma.org/dist/1.1.0/${path}`
27
+ return `https://design-standards.dhamma.org/dist/1.1.1/${path}`
28
28
  }
29
29
 
30
30
  function stylesheetLinkTag(url) {
@@ -10,7 +10,9 @@ exports.VdsIconAccount = VdsIconAccount;
10
10
  exports.VdsIconLocale = VdsIconLocale;
11
11
  exports.VdsIconMenu = VdsIconMenu;
12
12
  exports.VdsLogo = VdsLogo;
13
+ exports.isRtl = isRtl;
13
14
  var _i18n = _interopRequireDefault(require("./i18n.js"));
15
+ var _react = _interopRequireDefault(require("react"));
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
  function fixLocale(locale) {
16
18
  locale = (locale || 'en').toLowerCase();
@@ -34,18 +36,18 @@ function vdsAssetUrl(path) {
34
36
  var localhost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
35
37
  // For localhost dev, just run vscode liveserver
36
38
  if (localhost) return "http://localhost:5500/dist/".concat(path);
37
- return "https://design-standards.dhamma.org/dist/1.1.0/".concat(path);
39
+ return "https://design-standards.dhamma.org/dist/1.1.1/".concat(path);
38
40
  }
39
41
  function StylesheetLinkTag(_ref) {
40
42
  var url = _ref.url;
41
- return /*#__PURE__*/React.createElement("link", {
43
+ return /*#__PURE__*/_react["default"].createElement("link", {
42
44
  rel: "stylesheet",
43
45
  type: "text/css",
44
46
  href: url
45
47
  });
46
48
  }
47
49
  function VdsFaviconTag() {
48
- return /*#__PURE__*/React.createElement("link", {
50
+ return /*#__PURE__*/_react["default"].createElement("link", {
49
51
  rel: "shortcut icon",
50
52
  type: "image/x-icon",
51
53
  href: "https://design-standards.dhamma.org/dist/favicon.png"
@@ -57,9 +59,9 @@ function VdsBootstrapThemeCssTag(_ref2) {
57
59
  localhost = _ref2$localhost === void 0 ? false : _ref2$localhost;
58
60
  locale = fixLocale(locale);
59
61
  var url = vdsAssetUrl("css/bootstrap5-theme".concat(isRtl(locale) ? '.rtl' : '', ".min.css"), localhost);
60
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StylesheetLinkTag, {
62
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(StylesheetLinkTag, {
61
63
  url: url
62
- }), ['ar', 'fa', 'gu', 'he', 'ja', 'km', 'ko', 'or', 'si', 'ta', 'te', 'th', 'zh-HANS', 'zh-HANT', 'zh-HANT-HK'].includes(locale) && /*#__PURE__*/React.createElement(StylesheetLinkTag, {
64
+ }), ['ar', 'fa', 'gu', 'he', 'ja', 'km', 'ko', 'or', 'si', 'ta', 'te', 'th', 'zh-HANS', 'zh-HANT', 'zh-HANT-HK'].includes(locale) && /*#__PURE__*/_react["default"].createElement(StylesheetLinkTag, {
63
65
  url: vdsAssetUrl("css/fonts-".concat(locale, ".min.css"))
64
66
  }));
65
67
  }
@@ -67,7 +69,7 @@ function VdsBootstrapThemeJsTag(_ref3) {
67
69
  var _ref3$localhost = _ref3.localhost,
68
70
  localhost = _ref3$localhost === void 0 ? false : _ref3$localhost;
69
71
  var url = vdsAssetUrl('js/bootstrap5-theme.min.js', localhost);
70
- return /*#__PURE__*/React.createElement("script", {
72
+ return /*#__PURE__*/_react["default"].createElement("script", {
71
73
  type: "text/javascript",
72
74
  src: url
73
75
  });
@@ -88,7 +90,7 @@ function VdsLogo(_ref4) {
88
90
  disposition = 'left-two-lines';
89
91
  tagline = false;
90
92
  }
91
- return /*#__PURE__*/React.createElement("div", {
93
+ return /*#__PURE__*/_react["default"].createElement("div", {
92
94
  className: "vipassana-logo",
93
95
  "data-lang": locale,
94
96
  "data-disposition": disposition,
@@ -98,20 +100,20 @@ function VdsLogo(_ref4) {
98
100
  style: {
99
101
  fontSize: "".concat(size, "px")
100
102
  }
101
- }, /*#__PURE__*/React.createElement("img", {
103
+ }, /*#__PURE__*/_react["default"].createElement("img", {
102
104
  className: "logo-wheel",
103
105
  src: "https://design-standards.dhamma.org/dist/dhamma-wheel.svg"
104
- }), /*#__PURE__*/React.createElement("div", {
106
+ }), /*#__PURE__*/_react["default"].createElement("div", {
105
107
  className: "logo-text"
106
- }, /*#__PURE__*/React.createElement("h1", {
108
+ }, /*#__PURE__*/_react["default"].createElement("h1", {
107
109
  className: "logo-title"
108
- }, /*#__PURE__*/React.createElement("span", {
110
+ }, /*#__PURE__*/_react["default"].createElement("span", {
109
111
  "data-start-with": trans.vipassana_meditation.charAt(0).toLowerCase()
110
- }, trans.vipassana_meditation), /*#__PURE__*/React.createElement("span", {
112
+ }, trans.vipassana_meditation), /*#__PURE__*/_react["default"].createElement("span", {
111
113
  className: "logo-space"
112
- }, "\xA0"), /*#__PURE__*/React.createElement("span", null, trans.as_taught), /*#__PURE__*/React.createElement("span", {
114
+ }, "\xA0"), /*#__PURE__*/_react["default"].createElement("span", null, trans.as_taught), /*#__PURE__*/_react["default"].createElement("span", {
113
115
  className: "vipassana-as-taught"
114
- }, trans.vipassana_as_taught)), /*#__PURE__*/React.createElement("div", {
116
+ }, trans.vipassana_as_taught)), /*#__PURE__*/_react["default"].createElement("div", {
115
117
  className: "logo-subtitle"
116
118
  }, trans.in_the_tradition)));
117
119
  }
@@ -120,30 +122,30 @@ function VdsLogo(_ref4) {
120
122
  function VdsIconLocale(_ref5) {
121
123
  var _ref5$size = _ref5.size,
122
124
  size = _ref5$size === void 0 ? 1.2 : _ref5$size;
123
- return /*#__PURE__*/React.createElement("svg", {
125
+ return /*#__PURE__*/_react["default"].createElement("svg", {
124
126
  xmlns: "http://www.w3.org/2000/svg",
125
127
  width: "".concat(size, "em"),
126
128
  height: "".concat(size, "em"),
127
129
  fill: "currentColor",
128
130
  viewBox: "0 0 16 16"
129
- }, /*#__PURE__*/React.createElement("path", {
131
+ }, /*#__PURE__*/_react["default"].createElement("path", {
130
132
  d: "M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"
131
- }), /*#__PURE__*/React.createElement("path", {
133
+ }), /*#__PURE__*/_react["default"].createElement("path", {
132
134
  d: "M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"
133
135
  }));
134
136
  }
135
137
  function VdsIconAccount(_ref6) {
136
138
  var _ref6$size = _ref6.size,
137
139
  size = _ref6$size === void 0 ? 2.2 : _ref6$size;
138
- return /*#__PURE__*/React.createElement("svg", {
140
+ return /*#__PURE__*/_react["default"].createElement("svg", {
139
141
  xmlns: "http://www.w3.org/2000/svg",
140
142
  width: "".concat(size, "em"),
141
143
  height: "".concat(size, "em"),
142
144
  fill: "currentColor",
143
145
  viewBox: "0 0 16 16"
144
- }, /*#__PURE__*/React.createElement("path", {
146
+ }, /*#__PURE__*/_react["default"].createElement("path", {
145
147
  d: "M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"
146
- }), /*#__PURE__*/React.createElement("path", {
148
+ }), /*#__PURE__*/_react["default"].createElement("path", {
147
149
  fillRule: "evenodd",
148
150
  d: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"
149
151
  }));
@@ -151,13 +153,13 @@ function VdsIconAccount(_ref6) {
151
153
  function VdsIconMenu(_ref7) {
152
154
  var _ref7$size = _ref7.size,
153
155
  size = _ref7$size === void 0 ? 1.8 : _ref7$size;
154
- return /*#__PURE__*/React.createElement("svg", {
156
+ return /*#__PURE__*/_react["default"].createElement("svg", {
155
157
  xmlns: "http://www.w3.org/2000/svg",
156
158
  width: "".concat(size, "em"),
157
159
  height: "".concat(size, "em"),
158
160
  fill: "currentColor",
159
161
  viewBox: "0 0 16 16"
160
- }, /*#__PURE__*/React.createElement("path", {
162
+ }, /*#__PURE__*/_react["default"].createElement("path", {
161
163
  fillRule: "evenodd",
162
164
  d: "M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"
163
165
  }));
@@ -1,4 +1,5 @@
1
1
  import i18n from './i18n.js'
2
+ import React from 'react'
2
3
 
3
4
  function fixLocale(locale) {
4
5
  locale = (locale || 'en').toLowerCase()
@@ -16,7 +17,7 @@ function fixLocale(locale) {
16
17
  return locale
17
18
  }
18
19
 
19
- function isRtl(locale) {
20
+ export function isRtl(locale) {
20
21
  return ['ar', 'fa', 'he'].includes(locale)
21
22
  }
22
23
 
@@ -24,7 +25,7 @@ function vdsAssetUrl(path, localhost = false) {
24
25
  // For localhost dev, just run vscode liveserver
25
26
  if (localhost) return `http://localhost:5500/dist/${path}`
26
27
 
27
- return `https://design-standards.dhamma.org/dist/1.1.0/${path}`
28
+ return `https://design-standards.dhamma.org/dist/1.1.1/${path}`
28
29
  }
29
30
 
30
31
  function StylesheetLinkTag({ url }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vipassana-design-standards",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Vipassana design standards materials",
5
5
  "homepage": "https://design-standards.dhamma.org",
6
6
  "author": "Dhamma Workers",