@frollo/frollo-web-ui 9.0.9 → 9.0.10
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 +2172 -2079
- package/esm/{fw-input-Bo2gQcvM.js → fw-input-DTYzNw81.js} +107 -20
- package/esm/fw-input.js +5 -1
- package/esm/fw-provider-list.js +2 -2
- package/esm/fw-tag.js +205 -6
- package/esm/index.js +2 -3
- package/frollo-web-ui.esm.js +2220 -2127
- package/index.d.ts +50 -2
- package/package.json +1 -1
- package/types/components/fw-input/fw-input.vue.d.ts +31 -2
- package/types/components/fw-input/index.types.d.ts +4 -0
- package/types/components/fw-tag/fw-tag.vue.d.ts +15 -0
- package/web-components/index.js +2266 -2173
- package/esm/fw-tag-B0fVslEZ.js +0 -199
package/esm/fw-tag-B0fVslEZ.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, useCssVars, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot, createVNode, createCommentVNode, vShow } from 'vue';
|
|
2
|
-
import './fw-button.js';
|
|
3
|
-
import { d as render$1 } from './index-v1DX6R2G.js';
|
|
4
|
-
import { u as useColours } from './get-root-colours-DCCAnRF4.js';
|
|
5
|
-
import { s as script } from './fw-button-ChYejNWD.js';
|
|
6
|
-
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
7
|
-
|
|
8
|
-
var TAG_CLASSES = {
|
|
9
|
-
primary: {
|
|
10
|
-
text: 'text-button-primary-text',
|
|
11
|
-
background: 'bg-button-primary-bg',
|
|
12
|
-
iconButtonType: 'primary'
|
|
13
|
-
},
|
|
14
|
-
secondary: {
|
|
15
|
-
text: 'text-primary',
|
|
16
|
-
background: 'fw-tag--secondary-bg',
|
|
17
|
-
iconButtonType: 'tertiary'
|
|
18
|
-
},
|
|
19
|
-
tertiary: {
|
|
20
|
-
text: 'text-body',
|
|
21
|
-
background: 'bg-brand-bg4',
|
|
22
|
-
iconButtonType: 'tertiary'
|
|
23
|
-
},
|
|
24
|
-
quaternary: {
|
|
25
|
-
text: 'text-body',
|
|
26
|
-
background: 'bg-brand-bg3',
|
|
27
|
-
iconButtonType: 'tertiary'
|
|
28
|
-
},
|
|
29
|
-
alert: {
|
|
30
|
-
text: 'text-white',
|
|
31
|
-
background: 'bg-brand-warning-bg',
|
|
32
|
-
iconButtonType: 'error'
|
|
33
|
-
},
|
|
34
|
-
success: {
|
|
35
|
-
text: 'text-secondary',
|
|
36
|
-
background: 'bg-brand-success-new',
|
|
37
|
-
iconButtonType: 'success'
|
|
38
|
-
},
|
|
39
|
-
error: {
|
|
40
|
-
text: 'text-white',
|
|
41
|
-
background: 'bg-brand-error-text',
|
|
42
|
-
iconButtonType: 'error'
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var SIZES = {
|
|
46
|
-
xs: 'px-2 py-px text-xs',
|
|
47
|
-
sm: 'px-4 py-1 text-sm',
|
|
48
|
-
md: 'px-4 py-3 h-6 text-md'
|
|
49
|
-
};
|
|
50
|
-
var ICON_SIZES = {
|
|
51
|
-
xs: 'w-4 h-4',
|
|
52
|
-
sm: 'w-5 h-5',
|
|
53
|
-
md: 'w-5 h-5'
|
|
54
|
-
};
|
|
55
|
-
var baseClass = 'inline-flex items-center justify-center text-center whitespace-nowrap rounded-full';
|
|
56
|
-
var __default__ = defineComponent({
|
|
57
|
-
name: 'FwTag',
|
|
58
|
-
components: {
|
|
59
|
-
FwButton: script,
|
|
60
|
-
XMarkSvg: render$1
|
|
61
|
-
},
|
|
62
|
-
props: {
|
|
63
|
-
/**
|
|
64
|
-
* The label text of the tag.
|
|
65
|
-
* Overrides the default slot content.
|
|
66
|
-
*/
|
|
67
|
-
label: {
|
|
68
|
-
type: String
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* The size of the tag. Accepts: 'xs', 'sm' & 'md'
|
|
72
|
-
*/
|
|
73
|
-
size: {
|
|
74
|
-
type: String,
|
|
75
|
-
"default": 'xs',
|
|
76
|
-
validator: function validator(value) {
|
|
77
|
-
return ['xs', 'sm', 'md'].includes(value);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* The colour variant of the tag. Accepts 'primary', 'secondary', 'alert', 'error', 'success'
|
|
82
|
-
*/
|
|
83
|
-
variant: {
|
|
84
|
-
type: String,
|
|
85
|
-
"default": 'primary',
|
|
86
|
-
validator: function validator(value) {
|
|
87
|
-
return ['primary', 'secondary', 'tertiary', 'quaternary', 'alert', 'error', 'success'].includes(value);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Whether the tag can be dismissed or closed.
|
|
92
|
-
*/
|
|
93
|
-
dismissable: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
"default": false
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
emits: [/** Fires when the tag is dismissed. */
|
|
99
|
-
'dismissed'],
|
|
100
|
-
setup: function setup(props, ctx) {
|
|
101
|
-
var visible = ref(true);
|
|
102
|
-
var variantDef = computed(function () {
|
|
103
|
-
return TAG_CLASSES[props.variant];
|
|
104
|
-
});
|
|
105
|
-
var _useColours = useColours(),
|
|
106
|
-
primaryFade5 = _useColours.primaryFade5;
|
|
107
|
-
var textColorClass = computed(function () {
|
|
108
|
-
return variantDef.value.text;
|
|
109
|
-
});
|
|
110
|
-
var bgColorClass = computed(function () {
|
|
111
|
-
return variantDef.value.background;
|
|
112
|
-
});
|
|
113
|
-
var iconButtonType = computed(function () {
|
|
114
|
-
return variantDef.value.iconButtonType;
|
|
115
|
-
});
|
|
116
|
-
var sizeClass = computed(function () {
|
|
117
|
-
return SIZES[props.size];
|
|
118
|
-
});
|
|
119
|
-
var iconSizeClass = computed(function () {
|
|
120
|
-
return ICON_SIZES[props.size];
|
|
121
|
-
});
|
|
122
|
-
var rootClasses = computed(function () {
|
|
123
|
-
return [baseClass, textColorClass.value, bgColorClass.value, sizeClass.value, props.dismissable ? 'shadow font-semibold' : 'font-normal'];
|
|
124
|
-
});
|
|
125
|
-
var onDismiss = function onDismiss() {
|
|
126
|
-
visible.value = false;
|
|
127
|
-
ctx.emit('dismissed');
|
|
128
|
-
};
|
|
129
|
-
return {
|
|
130
|
-
visible: visible,
|
|
131
|
-
baseClass: baseClass,
|
|
132
|
-
textColorClass: textColorClass,
|
|
133
|
-
bgColorClass: bgColorClass,
|
|
134
|
-
sizeClass: sizeClass,
|
|
135
|
-
iconSizeClass: iconSizeClass,
|
|
136
|
-
iconButtonType: iconButtonType,
|
|
137
|
-
primaryFade5: primaryFade5,
|
|
138
|
-
onDismiss: onDismiss,
|
|
139
|
-
rootClasses: rootClasses
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
144
|
-
useCssVars(function (_ctx) {
|
|
145
|
-
return {
|
|
146
|
-
"v1b4b8120": _ctx.primaryFade5
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
var __setup__ = __default__.setup;
|
|
151
|
-
__default__.setup = __setup__ ? function (props, ctx) {
|
|
152
|
-
__injectCSSVars__();
|
|
153
|
-
return __setup__(props, ctx);
|
|
154
|
-
} : __injectCSSVars__;
|
|
155
|
-
|
|
156
|
-
var _hoisted_1 = {
|
|
157
|
-
key: 0
|
|
158
|
-
};
|
|
159
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
160
|
-
var _component_XMarkSvg = resolveComponent("XMarkSvg");
|
|
161
|
-
var _component_FwButton = resolveComponent("FwButton");
|
|
162
|
-
return openBlock(), createBlock(Transition, {
|
|
163
|
-
name: "fw-tag-fade-scale",
|
|
164
|
-
appear: ""
|
|
165
|
-
}, {
|
|
166
|
-
"default": withCtx(function () {
|
|
167
|
-
return [withDirectives(createElementVNode("span", {
|
|
168
|
-
"class": normalizeClass(["fw-tag", _ctx.rootClasses]),
|
|
169
|
-
role: "status"
|
|
170
|
-
}, [_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.label), 1)) : renderSlot(_ctx.$slots, "default", {
|
|
171
|
-
key: 1
|
|
172
|
-
}), _ctx.dismissable ? (openBlock(), createBlock(_component_FwButton, {
|
|
173
|
-
key: 2,
|
|
174
|
-
variant: _ctx.iconButtonType,
|
|
175
|
-
"class": normalizeClass([_ctx.iconSizeClass, "ml-1 !p-0 flex items-center justify-center border-none rounded-full"]),
|
|
176
|
-
tabindex: "0",
|
|
177
|
-
title: "Dismiss filter",
|
|
178
|
-
"aria-label": "Dismiss",
|
|
179
|
-
onClick: _ctx.onDismiss
|
|
180
|
-
}, {
|
|
181
|
-
"default": withCtx(function () {
|
|
182
|
-
return [createVNode(_component_XMarkSvg, {
|
|
183
|
-
"class": "w-3 h-3 font-semibold m-0"
|
|
184
|
-
})];
|
|
185
|
-
}),
|
|
186
|
-
_: 1
|
|
187
|
-
}, 8, ["variant", "class", "onClick"])) : createCommentVNode("", true)], 2), [[vShow, _ctx.visible]])];
|
|
188
|
-
}),
|
|
189
|
-
_: 3
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
var css_248z = ".fw-tag{line-height:normal;-webkit-transition:opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease;transition:opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease;-moz-transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease,-moz-transform .18s ease;transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease;transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease,-moz-transform .18s ease;will-change:transform,opacity}.fw-tag--secondary-bg{background:var(--v1b4b8120)}.fw-tag-fade-scale-enter-active,.fw-tag-fade-scale-leave-active{-webkit-transition:opacity .18s ease,-webkit-transform .18s ease;transition:opacity .18s ease,-webkit-transform .18s ease;-moz-transition:transform .18s ease,opacity .18s ease,-moz-transform .18s ease;transition:transform .18s ease,opacity .18s ease;transition:transform .18s ease,opacity .18s ease,-webkit-transform .18s ease,-moz-transform .18s ease}.fw-tag-fade-scale-enter-from,.fw-tag-fade-scale-leave-to{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}";
|
|
194
|
-
var stylesheet = ".fw-tag{line-height:normal;-webkit-transition:opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease;transition:opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease;-moz-transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease,-moz-transform .18s ease;transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease;transition:transform .18s ease,opacity .18s ease,xw background-color .18s ease,color .18s ease,-webkit-transform .18s ease,-moz-transform .18s ease;will-change:transform,opacity}.fw-tag--secondary-bg{background:var(--v1b4b8120)}.fw-tag-fade-scale-enter-active,.fw-tag-fade-scale-leave-active{-webkit-transition:opacity .18s ease,-webkit-transform .18s ease;transition:opacity .18s ease,-webkit-transform .18s ease;-moz-transition:transform .18s ease,opacity .18s ease,-moz-transform .18s ease;transition:transform .18s ease,opacity .18s ease;transition:transform .18s ease,opacity .18s ease,-webkit-transform .18s ease,-moz-transform .18s ease}.fw-tag-fade-scale-enter-from,.fw-tag-fade-scale-leave-to{opacity:0;-webkit-transform:scale(.96);-moz-transform:scale(.96);-ms-transform:scale(.96);transform:scale(.96)}";
|
|
195
|
-
styleInject(css_248z);
|
|
196
|
-
|
|
197
|
-
__default__.render = render;
|
|
198
|
-
|
|
199
|
-
export { __default__ as _ };
|