@frollo/frollo-web-ui 5.0.1 → 5.0.3

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 (67) hide show
  1. package/cjs/index.js +1169 -784
  2. package/esm/{add-to-unscopables-2400f45b.js → add-to-unscopables-31609885.js} +2 -2
  3. package/esm/{array-iteration-107f927f.js → array-iteration-ec356eb3.js} +2 -2
  4. package/esm/{array-method-has-species-support-3d413468.js → array-method-has-species-support-8a4b1310.js} +1 -1
  5. package/esm/{array-method-is-strict-055b1830.js → array-method-is-strict-fc2e0d8d.js} +1 -1
  6. package/esm/{array-species-create-a5f5503b.js → array-species-create-b125f4a4.js} +2 -2
  7. package/esm/{classof-39c30bd5.js → classof-ee4b3b5b.js} +1 -1
  8. package/esm/{create-property-534611fd.js → create-property-c70ecc08.js} +1 -1
  9. package/esm/{delete-property-or-throw-8032646c.js → delete-property-or-throw-cd4c57d6.js} +3 -3
  10. package/esm/{does-not-exceed-safe-integer-31d08811.js → does-not-exceed-safe-integer-8e0042ec.js} +1 -1
  11. package/esm/{es.array.concat-987938be.js → es.array.concat-fe990345.js} +6 -6
  12. package/esm/{es.array.find-dfa1f42f.js → es.array.find-67b3b514.js} +5 -5
  13. package/esm/{es.array.includes-91be7771.js → es.array.includes-a06445a5.js} +3 -3
  14. package/esm/es.array.map-ae6c9437.js +43 -0
  15. package/esm/{es.function.name-557cb1f9.js → es.function.name-6daefaeb.js} +1 -1
  16. package/esm/{es.number.constructor-d6ff8874.js → es.number.constructor-98bae04f.js} +2 -2
  17. package/esm/es.string.includes-ade04f96.js +66 -0
  18. package/esm/{es.string.iterator-590198a8.js → es.string.iterator-0992bb28.js} +8 -8
  19. package/esm/{export-a37ba078.js → export-8a363004.js} +1 -1
  20. package/esm/{function-apply-ce251590.js → function-apply-b908d7e6.js} +1 -1
  21. package/esm/fw-animations.js +5 -5
  22. package/esm/fw-bar-chart.js +17 -16
  23. package/esm/{fw-button-8d131219.js → fw-button-b7a12ae1.js} +2 -2
  24. package/esm/fw-button.js +9 -9
  25. package/esm/fw-checkbox.js +43 -22
  26. package/esm/fw-drawer.js +9 -9
  27. package/esm/fw-dropdown-765dbbba.js +223 -0
  28. package/esm/fw-dropdown.js +15 -222
  29. package/esm/{fw-image-4787a8bd.js → fw-image-660d3e75.js} +10 -10
  30. package/esm/fw-image.js +18 -18
  31. package/esm/fw-input-7d25de48.js +235 -0
  32. package/esm/fw-input.js +20 -245
  33. package/esm/{fw-loading-spinner-c394fafc.js → fw-loading-spinner-3fda633e.js} +1 -1
  34. package/esm/fw-loading.js +3 -3
  35. package/esm/fw-modal.js +9 -9
  36. package/esm/fw-navigation-menu.js +9 -9
  37. package/esm/fw-progress-bar.js +3 -3
  38. package/esm/fw-provider-list.js +36 -0
  39. package/esm/fw-sidebar-menu.js +9 -9
  40. package/esm/fw-table-row-d390fe77.js +492 -0
  41. package/esm/fw-table.js +14 -489
  42. package/esm/fw-tabs.js +10 -10
  43. package/esm/fw-tag-9ef5331a.js +157 -0
  44. package/esm/fw-tag.js +13 -162
  45. package/esm/fw-toast.js +24 -85
  46. package/esm/fw-transactions-card.js +18 -18
  47. package/esm/{index-e4a2f8b0.js → index-04d3cb23.js} +1 -1
  48. package/esm/index-8c78a422.js +417 -0
  49. package/esm/{index-2766bfe4.js → index-c15f5641.js} +18 -55
  50. package/esm/index.js +48 -54
  51. package/esm/{is-forced-752b5893.js → is-forced-fc680e39.js} +1 -1
  52. package/esm/{object-create-f6f3a673.js → object-create-bc771493.js} +2 -2
  53. package/esm/{object-keys-4f5bf4e7.js → object-keys-17f3b440.js} +1 -1
  54. package/esm/{web.timers-0f117224.js → web.timers-c5316125.js} +3 -3
  55. package/frollo-web-ui.esm.js +1255 -839
  56. package/index.d.ts +138 -22
  57. package/package.json +1 -1
  58. package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +19 -0
  59. package/types/components/fw-checkbox/index.types.d.ts +1 -0
  60. package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +17 -0
  61. package/types/components/fw-dropdown/index.types.d.ts +1 -0
  62. package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +68 -0
  63. package/types/components/fw-provider-list/index.d.ts +2 -0
  64. package/types/components/fw-provider-list/index.types.d.ts +11 -0
  65. package/types/components/index.d.ts +1 -0
  66. package/types/components/index.types.d.ts +1 -0
  67. package/web-components/index.js +1300 -869
package/esm/fw-table.js CHANGED
@@ -1,490 +1,15 @@
1
- import { t as toString$1 } from './es.number.constructor-d6ff8874.js';
2
- import { d as deletePropertyOrThrow$1 } from './delete-property-or-throw-8032646c.js';
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';
4
- import { _ as _export } from './export-a37ba078.js';
5
- import { c as createProperty$1 } from './create-property-534611fd.js';
6
- import { a as arrayMethodIsStrict$1 } from './array-method-is-strict-055b1830.js';
7
- import { d as render$3, e as render$4 } from './index-e4a2f8b0.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';
10
- import { s as script$2 } from './fw-loading-bar-f5ca605c.js';
11
- import { s as styleInject } from './style-inject.es-1f59c1d0.js';
12
- import './classof-39c30bd5.js';
13
- import './object-keys-4f5bf4e7.js';
1
+ export { _ as FwTable, s as FwTableHead, a as FwTableRow } from './fw-table-row-d390fe77.js';
2
+ import './es.number.constructor-98bae04f.js';
3
+ import './is-forced-fc680e39.js';
4
+ import './classof-ee4b3b5b.js';
5
+ import './delete-property-or-throw-cd4c57d6.js';
6
+ import './export-8a363004.js';
7
+ import './object-keys-17f3b440.js';
8
+ import './create-property-c70ecc08.js';
9
+ import './array-method-is-strict-fc2e0d8d.js';
10
+ import './index-04d3cb23.js';
11
+ import 'vue';
14
12
  import './check-94a5917a.js';
15
-
16
- var es_array_sort = {};
17
-
18
- var toAbsoluteIndex = toAbsoluteIndex$1;
19
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
20
- var createProperty = createProperty$1;
21
-
22
- var $Array = Array;
23
- var max = Math.max;
24
-
25
- var arraySliceSimple = function (O, start, end) {
26
- var length = lengthOfArrayLike$1(O);
27
- var k = toAbsoluteIndex(start, length);
28
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
29
- var result = $Array(max(fin - k, 0));
30
- for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
31
- result.length = n;
32
- return result;
33
- };
34
-
35
- var arraySlice = arraySliceSimple;
36
-
37
- var floor = Math.floor;
38
-
39
- var mergeSort = function (array, comparefn) {
40
- var length = array.length;
41
- var middle = floor(length / 2);
42
- return length < 8 ? insertionSort(array, comparefn) : merge(
43
- array,
44
- mergeSort(arraySlice(array, 0, middle), comparefn),
45
- mergeSort(arraySlice(array, middle), comparefn),
46
- comparefn
47
- );
48
- };
49
-
50
- var insertionSort = function (array, comparefn) {
51
- var length = array.length;
52
- var i = 1;
53
- var element, j;
54
-
55
- while (i < length) {
56
- j = i;
57
- element = array[i];
58
- while (j && comparefn(array[j - 1], element) > 0) {
59
- array[j] = array[--j];
60
- }
61
- if (j !== i++) array[j] = element;
62
- } return array;
63
- };
64
-
65
- var merge = function (array, left, right, comparefn) {
66
- var llength = left.length;
67
- var rlength = right.length;
68
- var lindex = 0;
69
- var rindex = 0;
70
-
71
- while (lindex < llength || rindex < rlength) {
72
- array[lindex + rindex] = (lindex < llength && rindex < rlength)
73
- ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
74
- : lindex < llength ? left[lindex++] : right[rindex++];
75
- } return array;
76
- };
77
-
78
- var arraySort = mergeSort;
79
-
80
- var userAgent$1 = engineUserAgent;
81
-
82
- var firefox = userAgent$1.match(/firefox\/(\d+)/i);
83
-
84
- var engineFfVersion = !!firefox && +firefox[1];
85
-
86
- var UA = engineUserAgent;
87
-
88
- var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
89
-
90
- var userAgent = engineUserAgent;
91
-
92
- var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
93
-
94
- var engineWebkitVersion = !!webkit && +webkit[1];
95
-
96
- 'use strict';
97
- var $ = _export;
98
- var uncurryThis = functionUncurryThis;
99
- var aCallable = aCallable$1;
100
- var toObject = toObject$1;
101
- var lengthOfArrayLike = lengthOfArrayLike$2;
102
- var deletePropertyOrThrow = deletePropertyOrThrow$1;
103
- var toString = toString$1;
104
- var fails = fails$1;
105
- var internalSort = arraySort;
106
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
107
- var FF = engineFfVersion;
108
- var IE_OR_EDGE = engineIsIeOrEdge;
109
- var V8 = engineV8Version;
110
- var WEBKIT = engineWebkitVersion;
111
-
112
- var test = [];
113
- var un$Sort = uncurryThis(test.sort);
114
- var push = uncurryThis(test.push);
115
-
116
- // IE8-
117
- var FAILS_ON_UNDEFINED = fails(function () {
118
- test.sort(undefined);
119
- });
120
- // V8 bug
121
- var FAILS_ON_NULL = fails(function () {
122
- test.sort(null);
123
- });
124
- // Old WebKit
125
- var STRICT_METHOD = arrayMethodIsStrict('sort');
126
-
127
- var STABLE_SORT = !fails(function () {
128
- // feature detection can be too slow, so check engines versions
129
- if (V8) return V8 < 70;
130
- if (FF && FF > 3) return;
131
- if (IE_OR_EDGE) return true;
132
- if (WEBKIT) return WEBKIT < 603;
133
-
134
- var result = '';
135
- var code, chr, value, index;
136
-
137
- // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
138
- for (code = 65; code < 76; code++) {
139
- chr = String.fromCharCode(code);
140
-
141
- switch (code) {
142
- case 66: case 69: case 70: case 72: value = 3; break;
143
- case 68: case 71: value = 4; break;
144
- default: value = 2;
145
- }
146
-
147
- for (index = 0; index < 47; index++) {
148
- test.push({ k: chr + index, v: value });
149
- }
150
- }
151
-
152
- test.sort(function (a, b) { return b.v - a.v; });
153
-
154
- for (index = 0; index < test.length; index++) {
155
- chr = test[index].k.charAt(0);
156
- if (result.charAt(result.length - 1) !== chr) result += chr;
157
- }
158
-
159
- return result !== 'DGBEFHACIJK';
160
- });
161
-
162
- var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
163
-
164
- var getSortCompare = function (comparefn) {
165
- return function (x, y) {
166
- if (y === undefined) return -1;
167
- if (x === undefined) return 1;
168
- if (comparefn !== undefined) return +comparefn(x, y) || 0;
169
- return toString(x) > toString(y) ? 1 : -1;
170
- };
171
- };
172
-
173
- // `Array.prototype.sort` method
174
- // https://tc39.es/ecma262/#sec-array.prototype.sort
175
- $({ target: 'Array', proto: true, forced: FORCED }, {
176
- sort: function sort(comparefn) {
177
- if (comparefn !== undefined) aCallable(comparefn);
178
-
179
- var array = toObject(this);
180
-
181
- if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
182
-
183
- var items = [];
184
- var arrayLength = lengthOfArrayLike(array);
185
- var itemsLength, index;
186
-
187
- for (index = 0; index < arrayLength; index++) {
188
- if (index in array) push(items, array[index]);
189
- }
190
-
191
- internalSort(items, getSortCompare(comparefn));
192
-
193
- itemsLength = items.length;
194
- index = 0;
195
-
196
- while (index < itemsLength) array[index] = items[index++];
197
- while (index < arrayLength) deletePropertyOrThrow(array, index++);
198
-
199
- return array;
200
- }
201
- });
202
-
203
- var __default__ = defineComponent({
204
- name: 'FwTable',
205
- components: {
206
- ArrowSortSvg: render$3,
207
- ArrowDownSvg: render$4,
208
- FwLoadingBar: script$2
209
- },
210
- emits: ['rowClicked'],
211
- props: {
212
- items: {
213
- type: Array,
214
- required: true
215
- },
216
- options: {
217
- type: Object,
218
- required: false
219
- },
220
- loading: {
221
- type: Boolean,
222
- "default": false
223
- },
224
- /**
225
- * Enable click events on rows.
226
- * Emits row data when clicked
227
- */
228
- clickableRows: {
229
- type: Boolean,
230
- "default": false
231
- },
232
- autoSortColumn: {
233
- type: Number
234
- }
235
- },
236
- setup: function setup(props, ctx) {
237
- var columns = computed(function () {
238
- return Object.keys(props.items[0]);
239
- });
240
- var sortBy = ref('');
241
- var sortDirection = ref('asc');
242
- var currentSortedColumn = ref('');
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;
250
- var sortColumn = function sortColumn(column) {
251
- if (!isColumnSortable(column)) return;
252
- currentSortedColumn.value = column;
253
- if (sortBy.value === column) {
254
- sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc';
255
- } else {
256
- sortBy.value = column;
257
- sortDirection.value = columnInitSort(column);
258
- }
259
- };
260
- var sortedData = computed(function () {
261
- if (!sortBy.value) {
262
- return props.items;
263
- }
264
- var data = props.items;
265
- data.sort(function (a, b) {
266
- var sortVal = a[sortBy.value] > b[sortBy.value] ? 1 : -1;
267
- return sortDirection.value === 'asc' ? sortVal : -sortVal;
268
- });
269
- return data;
270
- });
271
- var formattedText = function formattedText(row, column) {
272
- var _props$options$column;
273
- if (props.options && props.options[column] && (_props$options$column = props.options[column]) !== null && _props$options$column !== void 0 && _props$options$column.formatter) {
274
- var _props$options$column2;
275
- var colFormatter = (_props$options$column2 = props.options[column]) === null || _props$options$column2 === void 0 ? void 0 : _props$options$column2.formatter;
276
- if (colFormatter) {
277
- return colFormatter(row[column]);
278
- }
279
- }
280
- return row[column];
281
- };
282
- var sortedIcon = function sortedIcon(sortDir, column) {
283
- if (currentSortedColumn.value === column) {
284
- if (sortDirection.value === sortDir) {
285
- return true;
286
- }
287
- }
288
- return false;
289
- };
290
- var isColumnSortable = function isColumnSortable(column) {
291
- if (props.options && props.options[column]) {
292
- var _props$options$column3;
293
- return (_props$options$column3 = props.options[column]) === null || _props$options$column3 === void 0 ? void 0 : _props$options$column3.isSortable;
294
- }
295
- return false;
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
- };
304
- var isDisabled = function isDisabled(column) {
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) {
307
- return true;
308
- }
309
- return false;
310
- };
311
- var rowClicked = function rowClicked(row) {
312
- if (props.clickableRows) ctx.emit('rowClicked', row);
313
- };
314
- return {
315
- columns: columns,
316
- sortBy: sortBy,
317
- sortDirection: sortDirection,
318
- sortColumn: sortColumn,
319
- sortedData: sortedData,
320
- currentSortedColumn: currentSortedColumn,
321
- sortedIcon: sortedIcon,
322
- formattedText: formattedText,
323
- isColumnSortable: isColumnSortable,
324
- isDisabled: isDisabled,
325
- rowClicked: rowClicked,
326
- bgHoverColor: bgHoverColor
327
- };
328
- }
329
- });
330
- var __injectCSSVars__ = function __injectCSSVars__() {
331
- useCssVars(function (_ctx) {
332
- return {
333
- "14adfc52": _ctx.bgHoverColor
334
- };
335
- });
336
- };
337
- var __setup__ = __default__.setup;
338
- __default__.setup = __setup__ ? function (props, ctx) {
339
- __injectCSSVars__();
340
- return __setup__(props, ctx);
341
- } : __injectCSSVars__;
342
-
343
- var _withScopeId = function _withScopeId(n) {
344
- return pushScopeId("data-v-7670383f"), n = n(), popScopeId(), n;
345
- };
346
- var _hoisted_1$2 = ["aria-busy"];
347
- var _hoisted_2$1 = {
348
- "class": "text-p2 border-b border-grey-40"
349
- };
350
- var _hoisted_3$1 = ["tabindex", "onKeydown", "onClick"];
351
- var _hoisted_4 = {
352
- "class": "flex flex-row items-center"
353
- };
354
- var _hoisted_5 = {
355
- key: 0,
356
- "class": "ml-1 flex items-center justify-center w-5"
357
- };
358
- var _hoisted_6 = {
359
- "class": "text-p2 bg-white font-light"
360
- };
361
- var _hoisted_7 = {
362
- key: 0,
363
- "class": "py-4 pl-5 pr-3 text-left"
364
- };
365
- var _hoisted_8 = {
366
- key: 0,
367
- "class": "py-4 pl-5 pr-3 text-left"
368
- };
369
- var _hoisted_9 = ["onClick", "tabindex", "onKeydown"];
370
- var _hoisted_10 = ["innerHTML"];
371
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
372
- var _component_ArrowSortSvg = resolveComponent("ArrowSortSvg");
373
- var _component_ArrowDownSvg = resolveComponent("ArrowDownSvg");
374
- var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
375
- return openBlock(), createElementBlock("table", {
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) {
380
- return openBlock(), createElementBlock(Fragment, {
381
- key: thKey
382
- }, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("th", {
383
- key: 0,
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' : '']),
385
- tabindex: _ctx.isColumnSortable(column) ? 0 : -1,
386
- onKeydown: withKeys(function ($event) {
387
- return _ctx.sortColumn(column);
388
- }, ["enter", "space"]),
389
- onClick: function onClick($event) {
390
- return _ctx.sortColumn(column);
391
- }
392
- }, [createElementVNode("div", _hoisted_4, [createElementVNode("span", {
393
- "class": normalizeClass(_ctx.sortedIcon('asc', column) || _ctx.sortedIcon('desc', column) ? 'text-primary' : '')
394
- }, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_5, [!_ctx.sortedIcon('asc', column) && !_ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowSortSvg, {
395
- key: 0,
396
- "class": "inline-block w-full text-grey-base"
397
- })) : createCommentVNode("", true), _ctx.sortedIcon('asc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
398
- key: 1,
399
- "class": "inline-block w-4 text-primary rotate-180"
400
- })) : createCommentVNode("", true), _ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
401
- key: 2,
402
- "class": "inline-block w-4 text-primary"
403
- })) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42, _hoisted_3$1)) : createCommentVNode("", true)], 64);
404
- }), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
405
- key: 0
406
- }) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_6, [_ctx.loading ? (openBlock(true), createElementBlock(Fragment, {
407
- key: 0
408
- }, renderList(_ctx.sortedData, function (row, trKey) {
409
- return openBlock(), createElementBlock("tr", {
410
- key: trKey
411
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
412
- return openBlock(), createElementBlock(Fragment, {
413
- key: colKey
414
- }, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", _hoisted_7, [createVNode(_component_FwLoadingBar, {
415
- "class": "w-full h-7"
416
- })])) : createCommentVNode("", true)], 64);
417
- }), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td", _hoisted_8, [createVNode(_component_FwLoadingBar, {
418
- "class": "w-full h-7"
419
- })])) : createCommentVNode("", true)]);
420
- }), 128)) : (openBlock(true), createElementBlock(Fragment, {
421
- key: 1
422
- }, renderList(_ctx.sortedData, function (row, trKey) {
423
- return openBlock(), createElementBlock("tr", {
424
- "class": normalizeClass(["fw-table-row border-b border-grey-40", _ctx.clickableRows ? 'cursor-pointer' : '']),
425
- onClick: function onClick($event) {
426
- return _ctx.rowClicked(row);
427
- },
428
- tabindex: _ctx.clickableRows ? 0 : -1,
429
- onKeydown: withKeys(function ($event) {
430
- return _ctx.rowClicked(row);
431
- }, ["enter", "space"]),
432
- key: trKey
433
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
434
- return openBlock(), createElementBlock(Fragment, {
435
- key: colKey
436
- }, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", {
437
- key: 0,
438
- "class": "py-2 pl-5 pr-3 text-left",
439
- innerHTML: _ctx.formattedText(row, column)
440
- }, null, 8, _hoisted_10)) : createCommentVNode("", true)], 64);
441
- }), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
442
- key: 0,
443
- row: row
444
- }) : createCommentVNode("", true)], 42, _hoisted_9);
445
- }), 128))])], 10, _hoisted_1$2);
446
- }
447
-
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)}";
450
- styleInject(css_248z);
451
-
452
- __default__.render = render$2;
453
- __default__.__scopeId = "data-v-7670383f";
454
-
455
- var script$1 = defineComponent({
456
- name: 'FwTableHead'
457
- });
458
-
459
- var _hoisted_1$1 = {
460
- "class": "py-6 px-5 text-left font-medium"
461
- };
462
- var _hoisted_2 = {
463
- "class": "flex flex-row"
464
- };
465
- var _hoisted_3 = {
466
- key: 0,
467
- "class": "w-full"
468
- };
469
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
470
- return openBlock(), createElementBlock("th", _hoisted_1$1, [createElementVNode("div", _hoisted_2, [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)])]);
471
- }
472
-
473
- script$1.render = render$1;
474
-
475
- var script = defineComponent({
476
- name: 'FwTableRow'
477
- });
478
-
479
- var _hoisted_1 = {
480
- "class": "py-3 px-4 text-left whitespace-nowrap"
481
- };
482
- function render(_ctx, _cache, $props, $setup, $data, $options) {
483
- return openBlock(), createElementBlock("td", _hoisted_1, [_ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
484
- key: 0
485
- }) : createCommentVNode("", true)]);
486
- }
487
-
488
- script.render = render;
489
-
490
- export { __default__ as FwTable, script$1 as FwTableHead, script as FwTableRow };
13
+ import './get-root-colours-e2a1cb28.js';
14
+ import './fw-loading-bar-f5ca605c.js';
15
+ import './style-inject.es-1f59c1d0.js';
package/esm/fw-tabs.js CHANGED
@@ -1,14 +1,14 @@
1
- import './es.number.constructor-d6ff8874.js';
1
+ import './es.number.constructor-98bae04f.js';
2
2
  import { defineComponent, computed, ref, provide, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, getCurrentInstance, inject, watchEffect } from 'vue';
3
- import { e as toObject$1, l as lengthOfArrayLike$1, h as fails$1 } from './is-forced-752b5893.js';
4
- import { _ as _export } from './export-a37ba078.js';
5
- import { a as arrayIteration } from './array-iteration-107f927f.js';
6
- import { a as addToUnscopables$1 } from './add-to-unscopables-2400f45b.js';
7
- import { d as doesNotExceedSafeInteger$1 } from './does-not-exceed-safe-integer-31d08811.js';
8
- import './classof-39c30bd5.js';
9
- import './array-species-create-a5f5503b.js';
10
- import './object-create-f6f3a673.js';
11
- import './object-keys-4f5bf4e7.js';
3
+ import { e as toObject$1, l as lengthOfArrayLike$1, h as fails$1 } from './is-forced-fc680e39.js';
4
+ import { _ as _export } from './export-8a363004.js';
5
+ import { a as arrayIteration } from './array-iteration-ec356eb3.js';
6
+ import { a as addToUnscopables$1 } from './add-to-unscopables-31609885.js';
7
+ import { d as doesNotExceedSafeInteger$1 } from './does-not-exceed-safe-integer-8e0042ec.js';
8
+ import './classof-ee4b3b5b.js';
9
+ import './array-species-create-b125f4a4.js';
10
+ import './object-create-bc771493.js';
11
+ import './object-keys-17f3b440.js';
12
12
 
13
13
  var script$1 = defineComponent({
14
14
  name: 'FwTabs',
@@ -0,0 +1,157 @@
1
+ import './es.array.includes-a06445a5.js';
2
+ import { defineComponent, ref, computed, useCssVars, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock, withCtx, createVNode, createCommentVNode } from 'vue';
3
+ import './fw-button.js';
4
+ import { c as render$1 } from './index-04d3cb23.js';
5
+ import { u as useColours } from './get-root-colours-e2a1cb28.js';
6
+ import { s as script } from './fw-button-b7a12ae1.js';
7
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
8
+
9
+ var __default__ = defineComponent({
10
+ name: 'FwTag',
11
+ components: {
12
+ FwButton: script,
13
+ XMarkSvg: render$1
14
+ },
15
+ emits: ['dismissed'],
16
+ props: {
17
+ /**
18
+ * The size of the tag. Accepts: 'xs', 'sm' & 'md'
19
+ */
20
+ size: {
21
+ type: String,
22
+ "default": 'xs',
23
+ validator: function validator(value) {
24
+ return ['xs', 'sm', 'md'].includes(value);
25
+ }
26
+ },
27
+ /**
28
+ * The colour variant of the tag.
29
+ * Accepts 'primary', 'secondary', 'alert', 'error', 'success'
30
+ */
31
+ variant: {
32
+ type: String,
33
+ "default": 'primary',
34
+ validator: function validator(value) {
35
+ return ['primary', 'secondary', 'alert', 'error', 'success'].includes(value);
36
+ }
37
+ },
38
+ /**
39
+ * Whether the tag can be dismissed or closed.
40
+ * Emits the @dismissed event
41
+ */
42
+ dismissable: {
43
+ type: Boolean,
44
+ "default": false
45
+ }
46
+ },
47
+ setup: function setup(props) {
48
+ var baseClass = ref("\n inline-flex items-center justify-center font-semibold text-center whitespace-nowrap rounded-full shadow\n ");
49
+ var _useColours = useColours(),
50
+ primaryFade5 = _useColours.primaryFade5;
51
+ var tagClasses = ref({
52
+ primary: {
53
+ text: 'text-button-primary-text',
54
+ background: 'bg-button-primary-bg',
55
+ iconType: 'primary'
56
+ },
57
+ secondary: {
58
+ text: 'text-primary',
59
+ background: 'fw-tag--secondary-bg',
60
+ iconType: 'tertiary'
61
+ },
62
+ alert: {
63
+ text: 'text-white',
64
+ background: 'bg-alert',
65
+ iconType: 'error'
66
+ },
67
+ success: {
68
+ text: 'text-white',
69
+ background: 'bg-success',
70
+ iconType: 'success'
71
+ },
72
+ error: {
73
+ text: 'text-white',
74
+ background: 'bg-error',
75
+ iconType: 'error'
76
+ }
77
+ });
78
+ var sizes = ref({
79
+ xs: 'px-2 py-px text-xs',
80
+ sm: 'px-4 py-1 text-xs',
81
+ md: 'px-3 py-[4.75px] text-xs'
82
+ });
83
+ var iconSizes = ref({
84
+ xs: 'w-4 h-4',
85
+ sm: 'w-5 h-5',
86
+ md: 'w-6 h-6'
87
+ });
88
+ var textColorClass = computed(function () {
89
+ return tagClasses.value[props.variant].text;
90
+ });
91
+ var bgColorClass = computed(function () {
92
+ return tagClasses.value[props.variant].background;
93
+ });
94
+ var iconButtonType = computed(function () {
95
+ return tagClasses.value[props.variant].iconType;
96
+ });
97
+ var sizeClass = computed(function () {
98
+ return sizes.value[props.size];
99
+ });
100
+ var iconSizeClass = computed(function () {
101
+ return iconSizes.value[props.size];
102
+ });
103
+ return {
104
+ baseClass: baseClass,
105
+ textColorClass: textColorClass,
106
+ bgColorClass: bgColorClass,
107
+ sizeClass: sizeClass,
108
+ iconSizeClass: iconSizeClass,
109
+ iconButtonType: iconButtonType,
110
+ primaryFade5: primaryFade5
111
+ };
112
+ }
113
+ });
114
+ var __injectCSSVars__ = function __injectCSSVars__() {
115
+ useCssVars(function (_ctx) {
116
+ return {
117
+ "f1e3ea3e": _ctx.primaryFade5
118
+ };
119
+ });
120
+ };
121
+ var __setup__ = __default__.setup;
122
+ __default__.setup = __setup__ ? function (props, ctx) {
123
+ __injectCSSVars__();
124
+ return __setup__(props, ctx);
125
+ } : __injectCSSVars__;
126
+
127
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
128
+ var _component_XMarkSvg = resolveComponent("XMarkSvg");
129
+ var _component_FwButton = resolveComponent("FwButton");
130
+ return openBlock(), createElementBlock("span", {
131
+ "class": normalizeClass(["fw-tag", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass]])
132
+ }, [renderSlot(_ctx.$slots, "default"), _ctx.dismissable ? (openBlock(), createBlock(_component_FwButton, {
133
+ key: 0,
134
+ variant: _ctx.iconButtonType,
135
+ tabindex: "",
136
+ title: "Dismiss filter",
137
+ onClick: _cache[0] || (_cache[0] = function ($event) {
138
+ return _ctx.$emit('dismissed');
139
+ }),
140
+ "class": normalizeClass([_ctx.iconSizeClass, "ml-1 !p-0 flex items-center justify-center border-none rounded-full"])
141
+ }, {
142
+ "default": withCtx(function () {
143
+ return [createVNode(_component_XMarkSvg, {
144
+ "class": "w-full h-full font-semibold m-0"
145
+ })];
146
+ }),
147
+ _: 1
148
+ }, 8, ["variant", "class"])) : createCommentVNode("", true)], 2);
149
+ }
150
+
151
+ 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)}";
152
+ 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)}";
153
+ styleInject(css_248z);
154
+
155
+ __default__.render = render;
156
+
157
+ export { __default__ as _ };