@frollo/frollo-web-ui 0.0.7 → 0.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 +3445 -140
- package/esm/fw-button-02fc3f47.js +181 -0
- package/esm/fw-button.js +2 -1
- package/esm/fw-card.js +3 -2
- package/esm/fw-form.js +2 -0
- package/esm/fw-input.js +194 -0
- package/esm/fw-navigation-menu.js +2 -1
- package/esm/index.js +11 -3
- package/esm/{fw-button-6d5a9671.js → style-inject.es-da8f7768.js} +1 -179
- package/esm/vee-validate.esm-028c6424.js +3139 -0
- package/frollo-web-ui.esm.js +3475 -146
- package/icons/alert.svg +3 -0
- package/icons/email-filled.svg +4 -0
- package/icons/generate.svg +1 -1
- package/icons/index.ts +5 -1
- package/icons/manage.svg +1 -1
- package/icons/not-found.svg +1 -1
- package/icons/view.svg +1 -1
- package/index.d.ts +108 -4
- package/package.json +4 -2
- package/tailwind.config.js +4 -13
- package/types/components/fw-form/index.d.ts +2 -0
- package/types/components/fw-input/fw-input.vue.d.ts +104 -0
- package/types/components/fw-input/index.d.ts +2 -0
- package/types/components/index.d.ts +2 -0
- package/types/icons/index.d.ts +3 -1
- package/types/index-types.esm.d.ts +1 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { u as styleInject } from './style-inject.es-da8f7768.js';
|
|
2
|
+
import { defineComponent, ref, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
3
|
+
|
|
4
|
+
var script = defineComponent({
|
|
5
|
+
name: 'FwButton',
|
|
6
|
+
emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
|
|
7
|
+
props: {
|
|
8
|
+
/**
|
|
9
|
+
* A `router-link` path or object
|
|
10
|
+
*/
|
|
11
|
+
to: {
|
|
12
|
+
type: [String, Object]
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A URL to link to using a native anchor element
|
|
17
|
+
*/
|
|
18
|
+
href: String,
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The size of the button. Accepts: 'sm', 'md', 'lg', 'xl', '2xl'
|
|
22
|
+
*/
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
"default": 'lg',
|
|
26
|
+
validator: function validator(value) {
|
|
27
|
+
return ['sm', 'md', 'lg', 'xl', '2xl'].includes(value);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The colour variant of the button.
|
|
33
|
+
* Accepts 'primary', 'secondary', 'tertiary', 'error', 'success'
|
|
34
|
+
*/
|
|
35
|
+
variant: {
|
|
36
|
+
type: String,
|
|
37
|
+
"default": 'primary',
|
|
38
|
+
validator: function validator(value) {
|
|
39
|
+
return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
setup: function setup(props, ctx) {
|
|
44
|
+
var buttonClasses = ref({
|
|
45
|
+
primary: {
|
|
46
|
+
text: 'text-tertiary hover:text-primary active:text-primary',
|
|
47
|
+
background: 'bg-primary hover:bg-tertiary active:bg-tertiary',
|
|
48
|
+
border: 'border-primary focus:ring-primary'
|
|
49
|
+
},
|
|
50
|
+
secondary: {
|
|
51
|
+
text: 'text-primary hover:text-tertiary active:text-tertiary',
|
|
52
|
+
background: 'bg-tertiary hover:bg-primary active:bg-primary',
|
|
53
|
+
border: 'border-primary focus:ring-primary'
|
|
54
|
+
},
|
|
55
|
+
tertiary: {
|
|
56
|
+
text: 'text-tertiary hover:text-secondary active:text-secondary',
|
|
57
|
+
background: 'bg-secondary hover:bg-tertiary active:bg-tertiary',
|
|
58
|
+
border: 'border-tertiary focus:ring-tertiary'
|
|
59
|
+
},
|
|
60
|
+
success: {
|
|
61
|
+
text: 'text-white hover:text-success active:text-success',
|
|
62
|
+
background: 'bg-success hover:bg-white active:bg-white',
|
|
63
|
+
border: 'border-success focus:ring-success'
|
|
64
|
+
},
|
|
65
|
+
error: {
|
|
66
|
+
text: 'text-white hover:text-error active:text-error',
|
|
67
|
+
background: 'bg-error hover:bg-white active:bg-white',
|
|
68
|
+
border: 'border-error focus:ring-error'
|
|
69
|
+
},
|
|
70
|
+
text: {
|
|
71
|
+
text: 'text-body font-medium hover:text-white active:text-white',
|
|
72
|
+
background: 'bg-white hover:bg-body active:bg-body',
|
|
73
|
+
border: 'border-transparent focus:ring-body'
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var sizes = ref({
|
|
77
|
+
sm: 'px-2 py-0.5 text-sm',
|
|
78
|
+
md: 'px-6 py-1 text-md',
|
|
79
|
+
lg: 'px-10 py-2 text-lg',
|
|
80
|
+
xl: 'px-12 py-3 text-xl',
|
|
81
|
+
'2xl': 'px-16 py-4 text-2xl'
|
|
82
|
+
});
|
|
83
|
+
var textColorClass = computed(function () {
|
|
84
|
+
return buttonClasses.value[props.variant].text;
|
|
85
|
+
});
|
|
86
|
+
var bgColorClass = computed(function () {
|
|
87
|
+
return buttonClasses.value[props.variant].background;
|
|
88
|
+
});
|
|
89
|
+
var sizeClass = computed(function () {
|
|
90
|
+
return sizes.value[props.size];
|
|
91
|
+
});
|
|
92
|
+
var borderClass = computed(function () {
|
|
93
|
+
return buttonClasses.value[props.variant].border;
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* @event Click - Native click
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
var onClick = function onClick(e) {
|
|
100
|
+
return ctx.emit('click', e);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* @event mouseover - Native hover
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
var onMouseover = function onMouseover(e) {
|
|
108
|
+
return ctx.emit('mouseover', e);
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* @event mouseout - Native hover out
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
var onMouseout = function onMouseout(e) {
|
|
116
|
+
return ctx.emit('mouseout', e);
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* @event focusin - Native focusin
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
var onFocusin = function onFocusin(e) {
|
|
124
|
+
return ctx.emit('focusin', e);
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* @event focusout - Native focusout
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
var onFocusout = function onFocusout(e) {
|
|
132
|
+
return ctx.emit('focusout', e);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var tagName = computed(function () {
|
|
136
|
+
if (props.to) return 'router-link';
|
|
137
|
+
if (props.href) return 'a';
|
|
138
|
+
return 'button';
|
|
139
|
+
});
|
|
140
|
+
return {
|
|
141
|
+
textColorClass: textColorClass,
|
|
142
|
+
bgColorClass: bgColorClass,
|
|
143
|
+
sizeClass: sizeClass,
|
|
144
|
+
borderClass: borderClass,
|
|
145
|
+
onClick: onClick,
|
|
146
|
+
onMouseover: onMouseover,
|
|
147
|
+
onMouseout: onMouseout,
|
|
148
|
+
onFocusin: onFocusin,
|
|
149
|
+
onFocusout: onFocusout,
|
|
150
|
+
tagName: tagName
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
156
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
|
|
157
|
+
"class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
|
|
158
|
+
type: _ctx.tagName === 'button' ? _ctx.tagName : null,
|
|
159
|
+
to: _ctx.to ? _ctx.to : null,
|
|
160
|
+
href: _ctx.href ? _ctx.href : null,
|
|
161
|
+
tabindex: _ctx.to ? 0 : null,
|
|
162
|
+
onClick: _ctx.onClick,
|
|
163
|
+
onFocusin: _ctx.onFocusin,
|
|
164
|
+
onFocusout: _ctx.onFocusout,
|
|
165
|
+
onMouseover: _ctx.onMouseover,
|
|
166
|
+
onMouseout: _ctx.onMouseout
|
|
167
|
+
}, {
|
|
168
|
+
"default": withCtx(function () {
|
|
169
|
+
return [renderSlot(_ctx.$slots, "default")];
|
|
170
|
+
}),
|
|
171
|
+
_: 3
|
|
172
|
+
}, 8, ["class", "type", "to", "href", "tabindex", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
var css_248z = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
|
|
176
|
+
var stylesheet = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
|
|
177
|
+
styleInject(css_248z);
|
|
178
|
+
|
|
179
|
+
script.render = render;
|
|
180
|
+
|
|
181
|
+
export { script as s };
|
package/esm/fw-button.js
CHANGED
package/esm/fw-card.js
CHANGED
|
@@ -60,13 +60,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
60
60
|
return openBlock(), createBlock(resolveDynamicComponent(_ctx.componentName), {
|
|
61
61
|
to: _ctx.to ? _ctx.to : null,
|
|
62
62
|
href: _ctx.href ? _ctx.href : null,
|
|
63
|
-
|
|
63
|
+
tabindex: _ctx.to ? 0 : null,
|
|
64
|
+
"class": normalizeClass(["fw-card shadow-card rounded-lg", _ctx.to || _ctx.href ? 'block cursor-pointer focus:outline-none ring-offset-3 focus:ring focus:ring-primary transform-none transition-transform hover:-translate-y-1' : ''])
|
|
64
65
|
}, {
|
|
65
66
|
"default": withCtx(function () {
|
|
66
67
|
return [_ctx.title || _ctx.prefixTitle ? (openBlock(), createElementBlock("h4", _hoisted_1, [_ctx.prefixTitle ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(_ctx.prefixTitle), 1)) : createCommentVNode("", true), _ctx.title ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)];
|
|
67
68
|
}),
|
|
68
69
|
_: 3
|
|
69
|
-
}, 8, ["to", "href", "class"]);
|
|
70
|
+
}, 8, ["to", "href", "tabindex", "class"]);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
script.render = render;
|
package/esm/fw-form.js
ADDED
package/esm/fw-input.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { o as descriptors, v as functionName, f as functionUncurryThis, x as objectDefineProperty, u as styleInject } from './style-inject.es-da8f7768.js';
|
|
2
|
+
import { defineComponent, computed, createElementVNode, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, toDisplayString, createCommentVNode, renderSlot, mergeProps, Transition } from 'vue';
|
|
3
|
+
import { a as Field } from './vee-validate.esm-028c6424.js';
|
|
4
|
+
|
|
5
|
+
var script = defineComponent({
|
|
6
|
+
name: 'FwInput',
|
|
7
|
+
emits: ['update:modelValue'],
|
|
8
|
+
components: {
|
|
9
|
+
InputField: Field
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* The input v-model
|
|
14
|
+
*/
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: String,
|
|
17
|
+
"default": ''
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The name of the input field. Must be unique per form.
|
|
22
|
+
*/
|
|
23
|
+
name: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The input type. Accepts `text` | `password`
|
|
30
|
+
*/
|
|
31
|
+
type: {
|
|
32
|
+
type: String,
|
|
33
|
+
"default": 'text',
|
|
34
|
+
validator: function validator(value) {
|
|
35
|
+
return ['text', 'password'].includes(value);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Label for the input. Also renders to an aria-label attribute
|
|
41
|
+
*/
|
|
42
|
+
label: {
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The placeholder text of the input
|
|
48
|
+
*/
|
|
49
|
+
placeholder: {
|
|
50
|
+
type: String,
|
|
51
|
+
"default": ''
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Validation rules. Accepts a string, object, function or schema.
|
|
56
|
+
*/
|
|
57
|
+
rules: {
|
|
58
|
+
type: [String, Object, Function]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
setup: function setup(props, ctx) {
|
|
62
|
+
var inputValue = computed({
|
|
63
|
+
get: function get() {
|
|
64
|
+
return props.modelValue;
|
|
65
|
+
},
|
|
66
|
+
set: function set(state) {
|
|
67
|
+
return ctx.emit('update:modelValue', state);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
return {
|
|
71
|
+
inputValue: inputValue
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
var es_function_name = {};
|
|
77
|
+
|
|
78
|
+
var DESCRIPTORS = descriptors;
|
|
79
|
+
var FUNCTION_NAME_EXISTS = functionName.EXISTS;
|
|
80
|
+
var uncurryThis = functionUncurryThis;
|
|
81
|
+
var defineProperty = objectDefineProperty.f;
|
|
82
|
+
|
|
83
|
+
var FunctionPrototype = Function.prototype;
|
|
84
|
+
var functionToString = uncurryThis(FunctionPrototype.toString);
|
|
85
|
+
var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
|
|
86
|
+
var regExpExec = uncurryThis(nameRE.exec);
|
|
87
|
+
var NAME = 'name';
|
|
88
|
+
|
|
89
|
+
// Function instances `.name` property
|
|
90
|
+
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
91
|
+
if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
|
|
92
|
+
defineProperty(FunctionPrototype, NAME, {
|
|
93
|
+
configurable: true,
|
|
94
|
+
get: function () {
|
|
95
|
+
try {
|
|
96
|
+
return regExpExec(nameRE, functionToString(this))[1];
|
|
97
|
+
} catch (error) {
|
|
98
|
+
return '';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
var _hoisted_1 = {
|
|
105
|
+
"class": "fw-input w-full"
|
|
106
|
+
};
|
|
107
|
+
var _hoisted_2 = {
|
|
108
|
+
"class": "flex flex-col"
|
|
109
|
+
};
|
|
110
|
+
var _hoisted_3 = ["for"];
|
|
111
|
+
var _hoisted_4 = {
|
|
112
|
+
"class": "relative"
|
|
113
|
+
};
|
|
114
|
+
var _hoisted_5 = {
|
|
115
|
+
key: 0,
|
|
116
|
+
"class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
|
|
117
|
+
};
|
|
118
|
+
var _hoisted_6 = ["placeholder", "type"];
|
|
119
|
+
var _hoisted_7 = {
|
|
120
|
+
key: 0,
|
|
121
|
+
"class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
var _hoisted_8 = /*#__PURE__*/createElementVNode("svg", {
|
|
125
|
+
fill: "currentColor",
|
|
126
|
+
"aria-hidden": "true",
|
|
127
|
+
focusable: "false",
|
|
128
|
+
role: "img",
|
|
129
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
130
|
+
viewBox: "0 0 512 512"
|
|
131
|
+
}, [/*#__PURE__*/createElementVNode("path", {
|
|
132
|
+
d: "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM232 152C232 138.8\n 242.8 128 256 128s24 10.75 24 24v128c0 13.25-10.75 24-24 24S232 293.3 232 280V152zM256 400c-17.36\n 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 385.9 273.4\n 400 256 400z"
|
|
133
|
+
})], -1);
|
|
134
|
+
|
|
135
|
+
var _hoisted_9 = [_hoisted_8];
|
|
136
|
+
var _hoisted_10 = {
|
|
137
|
+
"class": "text-error italic text-right text-sm font-medium mt-2 min-h-[21px]"
|
|
138
|
+
};
|
|
139
|
+
var _hoisted_11 = {
|
|
140
|
+
key: 0
|
|
141
|
+
};
|
|
142
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
|
+
var _component_InputField = resolveComponent("InputField");
|
|
144
|
+
|
|
145
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_InputField, {
|
|
146
|
+
modelValue: _ctx.inputValue,
|
|
147
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
|
|
148
|
+
return _ctx.inputValue = $event;
|
|
149
|
+
}),
|
|
150
|
+
name: _ctx.name,
|
|
151
|
+
rules: _ctx.rules
|
|
152
|
+
}, {
|
|
153
|
+
"default": withCtx(function (_ref) {
|
|
154
|
+
var field = _ref.field,
|
|
155
|
+
errors = _ref.errors,
|
|
156
|
+
errorMessage = _ref.errorMessage,
|
|
157
|
+
meta = _ref.meta;
|
|
158
|
+
return [createElementVNode("div", _hoisted_2, [_ctx.label ? (openBlock(), createElementBlock("label", {
|
|
159
|
+
key: 0,
|
|
160
|
+
"for": _ctx.name,
|
|
161
|
+
"class": "block mb-2"
|
|
162
|
+
}, toDisplayString(_ctx.label), 9, _hoisted_3)) : createCommentVNode("", true), createElementVNode("div", _hoisted_4, [_ctx.$slots.prefixIcon ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "prefixIcon")])) : createCommentVNode("", true), createElementVNode("input", mergeProps(field, {
|
|
163
|
+
placeholder: _ctx.placeholder,
|
|
164
|
+
type: _ctx.type,
|
|
165
|
+
"class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
|
|
166
|
+
'pl-10': !!_ctx.$slots.prefixIcon
|
|
167
|
+
}]
|
|
168
|
+
}), null, 16, _hoisted_6), createVNode(Transition, {
|
|
169
|
+
name: "errorFadeIn"
|
|
170
|
+
}, {
|
|
171
|
+
"default": withCtx(function () {
|
|
172
|
+
return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("div", _hoisted_7, _hoisted_9)) : createCommentVNode("", true)];
|
|
173
|
+
}),
|
|
174
|
+
_: 2
|
|
175
|
+
}, 1024)]), createElementVNode("div", _hoisted_10, [createVNode(Transition, {
|
|
176
|
+
name: "errorFadeIn"
|
|
177
|
+
}, {
|
|
178
|
+
"default": withCtx(function () {
|
|
179
|
+
return [(errorMessage || errors[0]) && meta.touched ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(errorMessage || errors[0]), 1)) : createCommentVNode("", true)];
|
|
180
|
+
}),
|
|
181
|
+
_: 2
|
|
182
|
+
}, 1024)])])];
|
|
183
|
+
}),
|
|
184
|
+
_: 3
|
|
185
|
+
}, 8, ["modelValue", "name", "rules"])]);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
var css_248z = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
|
|
189
|
+
var stylesheet = ".errorFadeIn-enter-active{-webkit-animation:errorFadeIn .35s;animation:errorFadeIn .35s;-webkit-transition:opacity .35s ease-in;-o-transition:opacity .35s ease-in;transition:opacity .35s ease-in}.errorFadeIn-leave-active{animation:errorFadeIn .35s reverse;-webkit-transition:opacity .35s ease-out;-o-transition:opacity .35s ease-out;transition:opacity .35s ease-out}@-webkit-keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}@keyframes errorFadeIn{0%{opacity:0}to{opacity:1}}";
|
|
190
|
+
styleInject(css_248z);
|
|
191
|
+
|
|
192
|
+
script.render = render;
|
|
193
|
+
|
|
194
|
+
export { script as FwInput };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { s as script$1 } from './fw-button-02fc3f47.js';
|
|
3
|
+
import { u as styleInject } from './style-inject.es-da8f7768.js';
|
|
3
4
|
|
|
4
5
|
var script = defineComponent({
|
|
5
6
|
name: 'FwNavigationMenu',
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { f as functionUncurryThis, a as aCallable$1, b as functionBindNative, c as classofRaw$1, w as wellKnownSymbol$3, g as global$3, i as isCallable$2, d as fails$2, e as getBuiltIn$1, h as inspectSource$1, j as isObject$1, k as indexedObject, t as toObject$1, l as lengthOfArrayLike$1, _ as _export, r as redefine$1, m as documentCreateElement$1, n as createNonEnumerableProperty$1, o as descriptors, p as objectKeys$1, q as toIndexedObject$1, s as objectPropertyIsEnumerable
|
|
2
|
-
export { u as FwButton } from './fw-button-6d5a9671.js';
|
|
1
|
+
import { f as functionUncurryThis, a as aCallable$1, b as functionBindNative, c as classofRaw$1, w as wellKnownSymbol$3, g as global$3, i as isCallable$2, d as fails$2, e as getBuiltIn$1, h as inspectSource$1, j as isObject$1, k as indexedObject, t as toObject$1, l as lengthOfArrayLike$1, _ as _export, r as redefine$1, m as documentCreateElement$1, n as createNonEnumerableProperty$1, o as descriptors, p as objectKeys$1, q as toIndexedObject$1, s as objectPropertyIsEnumerable } from './style-inject.es-da8f7768.js';
|
|
3
2
|
import { FwCard as script } from './fw-card.js';
|
|
4
3
|
export { FwCard } from './fw-card.js';
|
|
5
4
|
import './fw-button.js';
|
|
6
5
|
import { FwNavigationMenu as script$2 } from './fw-navigation-menu.js';
|
|
7
6
|
export { FwNavigationMenu } from './fw-navigation-menu.js';
|
|
7
|
+
import './fw-form.js';
|
|
8
|
+
import { FwInput as script$3 } from './fw-input.js';
|
|
9
|
+
export { FwInput } from './fw-input.js';
|
|
10
|
+
import { s as script$1 } from './fw-button-02fc3f47.js';
|
|
11
|
+
export { s as FwButton } from './fw-button-02fc3f47.js';
|
|
12
|
+
import { F as Form } from './vee-validate.esm-028c6424.js';
|
|
13
|
+
export { F as FwForm } from './vee-validate.esm-028c6424.js';
|
|
8
14
|
import 'vue';
|
|
9
15
|
|
|
10
16
|
function _arrayWithHoles(arr) {
|
|
@@ -472,7 +478,9 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
472
478
|
__proto__: null,
|
|
473
479
|
FwCard: script,
|
|
474
480
|
FwButton: script$1,
|
|
475
|
-
FwNavigationMenu: script$2
|
|
481
|
+
FwNavigationMenu: script$2,
|
|
482
|
+
FwForm: Form,
|
|
483
|
+
FwInput: script$3
|
|
476
484
|
});
|
|
477
485
|
|
|
478
486
|
var install = function install(app) {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
-
|
|
3
1
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
2
|
|
|
5
3
|
function getDefaultExportFromCjs (x) {
|
|
@@ -1148,176 +1146,6 @@ $({ target: 'Array', proto: true }, {
|
|
|
1148
1146
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1149
1147
|
addToUnscopables('includes');
|
|
1150
1148
|
|
|
1151
|
-
var script = defineComponent({
|
|
1152
|
-
name: 'FwButton',
|
|
1153
|
-
emits: ['click', 'mouseover', 'mouseout', 'focusin', 'focusout'],
|
|
1154
|
-
props: {
|
|
1155
|
-
/**
|
|
1156
|
-
* A `router-link` path or object
|
|
1157
|
-
*/
|
|
1158
|
-
to: {
|
|
1159
|
-
type: [String, Object]
|
|
1160
|
-
},
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* A URL to link to using a native anchor element
|
|
1164
|
-
*/
|
|
1165
|
-
href: String,
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* The size of the button. Accepts: 'sm', 'md', 'lg', 'xl', '2xl'
|
|
1169
|
-
*/
|
|
1170
|
-
size: {
|
|
1171
|
-
type: String,
|
|
1172
|
-
"default": 'lg',
|
|
1173
|
-
validator: function validator(value) {
|
|
1174
|
-
return ['sm', 'md', 'lg', 'xl', '2xl'].includes(value);
|
|
1175
|
-
}
|
|
1176
|
-
},
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* The colour variant of the button.
|
|
1180
|
-
* Accepts 'primary', 'secondary', 'tertiary', 'error', 'success'
|
|
1181
|
-
*/
|
|
1182
|
-
variant: {
|
|
1183
|
-
type: String,
|
|
1184
|
-
"default": 'primary',
|
|
1185
|
-
validator: function validator(value) {
|
|
1186
|
-
return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
},
|
|
1190
|
-
setup: function setup(props, ctx) {
|
|
1191
|
-
var buttonClasses = ref({
|
|
1192
|
-
primary: {
|
|
1193
|
-
text: 'text-tertiary hover:text-primary active:text-primary',
|
|
1194
|
-
background: 'bg-primary hover:bg-tertiary active:bg-tertiary',
|
|
1195
|
-
border: 'border-primary focus:ring-primary'
|
|
1196
|
-
},
|
|
1197
|
-
secondary: {
|
|
1198
|
-
text: 'text-primary hover:text-tertiary active:text-tertiary',
|
|
1199
|
-
background: 'bg-tertiary hover:bg-primary active:bg-primary',
|
|
1200
|
-
border: 'border-primary focus:ring-primary'
|
|
1201
|
-
},
|
|
1202
|
-
tertiary: {
|
|
1203
|
-
text: 'text-tertiary hover:text-secondary active:text-secondary',
|
|
1204
|
-
background: 'bg-secondary hover:bg-tertiary active:bg-tertiary',
|
|
1205
|
-
border: 'border-tertiary focus:ring-tertiary'
|
|
1206
|
-
},
|
|
1207
|
-
success: {
|
|
1208
|
-
text: 'text-white hover:text-success active:text-success',
|
|
1209
|
-
background: 'bg-success hover:bg-white active:bg-white',
|
|
1210
|
-
border: 'border-success focus:ring-success'
|
|
1211
|
-
},
|
|
1212
|
-
error: {
|
|
1213
|
-
text: 'text-white hover:text-error active:text-error',
|
|
1214
|
-
background: 'bg-error hover:bg-white active:bg-white',
|
|
1215
|
-
border: 'border-error focus:ring-error'
|
|
1216
|
-
},
|
|
1217
|
-
text: {
|
|
1218
|
-
text: 'text-body font-medium hover:text-white active:text-white',
|
|
1219
|
-
background: 'bg-white hover:bg-body active:bg-body',
|
|
1220
|
-
border: 'border-transparent focus:ring-body'
|
|
1221
|
-
}
|
|
1222
|
-
});
|
|
1223
|
-
var sizes = ref({
|
|
1224
|
-
sm: 'px-2 py-0.5 text-sm',
|
|
1225
|
-
md: 'px-6 py-1 text-md',
|
|
1226
|
-
lg: 'px-10 py-2 text-lg',
|
|
1227
|
-
xl: 'px-12 py-3 text-xl',
|
|
1228
|
-
'2xl': 'px-16 py-4 text-2xl'
|
|
1229
|
-
});
|
|
1230
|
-
var textColorClass = computed(function () {
|
|
1231
|
-
return buttonClasses.value[props.variant].text;
|
|
1232
|
-
});
|
|
1233
|
-
var bgColorClass = computed(function () {
|
|
1234
|
-
return buttonClasses.value[props.variant].background;
|
|
1235
|
-
});
|
|
1236
|
-
var sizeClass = computed(function () {
|
|
1237
|
-
return sizes.value[props.size];
|
|
1238
|
-
});
|
|
1239
|
-
var borderClass = computed(function () {
|
|
1240
|
-
return buttonClasses.value[props.variant].border;
|
|
1241
|
-
});
|
|
1242
|
-
/**
|
|
1243
|
-
* @event Click - Native click
|
|
1244
|
-
*/
|
|
1245
|
-
|
|
1246
|
-
var onClick = function onClick(e) {
|
|
1247
|
-
return ctx.emit('click', e);
|
|
1248
|
-
};
|
|
1249
|
-
/**
|
|
1250
|
-
* @event mouseover - Native hover
|
|
1251
|
-
*/
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
var onMouseover = function onMouseover(e) {
|
|
1255
|
-
return ctx.emit('mouseover', e);
|
|
1256
|
-
};
|
|
1257
|
-
/**
|
|
1258
|
-
* @event mouseout - Native hover out
|
|
1259
|
-
*/
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
var onMouseout = function onMouseout(e) {
|
|
1263
|
-
return ctx.emit('mouseout', e);
|
|
1264
|
-
};
|
|
1265
|
-
/**
|
|
1266
|
-
* @event focusin - Native focusin
|
|
1267
|
-
*/
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
var onFocusin = function onFocusin(e) {
|
|
1271
|
-
return ctx.emit('focusin', e);
|
|
1272
|
-
};
|
|
1273
|
-
/**
|
|
1274
|
-
* @event focusout - Native focusout
|
|
1275
|
-
*/
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
var onFocusout = function onFocusout(e) {
|
|
1279
|
-
return ctx.emit('focusout', e);
|
|
1280
|
-
};
|
|
1281
|
-
|
|
1282
|
-
var tagName = computed(function () {
|
|
1283
|
-
if (props.to) return 'router-link';
|
|
1284
|
-
if (props.href) return 'a';
|
|
1285
|
-
return 'button';
|
|
1286
|
-
});
|
|
1287
|
-
return {
|
|
1288
|
-
textColorClass: textColorClass,
|
|
1289
|
-
bgColorClass: bgColorClass,
|
|
1290
|
-
sizeClass: sizeClass,
|
|
1291
|
-
borderClass: borderClass,
|
|
1292
|
-
onClick: onClick,
|
|
1293
|
-
onMouseover: onMouseover,
|
|
1294
|
-
onMouseout: onMouseout,
|
|
1295
|
-
onFocusin: onFocusin,
|
|
1296
|
-
onFocusout: onFocusout,
|
|
1297
|
-
tagName: tagName
|
|
1298
|
-
};
|
|
1299
|
-
}
|
|
1300
|
-
});
|
|
1301
|
-
|
|
1302
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1303
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
|
|
1304
|
-
"class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-none ring-offset-2 focus:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass]]),
|
|
1305
|
-
type: _ctx.tagName === 'button' ? _ctx.tagName : null,
|
|
1306
|
-
to: _ctx.to ? _ctx.to : null,
|
|
1307
|
-
href: _ctx.href ? _ctx.href : null,
|
|
1308
|
-
onClick: _ctx.onClick,
|
|
1309
|
-
onFocusin: _ctx.onFocusin,
|
|
1310
|
-
onFocusout: _ctx.onFocusout,
|
|
1311
|
-
onMouseover: _ctx.onMouseover,
|
|
1312
|
-
onMouseout: _ctx.onMouseout
|
|
1313
|
-
}, {
|
|
1314
|
-
"default": withCtx(function () {
|
|
1315
|
-
return [renderSlot(_ctx.$slots, "default")];
|
|
1316
|
-
}),
|
|
1317
|
-
_: 3
|
|
1318
|
-
}, 8, ["class", "type", "to", "href", "onClick", "onFocusin", "onFocusout", "onMouseover", "onMouseout"]);
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
1149
|
function styleInject(css, ref) {
|
|
1322
1150
|
if ( ref === void 0 ) ref = {};
|
|
1323
1151
|
var insertAt = ref.insertAt;
|
|
@@ -1345,10 +1173,4 @@ function styleInject(css, ref) {
|
|
|
1345
1173
|
}
|
|
1346
1174
|
}
|
|
1347
1175
|
|
|
1348
|
-
|
|
1349
|
-
var stylesheet = ".fw-button{-webkit-transition:all .25s ease-in;-o-transition:all .25s ease-in;transition:all .25s ease-in}";
|
|
1350
|
-
styleInject(css_248z);
|
|
1351
|
-
|
|
1352
|
-
script.render = render;
|
|
1353
|
-
|
|
1354
|
-
export { _export as _, aCallable$1 as a, functionBindNative as b, classofRaw as c, fails$7 as d, getBuiltIn$4 as e, functionUncurryThis as f, global$l as g, inspectSource$2 as h, isCallable$9 as i, isObject$5 as j, indexedObject as k, lengthOfArrayLike$1 as l, documentCreateElement$1 as m, createNonEnumerableProperty$3 as n, descriptors as o, objectKeys$1 as p, toIndexedObject$4 as q, redefine$2 as r, objectPropertyIsEnumerable as s, toObject$1 as t, script as u, styleInject as v, wellKnownSymbol$2 as w };
|
|
1176
|
+
export { _export as _, aCallable$1 as a, functionBindNative as b, classofRaw as c, fails$7 as d, getBuiltIn$4 as e, functionUncurryThis as f, global$l as g, inspectSource$2 as h, isCallable$9 as i, isObject$5 as j, indexedObject as k, lengthOfArrayLike$1 as l, documentCreateElement$1 as m, createNonEnumerableProperty$3 as n, descriptors as o, objectKeys$1 as p, toIndexedObject$4 as q, redefine$2 as r, objectPropertyIsEnumerable as s, toObject$1 as t, styleInject as u, functionName as v, wellKnownSymbol$2 as w, objectDefineProperty as x };
|