eco-vue-js 0.11.46 → 0.11.48

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.
@@ -86,8 +86,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  class: normalizeClass(["square-9 relative flex items-center justify-center rounded-full", {
87
87
  "w-ripple w-ripple-hover": !isDisabled.value && !_ctx.readonly,
88
88
  "opacity-50": isDisabled.value,
89
- "bg-primary dark:bg-primary-dark text-default font-semibold": isSelected.value,
90
- "bg-negative dark:bg-negative-dark text-default font-semibold": !isSelected.value && _ctx.isToday
89
+ "bg-primary dark:bg-primary-dark font-semibold text-[--w-date-picker-day,#ffffff]": isSelected.value,
90
+ "bg-negative dark:bg-negative-dark font-semibold text-[--w-date-picker-day,#ffffff]": !isSelected.value && _ctx.isToday
91
91
  }])
92
92
  }, [
93
93
  createElementVNode("div", _hoisted_1, toDisplayString(_ctx.startOfDay.getDate()), 1)
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarValue.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/DatePicker/components/CalendarValue.vue"],"names":[],"mappings":"AA0BA;AA+DA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AA8EF,wBAQG"}
1
+ {"version":3,"file":"CalendarValue.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/DatePicker/components/CalendarValue.vue"],"names":[],"mappings":"AAsBA;AA+DA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,IAAI,CAAA;IACjB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;AAkFF,wBAQG"}
@@ -1,4 +1,5 @@
1
- import { defineComponent, computed, onBeforeMount, createElementBlock, openBlock, normalizeClass, createElementVNode, toDisplayString, unref } from 'vue';
1
+ import { defineComponent, computed, onBeforeMount, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, toDisplayString } from 'vue';
2
+ import { useSemanticTypeBackgroundMap, SemanticType } from '../../../utils/SemanticType.js';
2
3
  import { isSameMonth, dateFormat, getStartOfMonth } from '../../../utils/dateTime.js';
3
4
 
4
5
  const _hoisted_1 = { class: "mb-0.5 font-normal tracking-wide" };
@@ -19,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
20
  if (!props.value || !clickable.value) return;
20
21
  emit("update:currentDate", getStartOfMonth(props.value));
21
22
  };
23
+ const semanticTypeBackgroundMap = useSemanticTypeBackgroundMap();
22
24
  onBeforeMount(() => {
23
25
  if (props.autoFocus) {
24
26
  updateCurrentDate();
@@ -26,9 +28,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
28
  });
27
29
  return (_ctx, _cache) => {
28
30
  return openBlock(), createElementBlock("div", {
29
- class: normalizeClass(["from-primary dark:from-primary-dark text-default relative w-full select-none rounded-xl bg-gradient-to-tr to-[#C376FF] px-4 py-3 dark:to-[#9b3be6]", {
31
+ class: normalizeClass(["relative w-full select-none rounded-xl bg-gradient-to-tr px-4 py-3", [{
30
32
  "w-ripple w-ripple-hover cursor-pointer": clickable.value
31
- }]),
33
+ }, unref(semanticTypeBackgroundMap)[unref(SemanticType).PRIMARY]]]),
32
34
  onClick: updateCurrentDate
33
35
  }, [
34
36
  createElementVNode("div", _hoisted_1, toDisplayString(_ctx.title), 1),
@@ -1 +1 @@
1
- {"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA6PA;AAukBA,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAatD,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAA;yBAE9B,IAAI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AG;wBACF,GAAG;;;YAjwB1B,oBAAoB,SAAS,4CAAa,SAAS,GAAG,IAAI;YAC1D,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EA+yBhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA31BzE,wBA21B4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -198,8 +198,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
198
198
  const blur = () => inputRef.value?.blur();
199
199
  const onPaste = async (e) => {
200
200
  if (props.loading || isDisabled.value || isReadonly.value || props.unclickable) return;
201
- navigator.clipboard.readText();
202
- const text = (e.clipboardData?.getData("text/plain") || await navigator.clipboard.readText()).replace(/\r\n?/g, "\n");
201
+ let text = e.clipboardData?.getData("text/plain");
202
+ if (!text) {
203
+ try {
204
+ text = await navigator.clipboard.readText();
205
+ } catch {
206
+ Notify.error({ title: "Clipboard API not available" });
207
+ return;
208
+ }
209
+ }
210
+ text = text.replace(/\r\n?/g, "\n");
203
211
  if (!text) {
204
212
  fieldWrapperRef.value?.showMessage("Nothing to paste");
205
213
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA;AAwUA,OAAO,KAAK,EAAC,QAAQ,EAAG,aAAa,EAAC,MAAM,UAAU,CAAA;AAStD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAC;;;;2BAmK4B,aAAa,KAAG,IAAI;2BATpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;AAsNvD,wBAUG"}
1
+ {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA;AAmVA,OAAO,KAAK,EAAC,QAAQ,EAAG,aAAa,EAAC,MAAM,UAAU,CAAA;AAUtD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAC;;;;2BA6K4B,aAAa,KAAG,IAAI;2BATpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;AAsNvD,wBAUG"}
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, useTemplateRef, ref, watch, onMounted, createElementBlock, openBlock, withModifiers, nextTick } from 'vue';
2
+ import { Notify } from '../../../utils/Notify.js';
2
3
  import { WrapSelectionType } from '../../../utils/utils.js';
3
4
  import { preserveIndentation } from '../models/toolbarActions.js';
4
5
  import { getCaretOffset, setCaretOffset } from '../models/utils.js';
@@ -104,9 +105,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
105
  }
105
106
  };
106
107
  const onPaste = async (e) => {
107
- navigator.clipboard.readText();
108
- const text = (e.clipboardData?.getData("text/plain") || await navigator.clipboard.readText()).replace(/\r\n?/g, "\n");
109
- insertPlain(text);
108
+ if (props.readonly || props.disabled) return;
109
+ let text = e.clipboardData?.getData("text/plain") || "";
110
+ if (!text) {
111
+ try {
112
+ text = await navigator.clipboard.readText();
113
+ } catch (error) {
114
+ Notify.error({ title: "Clipboard API not available" });
115
+ return;
116
+ }
117
+ }
118
+ insertPlain(text.replace(/\r\n?/g, "\n"));
110
119
  };
111
120
  const insertPlain = (text) => {
112
121
  const root = elementRef.value;
@@ -242,7 +251,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
242
251
  "aria-multiline": "true",
243
252
  spellcheck: "false",
244
253
  placeholder: _ctx.placeholder,
245
- class: "relative whitespace-pre",
254
+ class: "relative [whitespace:var(--w-input-whitespace,pre)]",
246
255
  onInput,
247
256
  onBeforeinput: _cache[0] || (_cache[0] = ($event) => insertParagraph($event)),
248
257
  onPaste: withModifiers(onPaste, ["prevent"]),
@@ -5,11 +5,11 @@ export default [
5
5
  {
6
6
  files: ['**/*.json'],
7
7
  rules: {
8
- 'jsonc/indent': ['error', 2, {}],
9
- 'jsonc/key-spacing': ['error', {beforeColon: false, afterColon: true, mode: 'strict'}],
8
+ 'jsonc/indent': ['warn', 2, {}],
9
+ 'jsonc/key-spacing': ['warn', {beforeColon: false, afterColon: true, mode: 'strict'}],
10
10
  'jsonc/comma-style': ['error', 'last'],
11
- 'jsonc/object-curly-newline': ['error', 'always'],
12
- 'jsonc/object-property-newline': 'error',
11
+ 'jsonc/object-curly-newline': ['warn', 'always'],
12
+ 'jsonc/object-property-newline': 'warn',
13
13
  },
14
14
  },
15
15
  ]
@@ -17,15 +17,15 @@ export default (config = {}) => [
17
17
  sourceType: 'module',
18
18
  },
19
19
  rules: {
20
- semi: ['error', 'never'],
21
- quotes: ['error', 'single', {allowTemplateLiterals: true}],
22
- indent: ['error', 2, {SwitchCase: 1}],
23
- 'comma-dangle': ['error', 'always-multiline'],
24
- 'comma-spacing': ['error', {before: false, after: true}],
25
- 'object-curly-spacing': ['error', 'never'],
20
+ semi: ['warn', 'never'],
21
+ quotes: ['warn', 'single', {allowTemplateLiterals: true}],
22
+ indent: ['warn', 2, {SwitchCase: 1}],
23
+ 'comma-dangle': ['warn', 'always-multiline'],
24
+ 'comma-spacing': ['warn', {before: false, after: true}],
25
+ 'object-curly-spacing': ['warn', 'never'],
26
26
  'func-call-spacing': 'off',
27
- 'template-curly-spacing': ['error', 'always'],
28
- 'space-before-function-paren': ['error', {anonymous: 'always', named: 'never', asyncArrow: 'always'}],
27
+ 'template-curly-spacing': ['warn', 'always'],
28
+ 'space-before-function-paren': ['warn', {anonymous: 'always', named: 'never', asyncArrow: 'always'}],
29
29
  'no-undef': 'off',
30
30
  'default-case-last': 'off',
31
31
  'no-console': ['warn'],
@@ -2,7 +2,7 @@ export default [
2
2
  {
3
3
  files: ['**/*.vue'],
4
4
  rules: {
5
- 'vue/script-indent': ['error', 2, {
5
+ 'vue/script-indent': ['warn', 2, {
6
6
  baseIndent: 0,
7
7
  switchCase: 1,
8
8
  ignores: [],
@@ -11,7 +11,7 @@ export default [
11
11
  'vue/block-order': ['error', {
12
12
  order: ['template', 'script[setup]', 'style'],
13
13
  }],
14
- 'vue/multiline-html-element-content-newline': ['error', {
14
+ 'vue/multiline-html-element-content-newline': ['warn', {
15
15
  ignoreWhenEmpty: true,
16
16
  ignores: ['pre', 'textarea', 'span', 'tspan', 'template'],
17
17
  allowEmptyLines: false,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.11.46",
7
+ "version": "0.11.48",
8
8
  "dependencies": {
9
9
  "@stylistic/eslint-plugin": "5.2.3",
10
10
  "@tanstack/eslint-plugin-query": "5.83.1",
@@ -1,7 +1,11 @@
1
1
  import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette'
2
2
  import plugin from 'tailwindcss/plugin.js'
3
3
 
4
- const pluginDefault = plugin(function ({matchUtilities, theme}) {
4
+ const pluginDefault = plugin(function ({matchUtilities, theme, addBase}) {
5
+ addBase({
6
+ '.w-input-whitespace-pre-wrap': {'--w-input-whitespace': 'pre-wrap'},
7
+ })
8
+
5
9
  matchUtilities(
6
10
  {
7
11
  'w-scroll-bar-color': value => ({'--w-scroll-bar-color': value}),
@@ -13,6 +17,7 @@ const pluginDefault = plugin(function ({matchUtilities, theme}) {
13
17
  'w-toggle-caret': value => ({'--w-toggle-caret': value}),
14
18
  'w-checkbox-color': value => ({'--w-checkbox-color': value}),
15
19
  'w-nav-item-dot-color': value => ({'--w-nav-item-dot-color': value}),
20
+ 'w-date-picker-day': value => ({'--w-date-picker-day': value}),
16
21
  },
17
22
  {values: flattenColorPalette(theme('colors'))},
18
23
  )