@frollo/frollo-web-ui 4.0.0 → 5.0.0
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.
- package/cjs/index.js +908 -497
- package/esm/{es.number.constructor-1249bd78.js → es.number.constructor-d6ff8874.js} +13 -4
- package/esm/{es.string.iterator-284b31d4.js → es.string.iterator-590198a8.js} +1 -2
- package/esm/fw-accordion.js +61 -28
- package/esm/fw-animations.js +3 -4
- package/esm/fw-bar-chart.js +4 -4
- package/esm/{fw-button-e8b1bd62.js → fw-button-beaf20f4.js} +1 -1
- package/esm/fw-button.js +3 -3
- package/esm/fw-checkbox.js +25 -9
- package/esm/fw-drawer.js +225 -0
- package/esm/fw-dropdown.js +1 -1
- package/esm/{fw-image-3fa960e1.js → fw-image-161b667a.js} +66 -60
- package/esm/fw-image.js +6 -7
- package/esm/fw-input.js +27 -9
- package/esm/{fw-loading-spinner-304e2f95.js → fw-loading-spinner-51deaa3d.js} +1 -1
- package/esm/fw-loading.js +17 -17
- package/esm/fw-modal.js +3 -3
- package/esm/fw-navigation-menu.js +3 -3
- package/esm/fw-progress-bar.js +1 -2
- package/esm/fw-sidebar-menu.js +13 -9
- package/esm/fw-table.js +63 -41
- package/esm/fw-tabs.js +1 -2
- package/esm/fw-tag.js +93 -18
- package/esm/fw-toast.js +2 -3
- package/esm/fw-transactions-card.js +6 -7
- package/esm/get-root-colours-e2a1cb28.js +21 -0
- package/esm/{index-1a41e7bf.js → index-2766bfe4.js} +14 -14
- package/esm/{index-c6458115.js → index-3624f1c9.js} +124 -96
- package/esm/index.js +42 -39
- package/frollo-web-ui.esm.js +971 -545
- package/icons/index.ts +5 -1
- package/icons/search.svg +3 -0
- package/icons/xmark.svg +3 -0
- package/index.d.ts +446 -139
- package/package.json +1 -1
- package/types/components/fw-accordion/fw-accordion.vue.d.ts +22 -4
- package/types/components/fw-accordion/index.types.d.ts +1 -0
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +35 -3
- package/types/components/fw-checkbox/index.types.d.ts +2 -0
- package/types/components/fw-drawer/fw-drawer.vue.d.ts +165 -0
- package/types/components/fw-drawer/index.d.ts +2 -0
- package/types/components/fw-drawer/index.types.d.ts +14 -0
- package/types/components/fw-input/fw-input.vue.d.ts +36 -2
- package/types/components/fw-input/index.types.d.ts +2 -0
- package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +4 -3
- package/types/components/fw-sidebar-menu/index.types.d.ts +2 -1
- package/types/components/fw-table/fw-table.vue.d.ts +14 -0
- package/types/components/fw-table/index.types.d.ts +3 -1
- package/types/components/fw-tag/fw-tag.vue.d.ts +30 -8
- package/types/components/fw-tag/index.types.d.ts +4 -2
- package/types/components/index.d.ts +1 -0
- package/types/components/index.types.d.ts +1 -0
- package/types/helpers/get-root-colours.d.ts +9 -0
- package/types/icons/index.d.ts +3 -1
- package/web-components/index.js +973 -547
- package/esm/to-string-12728fd2.js +0 -13
package/esm/fw-table.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { t as toString$1 } from './es.number.constructor-d6ff8874.js';
|
|
1
2
|
import { d as deletePropertyOrThrow$1 } from './delete-property-or-throw-8032646c.js';
|
|
2
3
|
import { i as toAbsoluteIndex$1, l as lengthOfArrayLike$2, j as engineUserAgent, f as functionUncurryThis, k as aCallable$1, e as toObject$1, h as fails$1, m as engineV8Version } from './is-forced-752b5893.js';
|
|
3
4
|
import { _ as _export } from './export-a37ba078.js';
|
|
4
|
-
import { t as toString$1 } from './to-string-12728fd2.js';
|
|
5
5
|
import { c as createProperty$1 } from './create-property-534611fd.js';
|
|
6
6
|
import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-055b1830.js';
|
|
7
|
-
import {
|
|
8
|
-
import { defineComponent, computed, ref, useCssVars, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, withKeys, toDisplayString, createBlock, createCommentVNode, renderSlot, createVNode } from 'vue';
|
|
7
|
+
import { c as render$3, d as render$4 } from './index-3624f1c9.js';
|
|
8
|
+
import { defineComponent, computed, ref, onMounted, useCssVars, pushScopeId, popScopeId, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, withKeys, toDisplayString, createBlock, createCommentVNode, renderSlot, createVNode } from 'vue';
|
|
9
|
+
import { u as useColours } from './get-root-colours-e2a1cb28.js';
|
|
9
10
|
import { s as script$2 } from './fw-loading-bar-f5ca605c.js';
|
|
10
11
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
|
-
import './object-keys-4f5bf4e7.js';
|
|
12
12
|
import './classof-39c30bd5.js';
|
|
13
|
+
import './object-keys-4f5bf4e7.js';
|
|
13
14
|
import './check-94a5917a.js';
|
|
14
15
|
|
|
15
16
|
var es_array_sort = {};
|
|
@@ -220,9 +221,16 @@ var __default__ = defineComponent({
|
|
|
220
221
|
type: Boolean,
|
|
221
222
|
"default": false
|
|
222
223
|
},
|
|
224
|
+
/**
|
|
225
|
+
* Enable click events on rows.
|
|
226
|
+
* Emits row data when clicked
|
|
227
|
+
*/
|
|
223
228
|
clickableRows: {
|
|
224
229
|
type: Boolean,
|
|
225
230
|
"default": false
|
|
231
|
+
},
|
|
232
|
+
autoSortColumn: {
|
|
233
|
+
type: Number
|
|
226
234
|
}
|
|
227
235
|
},
|
|
228
236
|
setup: function setup(props, ctx) {
|
|
@@ -232,9 +240,13 @@ var __default__ = defineComponent({
|
|
|
232
240
|
var sortBy = ref('');
|
|
233
241
|
var sortDirection = ref('asc');
|
|
234
242
|
var currentSortedColumn = ref('');
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
243
|
+
onMounted(function () {
|
|
244
|
+
if (Number(props.autoSortColumn) >= 0) {
|
|
245
|
+
sortColumn(columns.value[Number(props.autoSortColumn)]);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
var _useColours = useColours(),
|
|
249
|
+
bgHoverColor = _useColours.primaryFade5;
|
|
238
250
|
var sortColumn = function sortColumn(column) {
|
|
239
251
|
if (!isColumnSortable(column)) return;
|
|
240
252
|
currentSortedColumn.value = column;
|
|
@@ -242,7 +254,7 @@ var __default__ = defineComponent({
|
|
|
242
254
|
sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc';
|
|
243
255
|
} else {
|
|
244
256
|
sortBy.value = column;
|
|
245
|
-
sortDirection.value =
|
|
257
|
+
sortDirection.value = columnInitSort(column);
|
|
246
258
|
}
|
|
247
259
|
};
|
|
248
260
|
var sortedData = computed(function () {
|
|
@@ -282,9 +294,16 @@ var __default__ = defineComponent({
|
|
|
282
294
|
}
|
|
283
295
|
return false;
|
|
284
296
|
};
|
|
297
|
+
var columnInitSort = function columnInitSort(column) {
|
|
298
|
+
if (props.options && props.options[column]) {
|
|
299
|
+
var _props$options$column4;
|
|
300
|
+
return ((_props$options$column4 = props.options[column]) === null || _props$options$column4 === void 0 ? void 0 : _props$options$column4.initSortOrder) || 'asc';
|
|
301
|
+
}
|
|
302
|
+
return 'asc';
|
|
303
|
+
};
|
|
285
304
|
var isDisabled = function isDisabled(column) {
|
|
286
|
-
var _props$options$
|
|
287
|
-
if (props.options && (_props$options$
|
|
305
|
+
var _props$options$column5;
|
|
306
|
+
if (props.options && (_props$options$column5 = props.options[column]) !== null && _props$options$column5 !== void 0 && _props$options$column5.disabled) {
|
|
288
307
|
return true;
|
|
289
308
|
}
|
|
290
309
|
return false;
|
|
@@ -311,7 +330,7 @@ var __default__ = defineComponent({
|
|
|
311
330
|
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
312
331
|
useCssVars(function (_ctx) {
|
|
313
332
|
return {
|
|
314
|
-
"
|
|
333
|
+
"14adfc52": _ctx.bgHoverColor
|
|
315
334
|
};
|
|
316
335
|
});
|
|
317
336
|
};
|
|
@@ -322,44 +341,47 @@ __default__.setup = __setup__ ? function (props, ctx) {
|
|
|
322
341
|
} : __injectCSSVars__;
|
|
323
342
|
|
|
324
343
|
var _withScopeId = function _withScopeId(n) {
|
|
325
|
-
return pushScopeId("data-v-
|
|
344
|
+
return pushScopeId("data-v-7670383f"), n = n(), popScopeId(), n;
|
|
326
345
|
};
|
|
327
|
-
var _hoisted_1$2 =
|
|
346
|
+
var _hoisted_1$2 = ["aria-busy"];
|
|
347
|
+
var _hoisted_2$1 = {
|
|
328
348
|
"class": "text-p2 border-b border-grey-40"
|
|
329
349
|
};
|
|
330
|
-
var
|
|
331
|
-
var
|
|
350
|
+
var _hoisted_3$1 = ["tabindex", "onKeydown", "onClick"];
|
|
351
|
+
var _hoisted_4 = {
|
|
332
352
|
"class": "flex flex-row items-center"
|
|
333
353
|
};
|
|
334
|
-
var
|
|
354
|
+
var _hoisted_5 = {
|
|
335
355
|
key: 0,
|
|
336
356
|
"class": "ml-1 flex items-center justify-center w-5"
|
|
337
357
|
};
|
|
338
|
-
var
|
|
358
|
+
var _hoisted_6 = {
|
|
339
359
|
"class": "text-p2 bg-white font-light"
|
|
340
360
|
};
|
|
341
|
-
var
|
|
361
|
+
var _hoisted_7 = {
|
|
342
362
|
key: 0,
|
|
343
|
-
"class": "py-4
|
|
363
|
+
"class": "py-4 pl-5 pr-3 text-left"
|
|
344
364
|
};
|
|
345
|
-
var
|
|
365
|
+
var _hoisted_8 = {
|
|
346
366
|
key: 0,
|
|
347
|
-
"class": "py-4
|
|
367
|
+
"class": "py-4 pl-5 pr-3 text-left"
|
|
348
368
|
};
|
|
349
|
-
var
|
|
350
|
-
var
|
|
369
|
+
var _hoisted_9 = ["onClick", "tabindex", "onKeydown"];
|
|
370
|
+
var _hoisted_10 = ["innerHTML"];
|
|
351
371
|
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
352
372
|
var _component_ArrowSortSvg = resolveComponent("ArrowSortSvg");
|
|
353
373
|
var _component_ArrowDownSvg = resolveComponent("ArrowDownSvg");
|
|
354
374
|
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
355
375
|
return openBlock(), createElementBlock("table", {
|
|
356
|
-
"class": normalizeClass(["fw-table table-auto table-responsive rounded-md shadow-card", _ctx.loading ? 'cursor-wait' : ''])
|
|
357
|
-
|
|
376
|
+
"class": normalizeClass(["fw-table table-auto table-responsive rounded-md shadow-card", _ctx.loading ? 'cursor-wait' : '']),
|
|
377
|
+
"aria-live": "polite",
|
|
378
|
+
"aria-busy": _ctx.loading
|
|
379
|
+
}, [createElementVNode("thead", _hoisted_2$1, [createElementVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
|
|
358
380
|
return openBlock(), createElementBlock(Fragment, {
|
|
359
381
|
key: thKey
|
|
360
382
|
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("th", {
|
|
361
383
|
key: 0,
|
|
362
|
-
"class": normalizeClass(["fw-table-head py-6
|
|
384
|
+
"class": normalizeClass(["fw-table-head py-6 pl-5 pr-3 text-left font-medium", _ctx.isColumnSortable(column) ? 'cursor-pointer fw-table-head--sortable' : '']),
|
|
363
385
|
tabindex: _ctx.isColumnSortable(column) ? 0 : -1,
|
|
364
386
|
onKeydown: withKeys(function ($event) {
|
|
365
387
|
return _ctx.sortColumn(column);
|
|
@@ -367,21 +389,21 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
367
389
|
onClick: function onClick($event) {
|
|
368
390
|
return _ctx.sortColumn(column);
|
|
369
391
|
}
|
|
370
|
-
}, [createElementVNode("div",
|
|
392
|
+
}, [createElementVNode("div", _hoisted_4, [createElementVNode("span", {
|
|
371
393
|
"class": normalizeClass(_ctx.sortedIcon('asc', column) || _ctx.sortedIcon('desc', column) ? 'text-primary' : '')
|
|
372
|
-
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span",
|
|
394
|
+
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_5, [!_ctx.sortedIcon('asc', column) && !_ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowSortSvg, {
|
|
373
395
|
key: 0,
|
|
374
396
|
"class": "inline-block w-full text-grey-base"
|
|
375
|
-
})) : createCommentVNode("", true), _ctx.sortedIcon('
|
|
397
|
+
})) : createCommentVNode("", true), _ctx.sortedIcon('asc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
376
398
|
key: 1,
|
|
377
399
|
"class": "inline-block w-4 text-primary rotate-180"
|
|
378
|
-
})) : createCommentVNode("", true), _ctx.sortedIcon('
|
|
400
|
+
})) : createCommentVNode("", true), _ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
379
401
|
key: 2,
|
|
380
402
|
"class": "inline-block w-4 text-primary"
|
|
381
|
-
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42,
|
|
403
|
+
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42, _hoisted_3$1)) : createCommentVNode("", true)], 64);
|
|
382
404
|
}), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
|
|
383
405
|
key: 0
|
|
384
|
-
}) : createCommentVNode("", true)])]), createElementVNode("tbody",
|
|
406
|
+
}) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_6, [_ctx.loading ? (openBlock(true), createElementBlock(Fragment, {
|
|
385
407
|
key: 0
|
|
386
408
|
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
387
409
|
return openBlock(), createElementBlock("tr", {
|
|
@@ -389,10 +411,10 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
389
411
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
390
412
|
return openBlock(), createElementBlock(Fragment, {
|
|
391
413
|
key: colKey
|
|
392
|
-
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td",
|
|
414
|
+
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", _hoisted_7, [createVNode(_component_FwLoadingBar, {
|
|
393
415
|
"class": "w-full h-7"
|
|
394
416
|
})])) : createCommentVNode("", true)], 64);
|
|
395
|
-
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td",
|
|
417
|
+
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td", _hoisted_8, [createVNode(_component_FwLoadingBar, {
|
|
396
418
|
"class": "w-full h-7"
|
|
397
419
|
})])) : createCommentVNode("", true)]);
|
|
398
420
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, {
|
|
@@ -413,22 +435,22 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
413
435
|
key: colKey
|
|
414
436
|
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", {
|
|
415
437
|
key: 0,
|
|
416
|
-
"class": "py-
|
|
438
|
+
"class": "py-2 pl-5 pr-3 text-left",
|
|
417
439
|
innerHTML: _ctx.formattedText(row, column)
|
|
418
|
-
}, null, 8,
|
|
440
|
+
}, null, 8, _hoisted_10)) : createCommentVNode("", true)], 64);
|
|
419
441
|
}), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
|
|
420
442
|
key: 0,
|
|
421
443
|
row: row
|
|
422
|
-
}) : createCommentVNode("", true)], 42,
|
|
423
|
-
}), 128))])], 2);
|
|
444
|
+
}) : createCommentVNode("", true)], 42, _hoisted_9);
|
|
445
|
+
}), 128))])], 10, _hoisted_1$2);
|
|
424
446
|
}
|
|
425
447
|
|
|
426
|
-
var css_248z = ".fw-table-head--sortable[data-v-
|
|
427
|
-
var stylesheet = ".fw-table-head--sortable[data-v-
|
|
448
|
+
var css_248z = ".fw-table-head--sortable[data-v-7670383f]:hover{background-color:var(--14adfc52)}.fw-table-row[data-v-7670383f]:hover{background-color:var(--14adfc52)}";
|
|
449
|
+
var stylesheet = ".fw-table-head--sortable[data-v-7670383f]:hover{background-color:var(--14adfc52)}.fw-table-row[data-v-7670383f]:hover{background-color:var(--14adfc52)}";
|
|
428
450
|
styleInject(css_248z);
|
|
429
451
|
|
|
430
452
|
__default__.render = render$2;
|
|
431
|
-
__default__.__scopeId = "data-v-
|
|
453
|
+
__default__.__scopeId = "data-v-7670383f";
|
|
432
454
|
|
|
433
455
|
var script$1 = defineComponent({
|
|
434
456
|
name: 'FwTableHead'
|
package/esm/fw-tabs.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import './es.number.constructor-
|
|
1
|
+
import './es.number.constructor-d6ff8874.js';
|
|
2
2
|
import { defineComponent, computed, ref, provide, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, getCurrentInstance, inject, watchEffect } from 'vue';
|
|
3
3
|
import { e as toObject$1, l as lengthOfArrayLike$1, h as fails$1 } from './is-forced-752b5893.js';
|
|
4
4
|
import { _ as _export } from './export-a37ba078.js';
|
|
5
5
|
import { a as arrayIteration } from './array-iteration-107f927f.js';
|
|
6
6
|
import { a as addToUnscopables$1 } from './add-to-unscopables-2400f45b.js';
|
|
7
7
|
import { d as doesNotExceedSafeInteger$1 } from './does-not-exceed-safe-integer-31d08811.js';
|
|
8
|
-
import './to-string-12728fd2.js';
|
|
9
8
|
import './classof-39c30bd5.js';
|
|
10
9
|
import './array-species-create-a5f5503b.js';
|
|
11
10
|
import './object-create-f6f3a673.js';
|
package/esm/fw-tag.js
CHANGED
|
@@ -1,60 +1,96 @@
|
|
|
1
1
|
import './es.array.includes-91be7771.js';
|
|
2
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from 'vue';
|
|
2
|
+
import { defineComponent, ref, computed, useCssVars, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, withCtx, createVNode, createCommentVNode } from 'vue';
|
|
3
|
+
import './fw-button.js';
|
|
4
|
+
import { b as render$1 } from './index-3624f1c9.js';
|
|
5
|
+
import { u as useColours } from './get-root-colours-e2a1cb28.js';
|
|
6
|
+
import { s as script } from './fw-button-beaf20f4.js';
|
|
3
7
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
4
8
|
import './is-forced-752b5893.js';
|
|
5
9
|
import './export-a37ba078.js';
|
|
6
10
|
import './add-to-unscopables-2400f45b.js';
|
|
7
11
|
import './object-create-f6f3a673.js';
|
|
8
12
|
import './object-keys-4f5bf4e7.js';
|
|
13
|
+
import './check-94a5917a.js';
|
|
14
|
+
import './fw-loading-spinner-51deaa3d.js';
|
|
9
15
|
|
|
10
|
-
var
|
|
16
|
+
var __default__ = defineComponent({
|
|
11
17
|
name: 'FwTag',
|
|
18
|
+
components: {
|
|
19
|
+
FwButton: script,
|
|
20
|
+
XMarkSvg: render$1
|
|
21
|
+
},
|
|
22
|
+
emits: ['dismissed'],
|
|
12
23
|
props: {
|
|
13
24
|
/**
|
|
14
|
-
* The size of the tag. Accepts: 'xs' & '
|
|
25
|
+
* The size of the tag. Accepts: 'xs', 'sm' & 'md'
|
|
15
26
|
*/
|
|
16
27
|
size: {
|
|
17
28
|
type: String,
|
|
18
29
|
"default": 'xs',
|
|
19
30
|
validator: function validator(value) {
|
|
20
|
-
return ['xs', 'sm'].includes(value);
|
|
31
|
+
return ['xs', 'sm', 'md'].includes(value);
|
|
21
32
|
}
|
|
22
33
|
},
|
|
23
34
|
/**
|
|
24
35
|
* The colour variant of the tag.
|
|
25
|
-
* Accepts 'primary', 'alert', 'error', 'success'
|
|
36
|
+
* Accepts 'primary', 'secondary', 'alert', 'error', 'success'
|
|
26
37
|
*/
|
|
27
38
|
variant: {
|
|
28
39
|
type: String,
|
|
29
40
|
"default": 'primary',
|
|
30
41
|
validator: function validator(value) {
|
|
31
|
-
return ['primary', 'alert', 'error', 'success'].includes(value);
|
|
42
|
+
return ['primary', 'secondary', 'alert', 'error', 'success'].includes(value);
|
|
32
43
|
}
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Whether the tag can be dismissed or closed.
|
|
47
|
+
* Emits the @dismissed event
|
|
48
|
+
*/
|
|
49
|
+
dismissable: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
"default": false
|
|
33
52
|
}
|
|
34
53
|
},
|
|
35
54
|
setup: function setup(props) {
|
|
36
|
-
var baseClass = ref(
|
|
55
|
+
var baseClass = ref("\n inline-flex items-center justify-center font-semibold text-center whitespace-nowrap rounded-full shadow\n ");
|
|
56
|
+
var _useColours = useColours(),
|
|
57
|
+
primaryFade5 = _useColours.primaryFade5;
|
|
37
58
|
var tagClasses = ref({
|
|
38
59
|
primary: {
|
|
39
60
|
text: 'text-button-primary-text',
|
|
40
|
-
background: 'bg-button-primary-bg'
|
|
61
|
+
background: 'bg-button-primary-bg',
|
|
62
|
+
iconType: 'primary'
|
|
63
|
+
},
|
|
64
|
+
secondary: {
|
|
65
|
+
text: 'text-primary',
|
|
66
|
+
background: 'fw-tag--secondary-bg',
|
|
67
|
+
iconType: 'tertiary'
|
|
41
68
|
},
|
|
42
69
|
alert: {
|
|
43
70
|
text: 'text-white',
|
|
44
|
-
background: 'bg-alert'
|
|
71
|
+
background: 'bg-alert',
|
|
72
|
+
iconType: 'error'
|
|
45
73
|
},
|
|
46
74
|
success: {
|
|
47
75
|
text: 'text-white',
|
|
48
|
-
background: 'bg-success'
|
|
76
|
+
background: 'bg-success',
|
|
77
|
+
iconType: 'success'
|
|
49
78
|
},
|
|
50
79
|
error: {
|
|
51
80
|
text: 'text-white',
|
|
52
|
-
background: 'bg-error'
|
|
81
|
+
background: 'bg-error',
|
|
82
|
+
iconType: 'error'
|
|
53
83
|
}
|
|
54
84
|
});
|
|
55
85
|
var sizes = ref({
|
|
56
86
|
xs: 'px-2 py-px text-xs',
|
|
57
|
-
sm: 'px-4 py-1 text-xs'
|
|
87
|
+
sm: 'px-4 py-1 text-xs',
|
|
88
|
+
md: 'px-3 py-[4.75px] text-xs'
|
|
89
|
+
});
|
|
90
|
+
var iconSizes = ref({
|
|
91
|
+
xs: 'w-4 h-4',
|
|
92
|
+
sm: 'w-5 h-5',
|
|
93
|
+
md: 'w-6 h-6'
|
|
58
94
|
});
|
|
59
95
|
var textColorClass = computed(function () {
|
|
60
96
|
return tagClasses.value[props.variant].text;
|
|
@@ -62,28 +98,67 @@ var script = defineComponent({
|
|
|
62
98
|
var bgColorClass = computed(function () {
|
|
63
99
|
return tagClasses.value[props.variant].background;
|
|
64
100
|
});
|
|
101
|
+
var iconButtonType = computed(function () {
|
|
102
|
+
return tagClasses.value[props.variant].iconType;
|
|
103
|
+
});
|
|
65
104
|
var sizeClass = computed(function () {
|
|
66
105
|
return sizes.value[props.size];
|
|
67
106
|
});
|
|
107
|
+
var iconSizeClass = computed(function () {
|
|
108
|
+
return iconSizes.value[props.size];
|
|
109
|
+
});
|
|
68
110
|
return {
|
|
69
111
|
baseClass: baseClass,
|
|
70
112
|
textColorClass: textColorClass,
|
|
71
113
|
bgColorClass: bgColorClass,
|
|
72
|
-
sizeClass: sizeClass
|
|
114
|
+
sizeClass: sizeClass,
|
|
115
|
+
iconSizeClass: iconSizeClass,
|
|
116
|
+
iconButtonType: iconButtonType,
|
|
117
|
+
primaryFade5: primaryFade5
|
|
73
118
|
};
|
|
74
119
|
}
|
|
75
120
|
});
|
|
121
|
+
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
122
|
+
useCssVars(function (_ctx) {
|
|
123
|
+
return {
|
|
124
|
+
"f1e3ea3e": _ctx.primaryFade5
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
var __setup__ = __default__.setup;
|
|
129
|
+
__default__.setup = __setup__ ? function (props, ctx) {
|
|
130
|
+
__injectCSSVars__();
|
|
131
|
+
return __setup__(props, ctx);
|
|
132
|
+
} : __injectCSSVars__;
|
|
76
133
|
|
|
77
134
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
135
|
+
var _component_XMarkSvg = resolveComponent("XMarkSvg");
|
|
136
|
+
var _component_FwButton = resolveComponent("FwButton");
|
|
78
137
|
return openBlock(), createElementBlock("span", {
|
|
79
138
|
"class": normalizeClass(["fw-tag", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass]])
|
|
80
|
-
}, [renderSlot(_ctx.$slots, "default")
|
|
139
|
+
}, [renderSlot(_ctx.$slots, "default"), _ctx.dismissable ? (openBlock(), createBlock(_component_FwButton, {
|
|
140
|
+
key: 0,
|
|
141
|
+
variant: _ctx.iconButtonType,
|
|
142
|
+
tabindex: "",
|
|
143
|
+
title: "Dismiss filter",
|
|
144
|
+
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
145
|
+
return _ctx.$emit('dismissed');
|
|
146
|
+
}),
|
|
147
|
+
"class": normalizeClass([_ctx.iconSizeClass, "ml-1 !p-0 flex items-center justify-center border-none rounded-full"])
|
|
148
|
+
}, {
|
|
149
|
+
"default": withCtx(function () {
|
|
150
|
+
return [createVNode(_component_XMarkSvg, {
|
|
151
|
+
"class": "w-full h-full font-semibold m-0"
|
|
152
|
+
})];
|
|
153
|
+
}),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, ["variant", "class"])) : createCommentVNode("", true)], 2);
|
|
81
156
|
}
|
|
82
157
|
|
|
83
|
-
var css_248z = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out}";
|
|
84
|
-
var stylesheet = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out}";
|
|
158
|
+
var css_248z = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-tag--secondary-bg{background:var(--f1e3ea3e)}";
|
|
159
|
+
var stylesheet = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-tag--secondary-bg{background:var(--f1e3ea3e)}";
|
|
85
160
|
styleInject(css_248z);
|
|
86
161
|
|
|
87
|
-
|
|
162
|
+
__default__.render = render;
|
|
88
163
|
|
|
89
|
-
export {
|
|
164
|
+
export { __default__ as FwTag };
|
package/esm/fw-toast.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import './es.array.includes-91be7771.js';
|
|
2
|
-
import './es.number.constructor-
|
|
2
|
+
import { t as toString$1 } from './es.number.constructor-d6ff8874.js';
|
|
3
3
|
import { n as isObject$1, p as classofRaw, w as wellKnownSymbol$2, f as functionUncurryThis, r as requireObjectCoercible$1 } from './is-forced-752b5893.js';
|
|
4
4
|
import { _ as _export } from './export-a37ba078.js';
|
|
5
|
-
import { t as toString$1 } from './to-string-12728fd2.js';
|
|
6
5
|
import './es.array.concat-987938be.js';
|
|
7
6
|
import './web.timers-0f117224.js';
|
|
8
7
|
import { defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock, Fragment, createBlock, Teleport, createVNode, TransitionGroup, createCommentVNode, Transition, withCtx, normalizeClass, createElementVNode, resolveDynamicComponent, toDisplayString, renderSlot } from 'vue';
|
|
9
8
|
import { u as uniqueId } from './uniqueId-fe08534a.js';
|
|
10
|
-
import {
|
|
9
|
+
import { e as render$1, f as render$2, g as render$3 } from './index-3624f1c9.js';
|
|
11
10
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
12
11
|
import './add-to-unscopables-2400f45b.js';
|
|
13
12
|
import './object-create-f6f3a673.js';
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { defineComponent, createElementVNode, resolveComponent, openBlock, createBlock, withCtx, createCommentVNode, toDisplayString, createElementBlock } from 'vue';
|
|
2
2
|
import { s as script$1 } from './fw-card-1b6a67fe.js';
|
|
3
|
-
import { s as script$2 } from './fw-image-
|
|
3
|
+
import { s as script$2 } from './fw-image-161b667a.js';
|
|
4
4
|
import './es.array.includes-91be7771.js';
|
|
5
5
|
import './is-forced-752b5893.js';
|
|
6
6
|
import './export-a37ba078.js';
|
|
7
7
|
import './add-to-unscopables-2400f45b.js';
|
|
8
8
|
import './object-create-f6f3a673.js';
|
|
9
9
|
import './object-keys-4f5bf4e7.js';
|
|
10
|
-
import './es.number.constructor-
|
|
11
|
-
import './to-string-12728fd2.js';
|
|
10
|
+
import './es.number.constructor-d6ff8874.js';
|
|
12
11
|
import './classof-39c30bd5.js';
|
|
13
|
-
import './es.array.find-dfa1f42f.js';
|
|
14
12
|
import './array-iteration-107f927f.js';
|
|
15
13
|
import './array-species-create-a5f5503b.js';
|
|
16
|
-
import './
|
|
14
|
+
import './array-method-is-strict-055b1830.js';
|
|
15
|
+
import './es.array.find-dfa1f42f.js';
|
|
16
|
+
import './es.string.iterator-590198a8.js';
|
|
17
17
|
import './create-property-534611fd.js';
|
|
18
18
|
import './web.timers-0f117224.js';
|
|
19
19
|
import './function-apply-ce251590.js';
|
|
20
|
-
import './array-method-is-strict-055b1830.js';
|
|
21
20
|
import './fw-loading-bar-f5ca605c.js';
|
|
22
21
|
import './style-inject.es-1f59c1d0.js';
|
|
23
|
-
import './index-
|
|
22
|
+
import './index-3624f1c9.js';
|
|
24
23
|
import './check-94a5917a.js';
|
|
25
24
|
|
|
26
25
|
var script = defineComponent({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var useColours = function useColours() {
|
|
2
|
+
var style = getComputedStyle(document.body);
|
|
3
|
+
var colorPrimary = style.getPropertyValue('--colorPrimary');
|
|
4
|
+
var colorSecondary = style.getPropertyValue('--colorSecondary');
|
|
5
|
+
var colorTertiary = style.getPropertyValue('--colorTertiary');
|
|
6
|
+
var fontFamily = style.getPropertyValue('--fontFamily');
|
|
7
|
+
var colorBody = style.getPropertyValue('--colorBody');
|
|
8
|
+
var primaryFade40 = "".concat(colorPrimary, "66"); // Adds 40% transparency
|
|
9
|
+
var primaryFade5 = "".concat(colorPrimary, "0d"); // Adds 5% transparency
|
|
10
|
+
return {
|
|
11
|
+
colorPrimary: colorPrimary,
|
|
12
|
+
colorSecondary: colorSecondary,
|
|
13
|
+
colorTertiary: colorTertiary,
|
|
14
|
+
fontFamily: fontFamily,
|
|
15
|
+
colorBody: colorBody,
|
|
16
|
+
primaryFade5: primaryFade5,
|
|
17
|
+
primaryFade40: primaryFade40
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { useColours as u };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import './es.number.constructor-
|
|
1
|
+
import { t as toString$2 } from './es.number.constructor-d6ff8874.js';
|
|
2
2
|
import { q as anObject$3, h as fails$5, g as global$3, s as functionCall, f as functionUncurryThis, u as shared$1, v as internalState, b as defineBuiltIn$1, w as wellKnownSymbol$2, c as createNonEnumerableProperty$1, e as toObject$2, x as isCallable$2, p as classofRaw, y as toIntegerOrInfinity$2, z as toLength$1, r as requireObjectCoercible$1, A as getMethod$1, i as toAbsoluteIndex$1, l as lengthOfArrayLike$1 } from './is-forced-752b5893.js';
|
|
3
3
|
import { _ as _export } from './export-a37ba078.js';
|
|
4
|
-
import { t as toString$2 } from './to-string-12728fd2.js';
|
|
5
4
|
import { o as objectCreate } from './object-create-f6f3a673.js';
|
|
6
5
|
import { f as functionApply } from './function-apply-ce251590.js';
|
|
7
|
-
import { s as stringMultibyte } from './es.string.iterator-
|
|
6
|
+
import { s as stringMultibyte } from './es.string.iterator-590198a8.js';
|
|
8
7
|
import { d as deletePropertyOrThrow$1 } from './delete-property-or-throw-8032646c.js';
|
|
9
8
|
import { a as arrayIteration } from './array-iteration-107f927f.js';
|
|
10
9
|
import { a as arrayMethodHasSpeciesSupport$2 } from './array-method-has-species-support-3d413468.js';
|
|
@@ -13,6 +12,7 @@ import { d as doesNotExceedSafeInteger$1 } from './does-not-exceed-safe-integer-
|
|
|
13
12
|
import { a as arraySpeciesCreate$1 } from './array-species-create-a5f5503b.js';
|
|
14
13
|
import { c as createProperty$1 } from './create-property-534611fd.js';
|
|
15
14
|
import { version as version$1, isProxy, toRaw, defineComponent, ref, shallowRef, onMounted, onBeforeUnmount, watch, h, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createVNode } from 'vue';
|
|
15
|
+
import { u as useColours } from './get-root-colours-e2a1cb28.js';
|
|
16
16
|
import { u as uniqueId } from './uniqueId-fe08534a.js';
|
|
17
17
|
|
|
18
18
|
function _arrayLikeToArray(arr, len) {
|
|
@@ -3376,9 +3376,9 @@ function capBezierPoints(points, area) {
|
|
|
3376
3376
|
}
|
|
3377
3377
|
return valueInPixels;
|
|
3378
3378
|
}
|
|
3379
|
-
const getComputedStyle
|
|
3379
|
+
const getComputedStyle = (element)=>element.ownerDocument.defaultView.getComputedStyle(element, null);
|
|
3380
3380
|
function getStyle(el, property) {
|
|
3381
|
-
return getComputedStyle
|
|
3381
|
+
return getComputedStyle(el).getPropertyValue(property);
|
|
3382
3382
|
}
|
|
3383
3383
|
const positions = [
|
|
3384
3384
|
'top',
|
|
@@ -3433,7 +3433,7 @@ const useOffsetPos = (x, y, target)=>(x > 0 || y > 0) && (!target || !target.sha
|
|
|
3433
3433
|
return event;
|
|
3434
3434
|
}
|
|
3435
3435
|
const { canvas , currentDevicePixelRatio } = chart;
|
|
3436
|
-
const style = getComputedStyle
|
|
3436
|
+
const style = getComputedStyle(canvas);
|
|
3437
3437
|
const borderBox = style.boxSizing === 'border-box';
|
|
3438
3438
|
const paddings = getPositionedStyle(style, 'padding');
|
|
3439
3439
|
const borders = getPositionedStyle(style, 'border', 'width');
|
|
@@ -3459,7 +3459,7 @@ function getContainerSize(canvas, width, height) {
|
|
|
3459
3459
|
height = canvas.clientHeight;
|
|
3460
3460
|
} else {
|
|
3461
3461
|
const rect = container.getBoundingClientRect(); // this is the border box of the container
|
|
3462
|
-
const containerStyle = getComputedStyle
|
|
3462
|
+
const containerStyle = getComputedStyle(container);
|
|
3463
3463
|
const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');
|
|
3464
3464
|
const containerPadding = getPositionedStyle(containerStyle, 'padding');
|
|
3465
3465
|
width = rect.width - containerPadding.width - containerBorder.width;
|
|
@@ -3478,7 +3478,7 @@ function getContainerSize(canvas, width, height) {
|
|
|
3478
3478
|
const round1 = (v)=>Math.round(v * 10) / 10;
|
|
3479
3479
|
// eslint-disable-next-line complexity
|
|
3480
3480
|
function getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {
|
|
3481
|
-
const style = getComputedStyle
|
|
3481
|
+
const style = getComputedStyle(canvas);
|
|
3482
3482
|
const margins = getPositionedStyle(style, 'margin');
|
|
3483
3483
|
const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;
|
|
3484
3484
|
const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;
|
|
@@ -15681,12 +15681,12 @@ var script = defineComponent({
|
|
|
15681
15681
|
return strToNumber(singleY);
|
|
15682
15682
|
})) || [];
|
|
15683
15683
|
});
|
|
15684
|
-
var
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15684
|
+
var _useColours = useColours(),
|
|
15685
|
+
colorPrimary = _useColours.colorPrimary,
|
|
15686
|
+
colorBody = _useColours.colorBody,
|
|
15687
|
+
fontFamily = _useColours.fontFamily,
|
|
15688
|
+
bgColor = _useColours.primaryFade5,
|
|
15689
|
+
primaryFade = _useColours.primaryFade40;
|
|
15690
15690
|
var maxY = computed(function () {
|
|
15691
15691
|
return Math.max.apply(Math, _toConsumableArray(yModel.value));
|
|
15692
15692
|
});
|