@phila/phila-ui-link 1.0.3 → 1.0.4-beta.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/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@phila/phila-ui-core"),c=t.defineComponent({inheritAttrs:!1,__name:"Link",props:{to:{},href:{},target:{},rel:{},disabled:{type:Boolean,default:!1},ariaLabel:{},className:{},iconRight:{type:Boolean},iconOnly:{type:Boolean,default:!1},inline:{type:Boolean},text:{},size:{},shadow:{type:Boolean},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{default:"default"},isExternal:{type:Boolean,default:!1}},setup(o){const e=o,a=t.computed(()=>!(!e.isExternal||e.iconDefinition||e.iconClass||e.src||e.svgRaw)),s=t.computed(()=>i.cn("phila-link",e.variant&&`phila-link--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-link",e.disabled&&"is-disabled",e.className)),l=t.computed(()=>{const n={disabled:e.disabled,ariaLabel:e.ariaLabel,className:s.value};return i.isRouterLink(e)?{to:e.to,...n}:{href:e.href,target:e.target,rel:e.rel,...n}}),r=t.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass||(a.value?"external-link":void 0),src:e.src,svgRaw:e.svgRaw,iconRight:a.value?!0:e.iconRight,iconOnly:e.iconOnly,inline:e.inline,text:e.text,size:e.size}));return(n,u)=>(t.openBlock(),t.createBlock(t.unref(i.BaseLink),t.normalizeProps(t.guardReactiveProps({...l.value,...n.$attrs})),{default:t.withCtx(()=>[t.createVNode(t.unref(i.ActionContent),t.normalizeProps(t.guardReactiveProps(r.value)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16))}});exports.PhilaLink=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("@phila/phila-ui-core"),c=t.defineComponent({inheritAttrs:!1,__name:"Link",props:{to:{},href:{},target:{},rel:{},disabled:{type:Boolean,default:!1},ariaLabel:{},className:{},iconRight:{type:Boolean},iconOnly:{type:Boolean,default:!1},inline:{type:Boolean},text:{},size:{},shadow:{type:Boolean},iconSize:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{},variant:{default:"default"},isExternal:{type:Boolean,default:!1}},setup(o){const e=o,a=t.computed(()=>!(!e.isExternal||e.iconDefinition||e.iconClass||e.src||e.svgRaw)),s=t.computed(()=>n.cn("phila-link",e.variant&&`phila-link--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-link",e.disabled&&"is-disabled",e.className)),l=t.computed(()=>{const i={disabled:e.disabled,ariaLabel:e.ariaLabel,className:s.value};return n.isRouterLink(e)?{to:e.to,...i}:{href:e.href,target:e.target,rel:e.rel,...i}}),r=t.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass||(a.value?"external-link":void 0),src:e.src,svgRaw:e.svgRaw,iconRight:a.value?!0:e.iconRight,iconOnly:e.iconOnly,inline:e.inline,text:e.text,size:e.size}));return(i,u)=>(t.openBlock(),t.createBlock(t.unref(n.BaseLink),t.normalizeProps(t.guardReactiveProps({...l.value,...i.$attrs})),{default:t.withCtx(()=>[t.createVNode(t.unref(n.ActionContent),t.normalizeProps(t.guardReactiveProps(r.value)),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16))}});exports.PhilaLink=c;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, computed as t, createBlock as p, openBlock as h, unref as a, normalizeProps as o, guardReactiveProps as s, withCtx as l, createVNode as v, renderSlot as g, createTextVNode as k, toDisplayString as m } from "vue";
1
+ import { defineComponent as d, computed as i, createBlock as p, openBlock as h, unref as a, normalizeProps as o, guardReactiveProps as s, withCtx as l, createVNode as v, renderSlot as g, createTextVNode as k, toDisplayString as m } from "vue";
2
2
  import { cn as y, isRouterLink as b, BaseLink as x, ActionContent as B } from "@phila/phila-ui-core";
3
3
  const w = /* @__PURE__ */ d({
4
4
  inheritAttrs: !1,
@@ -17,6 +17,7 @@ const w = /* @__PURE__ */ d({
17
17
  text: {},
18
18
  size: {},
19
19
  shadow: { type: Boolean },
20
+ iconSize: {},
20
21
  iconDefinition: {},
21
22
  iconClass: {},
22
23
  src: {},
@@ -25,14 +26,14 @@ const w = /* @__PURE__ */ d({
25
26
  isExternal: { type: Boolean, default: !1 }
26
27
  },
27
28
  setup(r) {
28
- const e = r, i = t(() => !(!e.isExternal || e.iconDefinition || e.iconClass || e.src || e.svgRaw)), c = t(() => y(
29
+ const e = r, t = i(() => !(!e.isExternal || e.iconDefinition || e.iconClass || e.src || e.svgRaw)), c = i(() => y(
29
30
  "phila-link",
30
31
  e.variant && `phila-link--${e.variant}`,
31
32
  e.size && `is-${e.size}`,
32
33
  e.iconOnly && "icon-link",
33
34
  e.disabled && "is-disabled",
34
35
  e.className
35
- )), f = t(() => {
36
+ )), f = i(() => {
36
37
  const n = {
37
38
  disabled: e.disabled,
38
39
  ariaLabel: e.ariaLabel,
@@ -47,13 +48,13 @@ const w = /* @__PURE__ */ d({
47
48
  rel: e.rel,
48
49
  ...n
49
50
  };
50
- }), u = t(
51
+ }), u = i(
51
52
  () => ({
52
53
  iconDefinition: e.iconDefinition,
53
- iconClass: e.iconClass || (i.value ? "external-link" : void 0),
54
+ iconClass: e.iconClass || (t.value ? "external-link" : void 0),
54
55
  src: e.src,
55
56
  svgRaw: e.svgRaw,
56
- iconRight: i.value ? !0 : e.iconRight,
57
+ iconRight: t.value ? !0 : e.iconRight,
57
58
  iconOnly: e.iconOnly,
58
59
  inline: e.inline,
59
60
  text: e.text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phila/phila-ui-link",
3
- "version": "1.0.3",
3
+ "version": "1.0.4-beta.1",
4
4
  "type": "module",
5
5
  "description": "Link component with suppport for Vue Router",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@phila/phila-ui-core": "2.3.2"
39
+ "@phila/phila-ui-core": "2.3.3-beta.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^24.0.0",