@oneb/ui-vue 0.0.11 → 0.0.12

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../_plugin-vue_export-helper-f246444f.cjs");const b={},g={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}},m=e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1),h=[m];function f(t,n){return e.openBlock(),e.createElementBlock("svg",g,h)}const y=p._export_sfc(b,[["render",f]]),v={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]}},w=["relative inline-flex","border","items-center justify-center","text-sm font-medium whitespace-nowrap","disabled:opacity-50 disabled:cursor-default","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-colors duration-200"],k={sm:["px-2 py-1"],md:["px-3 py-2"],lg:["px-4 py-3"]},_={primary:["rounded-md border-transparent bg-primary-base disabled:bg-primary-hover text-white hover:bg-primary-hover focus:ring-primary-glow"],secondary:["rounded-md border-primary-stroke bg-primary-body disabled:bg-primary-body-hover text-black hover:bg-primary-body-hover focus:ring-tertiary-glow"],info:["rounded-md border-transparent bg-info-base disabled:bg-info-hover text-white hover:bg-info-hover focus:ring-info-glow"],success:["rounded-md border-transparent bg-success-base disabled:bg-success-hover text-white hover:bg-success-hover focus:ring-success-glow"],warning:["rounded-md border-transparent bg-warning-base disabled:bg-warning-hover text-white hover:bg-warning-hover focus:ring-warning-glow"],danger:["rounded-md border-transparent bg-danger-base disabled:bg-danger-hover text-white hover:bg-danger-hover focus:ring-danger-glow"],touch:["rounded-full border-transparent text-black hover:bg-primary-body-hover hover:shadow p-3 focus:ring-tertiary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover"],none:["rounded-md border-transparent text-gray-500"]},C=(t="primary",n="md")=>{const o=[];return o.push(...w),o.push(..._[t]??[]),t!=="touch"&&o.push(...k[n]??[]),o},B=["disabled","title","type","onClick"],x=e.defineComponent({__name:"OneButton",props:v,emits:["click"],setup(t,{emit:n}){const o=t,a=()=>{n("click")},r=e.computed(()=>o.icon),l=e.computed(()=>{const s=C(o.variant,o.size);return o.variant==="touch"&&o.active&&s.push("bg-primary-body-active"),s}),c=e.computed(()=>o.disabled||o.isLoading),d=e.computed(()=>o.label&&o.label.length>0&&o.variant!=="touch"),u=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return(o.icon!=null||o.isLoading)&&s.push("ml-2"),s}),i=e.computed(()=>{const s=[];return o.size==="sm"?s.push("w-3 h-3"):o.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof o.iconClass=="string"?s.push(o.iconClass):o.iconClass instanceof Array&&s.push(...o.iconClass),s});return(s,L)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(l.value),disabled:c.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(a,["stop"])},[s.isLoading?(e.openBlock(),e.createBlock(y,{key:0,class:e.normalizeClass(i.value)},null,8,["class"])):r.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:1,class:e.normalizeClass(i.value)},null,8,["class"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(u.value)},e.toDisplayString(s.label),3)):e.createCommentVNode("",!0)],10,B))}});exports.OneButton=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../_plugin-vue_export-helper-f246444f.cjs");const b={},g={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}},m=e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1),h=[m];function f(t,n){return e.openBlock(),e.createElementBlock("svg",g,h)}const y=p._export_sfc(b,[["render",f]]),v={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]}},w=["relative inline-flex","border","items-center justify-center","font-medium whitespace-nowrap","disabled:opacity-50 disabled:cursor-default","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-colors duration-200"],k={sm:["px-2 py-1 text-sm"],md:["px-3 py-2"],lg:["px-4 py-3"]},_={primary:["rounded-md border-transparent bg-primary-base disabled:bg-primary-hover text-white hover:bg-primary-hover focus:ring-primary-glow"],secondary:["rounded-md border-primary-stroke bg-primary-body disabled:bg-primary-body-hover text-black hover:bg-primary-body-hover focus:ring-tertiary-glow"],info:["rounded-md border-transparent bg-info-base disabled:bg-info-hover text-white hover:bg-info-hover focus:ring-info-glow"],success:["rounded-md border-transparent bg-success-base disabled:bg-success-hover text-white hover:bg-success-hover focus:ring-success-glow"],warning:["rounded-md border-transparent bg-warning-base disabled:bg-warning-hover text-white hover:bg-warning-hover focus:ring-warning-glow"],danger:["rounded-md border-transparent bg-danger-base disabled:bg-danger-hover text-white hover:bg-danger-hover focus:ring-danger-glow"],touch:["rounded-full border-transparent text-black hover:bg-primary-body-hover hover:shadow p-3 focus:ring-tertiary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover"],none:["rounded-md border-transparent text-gray-500"]},C=(t="primary",n="md")=>{const o=[];return o.push(...w),o.push(..._[t]??[]),t!=="touch"&&o.push(...k[n]??[]),o},B=["disabled","title","type","onClick"],x=e.defineComponent({__name:"OneButton",props:v,emits:["click"],setup(t,{emit:n}){const o=t,a=()=>{n("click")},r=e.computed(()=>o.icon),l=e.computed(()=>{const s=C(o.variant,o.size);return o.variant==="touch"&&o.active&&s.push("bg-primary-body-active"),s}),c=e.computed(()=>o.disabled||o.isLoading),d=e.computed(()=>o.label&&o.label.length>0&&o.variant!=="touch"),u=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return(o.icon!=null||o.isLoading)&&s.push("ml-2"),s}),i=e.computed(()=>{const s=[];return o.size==="sm"?s.push("w-3 h-3"):o.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof o.iconClass=="string"?s.push(o.iconClass):o.iconClass instanceof Array&&s.push(...o.iconClass),s});return(s,L)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(l.value),disabled:c.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(a,["stop"])},[s.isLoading?(e.openBlock(),e.createBlock(y,{key:0,class:e.normalizeClass(i.value)},null,8,["class"])):r.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:1,class:e.normalizeClass(i.value)},null,8,["class"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(u.value)},e.toDisplayString(s.label),3)):e.createCommentVNode("",!0)],10,B))}});exports.OneButton=x;
@@ -57,12 +57,12 @@ const z = /* @__PURE__ */ k(x, [["render", S]]), I = {
57
57
  "relative inline-flex",
58
58
  "border",
59
59
  "items-center justify-center",
60
- "text-sm font-medium whitespace-nowrap",
60
+ "font-medium whitespace-nowrap",
61
61
  "disabled:opacity-50 disabled:cursor-default",
62
62
  "focus:outline-none focus:ring-2 focus:ring-offset-2",
63
63
  "transition-colors duration-200"
64
64
  ], O = {
65
- sm: ["px-2 py-1"],
65
+ sm: ["px-2 py-1 text-sm"],
66
66
  md: ["px-3 py-2"],
67
67
  lg: ["px-4 py-3"]
68
68
  }, j = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneb/ui-vue",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [