@frollo/frollo-web-ui 0.0.10 → 0.0.11

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 CHANGED
@@ -1496,7 +1496,18 @@ addToUnscopables('includes');var script$2 = vue.defineComponent({
1496
1496
  type: String,
1497
1497
  "default": 'primary',
1498
1498
  validator: function validator(value) {
1499
- return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
1499
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
1500
+ }
1501
+ },
1502
+
1503
+ /**
1504
+ * The type attribute of the button
1505
+ */
1506
+ buttonType: {
1507
+ type: String,
1508
+ "default": 'button',
1509
+ validator: function validator(value) {
1510
+ return ['button', 'submit', 'reset'].includes(value);
1500
1511
  }
1501
1512
  }
1502
1513
  },
@@ -1505,32 +1516,37 @@ addToUnscopables('includes');var script$2 = vue.defineComponent({
1505
1516
  primary: {
1506
1517
  text: 'text-tertiary hover:text-primary active:text-primary',
1507
1518
  background: 'bg-primary hover:bg-tertiary active:bg-tertiary',
1508
- border: 'border-primary focus:ring-primary'
1519
+ border: 'border-primary focus-visible:ring-primary'
1509
1520
  },
1510
1521
  secondary: {
1511
1522
  text: 'text-primary hover:text-tertiary active:text-tertiary',
1512
1523
  background: 'bg-tertiary hover:bg-primary active:bg-primary',
1513
- border: 'border-primary focus:ring-primary'
1524
+ border: 'border-primary focus-visible:ring-primary'
1514
1525
  },
1515
1526
  tertiary: {
1516
1527
  text: 'text-tertiary hover:text-secondary active:text-secondary',
1517
1528
  background: 'bg-secondary hover:bg-tertiary active:bg-tertiary',
1518
- border: 'border-tertiary focus:ring-tertiary'
1529
+ border: 'border-secondary focus-visible:ring-secondary'
1519
1530
  },
1520
1531
  success: {
1521
1532
  text: 'text-white hover:text-success active:text-success',
1522
1533
  background: 'bg-success hover:bg-white active:bg-white',
1523
- border: 'border-success focus:ring-success'
1534
+ border: 'border-success focus-visible:ring-success'
1524
1535
  },
1525
1536
  error: {
1526
1537
  text: 'text-white hover:text-error active:text-error',
1527
1538
  background: 'bg-error hover:bg-white active:bg-white',
1528
- border: 'border-error focus:ring-error'
1539
+ border: 'border-error focus-visible:ring-error'
1540
+ },
1541
+ link: {
1542
+ text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
1543
+ background: '',
1544
+ border: 'border-none rounded-none focus-visible:ring-primary'
1529
1545
  },
1530
1546
  text: {
1531
1547
  text: 'text-body font-medium hover:text-white active:text-white',
1532
1548
  background: 'bg-white hover:bg-body active:bg-body',
1533
- border: 'border-transparent focus:ring-body'
1549
+ border: 'border-transparent focus-visible:ring-body'
1534
1550
  }
1535
1551
  });
1536
1552
  var sizes = vue.ref({
@@ -1612,8 +1628,8 @@ addToUnscopables('includes');var script$2 = vue.defineComponent({
1612
1628
  }
1613
1629
  });function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1614
1630
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tagName), {
1615
- "class": vue.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]]),
1616
- type: _ctx.tagName === 'button' ? _ctx.tagName : null,
1631
+ "class": vue.normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-0 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0' : '']]),
1632
+ type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
1617
1633
  to: _ctx.to ? _ctx.to : null,
1618
1634
  href: _ctx.href ? _ctx.href : null,
1619
1635
  tabindex: _ctx.to ? 0 : null,
@@ -4999,6 +5015,14 @@ function useSubmitForm(cb) {
4999
5015
  */
5000
5016
  rules: {
5001
5017
  type: [String, Object, Function]
5018
+ },
5019
+
5020
+ /**
5021
+ * Converts the input into a readonly disabled field
5022
+ */
5023
+ readonly: {
5024
+ type: Boolean,
5025
+ "default": false
5002
5026
  }
5003
5027
  },
5004
5028
  setup: function setup(props, ctx) {
@@ -5052,7 +5076,7 @@ var _hoisted_5 = {
5052
5076
  key: 0,
5053
5077
  "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5054
5078
  };
5055
- var _hoisted_6 = ["placeholder", "type"];
5079
+ var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
5056
5080
  var _hoisted_7 = {
5057
5081
  key: 0,
5058
5082
  "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
@@ -5099,6 +5123,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5099
5123
  }, vue.toDisplayString(_ctx.label), 9, _hoisted_3)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_4, [_ctx.$slots.prefixIcon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [vue.renderSlot(_ctx.$slots, "prefixIcon")])) : vue.createCommentVNode("", true), vue.createElementVNode("input", vue.mergeProps(field, {
5100
5124
  placeholder: _ctx.placeholder,
5101
5125
  type: _ctx.type,
5126
+ readonly: _ctx.readonly,
5127
+ disabled: _ctx.readonly,
5102
5128
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
5103
5129
  'pl-10': !!_ctx.$slots.prefixIcon
5104
5130
  }]
@@ -36,7 +36,18 @@ var script = defineComponent({
36
36
  type: String,
37
37
  "default": 'primary',
38
38
  validator: function validator(value) {
39
- return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
39
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
40
+ }
41
+ },
42
+
43
+ /**
44
+ * The type attribute of the button
45
+ */
46
+ buttonType: {
47
+ type: String,
48
+ "default": 'button',
49
+ validator: function validator(value) {
50
+ return ['button', 'submit', 'reset'].includes(value);
40
51
  }
41
52
  }
42
53
  },
@@ -45,32 +56,37 @@ var script = defineComponent({
45
56
  primary: {
46
57
  text: 'text-tertiary hover:text-primary active:text-primary',
47
58
  background: 'bg-primary hover:bg-tertiary active:bg-tertiary',
48
- border: 'border-primary focus:ring-primary'
59
+ border: 'border-primary focus-visible:ring-primary'
49
60
  },
50
61
  secondary: {
51
62
  text: 'text-primary hover:text-tertiary active:text-tertiary',
52
63
  background: 'bg-tertiary hover:bg-primary active:bg-primary',
53
- border: 'border-primary focus:ring-primary'
64
+ border: 'border-primary focus-visible:ring-primary'
54
65
  },
55
66
  tertiary: {
56
67
  text: 'text-tertiary hover:text-secondary active:text-secondary',
57
68
  background: 'bg-secondary hover:bg-tertiary active:bg-tertiary',
58
- border: 'border-tertiary focus:ring-tertiary'
69
+ border: 'border-secondary focus-visible:ring-secondary'
59
70
  },
60
71
  success: {
61
72
  text: 'text-white hover:text-success active:text-success',
62
73
  background: 'bg-success hover:bg-white active:bg-white',
63
- border: 'border-success focus:ring-success'
74
+ border: 'border-success focus-visible:ring-success'
64
75
  },
65
76
  error: {
66
77
  text: 'text-white hover:text-error active:text-error',
67
78
  background: 'bg-error hover:bg-white active:bg-white',
68
- border: 'border-error focus:ring-error'
79
+ border: 'border-error focus-visible:ring-error'
80
+ },
81
+ link: {
82
+ text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
83
+ background: '',
84
+ border: 'border-none rounded-none focus-visible:ring-primary'
69
85
  },
70
86
  text: {
71
87
  text: 'text-body font-medium hover:text-white active:text-white',
72
88
  background: 'bg-white hover:bg-body active:bg-body',
73
- border: 'border-transparent focus:ring-body'
89
+ border: 'border-transparent focus-visible:ring-body'
74
90
  }
75
91
  });
76
92
  var sizes = ref({
@@ -154,8 +170,8 @@ var script = defineComponent({
154
170
 
155
171
  function render(_ctx, _cache, $props, $setup, $data, $options) {
156
172
  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,
173
+ "class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-0 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0' : '']]),
174
+ type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
159
175
  to: _ctx.to ? _ctx.to : null,
160
176
  href: _ctx.href ? _ctx.href : null,
161
177
  tabindex: _ctx.to ? 0 : null,
package/esm/fw-button.js CHANGED
@@ -1,3 +1,3 @@
1
- export { s as FwButton } from './fw-button-02fc3f47.js';
1
+ export { s as FwButton } from './fw-button-430c8529.js';
2
2
  import './style-inject.es-da8f7768.js';
3
3
  import 'vue';
package/esm/fw-input.js CHANGED
@@ -56,6 +56,14 @@ var script = defineComponent({
56
56
  */
57
57
  rules: {
58
58
  type: [String, Object, Function]
59
+ },
60
+
61
+ /**
62
+ * Converts the input into a readonly disabled field
63
+ */
64
+ readonly: {
65
+ type: Boolean,
66
+ "default": false
59
67
  }
60
68
  },
61
69
  setup: function setup(props, ctx) {
@@ -115,7 +123,7 @@ var _hoisted_5 = {
115
123
  key: 0,
116
124
  "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
117
125
  };
118
- var _hoisted_6 = ["placeholder", "type"];
126
+ var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
119
127
  var _hoisted_7 = {
120
128
  key: 0,
121
129
  "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
@@ -162,6 +170,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
162
170
  }, 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
171
  placeholder: _ctx.placeholder,
164
172
  type: _ctx.type,
173
+ readonly: _ctx.readonly,
174
+ disabled: _ctx.readonly,
165
175
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
166
176
  'pl-10': !!_ctx.$slots.prefixIcon
167
177
  }]
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, createElementVNode, resolveComponent, openBlock, createElementBlock, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createVNode, Transition } from 'vue';
2
- import { s as script$1 } from './fw-button-02fc3f47.js';
2
+ import { s as script$1 } from './fw-button-430c8529.js';
3
3
  import { u as styleInject } from './style-inject.es-da8f7768.js';
4
4
 
5
5
  var script = defineComponent({
package/esm/index.js CHANGED
@@ -7,8 +7,8 @@ export { FwNavigationMenu } from './fw-navigation-menu.js';
7
7
  import './fw-form.js';
8
8
  import { FwInput as script$3 } from './fw-input.js';
9
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';
10
+ import { s as script$1 } from './fw-button-430c8529.js';
11
+ export { s as FwButton } from './fw-button-430c8529.js';
12
12
  import { F as Form } from './vee-validate.esm-028c6424.js';
13
13
  export { F as FwForm } from './vee-validate.esm-028c6424.js';
14
14
  import 'vue';
@@ -1716,7 +1716,18 @@ var script$2 = defineComponent({
1716
1716
  type: String,
1717
1717
  "default": 'primary',
1718
1718
  validator: function validator(value) {
1719
- return ['primary', 'secondary', 'tertiary', 'error', 'success', 'text'].includes(value);
1719
+ return ['primary', 'secondary', 'tertiary', 'error', 'success', 'link', 'text'].includes(value);
1720
+ }
1721
+ },
1722
+
1723
+ /**
1724
+ * The type attribute of the button
1725
+ */
1726
+ buttonType: {
1727
+ type: String,
1728
+ "default": 'button',
1729
+ validator: function validator(value) {
1730
+ return ['button', 'submit', 'reset'].includes(value);
1720
1731
  }
1721
1732
  }
1722
1733
  },
@@ -1725,32 +1736,37 @@ var script$2 = defineComponent({
1725
1736
  primary: {
1726
1737
  text: 'text-tertiary hover:text-primary active:text-primary',
1727
1738
  background: 'bg-primary hover:bg-tertiary active:bg-tertiary',
1728
- border: 'border-primary focus:ring-primary'
1739
+ border: 'border-primary focus-visible:ring-primary'
1729
1740
  },
1730
1741
  secondary: {
1731
1742
  text: 'text-primary hover:text-tertiary active:text-tertiary',
1732
1743
  background: 'bg-tertiary hover:bg-primary active:bg-primary',
1733
- border: 'border-primary focus:ring-primary'
1744
+ border: 'border-primary focus-visible:ring-primary'
1734
1745
  },
1735
1746
  tertiary: {
1736
1747
  text: 'text-tertiary hover:text-secondary active:text-secondary',
1737
1748
  background: 'bg-secondary hover:bg-tertiary active:bg-tertiary',
1738
- border: 'border-tertiary focus:ring-tertiary'
1749
+ border: 'border-secondary focus-visible:ring-secondary'
1739
1750
  },
1740
1751
  success: {
1741
1752
  text: 'text-white hover:text-success active:text-success',
1742
1753
  background: 'bg-success hover:bg-white active:bg-white',
1743
- border: 'border-success focus:ring-success'
1754
+ border: 'border-success focus-visible:ring-success'
1744
1755
  },
1745
1756
  error: {
1746
1757
  text: 'text-white hover:text-error active:text-error',
1747
1758
  background: 'bg-error hover:bg-white active:bg-white',
1748
- border: 'border-error focus:ring-error'
1759
+ border: 'border-error focus-visible:ring-error'
1760
+ },
1761
+ link: {
1762
+ text: 'text-primary underline hover:no-underline active:no-underline focus-visible:no-underline',
1763
+ background: '',
1764
+ border: 'border-none rounded-none focus-visible:ring-primary'
1749
1765
  },
1750
1766
  text: {
1751
1767
  text: 'text-body font-medium hover:text-white active:text-white',
1752
1768
  background: 'bg-white hover:bg-body active:bg-body',
1753
- border: 'border-transparent focus:ring-body'
1769
+ border: 'border-transparent focus-visible:ring-body'
1754
1770
  }
1755
1771
  });
1756
1772
  var sizes = ref({
@@ -1834,8 +1850,8 @@ var script$2 = defineComponent({
1834
1850
 
1835
1851
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
1836
1852
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {
1837
- "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]]),
1838
- type: _ctx.tagName === 'button' ? _ctx.tagName : null,
1853
+ "class": normalizeClass(["fw-button font-bold cursor-pointer whitespace-nowrap rounded-full border-2 focus:outline-0 focus-visible:outline-0 focus:ring-none ring-offset-2 focus-visible:ring", [_ctx.textColorClass, _ctx.bgColorClass, _ctx.sizeClass, _ctx.borderClass, _ctx.variant === 'link' ? 'pl-0 pr-0 pt-0 pb-0' : '']]),
1854
+ type: _ctx.tagName === 'button' ? _ctx.buttonType : null,
1839
1855
  to: _ctx.to ? _ctx.to : null,
1840
1856
  href: _ctx.href ? _ctx.href : null,
1841
1857
  tabindex: _ctx.to ? 0 : null,
@@ -5247,6 +5263,14 @@ var script = defineComponent({
5247
5263
  */
5248
5264
  rules: {
5249
5265
  type: [String, Object, Function]
5266
+ },
5267
+
5268
+ /**
5269
+ * Converts the input into a readonly disabled field
5270
+ */
5271
+ readonly: {
5272
+ type: Boolean,
5273
+ "default": false
5250
5274
  }
5251
5275
  },
5252
5276
  setup: function setup(props, ctx) {
@@ -5306,7 +5330,7 @@ var _hoisted_5 = {
5306
5330
  key: 0,
5307
5331
  "class": "flex text-grey-base absolute w-9 h-full inset-y-0 left-0 items-center pl-3 pointer-events-none"
5308
5332
  };
5309
- var _hoisted_6 = ["placeholder", "type"];
5333
+ var _hoisted_6 = ["placeholder", "type", "readonly", "disabled"];
5310
5334
  var _hoisted_7 = {
5311
5335
  key: 0,
5312
5336
  "class": "flex text-error absolute w-9 h-full inset-y-0 right-0 items-center pr-3 pointer-events-none"
@@ -5353,6 +5377,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5353
5377
  }, 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, {
5354
5378
  placeholder: _ctx.placeholder,
5355
5379
  type: _ctx.type,
5380
+ readonly: _ctx.readonly,
5381
+ disabled: _ctx.readonly,
5356
5382
  "class": ["border-2 border-grey-lightest rounded-lg focus:outline-none focus:ring-2 focus:ring-primary block w-full p-2.5", {
5357
5383
  'pl-10': !!_ctx.$slots.prefixIcon
5358
5384
  }]
package/icons/index.ts CHANGED
@@ -4,6 +4,7 @@ import ManageSvg from './manage.svg';
4
4
  import NotFoundSvg from './not-found.svg';
5
5
  import EmailFilledSvg from './email-filled.svg';
6
6
  import AlertSvg from './alert.svg';
7
+ import LockSvg from './lock.svg';
7
8
 
8
9
  export {
9
10
  ViewSvg,
@@ -11,5 +12,6 @@ export {
11
12
  ManageSvg,
12
13
  NotFoundSvg,
13
14
  EmailFilledSvg,
14
- AlertSvg
15
+ AlertSvg,
16
+ LockSvg
15
17
  };
package/icons/lock.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <path d="M17,9V7c0-2.8-2.2-5-5-5S7,4.2,7,7v2c-1.7,0-3,1.3-3,3v7c0,1.7,1.3,3,3,3h10c1.7,0,3-1.3,3-3v-7C20,10.3,18.7,9,17,9z M9,7c0-1.7,1.3-3,3-3s3,1.3,3,3v2H9V7z"/>
3
+ </svg>
package/index.d.ts CHANGED
@@ -52,7 +52,7 @@ declare const _default$3: vue.DefineComponent<{
52
52
  href: StringConstructor;
53
53
  }>>, {}>;
54
54
 
55
- declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
55
+ declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text' | 'link';
56
56
  interface ButtonDefinition {
57
57
  text: string;
58
58
  background: string;
@@ -65,11 +65,13 @@ declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
65
65
  declare type ButtonSizes = {
66
66
  [key in ButtonSize]: string;
67
67
  };
68
+ declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
68
69
  interface FwButtonProps {
69
70
  to?: string | object;
70
71
  href?: string;
71
72
  size?: ButtonSize;
72
73
  variant?: ButtonVariantName;
74
+ buttonType?: ButtonTypeAttribute;
73
75
  }
74
76
  declare const _default$2: vue.DefineComponent<{
75
77
  /**
@@ -99,6 +101,14 @@ declare const _default$2: vue.DefineComponent<{
99
101
  default: string;
100
102
  validator: (value: string) => boolean;
101
103
  };
104
+ /**
105
+ * The type attribute of the button
106
+ */
107
+ buttonType: {
108
+ type: PropType<ButtonTypeAttribute>;
109
+ default: string;
110
+ validator: (value: string) => boolean;
111
+ };
102
112
  }, {
103
113
  textColorClass: vue.ComputedRef<string>;
104
114
  bgColorClass: vue.ComputedRef<string>;
@@ -109,7 +119,7 @@ declare const _default$2: vue.DefineComponent<{
109
119
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
110
120
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
111
121
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
112
- tagName: vue.ComputedRef<"router-link" | "a" | "button">;
122
+ tagName: vue.ComputedRef<"button" | "router-link" | "a">;
113
123
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
114
124
  /**
115
125
  * A `router-link` path or object
@@ -138,6 +148,14 @@ declare const _default$2: vue.DefineComponent<{
138
148
  default: string;
139
149
  validator: (value: string) => boolean;
140
150
  };
151
+ /**
152
+ * The type attribute of the button
153
+ */
154
+ buttonType: {
155
+ type: PropType<ButtonTypeAttribute>;
156
+ default: string;
157
+ validator: (value: string) => boolean;
158
+ };
141
159
  }>> & {
142
160
  onClick?: ((...args: any[]) => any) | undefined;
143
161
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -147,6 +165,7 @@ declare const _default$2: vue.DefineComponent<{
147
165
  }, {
148
166
  size: ButtonSize;
149
167
  variant: ButtonVariantName;
168
+ buttonType: ButtonTypeAttribute;
150
169
  }>;
151
170
 
152
171
  interface NavMenuItem {
@@ -200,6 +219,7 @@ interface FwInputProps {
200
219
  label?: string;
201
220
  placeholder?: string;
202
221
  rules?: string | object | Function;
222
+ readonly?: boolean;
203
223
  }
204
224
  declare const _default: vue.DefineComponent<{
205
225
  /**
@@ -243,6 +263,13 @@ declare const _default: vue.DefineComponent<{
243
263
  rules: {
244
264
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
245
265
  };
266
+ /**
267
+ * Converts the input into a readonly disabled field
268
+ */
269
+ readonly: {
270
+ type: BooleanConstructor;
271
+ default: boolean;
272
+ };
246
273
  }, {
247
274
  inputValue: vue.WritableComputedRef<string>;
248
275
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
@@ -287,16 +314,24 @@ declare const _default: vue.DefineComponent<{
287
314
  rules: {
288
315
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
289
316
  };
317
+ /**
318
+ * Converts the input into a readonly disabled field
319
+ */
320
+ readonly: {
321
+ type: BooleanConstructor;
322
+ default: boolean;
323
+ };
290
324
  }>> & {
291
325
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
292
326
  }, {
293
327
  modelValue: string;
294
328
  type: InputType;
295
329
  placeholder: string;
330
+ readonly: boolean;
296
331
  }>;
297
332
 
298
333
  declare const install: Exclude<Plugin['install'], undefined>;
299
334
 
300
335
  declare module '@frollo/frollo-web-ui/icons' { }
301
336
 
302
- export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonVariantName, _default$2 as FwButton, FwButtonProps, _default$3 as FwCard, _default as FwInput, FwInputProps, _default$1 as FwNavigationMenu, InputType, NavMenuItem, install as default };
337
+ export { ButtonDefinition, ButtonDefinitionList, ButtonSize, ButtonSizes, ButtonTypeAttribute, ButtonVariantName, _default$2 as FwButton, FwButtonProps, _default$3 as FwCard, _default as FwInput, FwInputProps, _default$1 as FwNavigationMenu, InputType, NavMenuItem, install as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frollo/frollo-web-ui",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Frollo's UI library for components, utilities and configs",
5
5
  "exports": {
6
6
  "./icons": "./icons/index.ts",
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text';
2
+ export declare type ButtonVariantName = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'text' | 'link';
3
3
  export interface ButtonDefinition {
4
4
  text: string;
5
5
  background: string;
@@ -12,11 +12,13 @@ export declare type ButtonSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
12
12
  export declare type ButtonSizes = {
13
13
  [key in ButtonSize]: string;
14
14
  };
15
+ export declare type ButtonTypeAttribute = 'button' | 'submit' | 'reset';
15
16
  export interface FwButtonProps {
16
17
  to?: string | object;
17
18
  href?: string;
18
19
  size?: ButtonSize;
19
20
  variant?: ButtonVariantName;
21
+ buttonType?: ButtonTypeAttribute;
20
22
  }
21
23
  declare const _default: import("vue").DefineComponent<{
22
24
  /**
@@ -46,6 +48,14 @@ declare const _default: import("vue").DefineComponent<{
46
48
  default: string;
47
49
  validator: (value: string) => boolean;
48
50
  };
51
+ /**
52
+ * The type attribute of the button
53
+ */
54
+ buttonType: {
55
+ type: PropType<ButtonTypeAttribute>;
56
+ default: string;
57
+ validator: (value: string) => boolean;
58
+ };
49
59
  }, {
50
60
  textColorClass: import("vue").ComputedRef<string>;
51
61
  bgColorClass: import("vue").ComputedRef<string>;
@@ -56,7 +66,7 @@ declare const _default: import("vue").DefineComponent<{
56
66
  onMouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any;
57
67
  onFocusin: (this: GlobalEventHandlers, ev: FocusEvent) => any;
58
68
  onFocusout: (this: GlobalEventHandlers, ev: FocusEvent) => any;
59
- tagName: import("vue").ComputedRef<"router-link" | "a" | "button">;
69
+ tagName: import("vue").ComputedRef<"button" | "router-link" | "a">;
60
70
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover" | "mouseout" | "focusin" | "focusout")[], "click" | "mouseover" | "mouseout" | "focusin" | "focusout", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
61
71
  /**
62
72
  * A `router-link` path or object
@@ -85,6 +95,14 @@ declare const _default: import("vue").DefineComponent<{
85
95
  default: string;
86
96
  validator: (value: string) => boolean;
87
97
  };
98
+ /**
99
+ * The type attribute of the button
100
+ */
101
+ buttonType: {
102
+ type: PropType<ButtonTypeAttribute>;
103
+ default: string;
104
+ validator: (value: string) => boolean;
105
+ };
88
106
  }>> & {
89
107
  onClick?: ((...args: any[]) => any) | undefined;
90
108
  onMouseover?: ((...args: any[]) => any) | undefined;
@@ -94,5 +112,6 @@ declare const _default: import("vue").DefineComponent<{
94
112
  }, {
95
113
  size: ButtonSize;
96
114
  variant: ButtonVariantName;
115
+ buttonType: ButtonTypeAttribute;
97
116
  }>;
98
117
  export default _default;
@@ -7,6 +7,7 @@ export interface FwInputProps {
7
7
  label?: string;
8
8
  placeholder?: string;
9
9
  rules?: string | object | Function;
10
+ readonly?: boolean;
10
11
  }
11
12
  declare const _default: import("vue").DefineComponent<{
12
13
  /**
@@ -50,6 +51,13 @@ declare const _default: import("vue").DefineComponent<{
50
51
  rules: {
51
52
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
52
53
  };
54
+ /**
55
+ * Converts the input into a readonly disabled field
56
+ */
57
+ readonly: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
53
61
  }, {
54
62
  inputValue: import("vue").WritableComputedRef<string>;
55
63
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -94,11 +102,19 @@ declare const _default: import("vue").DefineComponent<{
94
102
  rules: {
95
103
  type: (StringConstructor | ObjectConstructor | FunctionConstructor)[];
96
104
  };
105
+ /**
106
+ * Converts the input into a readonly disabled field
107
+ */
108
+ readonly: {
109
+ type: BooleanConstructor;
110
+ default: boolean;
111
+ };
97
112
  }>> & {
98
113
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
99
114
  }, {
100
115
  modelValue: string;
101
116
  type: InputType;
102
117
  placeholder: string;
118
+ readonly: boolean;
103
119
  }>;
104
120
  export default _default;
@@ -4,4 +4,5 @@ import ManageSvg from './manage.svg';
4
4
  import NotFoundSvg from './not-found.svg';
5
5
  import EmailFilledSvg from './email-filled.svg';
6
6
  import AlertSvg from './alert.svg';
7
- export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg };
7
+ import LockSvg from './lock.svg';
8
+ export { ViewSvg, GenerateSvg, ManageSvg, NotFoundSvg, EmailFilledSvg, AlertSvg, LockSvg };