@phila/phila-ui-button 2.2.0 → 2.2.1-beta.0

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"),o=require("@phila/phila-ui-core"),c=["disabled"],d=t.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(s){const e=s,i=n=>"href"in n&&n.href!==void 0||"to"in n&&n.to!==void 0,a=t.computed(()=>o.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),l=t.computed(()=>i(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:a.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:a.value}:{}),r=t.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size,shadow:e.iconOnly&&e.variant==="standard"}));return(n,u)=>i(e)?(t.openBlock(),t.createBlock(t.unref(o.BaseLink),t.mergeProps({key:0},{...l.value,...n.$attrs},{role:"button"}),{default:t.withCtx(()=>[t.createVNode(t.unref(o.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)):(t.openBlock(),t.createElementBlock("button",t.mergeProps({key:1,type:"button",disabled:e.disabled,class:a.value},n.$attrs),[t.createVNode(t.unref(o.ActionContent),t.normalizeProps(t.guardReactiveProps(r.value)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.text),1)])]),_:3},16)],16,c))}});exports.PhilaButton=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("@phila/phila-ui-core"),c=["disabled"],u=e.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(s){const t=s,a=n=>"href"in n&&n.href!==void 0||"to"in n&&n.to!==void 0,i=e.computed(()=>o.cn("phila-button",`phila-button--${t.variant}`,t.size&&`is-${t.size}`,t.iconOnly&&"icon-button",t.iconOnly&&t.variant==="standard"&&"icon-button--standard",t.className)),l=e.computed(()=>a(t)?"to"in t&&t.to!==void 0?{to:t.to,disabled:t.disabled,className:i.value}:{href:t.href,target:t.target,rel:t.rel,disabled:t.disabled,className:i.value}:{}),r=e.computed(()=>({iconDefinition:t.iconDefinition,iconClass:t.iconClass,src:t.src,iconRight:t.iconRight,iconOnly:t.iconOnly,text:t.text,size:t.size}));return(n,d)=>a(t)?(e.openBlock(),e.createBlock(e.unref(o.BaseLink),e.mergeProps({key:0},{...l.value,...n.$attrs},{role:"button"}),{default:e.withCtx(()=>[e.createVNode(e.unref(o.ActionContent),e.normalizeProps(e.guardReactiveProps(r.value)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:"button",disabled:t.disabled,class:i.value},n.$attrs),[e.createVNode(e.unref(o.ActionContent),e.normalizeProps(e.guardReactiveProps(r.value)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)],16,c))}});exports.PhilaButton=u;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as g, computed as o, createBlock as B, createElementBlock as k, openBlock as r, unref as a, mergeProps as c, withCtx as i, createVNode as d, normalizeProps as u, guardReactiveProps as f, renderSlot as m, createTextVNode as p, toDisplayString as b } from "vue";
2
2
  import { cn as C, BaseLink as P, ActionContent as h } from "@phila/phila-ui-core";
3
- const _ = ["disabled"], $ = /* @__PURE__ */ g({
3
+ const _ = ["disabled"], x = /* @__PURE__ */ g({
4
4
  inheritAttrs: !1,
5
5
  __name: "PhlButton",
6
6
  props: {
@@ -47,8 +47,7 @@ const _ = ["disabled"], $ = /* @__PURE__ */ g({
47
47
  iconRight: t.iconRight,
48
48
  iconOnly: t.iconOnly,
49
49
  text: t.text,
50
- size: t.size,
51
- shadow: t.iconOnly && t.variant === "standard"
50
+ size: t.size
52
51
  })
53
52
  );
54
53
  return (e, z) => s(t) ? (r(), B(a(P), c({ key: 0 }, { ...y.value, ...e.$attrs }, { role: "button" }), {
@@ -81,5 +80,5 @@ const _ = ["disabled"], $ = /* @__PURE__ */ g({
81
80
  }
82
81
  });
83
82
  export {
84
- $ as PhilaButton
83
+ x as PhilaButton
85
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phila/phila-ui-button",
3
- "version": "2.2.0",
3
+ "version": "2.2.1-beta.0",
4
4
  "type": "module",
5
5
  "description": "Button component for Phila UI library",
6
6
  "main": "./dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "@fortawesome/vue-fontawesome": "^3.1.2"
31
31
  },
32
32
  "dependencies": {
33
- "@phila/phila-ui-core": "2.3.0"
33
+ "@phila/phila-ui-core": "2.3.1-beta.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^24.0.0",