@frollo/frollo-web-ui 0.0.5 → 0.0.8

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.
@@ -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 { u as script$1 } from './fw-button-0f8956b5.js';
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',
@@ -167,33 +168,6 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
167
168
  })]);
168
169
  }
169
170
 
170
- function styleInject(css, ref) {
171
- if ( ref === void 0 ) ref = {};
172
- var insertAt = ref.insertAt;
173
-
174
- if (!css || typeof document === 'undefined') { return; }
175
-
176
- var head = document.head || document.getElementsByTagName('head')[0];
177
- var style = document.createElement('style');
178
- style.type = 'text/css';
179
-
180
- if (insertAt === 'top') {
181
- if (head.firstChild) {
182
- head.insertBefore(style, head.firstChild);
183
- } else {
184
- head.appendChild(style);
185
- }
186
- } else {
187
- head.appendChild(style);
188
- }
189
-
190
- if (style.styleSheet) {
191
- style.styleSheet.cssText = css;
192
- } else {
193
- style.appendChild(document.createTextNode(css));
194
- }
195
- }
196
-
197
171
  var css_248z = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
198
172
  var stylesheet = ".fw-nav-menu--mobile{z-index:-1}.fw-nav-menu--mobile,.slideInLeft-enter-active{-webkit-transition:left .35s ease-in;-o-transition:left .35s ease-in;transition:left .35s ease-in}.slideInLeft-enter-active{-webkit-animation:slideInLeft .35s;animation:slideInLeft .35s}.slideInLeft-leave-active{animation:slideInLeft .35s reverse;-webkit-transition:left .35s ease-in-out;-o-transition:left .35s ease-in-out;transition:left .35s ease-in-out}@-webkit-keyframes slideInLeft{0%{left:100%}to{left:0}}@keyframes slideInLeft{0%{left:100%}to{left:0}}";
199
173
  styleInject(css_248z);
package/esm/index.js CHANGED
@@ -1,10 +1,13 @@
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, u as script$1 } from './fw-button-0f8956b5.js';
2
- export { u as FwButton } from './fw-button-0f8956b5.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 { FwInput as script$3 } from './fw-input.js';
8
+ export { FwInput } from './fw-input.js';
9
+ import { s as script$1 } from './fw-button-02fc3f47.js';
10
+ export { s as FwButton } from './fw-button-02fc3f47.js';
8
11
  import 'vue';
9
12
 
10
13
  function _arrayWithHoles(arr) {
@@ -472,7 +475,8 @@ var components = /*#__PURE__*/Object.freeze({
472
475
  __proto__: null,
473
476
  FwCard: script,
474
477
  FwButton: script$1,
475
- FwNavigationMenu: script$2
478
+ FwNavigationMenu: script$2,
479
+ FwInput: script$3
476
480
  });
477
481
 
478
482
  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,31 @@ $({ 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
- }
1149
+ function styleInject(css, ref) {
1150
+ if ( ref === void 0 ) ref = {};
1151
+ var insertAt = ref.insertAt;
1152
+
1153
+ if (!css || typeof document === 'undefined') { return; }
1154
+
1155
+ var head = document.head || document.getElementsByTagName('head')[0];
1156
+ var style = document.createElement('style');
1157
+ style.type = 'text/css';
1158
+
1159
+ if (insertAt === 'top') {
1160
+ if (head.firstChild) {
1161
+ head.insertBefore(style, head.firstChild);
1162
+ } else {
1163
+ head.appendChild(style);
1188
1164
  }
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
- };
1165
+ } else {
1166
+ head.appendChild(style);
1299
1167
  }
1300
- });
1301
1168
 
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,
1307
- href: _ctx.href,
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"]);
1169
+ if (style.styleSheet) {
1170
+ style.styleSheet.cssText = css;
1171
+ } else {
1172
+ style.appendChild(document.createTextNode(css));
1173
+ }
1319
1174
  }
1320
1175
 
1321
- script.render = render;
1322
-
1323
- 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, 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 };