@frollo/frollo-web-ui 9.0.1 → 9.0.2
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 +10733 -3060
- package/esm/{_rollupPluginBabelHelpers-DODWUb5N.js → _rollupPluginBabelHelpers-BKlDnZ7n.js} +1 -1
- package/esm/fw-accordion.js +15 -18
- package/esm/fw-alert.js +32 -25
- package/esm/fw-bar-chart.js +265 -93
- package/esm/fw-button-DZTHZLjk.js +318 -0
- package/esm/fw-button.js +2 -2
- package/esm/{fw-card-D45R4kN-.js → fw-card-XGtsK2bM.js} +7 -10
- package/esm/fw-card.js +2 -2
- package/esm/fw-checkbox.js +8 -11
- package/esm/fw-date-picker.js +85 -49
- package/esm/fw-drawer.js +8 -8
- package/esm/{fw-dropdown-58wyuzsW.js → fw-dropdown-CSmYTm5O.js} +11 -14
- package/esm/fw-dropdown.js +7 -6
- package/esm/fw-form.js +1 -1
- package/esm/fw-icons.js +11 -12
- package/esm/fw-image-A2lXYs0u.js +325 -0
- package/esm/fw-image.js +5 -4
- package/esm/{fw-input-C2-cZ-BY.js → fw-input-BiPWWfK3.js} +12 -19
- package/esm/fw-input.js +3 -3
- package/esm/fw-loading-bar-3x4tkF1B.js +37 -0
- package/esm/fw-loading.js +89 -40
- package/esm/fw-media-picker.js +10 -653
- package/esm/fw-modal.js +11 -10
- package/esm/fw-navigation-menu.js +36 -41
- package/esm/fw-popover-BZ-zqUme.js +330 -0
- package/esm/fw-popover.js +2 -3
- package/esm/fw-progress-bar.js +1 -1
- package/esm/fw-provider-list.js +109 -87
- package/esm/fw-sidebar-menu.js +58 -51
- package/esm/fw-slider.js +64 -61
- package/esm/fw-switch.js +76 -49
- package/esm/fw-table-row-D6FdCJMs.js +447 -0
- package/esm/fw-table.js +5 -6
- package/esm/fw-tabs.js +87 -35
- package/esm/fw-tag-BRxPc4zc.js +199 -0
- package/esm/fw-tag.js +4 -4
- package/esm/fw-toast.js +58 -76
- package/esm/fw-transactions-card.js +20 -20
- package/esm/{get-root-colours-DCjlYelc.js → get-root-colours-DCCAnRF4.js} +3 -1
- package/esm/index-C8z11jcJ.js +7583 -0
- package/esm/index-DHyRsKsZ.js +843 -0
- package/esm/index-eP2GMSdQ.js +755 -0
- package/esm/index.js +54 -61
- package/esm/{uniqueId-DZdGzBh8.js → uniqueId-DK6xzFd8.js} +1 -1
- package/esm/{vee-validate.esm-3ptvCDR1.js → vee-validate-0dtT5GSQ.js} +182 -305
- package/frollo-web-ui.esm.js +10790 -3115
- package/icons/circle-check.svg +4 -0
- package/index.d.ts +1522 -586
- package/package.json +11 -11
- package/types/components/fw-accordion/fw-accordion.vue.d.ts +9 -7
- package/types/components/fw-alert/fw-alert.vue.d.ts +11 -6
- package/types/components/fw-bar-chart/fw-bar-chart.vue.d.ts +15 -64
- package/types/components/fw-button/fw-button.vue.d.ts +11 -7
- package/types/components/fw-card/fw-card.vue.d.ts +6 -6
- package/types/components/fw-checkbox/fw-checkbox.vue.d.ts +365 -5
- package/types/components/fw-date-picker/fw-date-picker.vue.d.ts +3 -242
- package/types/components/fw-drawer/fw-drawer.vue.d.ts +11 -8
- package/types/components/fw-dropdown/fw-dropdown.vue.d.ts +20 -12
- package/types/components/fw-icons/fw-success-animation.vue.d.ts +1 -1
- package/types/components/fw-image/fw-image.vue.d.ts +33 -7
- package/types/components/fw-input/fw-input.vue.d.ts +368 -10
- package/types/components/fw-loading/fw-loading-bar.vue.d.ts +7 -5
- package/types/components/fw-loading/fw-loading-card.vue.d.ts +3 -1
- package/types/components/fw-loading/fw-loading-dots.vue.d.ts +8 -1
- package/types/components/fw-loading/fw-loading-table.vue.d.ts +11 -6
- package/types/components/fw-media-picker/fw-media-picker.vue.d.ts +27 -18
- package/types/components/fw-modal/fw-modal.vue.d.ts +11 -7
- package/types/components/fw-navigation-menu/fw-navigation-menu.vue.d.ts +12 -8
- package/types/components/fw-popover/fw-popover.vue.d.ts +16 -21
- package/types/components/fw-progress-bar/fw-progress-bar.vue.d.ts +6 -4
- package/types/components/fw-provider-list/fw-provider-list.vue.d.ts +20 -45
- package/types/components/fw-sidebar-menu/fw-sidebar-menu.vue.d.ts +13 -7
- package/types/components/fw-slider/fw-slider.vue.d.ts +11 -8
- package/types/components/fw-switch/fw-switch.vue.d.ts +383 -9
- package/types/components/fw-switch/index.types.d.ts +1 -0
- package/types/components/fw-table/fw-table-head.vue.d.ts +1 -1
- package/types/components/fw-table/fw-table-row.vue.d.ts +1 -1
- package/types/components/fw-table/fw-table.vue.d.ts +40 -19
- package/types/components/fw-table/index.types.d.ts +36 -2
- package/types/components/fw-tabs/fw-tab.vue.d.ts +4 -8
- package/types/components/fw-tabs/fw-tabs.vue.d.ts +11 -8
- package/types/components/fw-tabs/index.types.d.ts +14 -4
- package/types/components/fw-tag/fw-tag.vue.d.ts +14 -8
- package/types/components/fw-toast/fw-toast.vue.d.ts +17 -22
- package/types/components/fw-transactions-card/fw-transactions-card.vue.d.ts +6 -3
- package/types/directives/lazy-loader.d.ts +11 -2
- package/types/helpers/get-root-colours.d.ts +1 -0
- package/web-components/index.js +16793 -7700
- package/esm/fw-button-YMoW4x4c.js +0 -296
- package/esm/fw-image-D-OHafdw.js +0 -217
- package/esm/fw-loading-bar-DecYSBC_.js +0 -45
- package/esm/fw-popover-B4bsfuxm.js +0 -620
- package/esm/fw-table-row-Cgi8871h.js +0 -389
- package/esm/fw-tag-fDo50Nw7.js +0 -177
- package/esm/index-BsEH8YYr.js +0 -979
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
import { b as _toConsumableArray } from './_rollupPluginBabelHelpers-DODWUb5N.js';
|
|
2
|
-
import { defineComponent, computed, ref, onMounted, useCssVars, pushScopeId, popScopeId, resolveComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, renderSlot, Fragment, renderList, withKeys, toDisplayString, createBlock, createVNode, withCtx } from 'vue';
|
|
3
|
-
import { u as useColours } from './get-root-colours-DCjlYelc.js';
|
|
4
|
-
import './fw-button.js';
|
|
5
|
-
import { o as render$3, p as render$4, q as render$5, s as render$6 } from './index-BsEH8YYr.js';
|
|
6
|
-
import './fw-loading.js';
|
|
7
|
-
import { s as script$2 } from './fw-button-YMoW4x4c.js';
|
|
8
|
-
import { _ as __default__$1 } from './fw-loading-bar-DecYSBC_.js';
|
|
9
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
10
|
-
|
|
11
|
-
var __default__ = defineComponent({
|
|
12
|
-
name: 'FwTable',
|
|
13
|
-
components: {
|
|
14
|
-
FwLoadingBar: __default__$1,
|
|
15
|
-
FwButton: script$2,
|
|
16
|
-
ArrowDownSvg: render$6,
|
|
17
|
-
ArrowSortSvg: render$5,
|
|
18
|
-
ChevronLeftSvg: render$4,
|
|
19
|
-
ChevronRightSvg: render$3
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
items: {
|
|
23
|
-
type: Array,
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
options: {
|
|
27
|
-
type: Object,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
loading: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
"default": false
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* Enable click events on rows.
|
|
36
|
-
* Emits row data when clicked
|
|
37
|
-
*/
|
|
38
|
-
clickableRows: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
"default": false
|
|
41
|
-
},
|
|
42
|
-
autoSortColumn: {
|
|
43
|
-
type: Number
|
|
44
|
-
},
|
|
45
|
-
enablePagination: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
"default": false
|
|
48
|
-
},
|
|
49
|
-
totalAmount: {
|
|
50
|
-
type: Number
|
|
51
|
-
},
|
|
52
|
-
pageSize: {
|
|
53
|
-
type: Number
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
emits: [/** Fired when a row is clicked with row data */
|
|
57
|
-
'rowClicked', /** Fired when a column is sorted */
|
|
58
|
-
'columnSorted', /** Fired when a page number or arrow is clicked */
|
|
59
|
-
'pageChanged'],
|
|
60
|
-
setup: function setup(props, ctx) {
|
|
61
|
-
var columns = computed(function () {
|
|
62
|
-
return Object.keys(props.items[0]);
|
|
63
|
-
});
|
|
64
|
-
var sortBy = ref('');
|
|
65
|
-
var sortDirection = ref('asc');
|
|
66
|
-
var currentSortedColumn = ref('');
|
|
67
|
-
var currentPage = ref(1);
|
|
68
|
-
var maxPageAmount = ref();
|
|
69
|
-
onMounted(function () {
|
|
70
|
-
if (Number(props.autoSortColumn) >= 0) {
|
|
71
|
-
sortColumn(columns.value[Number(props.autoSortColumn)], false);
|
|
72
|
-
}
|
|
73
|
-
if (props.totalAmount && props.pageSize) {
|
|
74
|
-
maxPageAmount.value = Math.ceil(props.totalAmount / props.pageSize);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
var _useColours = useColours(),
|
|
78
|
-
bgHoverColor = _useColours.primaryFade5;
|
|
79
|
-
var sortColumn = function sortColumn(column) {
|
|
80
|
-
var isAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
81
|
-
if (!isColumnSortable(column)) return;
|
|
82
|
-
currentSortedColumn.value = column;
|
|
83
|
-
if (sortBy.value === column) {
|
|
84
|
-
sortDirection.value = sortDirection.value === 'asc' ? 'desc' : 'asc';
|
|
85
|
-
} else {
|
|
86
|
-
sortBy.value = column;
|
|
87
|
-
sortDirection.value = columnInitSort(column);
|
|
88
|
-
}
|
|
89
|
-
if (isAction) ctx.emit('columnSorted', column, sortDirection.value);
|
|
90
|
-
};
|
|
91
|
-
var sortedData = computed(function () {
|
|
92
|
-
var _props$options$sortBy;
|
|
93
|
-
if (!sortBy.value) {
|
|
94
|
-
return props.items;
|
|
95
|
-
}
|
|
96
|
-
var data = _toConsumableArray(props.items);
|
|
97
|
-
var customSort = props.options ? (_props$options$sortBy = props.options[sortBy.value]) === null || _props$options$sortBy === void 0 ? void 0 : _props$options$sortBy.sort : false;
|
|
98
|
-
if (customSort) {
|
|
99
|
-
return customSort(data, sortBy.value, sortDirection.value);
|
|
100
|
-
} else {
|
|
101
|
-
data.sort(function (a, b) {
|
|
102
|
-
var sortVal = typeof a[sortBy.value] === 'string' ? a[sortBy.value].toString().toLowerCase() > b[sortBy.value].toString().toLowerCase() ? 1 : -1 : a[sortBy.value] > b[sortBy.value] ? 1 : -1;
|
|
103
|
-
return sortDirection.value === 'asc' ? sortVal : -sortVal;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return data;
|
|
107
|
-
});
|
|
108
|
-
var formattedText = function formattedText(row, column) {
|
|
109
|
-
var _props$options$column;
|
|
110
|
-
if (props.options && props.options[column] && (_props$options$column = props.options[column]) !== null && _props$options$column !== void 0 && _props$options$column.formatter) {
|
|
111
|
-
var _props$options$column2;
|
|
112
|
-
var colFormatter = (_props$options$column2 = props.options[column]) === null || _props$options$column2 === void 0 ? void 0 : _props$options$column2.formatter;
|
|
113
|
-
if (colFormatter) {
|
|
114
|
-
return colFormatter(row[column]);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return row[column];
|
|
118
|
-
};
|
|
119
|
-
var sortedIcon = function sortedIcon(sortDir, column) {
|
|
120
|
-
if (currentSortedColumn.value === column) {
|
|
121
|
-
if (sortDirection.value === sortDir) {
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return false;
|
|
126
|
-
};
|
|
127
|
-
var isColumnSortable = function isColumnSortable(column) {
|
|
128
|
-
if (props.options && props.options[column]) {
|
|
129
|
-
var _props$options$column3;
|
|
130
|
-
return (_props$options$column3 = props.options[column]) === null || _props$options$column3 === void 0 ? void 0 : _props$options$column3.isSortable;
|
|
131
|
-
}
|
|
132
|
-
return false;
|
|
133
|
-
};
|
|
134
|
-
var columnInitSort = function columnInitSort(column) {
|
|
135
|
-
if (props.options && props.options[column]) {
|
|
136
|
-
var _props$options$column4;
|
|
137
|
-
return ((_props$options$column4 = props.options[column]) === null || _props$options$column4 === void 0 ? void 0 : _props$options$column4.initSortOrder) || 'asc';
|
|
138
|
-
}
|
|
139
|
-
return 'asc';
|
|
140
|
-
};
|
|
141
|
-
var isDisabled = function isDisabled(column) {
|
|
142
|
-
var _props$options$column5;
|
|
143
|
-
if (props.options && (_props$options$column5 = props.options[column]) !== null && _props$options$column5 !== void 0 && _props$options$column5.disabled) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
return false;
|
|
147
|
-
};
|
|
148
|
-
var rowClicked = function rowClicked(row) {
|
|
149
|
-
if (props.clickableRows) ctx.emit('rowClicked', row);
|
|
150
|
-
};
|
|
151
|
-
var pageArrowClick = function pageArrowClick(next) {
|
|
152
|
-
currentPage.value = currentPage.value + (next ? 1 : -1);
|
|
153
|
-
ctx.emit('pageChanged', next);
|
|
154
|
-
window.scrollTo({
|
|
155
|
-
top: 0,
|
|
156
|
-
behavior: 'smooth'
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
return {
|
|
160
|
-
columns: columns,
|
|
161
|
-
sortBy: sortBy,
|
|
162
|
-
sortDirection: sortDirection,
|
|
163
|
-
sortColumn: sortColumn,
|
|
164
|
-
sortedData: sortedData,
|
|
165
|
-
currentSortedColumn: currentSortedColumn,
|
|
166
|
-
sortedIcon: sortedIcon,
|
|
167
|
-
formattedText: formattedText,
|
|
168
|
-
isColumnSortable: isColumnSortable,
|
|
169
|
-
isDisabled: isDisabled,
|
|
170
|
-
rowClicked: rowClicked,
|
|
171
|
-
bgHoverColor: bgHoverColor,
|
|
172
|
-
currentPage: currentPage,
|
|
173
|
-
maxPageAmount: maxPageAmount,
|
|
174
|
-
pageArrowClick: pageArrowClick
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
179
|
-
useCssVars(function (_ctx) {
|
|
180
|
-
return {
|
|
181
|
-
"00d6962e": _ctx.bgHoverColor
|
|
182
|
-
};
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
var __setup__ = __default__.setup;
|
|
186
|
-
__default__.setup = __setup__ ? function (props, ctx) {
|
|
187
|
-
__injectCSSVars__();
|
|
188
|
-
return __setup__(props, ctx);
|
|
189
|
-
} : __injectCSSVars__;
|
|
190
|
-
|
|
191
|
-
var _withScopeId = function _withScopeId(n) {
|
|
192
|
-
return pushScopeId("data-v-d847bfa2"), n = n(), popScopeId(), n;
|
|
193
|
-
};
|
|
194
|
-
var _hoisted_1$2 = {
|
|
195
|
-
"class": "flex flex-col"
|
|
196
|
-
};
|
|
197
|
-
var _hoisted_2$1 = ["aria-busy"];
|
|
198
|
-
var _hoisted_3$1 = {
|
|
199
|
-
"class": "text-base border-b border-grey-60"
|
|
200
|
-
};
|
|
201
|
-
var _hoisted_4 = ["tabindex", "onKeydown", "onClick"];
|
|
202
|
-
var _hoisted_5 = {
|
|
203
|
-
"class": "flex flex-row items-center"
|
|
204
|
-
};
|
|
205
|
-
var _hoisted_6 = {
|
|
206
|
-
key: 0,
|
|
207
|
-
"class": "ml-1 flex items-center justify-center w-5"
|
|
208
|
-
};
|
|
209
|
-
var _hoisted_7 = {
|
|
210
|
-
"class": "text-base bg-white font-normal"
|
|
211
|
-
};
|
|
212
|
-
var _hoisted_8 = {
|
|
213
|
-
key: 0,
|
|
214
|
-
"class": "py-4 pl-5 pr-3 text-left"
|
|
215
|
-
};
|
|
216
|
-
var _hoisted_9 = {
|
|
217
|
-
key: 0,
|
|
218
|
-
"class": "py-4 pl-5 pr-3 text-left"
|
|
219
|
-
};
|
|
220
|
-
var _hoisted_10 = ["tabindex", "onClick", "onKeydown"];
|
|
221
|
-
var _hoisted_11 = ["innerHTML"];
|
|
222
|
-
var _hoisted_12 = {
|
|
223
|
-
key: 0,
|
|
224
|
-
"class": "flex flex-row justify-center h-[44px] mt-8 space-x-2 mb-[40px]"
|
|
225
|
-
};
|
|
226
|
-
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
227
|
-
var _component_ArrowSortSvg = resolveComponent("ArrowSortSvg");
|
|
228
|
-
var _component_ArrowDownSvg = resolveComponent("ArrowDownSvg");
|
|
229
|
-
var _component_FwLoadingBar = resolveComponent("FwLoadingBar");
|
|
230
|
-
var _component_ChevronLeftSvg = resolveComponent("ChevronLeftSvg");
|
|
231
|
-
var _component_FwButton = resolveComponent("FwButton");
|
|
232
|
-
var _component_ChevronRightSvg = resolveComponent("ChevronRightSvg");
|
|
233
|
-
return openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("table", {
|
|
234
|
-
"class": normalizeClass(["fw-table table-auto flex-1", _ctx.loading ? 'cursor-wait' : '']),
|
|
235
|
-
"aria-live": "polite",
|
|
236
|
-
"aria-busy": _ctx.loading
|
|
237
|
-
}, [createElementVNode("thead", _hoisted_3$1, [createElementVNode("tr", null, [_ctx.$slots.preHead ? renderSlot(_ctx.$slots, "preHead", {
|
|
238
|
-
key: 0
|
|
239
|
-
}) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, thKey) {
|
|
240
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
241
|
-
key: thKey
|
|
242
|
-
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("th", {
|
|
243
|
-
key: 0,
|
|
244
|
-
"class": normalizeClass(["fw-table-head py-6 pl-5 pr-3 text-left font-medium text-brand-text1", _ctx.isColumnSortable(column) ? 'cursor-pointer fw-table-head--sortable' : '']),
|
|
245
|
-
tabindex: _ctx.isColumnSortable(column) ? 0 : -1,
|
|
246
|
-
onKeydown: withKeys(function ($event) {
|
|
247
|
-
return _ctx.sortColumn(column);
|
|
248
|
-
}, ["enter", "space"]),
|
|
249
|
-
onClick: function onClick($event) {
|
|
250
|
-
return _ctx.sortColumn(column);
|
|
251
|
-
}
|
|
252
|
-
}, [createElementVNode("div", _hoisted_5, [createElementVNode("span", {
|
|
253
|
-
"class": normalizeClass(_ctx.sortedIcon('asc', column) || _ctx.sortedIcon('desc', column) ? 'text-primary' : '')
|
|
254
|
-
}, toDisplayString(column), 3), _ctx.isColumnSortable(column) ? (openBlock(), createElementBlock("span", _hoisted_6, [!_ctx.sortedIcon('asc', column) && !_ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowSortSvg, {
|
|
255
|
-
key: 0,
|
|
256
|
-
name: "arrow-sort",
|
|
257
|
-
"class": "inline-block w-full text-brand-text2"
|
|
258
|
-
})) : createCommentVNode("", true), _ctx.sortedIcon('asc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
259
|
-
key: 1,
|
|
260
|
-
name: "arrow-down",
|
|
261
|
-
"class": "inline-block w-4 text-primary rotate-180"
|
|
262
|
-
})) : createCommentVNode("", true), _ctx.sortedIcon('desc', column) ? (openBlock(), createBlock(_component_ArrowDownSvg, {
|
|
263
|
-
key: 2,
|
|
264
|
-
name: "arrow-down",
|
|
265
|
-
"class": "inline-block w-4 text-primary"
|
|
266
|
-
})) : createCommentVNode("", true)])) : createCommentVNode("", true)])], 42, _hoisted_4)) : createCommentVNode("", true)], 64);
|
|
267
|
-
}), 128)), _ctx.$slots.head ? renderSlot(_ctx.$slots, "head", {
|
|
268
|
-
key: 1
|
|
269
|
-
}) : createCommentVNode("", true)])]), createElementVNode("tbody", _hoisted_7, [_ctx.loading ? (openBlock(true), createElementBlock(Fragment, {
|
|
270
|
-
key: 0
|
|
271
|
-
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
272
|
-
return openBlock(), createElementBlock("tr", {
|
|
273
|
-
key: trKey
|
|
274
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
275
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
276
|
-
key: colKey
|
|
277
|
-
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", _hoisted_8, [createVNode(_component_FwLoadingBar, {
|
|
278
|
-
"class": "w-full h-7"
|
|
279
|
-
})])) : createCommentVNode("", true)], 64);
|
|
280
|
-
}), 128)), _ctx.$slots.row ? (openBlock(), createElementBlock("td", _hoisted_9, [createVNode(_component_FwLoadingBar, {
|
|
281
|
-
"class": "w-full h-7"
|
|
282
|
-
})])) : createCommentVNode("", true)]);
|
|
283
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, {
|
|
284
|
-
key: 1
|
|
285
|
-
}, renderList(_ctx.sortedData, function (row, trKey) {
|
|
286
|
-
return openBlock(), createElementBlock("tr", {
|
|
287
|
-
key: trKey,
|
|
288
|
-
"class": normalizeClass(["fw-table-row border-b last:border-b-0 border-grey-60", _ctx.clickableRows ? 'cursor-pointer' : '']),
|
|
289
|
-
tabindex: _ctx.clickableRows ? 0 : -1,
|
|
290
|
-
onClick: function onClick($event) {
|
|
291
|
-
return _ctx.rowClicked(row);
|
|
292
|
-
},
|
|
293
|
-
onKeydown: withKeys(function ($event) {
|
|
294
|
-
return _ctx.rowClicked(row);
|
|
295
|
-
}, ["enter", "space"])
|
|
296
|
-
}, [_ctx.$slots.preRow ? renderSlot(_ctx.$slots, "preRow", {
|
|
297
|
-
key: 0,
|
|
298
|
-
row: row
|
|
299
|
-
}) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, function (column, colKey) {
|
|
300
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
301
|
-
key: colKey
|
|
302
|
-
}, [!_ctx.isDisabled(column) ? (openBlock(), createElementBlock("td", {
|
|
303
|
-
key: 0,
|
|
304
|
-
"class": "py-5 pl-5 pr-3 text-left",
|
|
305
|
-
innerHTML: _ctx.formattedText(row, column)
|
|
306
|
-
}, null, 8, _hoisted_11)) : createCommentVNode("", true)], 64);
|
|
307
|
-
}), 128)), _ctx.$slots.row ? renderSlot(_ctx.$slots, "row", {
|
|
308
|
-
key: 1,
|
|
309
|
-
row: row
|
|
310
|
-
}) : createCommentVNode("", true)], 42, _hoisted_10);
|
|
311
|
-
}), 128))])], 10, _hoisted_2$1), _ctx.enablePagination ? (openBlock(), createElementBlock("div", _hoisted_12, [createVNode(_component_FwButton, {
|
|
312
|
-
variant: 'tertiary',
|
|
313
|
-
disabled: _ctx.currentPage === 1,
|
|
314
|
-
size: "sm",
|
|
315
|
-
"class": "border-grey-40",
|
|
316
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
317
|
-
return _ctx.pageArrowClick(false);
|
|
318
|
-
})
|
|
319
|
-
}, {
|
|
320
|
-
"default": withCtx(function () {
|
|
321
|
-
return [createVNode(_component_ChevronLeftSvg, {
|
|
322
|
-
name: "chevron-left",
|
|
323
|
-
"class": "h-4 w-4",
|
|
324
|
-
"stroke-width": "3"
|
|
325
|
-
})];
|
|
326
|
-
}),
|
|
327
|
-
_: 1
|
|
328
|
-
}, 8, ["disabled"]), renderSlot(_ctx.$slots, "page"), createVNode(_component_FwButton, {
|
|
329
|
-
variant: 'tertiary',
|
|
330
|
-
disabled: _ctx.currentPage === _ctx.maxPageAmount,
|
|
331
|
-
size: "sm",
|
|
332
|
-
"class": "border-grey-40",
|
|
333
|
-
onClick: _cache[1] || (_cache[1] = function ($event) {
|
|
334
|
-
return _ctx.pageArrowClick(true);
|
|
335
|
-
})
|
|
336
|
-
}, {
|
|
337
|
-
"default": withCtx(function () {
|
|
338
|
-
return [createVNode(_component_ChevronRightSvg, {
|
|
339
|
-
name: "chevron-right",
|
|
340
|
-
"class": "h-4 w-4"
|
|
341
|
-
})];
|
|
342
|
-
}),
|
|
343
|
-
_: 1
|
|
344
|
-
}, 8, ["disabled"])])) : createCommentVNode("", true)]);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
var css_248z = ".fw-table-head--sortable[data-v-d847bfa2]:hover{background-color:var(--00d6962e)}.fw-table-row[data-v-d847bfa2]:hover{background-color:var(--00d6962e)}";
|
|
348
|
-
var stylesheet = ".fw-table-head--sortable[data-v-d847bfa2]:hover{background-color:var(--00d6962e)}.fw-table-row[data-v-d847bfa2]:hover{background-color:var(--00d6962e)}";
|
|
349
|
-
styleInject(css_248z);
|
|
350
|
-
|
|
351
|
-
__default__.render = render$2;
|
|
352
|
-
__default__.__scopeId = "data-v-d847bfa2";
|
|
353
|
-
|
|
354
|
-
var script$1 = defineComponent({
|
|
355
|
-
name: 'FwTableHead'
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
var _hoisted_1$1 = {
|
|
359
|
-
"class": "py-6 px-5 text-left font-medium"
|
|
360
|
-
};
|
|
361
|
-
var _hoisted_2 = {
|
|
362
|
-
"class": "flex flex-row"
|
|
363
|
-
};
|
|
364
|
-
var _hoisted_3 = {
|
|
365
|
-
key: 0,
|
|
366
|
-
"class": "w-full"
|
|
367
|
-
};
|
|
368
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
369
|
-
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)])]);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
script$1.render = render$1;
|
|
373
|
-
|
|
374
|
-
var script = defineComponent({
|
|
375
|
-
name: 'FwTableRow'
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
var _hoisted_1 = {
|
|
379
|
-
"class": "py-3 px-4 text-left whitespace-nowrap"
|
|
380
|
-
};
|
|
381
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
382
|
-
return openBlock(), createElementBlock("td", _hoisted_1, [_ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
|
|
383
|
-
key: 0
|
|
384
|
-
}) : createCommentVNode("", true)]);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
script.render = render;
|
|
388
|
-
|
|
389
|
-
export { __default__ as _, script as a, script$1 as s };
|
package/esm/fw-tag-fDo50Nw7.js
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, useCssVars, resolveComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createCommentVNode, createBlock, Fragment, createTextVNode, toDisplayString, withCtx, createVNode } from 'vue';
|
|
2
|
-
import './fw-button.js';
|
|
3
|
-
import { d as render$1 } from './index-BsEH8YYr.js';
|
|
4
|
-
import { u as useColours } from './get-root-colours-DCjlYelc.js';
|
|
5
|
-
import { s as script } from './fw-button-YMoW4x4c.js';
|
|
6
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
7
|
-
|
|
8
|
-
var __default__ = defineComponent({
|
|
9
|
-
name: 'FwTag',
|
|
10
|
-
components: {
|
|
11
|
-
FwButton: script,
|
|
12
|
-
XMarkSvg: render$1
|
|
13
|
-
},
|
|
14
|
-
props: {
|
|
15
|
-
/**
|
|
16
|
-
* The label text of the tag.
|
|
17
|
-
* Overrides the default slot content.
|
|
18
|
-
*/
|
|
19
|
-
label: {
|
|
20
|
-
type: String
|
|
21
|
-
},
|
|
22
|
-
/**
|
|
23
|
-
* The size of the tag. Accepts: 'xs', 'sm' & 'md'
|
|
24
|
-
*/
|
|
25
|
-
size: {
|
|
26
|
-
type: String,
|
|
27
|
-
"default": 'xs',
|
|
28
|
-
validator: function validator(value) {
|
|
29
|
-
return ['xs', 'sm', 'md'].includes(value);
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
/**
|
|
33
|
-
* The colour variant of the tag. Accepts 'primary', 'secondary', 'alert', 'error', 'success'
|
|
34
|
-
*/
|
|
35
|
-
variant: {
|
|
36
|
-
type: String,
|
|
37
|
-
"default": 'primary',
|
|
38
|
-
validator: function validator(value) {
|
|
39
|
-
return ['primary', 'secondary', 'tertiary', 'quaternary', 'alert', 'error', 'success'].includes(value);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* Whether the tag can be dismissed or closed.
|
|
44
|
-
*/
|
|
45
|
-
dismissable: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
"default": false
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
emits: [/** Fires when the tag is dismissed. */
|
|
51
|
-
'dismissed'],
|
|
52
|
-
setup: function setup(props) {
|
|
53
|
-
var baseClass = ref("\n inline-flex items-center justify-center text-center whitespace-nowrap rounded-full\n ");
|
|
54
|
-
var _useColours = useColours(),
|
|
55
|
-
primaryFade5 = _useColours.primaryFade5;
|
|
56
|
-
var tagClasses = ref({
|
|
57
|
-
primary: {
|
|
58
|
-
text: 'text-button-primary-text',
|
|
59
|
-
background: 'bg-button-primary-bg',
|
|
60
|
-
iconButtonType: 'primary'
|
|
61
|
-
},
|
|
62
|
-
secondary: {
|
|
63
|
-
text: 'text-primary',
|
|
64
|
-
background: 'fw-tag--secondary-bg',
|
|
65
|
-
iconButtonType: 'tertiary'
|
|
66
|
-
},
|
|
67
|
-
tertiary: {
|
|
68
|
-
text: 'text-body',
|
|
69
|
-
background: 'bg-brand-bg4',
|
|
70
|
-
iconButtonType: 'tertiary'
|
|
71
|
-
},
|
|
72
|
-
quaternary: {
|
|
73
|
-
text: 'text-body',
|
|
74
|
-
background: 'bg-brand-bg3',
|
|
75
|
-
iconButtonType: 'tertiary'
|
|
76
|
-
},
|
|
77
|
-
alert: {
|
|
78
|
-
text: 'text-white',
|
|
79
|
-
background: 'bg-brand-warning-bg',
|
|
80
|
-
iconButtonType: 'error'
|
|
81
|
-
},
|
|
82
|
-
success: {
|
|
83
|
-
text: 'text-secondary',
|
|
84
|
-
background: 'bg-brand-success-new',
|
|
85
|
-
iconButtonType: 'success'
|
|
86
|
-
},
|
|
87
|
-
error: {
|
|
88
|
-
text: 'text-white',
|
|
89
|
-
background: 'bg-brand-error-text',
|
|
90
|
-
iconButtonType: 'error'
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
var sizes = ref({
|
|
94
|
-
xs: 'px-2 py-px text-xs',
|
|
95
|
-
sm: 'px-4 py-1 text-xs',
|
|
96
|
-
md: 'px-4 py-3 h-6 text-sm'
|
|
97
|
-
});
|
|
98
|
-
var iconSizes = ref({
|
|
99
|
-
xs: 'w-4 h-4',
|
|
100
|
-
sm: 'w-5 h-5',
|
|
101
|
-
md: 'w-6 h-6'
|
|
102
|
-
});
|
|
103
|
-
var textColorClass = computed(function () {
|
|
104
|
-
return tagClasses.value[props.variant].text;
|
|
105
|
-
});
|
|
106
|
-
var bgColorClass = computed(function () {
|
|
107
|
-
return tagClasses.value[props.variant].background;
|
|
108
|
-
});
|
|
109
|
-
var iconButtonType = computed(function () {
|
|
110
|
-
return tagClasses.value[props.variant].iconButtonType;
|
|
111
|
-
});
|
|
112
|
-
var sizeClass = computed(function () {
|
|
113
|
-
return sizes.value[props.size];
|
|
114
|
-
});
|
|
115
|
-
var iconSizeClass = computed(function () {
|
|
116
|
-
return iconSizes.value[props.size];
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
baseClass: baseClass,
|
|
120
|
-
textColorClass: textColorClass,
|
|
121
|
-
bgColorClass: bgColorClass,
|
|
122
|
-
sizeClass: sizeClass,
|
|
123
|
-
iconSizeClass: iconSizeClass,
|
|
124
|
-
iconButtonType: iconButtonType,
|
|
125
|
-
primaryFade5: primaryFade5
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
130
|
-
useCssVars(function (_ctx) {
|
|
131
|
-
return {
|
|
132
|
-
"819938ae": _ctx.primaryFade5
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
var __setup__ = __default__.setup;
|
|
137
|
-
__default__.setup = __setup__ ? function (props, ctx) {
|
|
138
|
-
__injectCSSVars__();
|
|
139
|
-
return __setup__(props, ctx);
|
|
140
|
-
} : __injectCSSVars__;
|
|
141
|
-
|
|
142
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
|
-
var _component_XMarkSvg = resolveComponent("XMarkSvg");
|
|
144
|
-
var _component_FwButton = resolveComponent("FwButton");
|
|
145
|
-
return openBlock(), createElementBlock("span", {
|
|
146
|
-
"class": normalizeClass(["fw-tag", [_ctx.baseClass, _ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.dismissable ? 'shadow font-semibold' : 'font-normal']])
|
|
147
|
-
}, [_ctx.label ? (openBlock(), createElementBlock(Fragment, {
|
|
148
|
-
key: 0
|
|
149
|
-
}, [createTextVNode(toDisplayString(_ctx.label), 1)], 64)) : _ctx.$slots["default"] ? renderSlot(_ctx.$slots, "default", {
|
|
150
|
-
key: 1
|
|
151
|
-
}) : createCommentVNode("", true), _ctx.dismissable ? (openBlock(), createBlock(_component_FwButton, {
|
|
152
|
-
key: 2,
|
|
153
|
-
variant: _ctx.iconButtonType,
|
|
154
|
-
"class": normalizeClass([_ctx.iconSizeClass, "ml-1 !p-0 flex items-center justify-center border-none rounded-full"]),
|
|
155
|
-
tabindex: "",
|
|
156
|
-
title: "Dismiss filter",
|
|
157
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
158
|
-
return _ctx.$emit('dismissed');
|
|
159
|
-
})
|
|
160
|
-
}, {
|
|
161
|
-
"default": withCtx(function () {
|
|
162
|
-
return [createVNode(_component_XMarkSvg, {
|
|
163
|
-
name: "xmark",
|
|
164
|
-
"class": "w-3 h-3 font-semibold m-0"
|
|
165
|
-
})];
|
|
166
|
-
}),
|
|
167
|
-
_: 1
|
|
168
|
-
}, 8, ["variant", "class"])) : createCommentVNode("", true)], 2);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
var css_248z = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;-moz-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-tag--secondary-bg{background:var(--819938ae)}";
|
|
172
|
-
var stylesheet = ".fw-tag{line-height:normal;-webkit-transition:all .25s ease-in-out;-moz-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.fw-tag--secondary-bg{background:var(--819938ae)}";
|
|
173
|
-
styleInject(css_248z);
|
|
174
|
-
|
|
175
|
-
__default__.render = render;
|
|
176
|
-
|
|
177
|
-
export { __default__ as _ };
|