@rebilly/revel 4.1.0 → 4.2.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [4.2.1](https://github.com/Rebilly/rebilly/compare/revel-v4.2.0...revel-v4.2.1) (2023-04-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **revel:** r-avatar had wrong top margin applied ([#190](https://github.com/Rebilly/rebilly/issues/190)) ([23a166c](https://github.com/Rebilly/rebilly/commit/23a166c152653b6393cfe5db04129f5dec559857))
7
+
8
+ ## [4.2.0](https://github.com/Rebilly/rebilly/compare/revel-v4.1.0...revel-v4.2.0) (2023-04-28)
9
+
10
+
11
+ ### Features
12
+
13
+ * **revel:** Update button component ([#186](https://github.com/Rebilly/rebilly/issues/186)) ([c269206](https://github.com/Rebilly/rebilly/commit/c269206077471cd5eaf0547754d0632c34d39f88))
14
+
1
15
  ## [4.1.0](https://github.com/Rebilly/rebilly/compare/revel-v4.0.0...revel-v4.1.0) (2023-04-28)
2
16
 
3
17
 
package/dist/revel.es.js CHANGED
@@ -1601,7 +1601,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
1601
1601
  const _component_r_img = resolveComponent("r-img");
1602
1602
 
1603
1603
  return (openBlock(), createElementBlock("div", {
1604
- class: normalizeClass(["r-avatar r-mt-5", { 'r-avatar-description': $props.description }])
1604
+ class: normalizeClass(["r-avatar", { 'r-avatar-description': $props.description }])
1605
1605
  }, [
1606
1606
  createElementVNode("div", _hoisted_1$p, [
1607
1607
  ($props.initials)
@@ -1705,8 +1705,6 @@ var rBadge = /*#__PURE__*/_export_sfc$1(_sfc_main$u, [['render',_sfc_render$u]])
1705
1705
 
1706
1706
  var rButton_vue_vue_type_style_index_0_lang = '';
1707
1707
 
1708
- // TODO: button type link disabled property doesn't work (hide target, hide link, fix css)
1709
- // TODO prefixes icon classes "r-is-spinning icon-light-gray r-inline-3"
1710
1708
  const _sfc_main$t = {
1711
1709
  name: 'RButton',
1712
1710
  compatConfig: {
@@ -1722,6 +1720,13 @@ const _sfc_main$t = {
1722
1720
  default: 'regular',
1723
1721
  validator: (val) => ['small', 'regular', 'large'].includes(val),
1724
1722
  },
1723
+ /**
1724
+ * Specify button as anchor link
1725
+ */
1726
+ link: {
1727
+ type: Boolean,
1728
+ default: false,
1729
+ },
1725
1730
  /**
1726
1731
  * Specify button type according to your theme colors
1727
1732
  */
@@ -1729,7 +1734,14 @@ const _sfc_main$t = {
1729
1734
  type: String,
1730
1735
  default: 'default',
1731
1736
  validator: (val) =>
1732
- ['default', 'primary', 'danger', 'positive', 'link'].includes(val),
1737
+ [
1738
+ 'default',
1739
+ 'primary',
1740
+ 'danger',
1741
+ 'positive',
1742
+ 'plain',
1743
+ 'unstyled',
1744
+ ].includes(val),
1733
1745
  },
1734
1746
  /**
1735
1747
  * Disabled state just like for regular html button
@@ -1776,10 +1788,13 @@ const _sfc_main$t = {
1776
1788
  };
1777
1789
  },
1778
1790
  computed: {
1779
- isLink() {
1780
- return !!this.$attrs.href && this.type === 'link';
1791
+ isHrefLink() {
1792
+ return this.link && Boolean(this.href);
1781
1793
  },
1782
1794
  classes() {
1795
+ if (this.isHrefLink) {
1796
+ return 'r-button-type-link';
1797
+ }
1783
1798
  return {
1784
1799
  [`r-button-size-${this.size}`]: !!this.size,
1785
1800
  [`r-button-type-${this.type}`]: !!this.type,
@@ -1802,14 +1817,14 @@ const _sfc_main$t = {
1802
1817
  // to avoid issues with accessibility and testing library
1803
1818
  return this.title || this.$attrs['aria-label'] ? 'button' : '';
1804
1819
  },
1805
- link() {
1820
+ href() {
1806
1821
  return this.$attrs.href;
1807
1822
  },
1808
1823
  },
1809
1824
  methods: {},
1810
1825
  };
1811
1826
 
1812
- const _hoisted_1$o = ["href", "disabled", "target"];
1827
+ const _hoisted_1$o = ["href", "target"];
1813
1828
  const _hoisted_2$i = {
1814
1829
  key: 0,
1815
1830
  class: "r-capitalize-first-letter",
@@ -1825,13 +1840,12 @@ const _hoisted_4$c = {
1825
1840
  function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
1826
1841
  const _component_r_icon = resolveComponent("r-icon");
1827
1842
 
1828
- return ($options.isLink)
1843
+ return ($props.link)
1829
1844
  ? (openBlock(), createElementBlock("a", {
1830
1845
  key: 0,
1831
1846
  role: "button",
1832
1847
  class: normalizeClass(["r-button", $options.classes]),
1833
- href: $options.link,
1834
- disabled: $props.disabled || $props.loading,
1848
+ href: $options.href,
1835
1849
  target: _ctx.$attrs.href ? '_target' : _ctx.$attrs.target || ''
1836
1850
  }, [
1837
1851
  ($props.capitalizeFirstLetter)
@@ -16627,7 +16641,8 @@ const _sfc_main$d = {
16627
16641
  type: {
16628
16642
  type: String,
16629
16643
  default: 'default',
16630
- validator: (val) => ['default', 'primary', 'danger'].includes(val),
16644
+ validator: (val) =>
16645
+ ['default', 'primary', 'danger', 'plain', 'unstyled'].includes(val),
16631
16646
  },
16632
16647
  /**
16633
16648
  * TBD