frappe-ui 0.1.235 → 0.1.237

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 (43) hide show
  1. package/frappe/DataImport/DataImport.vue +7 -7
  2. package/frappe/DataImport/PreviewStep.vue +8 -6
  3. package/package.json +1 -1
  4. package/src/components/MultiSelect/MultiSelect.vue +1 -0
  5. package/src/components/TextEditor/TextEditor.vue +10 -5
  6. package/src/fonts/Inter/inter.css +18 -279
  7. package/src/tailwind/plugin.js +2 -7
  8. package/src/fonts/Inter/Inter-Black.woff2 +0 -0
  9. package/src/fonts/Inter/Inter-BlackItalic.woff2 +0 -0
  10. package/src/fonts/Inter/Inter-Bold.woff2 +0 -0
  11. package/src/fonts/Inter/Inter-BoldItalic.woff2 +0 -0
  12. package/src/fonts/Inter/Inter-Display.woff2 +0 -0
  13. package/src/fonts/Inter/Inter-DisplayBlack.woff2 +0 -0
  14. package/src/fonts/Inter/Inter-DisplayBlackItalic.woff2 +0 -0
  15. package/src/fonts/Inter/Inter-DisplayBold.woff2 +0 -0
  16. package/src/fonts/Inter/Inter-DisplayBoldItalic.woff2 +0 -0
  17. package/src/fonts/Inter/Inter-DisplayExtraBold.woff2 +0 -0
  18. package/src/fonts/Inter/Inter-DisplayExtraBoldItalic.woff2 +0 -0
  19. package/src/fonts/Inter/Inter-DisplayExtraLight.woff2 +0 -0
  20. package/src/fonts/Inter/Inter-DisplayExtraLightItalic.woff2 +0 -0
  21. package/src/fonts/Inter/Inter-DisplayItalic.woff2 +0 -0
  22. package/src/fonts/Inter/Inter-DisplayLight.woff2 +0 -0
  23. package/src/fonts/Inter/Inter-DisplayLightItalic.woff2 +0 -0
  24. package/src/fonts/Inter/Inter-DisplayMedium.woff2 +0 -0
  25. package/src/fonts/Inter/Inter-DisplayMediumItalic.woff2 +0 -0
  26. package/src/fonts/Inter/Inter-DisplaySemiBold.woff2 +0 -0
  27. package/src/fonts/Inter/Inter-DisplaySemiBoldItalic.woff2 +0 -0
  28. package/src/fonts/Inter/Inter-DisplayThin.woff2 +0 -0
  29. package/src/fonts/Inter/Inter-DisplayThinItalic.woff2 +0 -0
  30. package/src/fonts/Inter/Inter-ExtraBold.woff2 +0 -0
  31. package/src/fonts/Inter/Inter-ExtraBoldItalic.woff2 +0 -0
  32. package/src/fonts/Inter/Inter-ExtraLight.woff2 +0 -0
  33. package/src/fonts/Inter/Inter-ExtraLightItalic.woff2 +0 -0
  34. package/src/fonts/Inter/Inter-Italic.woff2 +0 -0
  35. package/src/fonts/Inter/Inter-Light.woff2 +0 -0
  36. package/src/fonts/Inter/Inter-LightItalic.woff2 +0 -0
  37. package/src/fonts/Inter/Inter-Medium.woff2 +0 -0
  38. package/src/fonts/Inter/Inter-MediumItalic.woff2 +0 -0
  39. package/src/fonts/Inter/Inter-Regular.woff2 +0 -0
  40. package/src/fonts/Inter/Inter-SemiBold.woff2 +0 -0
  41. package/src/fonts/Inter/Inter-SemiBoldItalic.woff2 +0 -0
  42. package/src/fonts/Inter/Inter-Thin.woff2 +0 -0
  43. package/src/fonts/Inter/Inter-ThinItalic.woff2 +0 -0
@@ -87,10 +87,16 @@ const fields = createResource({
87
87
  auto: false,
88
88
  })
89
89
 
90
+
91
+ const updateData = () => {
92
+ data.value = dataImports.data?.find(
93
+ (di: DataImport) => di.name === props.importName,
94
+ ) || null
95
+ }
96
+
90
97
  watch(
91
98
  () => [route.params, props, dataImports.data],
92
99
  () => {
93
- if (!dataImports.data?.length) return
94
100
  if (props.doctype) {
95
101
  step.value = 'upload'
96
102
  fields.reload({
@@ -121,12 +127,6 @@ watch(() => route.query, () => {
121
127
  }
122
128
  })
123
129
 
124
- const updateData = () => {
125
- data.value = dataImports.data?.find(
126
- (di: DataImport) => di.name === props.importName,
127
- ) || null
128
- }
129
-
130
130
  const updateStep = (newStep: 'list' | 'upload' | 'map' | 'preview', newData: DataImport) => {
131
131
  step.value = newStep
132
132
  if (newData) {
@@ -312,13 +312,15 @@ const mapping = computed(() => {
312
312
  let warningMap: string[][] = [];
313
313
  if (!preview.value?.warnings?.length) return [];
314
314
  preview.value.warnings.forEach((warning: any) => {
315
- const regex = /<strong>(.*?)<\/strong>/g;
316
- let match;
317
- const fields = [];
318
- while ((match = regex.exec(warning.message)) !== null) {
319
- fields.push(match[1]);
315
+ if (warning.type == "info") {
316
+ const regex = /<strong>(.*?)<\/strong>/g;
317
+ let match;
318
+ const fields = [];
319
+ while ((match = regex.exec(warning.message)) !== null) {
320
+ fields.push(match[1]);
321
+ }
322
+ warningMap.push(fields);
320
323
  }
321
- warningMap.push(fields);
322
324
  })
323
325
  return warningMap;
324
326
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frappe-ui",
3
- "version": "0.1.235",
3
+ "version": "0.1.237",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -13,6 +13,7 @@ import {
13
13
  } from "reka-ui";
14
14
 
15
15
  import LucideX from "~icons/lucide/x";
16
+ import Button from "../Button/Button.vue";
16
17
  import Popover from "../Popover/Popover.vue";
17
18
  import LucideCheck from "~icons/lucide/check";
18
19
  import LoadingIndicator from "../LoadingIndicator.vue";
@@ -94,6 +94,7 @@ const props = withDefaults(defineProps<TextEditorProps>(), {
94
94
  tags: () => [],
95
95
  })
96
96
 
97
+ const model = defineModel()
97
98
  const emit = defineEmits<TextEditorEmits>()
98
99
 
99
100
  const editor = ref<Editor | null>(null)
@@ -119,10 +120,12 @@ const editorProps = computed(() => {
119
120
  })
120
121
 
121
122
  watch(
122
- () => props.content,
123
- (val) => {
123
+ () => [props.content, model.value],
124
+ ([content, modelVal]) => {
125
+ const val = content || modelVal
126
+
124
127
  if (editor.value) {
125
- let currentHTML = editor.value.getHTML()
128
+ const currentHTML = editor.value.getHTML()
126
129
  if (currentHTML !== val) {
127
130
  editor.value.commands.setContent(val)
128
131
  }
@@ -153,7 +156,7 @@ watch(
153
156
 
154
157
  onMounted(() => {
155
158
  editor.value = new Editor({
156
- content: props.content || null,
159
+ content: props.content || model.value || null,
157
160
  editorProps: editorProps.value,
158
161
  editable: props.editable,
159
162
  autofocus: props.autofocus,
@@ -237,7 +240,9 @@ onMounted(() => {
237
240
  ...(props.extensions || []),
238
241
  ],
239
242
  onUpdate: ({ editor }) => {
240
- emit('change', editor.getHTML())
243
+ const html = editor.getHTML()
244
+ emit('change', html)
245
+ model.value = html
241
246
  },
242
247
  onTransaction: ({ editor }) => {
243
248
  emit('transaction', editor)
@@ -30,293 +30,32 @@
30
30
  src: url('Inter-Italic.var.woff2?v=3.19') format('woff2') tech('variations');
31
31
  unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
32
32
  }
33
- /* static fonts "Inter" */
33
+ /* Aliased 'InterVar' font as 'Inter' */
34
+ /* To prevent breaking usage of `font-family: 'Inter'` */
34
35
  @font-face {
35
36
  font-family: 'Inter';
36
- font-style: normal;
37
- font-weight: 100;
38
- font-display: swap;
39
- src: url('Inter-Thin.woff2?v=3.19') format('woff2');
40
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
41
- }
42
- @font-face {
43
- font-family: 'Inter';
44
- font-style: italic;
45
- font-weight: 100;
46
- font-display: swap;
47
- src: url('Inter-ThinItalic.woff2?v=3.19') format('woff2');
48
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
49
- }
50
- @font-face {
51
- font-family: 'Inter';
52
- font-style: normal;
53
- font-weight: 200;
54
- font-display: swap;
55
- src: url('Inter-ExtraLight.woff2?v=3.19') format('woff2');
56
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
57
- }
58
- @font-face {
59
- font-family: 'Inter';
60
- font-style: italic;
61
- font-weight: 200;
62
- font-display: swap;
63
- src: url('Inter-ExtraLightItalic.woff2?v=3.19') format('woff2');
64
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
65
- }
66
- @font-face {
67
- font-family: 'Inter';
68
- font-style: normal;
69
- font-weight: 300;
70
- font-display: swap;
71
- src: url('Inter-Light.woff2?v=3.19') format('woff2');
72
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
73
- }
74
- @font-face {
75
- font-family: 'Inter';
76
- font-style: italic;
77
- font-weight: 300;
78
- font-display: swap;
79
- src: url('Inter-LightItalic.woff2?v=3.19') format('woff2');
80
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
81
- }
82
- @font-face {
83
- font-family: 'Inter';
84
- font-style: normal;
85
- font-weight: 400;
86
- font-display: swap;
87
- src: url('Inter-Regular.woff2?v=3.19') format('woff2');
88
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
89
- }
90
- @font-face {
91
- font-family: 'Inter';
92
- font-style: italic;
93
- font-weight: 400;
94
- font-display: swap;
95
- src: url('Inter-Italic.woff2?v=3.19') format('woff2');
96
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
97
- }
98
- @font-face {
99
- font-family: 'Inter';
100
- font-style: normal;
101
- font-weight: 500;
102
- font-display: swap;
103
- src: url('Inter-Medium.woff2?v=3.19') format('woff2');
104
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
105
- }
106
- @font-face {
107
- font-family: 'Inter';
108
- font-style: italic;
109
- font-weight: 500;
110
- font-display: swap;
111
- src: url('Inter-MediumItalic.woff2?v=3.19') format('woff2');
112
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
113
- }
114
- @font-face {
115
- font-family: 'Inter';
116
- font-style: normal;
117
- font-weight: 600;
118
- font-display: swap;
119
- src: url('Inter-SemiBold.woff2?v=3.19') format('woff2');
120
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
121
- }
122
- @font-face {
123
- font-family: 'Inter';
124
- font-style: italic;
125
- font-weight: 600;
126
- font-display: swap;
127
- src: url('Inter-SemiBoldItalic.woff2?v=3.19') format('woff2');
128
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
129
- }
130
- @font-face {
131
- font-family: 'Inter';
132
- font-style: normal;
133
- font-weight: 700;
134
- font-display: swap;
135
- src: url('Inter-Bold.woff2?v=3.19') format('woff2');
136
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
137
- }
138
- @font-face {
139
- font-family: 'Inter';
140
- font-style: italic;
141
- font-weight: 700;
142
- font-display: swap;
143
- src: url('Inter-BoldItalic.woff2?v=3.19') format('woff2');
144
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
145
- }
146
- @font-face {
147
- font-family: 'Inter';
148
- font-style: normal;
149
- font-weight: 800;
150
- font-display: swap;
151
- src: url('Inter-ExtraBold.woff2?v=3.19') format('woff2');
152
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
153
- }
154
- @font-face {
155
- font-family: 'Inter';
156
- font-style: italic;
157
- font-weight: 800;
37
+ font-weight: 100 900;
158
38
  font-display: swap;
159
- src: url('Inter-ExtraBoldItalic.woff2?v=3.19') format('woff2');
160
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
161
- }
162
- @font-face {
163
- font-family: 'Inter';
164
39
  font-style: normal;
165
- font-weight: 900;
166
- font-display: swap;
167
- src: url('Inter-Black.woff2?v=3.19') format('woff2');
168
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
40
+ src:
41
+ url('Inter.var.woff2?v=3.19') format('woff2-variations'),
42
+ url('Inter.var.woff2?v=3.19') format('woff2');
43
+ src: url('Inter.var.woff2?v=3.19') format('woff2') tech('variations');
44
+ unicode-range:
45
+ U+0000-05FF, /* Latin, Greek, Cyrillic, Hebrew */
46
+ U+0700-1FFF, /* Extended Latin, Greek, Cyrillic, Armenian, Georgian */
47
+ U+2C00-2FFF, /* Additional scripts */
48
+ U+4E00-9FFF, /* CJK (Chinese, Japanese, Korean) */
49
+ U+AC00-D7AF; /* Hangul (Korean) */
169
50
  }
170
51
  @font-face {
171
52
  font-family: 'Inter';
172
- font-style: italic;
173
- font-weight: 900;
174
- font-display: swap;
175
- src: url('Inter-BlackItalic.woff2?v=3.19') format('woff2');
176
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
177
- }
178
- /* static fonts "InterDisplay" */
179
- @font-face {
180
- font-family: 'InterDisplay';
181
- font-style: normal;
182
- font-weight: 100;
183
- font-display: swap;
184
- src: url('Inter-DisplayThin.woff2?v=3.19') format('woff2');
185
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
186
- }
187
- @font-face {
188
- font-family: 'InterDisplay';
189
- font-style: italic;
190
- font-weight: 100;
191
- font-display: swap;
192
- src: url('Inter-DisplayThinItalic.woff2?v=3.19') format('woff2');
193
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
194
- }
195
- @font-face {
196
- font-family: 'InterDisplay';
197
- font-style: normal;
198
- font-weight: 200;
199
- font-display: swap;
200
- src: url('Inter-DisplayExtraLight.woff2?v=3.19') format('woff2');
201
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
202
- }
203
- @font-face {
204
- font-family: 'InterDisplay';
205
- font-style: italic;
206
- font-weight: 200;
207
- font-display: swap;
208
- src: url('Inter-DisplayExtraLightItalic.woff2?v=3.19') format('woff2');
209
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
210
- }
211
- @font-face {
212
- font-family: 'InterDisplay';
213
- font-style: normal;
214
- font-weight: 300;
215
- font-display: swap;
216
- src: url('Inter-DisplayLight.woff2?v=3.19') format('woff2');
217
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
218
- }
219
- @font-face {
220
- font-family: 'InterDisplay';
221
- font-style: italic;
222
- font-weight: 300;
223
- font-display: swap;
224
- src: url('Inter-DisplayLightItalic.woff2?v=3.19') format('woff2');
225
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
226
- }
227
- @font-face {
228
- font-family: 'InterDisplay';
229
- font-style: normal;
230
- font-weight: 400;
231
- font-display: swap;
232
- src: url('Inter-DisplayRegular.woff2?v=3.19') format('woff2');
233
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
234
- }
235
- @font-face {
236
- font-family: 'InterDisplay';
237
- font-style: italic;
238
- font-weight: 400;
239
- font-display: swap;
240
- src: url('Inter-DisplayItalic.woff2?v=3.19') format('woff2');
241
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
242
- }
243
- @font-face {
244
- font-family: 'InterDisplay';
245
- font-style: normal;
246
- font-weight: 500;
247
- font-display: swap;
248
- src: url('Inter-DisplayMedium.woff2?v=3.19') format('woff2');
249
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
250
- }
251
- @font-face {
252
- font-family: 'InterDisplay';
253
- font-style: italic;
254
- font-weight: 500;
255
- font-display: swap;
256
- src: url('Inter-DisplayMediumItalic.woff2?v=3.19') format('woff2');
257
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
258
- }
259
- @font-face {
260
- font-family: 'InterDisplay';
261
- font-style: normal;
262
- font-weight: 600;
263
- font-display: swap;
264
- src: url('Inter-DisplaySemiBold.woff2?v=3.19') format('woff2');
265
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
266
- }
267
- @font-face {
268
- font-family: 'InterDisplay';
269
- font-style: italic;
270
- font-weight: 600;
271
- font-display: swap;
272
- src: url('Inter-DisplaySemiBoldItalic.woff2?v=3.19') format('woff2');
273
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
274
- }
275
- @font-face {
276
- font-family: 'InterDisplay';
277
- font-style: normal;
278
- font-weight: 700;
279
- font-display: swap;
280
- src: url('Inter-DisplayBold.woff2?v=3.19') format('woff2');
281
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
282
- }
283
- @font-face {
284
- font-family: 'InterDisplay';
285
- font-style: italic;
286
- font-weight: 700;
287
- font-display: swap;
288
- src: url('Inter-DisplayBoldItalic.woff2?v=3.19') format('woff2');
289
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
290
- }
291
- @font-face {
292
- font-family: 'InterDisplay';
293
- font-style: normal;
294
- font-weight: 800;
295
- font-display: swap;
296
- src: url('Inter-DisplayExtraBold.woff2?v=3.19') format('woff2');
297
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
298
- }
299
- @font-face {
300
- font-family: 'InterDisplay';
301
- font-style: italic;
302
- font-weight: 800;
303
- font-display: swap;
304
- src: url('Inter-DisplayExtraBoldItalic.woff2?v=3.19') format('woff2');
305
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
306
- }
307
- @font-face {
308
- font-family: 'InterDisplay';
309
- font-style: normal;
310
- font-weight: 900;
53
+ font-weight: 100 900;
311
54
  font-display: swap;
312
- src: url('Inter-DisplayBlack.woff2?v=3.19') format('woff2');
313
- unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
314
- }
315
- @font-face {
316
- font-family: 'InterDisplay';
317
55
  font-style: italic;
318
- font-weight: 900;
319
- font-display: swap;
320
- src: url('Inter-DisplayBlackItalic.woff2?v=3.19') format('woff2');
56
+ src:
57
+ url('Inter-Italic.var.woff2?v=3.19') format('woff2-variations'),
58
+ url('Inter-Italic.var.woff2?v=3.19') format('woff2');
59
+ src: url('Inter-Italic.var.woff2?v=3.19') format('woff2') tech('variations');
321
60
  unicode-range: U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
322
61
  }
@@ -11,13 +11,8 @@ let cssVariables = generateCSSVariables()
11
11
 
12
12
  let globalStyles = (theme) => ({
13
13
  html: {
14
- 'font-family': `Inter, ${theme('fontFamily.sans')}`,
15
- },
16
- '@supports (font-variation-settings: normal)': {
17
- html: {
18
- 'font-family': `InterVar, ${theme('fontFamily.sans')}`,
19
- 'font-optical-sizing': 'auto',
20
- },
14
+ 'font-family': `InterVar, ${theme('fontFamily.sans')}`,
15
+ 'font-optical-sizing': 'auto',
21
16
  },
22
17
  'html, body, button, p, span, div': {
23
18
  fontVariationSettings: "'opsz' 24",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file