@skill-map/cli 0.39.0 → 0.40.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/cli/tutorial/sm-master/references/tour-authoring.md +0 -4
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +279 -26
- package/dist/cli.js +732 -549
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +44 -34
- package/dist/kernel/index.js +28 -13
- package/dist/kernel/index.js.map +1 -1
- package/dist/ui/{chunk-VZIYRREA.js → chunk-2W6BCESO.js} +30 -29
- package/dist/ui/{chunk-NHI5UPNK.js → chunk-3FPS5OIY.js} +1 -1
- package/dist/ui/chunk-4KQGLZV2.js +123 -0
- package/dist/ui/chunk-ASCTZSBZ.js +107 -0
- package/dist/ui/chunk-GSTYLDCL.js +135 -0
- package/dist/ui/chunk-MHEKCBIR.js +317 -0
- package/dist/ui/chunk-PFA2CVPN.js +61 -0
- package/dist/ui/chunk-PURF7B6R.js +411 -0
- package/dist/ui/chunk-UFCOGNZX.js +1 -0
- package/dist/ui/chunk-WQ42JTZB.js +90 -0
- package/dist/ui/chunk-XEWWXGNE.js +1 -0
- package/dist/ui/chunk-YXFKPYK3.js +965 -0
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-WLCA4YLM.js +3 -0
- package/package.json +2 -2
- package/dist/ui/chunk-AALYQ3RG.js +0 -965
- package/dist/ui/chunk-JECPBFFX.js +0 -135
- package/dist/ui/chunk-LGLLRAJ6.js +0 -61
- package/dist/ui/chunk-PVVKVGJ6.js +0 -500
- package/dist/ui/chunk-SKA7ZFUX.js +0 -1
- package/dist/ui/chunk-VDMXHCXR.js +0 -1
- package/dist/ui/chunk-XRDZZC5F.js +0 -123
- package/dist/ui/chunk-YPO2DTMO.js +0 -317
- package/dist/ui/chunk-ZYIKNMFV.js +0 -107
- package/dist/ui/main-TYWMNAII.js +0 -2
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import{$a as le,Aa as ne,Gb as I,Gc as $e,H as Ee,Hc as W,I as x,Ib as re,J as $,Ja as oe,Jc as K,L as B,Ma as T,Mc as w,N as m,Na as A,Nc as ge,Rb as se,Sa as N,Sb as _,Ta as ie,Tc as y,U as Le,Ua as ae,Uc as Y,Va as Te,Vb as u,Wb as a,Ya as Ae,Yc as Pe,_ as De,_c as He,bc as L,ca as P,cc as we,da as H,dc as de,eb as Ne,fa as b,gb as k,hb as Be,ib as Oe,jb as ke,lb as z,mb as q,mc as Se,md as je,na as O,nc as G,ub as E,va as D,vb as Ie,vd as Ve,wa as j,wb as _e,xa as V,ya as R,za as C}from"./chunk-YXFKPYK3.js";import{J as xe,L as Q,Q as ce,b as U,d as ue,g as Fe,ga as pe}from"./chunk-3SI3TVER.js";import{a as te}from"./chunk-VB56BUGO.js";var tt=["data-p-icon","times"],wt=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=b(t)))(o||t)}})();static \u0275cmp=D({type:t,selectors:[["","data-p-icon","times"]],features:[C],attrs:tt,decls:1,vars:0,consts:[["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(n,o){n&1&&(Le(),Ae(0,"path",0))},encapsulation:2})}return t})();var nt=Object.defineProperty,Re=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ze=(t,i,e)=>i in t?nt(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,qe=(t,i)=>{for(var e in i||(i={}))ot.call(i,e)&&ze(t,e,i[e]);if(Re)for(var e of Re(i))it.call(i,e)&&ze(t,e,i[e]);return t},at=(t,i,e)=>new Promise((n,o)=>{var l=s=>{try{f(e.next(s))}catch(c){o(c)}},r=s=>{try{f(e.throw(s))}catch(c){o(c)}},f=s=>s.done?n(s.value):Promise.resolve(s.value).then(l,r);f((e=e.apply(t,i)).next())}),Z="animation",S="transition";function lt(t){return t?t.disabled||!!(t.safe&&xe()):!1}function rt(t,i){return t?qe(qe({},t),Object.entries(i).reduce((e,[n,o])=>{var l;return e[n]=(l=t[n])!=null?l:o,e},{})):i}function st(t){let{name:i,enterClass:e,leaveClass:n}=t||{};return{enter:{from:e?.from||`${i}-enter-from`,to:e?.to||`${i}-enter-to`,active:e?.active||`${i}-enter-active`},leave:{from:n?.from||`${i}-leave-from`,to:n?.to||`${i}-leave-to`,active:n?.active||`${i}-leave-active`}}}function dt(t){return{enter:{onBefore:t?.onBeforeEnter,onStart:t?.onEnter,onAfter:t?.onAfterEnter,onCancelled:t?.onEnterCancelled},leave:{onBefore:t?.onBeforeLeave,onStart:t?.onLeave,onAfter:t?.onAfterLeave,onCancelled:t?.onLeaveCancelled}}}function ut(t,i){let e=window.getComputedStyle(t),n=g=>{let M=e[`${g}Delay`],v=e[`${g}Duration`];return[M.split(", ").map(pe),v.split(", ").map(pe)]},[o,l]=n(S),[r,f]=n(Z),s=Math.max(...l.map((g,M)=>g+o[M])),c=Math.max(...f.map((g,M)=>g+r[M])),d,p=0,h=0;return i===S?s>0&&(d=S,p=s,h=l.length):i===Z?c>0&&(d=Z,p=c,h=f.length):(p=Math.max(s,c),d=p>0?s>c?S:Z:void 0,h=d?d===S?l.length:f.length:0),{type:d,timeout:p,count:h}}function J(t,i){return typeof t=="number"?t:typeof t=="object"&&t[i]!=null?t[i]:null}function ct(t,i=!0,e=!1){if(!i&&!e)return;let n=Fe(t);i&&ce(t,"--pui-motion-height",n.height+"px"),e&&ce(t,"--pui-motion-width",n.width+"px")}var pt={name:"p",safe:!0,disabled:!1,enter:!0,leave:!0,autoHeight:!0,autoWidth:!1};function he(t,i){if(!t)throw new Error("Element is required.");let e={},n=!1,o={},l=null,r={},f=d=>{if(Object.assign(e,rt(d,pt)),!e.enter&&!e.leave)throw new Error("Enter or leave must be true.");r=dt(e),n=lt(e),o=st(e),l=null},s=d=>at(null,null,function*(){l?.();let{onBefore:p,onStart:h,onAfter:g,onCancelled:M}=r[d]||{},v={element:t};if(n){p?.(v),h?.(v),g?.(v);return}let{from:me,active:be,to:Ce}=o[d]||{};return ct(t,e.autoHeight,e.autoWidth),p?.(v),U(t,me),U(t,be),t.offsetHeight,ue(t,me),U(t,Ce),h?.(v),new Promise(ye=>{let Xe=J(e.duration,d),Me=()=>{ue(t,[Ce,be]),l=null},et=()=>{Me(),g?.(v),ye()};l=()=>{Me(),M?.(v),ye()},ft(t,e.type,Xe,et)})});f(i);let c={enter:()=>e.enter?s("enter"):Promise.resolve(),leave:()=>e.leave?s("leave"):Promise.resolve(),cancel:()=>{l?.(),l=null},update:(d,p)=>{if(!d)throw new Error("Element is required.");t=d,c.cancel(),f(p)}};return e.appear&&c.enter(),c}var gt=0;function ft(t,i,e,n){let o=t._motionEndId=++gt,l=()=>{o===t._motionEndId&&n()};if(e!=null)return setTimeout(l,e);let{type:r,timeout:f,count:s}=ut(t,i);if(!r){n();return}let c=r+"end",d=0,p=()=>{t.removeEventListener(c,h,!0),l()},h=g=>{g.target===t&&++d>=s&&p()};t.addEventListener(c,h,{capture:!0,once:!0}),setTimeout(()=>{d<s&&p()},f+1)}var vt=["*"];function mt(t,i){t&1&&Oe(0)}var X=new WeakMap;function F(t,i){if(t)switch(X.has(t)||X.set(t,{display:t.style.display,visibility:t.style.visibility,maxHeight:t.style.maxHeight,overflow:t.style.overflow}),i){case"display":t.style.display="none";break;case"visibility":t.style.visibility="hidden",t.style.maxHeight="0",t.style.overflow="hidden";break}}function ee(t,i){if(!t)return;let e=X.get(t)??t.style;switch(i){case"display":t.style.display=e?.display||"";break;case"visibility":t.style.visibility=e?.visibility||"",t.style.maxHeight=e?.maxHeight||"",t.style.overflow=e?.overflow||"";break}X.delete(t)}var bt=`
|
|
2
|
+
.p-motion {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
`,Ct={root:"p-motion"},ve=(()=>{class t extends K{name="motion";style=bt;classes=Ct;static \u0275fac=(()=>{let e;return function(o){return(e||(e=b(t)))(o||t)}})();static \u0275prov=x({token:t,factory:t.\u0275fac})}return t})();var Ge=new B("MOTION_INSTANCE"),yt=(()=>{class t extends ge{$pcMotion=m(Ge,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=m(y,{self:!0});onAfterViewChecked(){let n=this.options()?.root||{};this.bindDirectiveInstance.setAttrs(te(te({},this.ptms(["host","root"])),n))}_componentStyle=m(ve);visible=a(!1);mountOnEnter=a(!0);unmountOnLeave=a(!0);name=a(void 0);type=a(void 0);safe=a(void 0);disabled=a(!1);appear=a(!1);enter=a(!0);leave=a(!0);duration=a(void 0);hideStrategy=a("display");enterFromClass=a(void 0);enterToClass=a(void 0);enterActiveClass=a(void 0);leaveFromClass=a(void 0);leaveToClass=a(void 0);leaveActiveClass=a(void 0);options=a({});onBeforeEnter=u();onEnter=u();onAfterEnter=u();onEnterCancelled=u();onBeforeLeave=u();onLeave=u();onAfterLeave=u();onLeaveCancelled=u();motionOptions=_(()=>{let e=this.options();return{name:e.name??this.name(),type:e.type??this.type(),safe:e.safe??this.safe(),disabled:e.disabled??this.disabled(),appear:!1,enter:e.enter??this.enter(),leave:e.leave??this.leave(),duration:e.duration??this.duration(),enterClass:{from:e.enterClass?.from??(e.name?void 0:this.enterFromClass()),to:e.enterClass?.to??(e.name?void 0:this.enterToClass()),active:e.enterClass?.active??(e.name?void 0:this.enterActiveClass())},leaveClass:{from:e.leaveClass?.from??(e.name?void 0:this.leaveFromClass()),to:e.leaveClass?.to??(e.name?void 0:this.leaveToClass()),active:e.leaveClass?.active??(e.name?void 0:this.leaveActiveClass())},onBeforeEnter:e.onBeforeEnter??this.handleBeforeEnter,onEnter:e.onEnter??this.handleEnter,onAfterEnter:e.onAfterEnter??this.handleAfterEnter,onEnterCancelled:e.onEnterCancelled??this.handleEnterCancelled,onBeforeLeave:e.onBeforeLeave??this.handleBeforeLeave,onLeave:e.onLeave??this.handleLeave,onAfterLeave:e.onAfterLeave??this.handleAfterLeave,onLeaveCancelled:e.onLeaveCancelled??this.handleLeaveCancelled}});motion;isInitialMount=!0;cancelled=!1;destroyed=!1;rendered=P(!1);handleBeforeEnter=e=>!this.destroyed&&this.onBeforeEnter.emit(e);handleEnter=e=>!this.destroyed&&this.onEnter.emit(e);handleAfterEnter=e=>!this.destroyed&&this.onAfterEnter.emit(e);handleEnterCancelled=e=>!this.destroyed&&this.onEnterCancelled.emit(e);handleBeforeLeave=e=>!this.destroyed&&this.onBeforeLeave.emit(e);handleLeave=e=>!this.destroyed&&this.onLeave.emit(e);handleAfterLeave=e=>!this.destroyed&&this.onAfterLeave.emit(e);handleLeaveCancelled=e=>!this.destroyed&&this.onLeaveCancelled.emit(e);constructor(){super(),H(()=>{let e=this.hideStrategy();this.isInitialMount?(F(this.$el,e),this.rendered.set(this.visible()&&this.mountOnEnter()||!this.mountOnEnter())):this.visible()&&!this.rendered()&&(F(this.$el,e),this.rendered.set(!0))}),H(()=>{this.motion||(this.motion=he(this.$el,this.motionOptions()))}),de(async()=>{if(!this.$el)return;let e=this.isInitialMount&&this.visible()&&this.appear(),n=this.hideStrategy();this.visible()?(await Q(),ee(this.$el,n),(e||!this.isInitialMount)&&(this.applyMotionDuration("enter"),this.motion?.enter())):this.isInitialMount||(await Q(),this.applyMotionDuration("leave"),this.motion?.leave()?.then(async()=>{this.$el&&!this.cancelled&&!this.visible()&&(F(this.$el,n),this.unmountOnLeave()&&(await Q(),this.cancelled||this.rendered.set(!1)))})),this.isInitialMount=!1})}applyMotionDuration(e){let n=se(this.motionOptions),o=J(n.duration,e);if(o==null||!this.$el)return;let l=this.$el,r=`${o}ms`;n.type==="transition"?l.style.transitionDuration=r:l.style.animationDuration=r}onDestroy(){this.destroyed=!0,this.cancelled=!0,this.motion?.cancel(),this.motion=void 0,ee(this.$el,this.hideStrategy()),this.$el?.remove(),this.isInitialMount=!0}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["p-motion"]],hostVars:2,hostBindings:function(n,o){n&2&&E(o.cx("root"))},inputs:{visible:[1,"visible"],mountOnEnter:[1,"mountOnEnter"],unmountOnLeave:[1,"unmountOnLeave"],name:[1,"name"],type:[1,"type"],safe:[1,"safe"],disabled:[1,"disabled"],appear:[1,"appear"],enter:[1,"enter"],leave:[1,"leave"],duration:[1,"duration"],hideStrategy:[1,"hideStrategy"],enterFromClass:[1,"enterFromClass"],enterToClass:[1,"enterToClass"],enterActiveClass:[1,"enterActiveClass"],leaveFromClass:[1,"leaveFromClass"],leaveToClass:[1,"leaveToClass"],leaveActiveClass:[1,"leaveActiveClass"],options:[1,"options"]},outputs:{onBeforeEnter:"onBeforeEnter",onEnter:"onEnter",onAfterEnter:"onAfterEnter",onEnterCancelled:"onEnterCancelled",onBeforeLeave:"onBeforeLeave",onLeave:"onLeave",onAfterLeave:"onAfterLeave",onLeaveCancelled:"onLeaveCancelled"},features:[I([ve,{provide:Ge,useExisting:t},{provide:w,useExisting:t}]),R([y]),C],ngContentSelectors:vt,decls:1,vars:1,template:function(n,o){n&1&&(Be(),T(0,mt,1,0)),n&2&&A(o.rendered()?0:-1)},dependencies:[G,Y],encapsulation:2})}return t})(),Ue=new B("MOTION_DIRECTIVE_INSTANCE"),Kt=(()=>{class t extends ge{$pcMotionDirective=m(Ue,{optional:!0,skipSelf:!0})??void 0;visible=a(!1,{alias:"pMotion"});name=a(void 0,{alias:"pMotionName"});type=a(void 0,{alias:"pMotionType"});safe=a(void 0,{alias:"pMotionSafe"});disabled=a(!1,{alias:"pMotionDisabled"});appear=a(!1,{alias:"pMotionAppear"});enter=a(!0,{alias:"pMotionEnter"});leave=a(!0,{alias:"pMotionLeave"});duration=a(void 0,{alias:"pMotionDuration"});hideStrategy=a("display",{alias:"pMotionHideStrategy"});enterFromClass=a(void 0,{alias:"pMotionEnterFromClass"});enterToClass=a(void 0,{alias:"pMotionEnterToClass"});enterActiveClass=a(void 0,{alias:"pMotionEnterActiveClass"});leaveFromClass=a(void 0,{alias:"pMotionLeaveFromClass"});leaveToClass=a(void 0,{alias:"pMotionLeaveToClass"});leaveActiveClass=a(void 0,{alias:"pMotionLeaveActiveClass"});options=a({},{alias:"pMotionOptions"});onBeforeEnter=u({alias:"pMotionOnBeforeEnter"});onEnter=u({alias:"pMotionOnEnter"});onAfterEnter=u({alias:"pMotionOnAfterEnter"});onEnterCancelled=u({alias:"pMotionOnEnterCancelled"});onBeforeLeave=u({alias:"pMotionOnBeforeLeave"});onLeave=u({alias:"pMotionOnLeave"});onAfterLeave=u({alias:"pMotionOnAfterLeave"});onLeaveCancelled=u({alias:"pMotionOnLeaveCancelled"});motionOptions=_(()=>{let e=this.options()??{};return{name:e.name??this.name(),type:e.type??this.type(),safe:e.safe??this.safe(),disabled:e.disabled??this.disabled(),appear:!1,enter:e.enter??this.enter(),leave:e.leave??this.leave(),duration:e.duration??this.duration(),enterClass:{from:e.enterClass?.from??(e.name?void 0:this.enterFromClass()),to:e.enterClass?.to??(e.name?void 0:this.enterToClass()),active:e.enterClass?.active??(e.name?void 0:this.enterActiveClass())},leaveClass:{from:e.leaveClass?.from??(e.name?void 0:this.leaveFromClass()),to:e.leaveClass?.to??(e.name?void 0:this.leaveToClass()),active:e.leaveClass?.active??(e.name?void 0:this.leaveActiveClass())},onBeforeEnter:e.onBeforeEnter??this.handleBeforeEnter,onEnter:e.onEnter??this.handleEnter,onAfterEnter:e.onAfterEnter??this.handleAfterEnter,onEnterCancelled:e.onEnterCancelled??this.handleEnterCancelled,onBeforeLeave:e.onBeforeLeave??this.handleBeforeLeave,onLeave:e.onLeave??this.handleLeave,onAfterLeave:e.onAfterLeave??this.handleAfterLeave,onLeaveCancelled:e.onLeaveCancelled??this.handleLeaveCancelled}});motion;isInitialMount=!0;cancelled=!1;destroyed=!1;handleBeforeEnter=e=>!this.destroyed&&this.onBeforeEnter.emit(e);handleEnter=e=>!this.destroyed&&this.onEnter.emit(e);handleAfterEnter=e=>!this.destroyed&&this.onAfterEnter.emit(e);handleEnterCancelled=e=>!this.destroyed&&this.onEnterCancelled.emit(e);handleBeforeLeave=e=>!this.destroyed&&this.onBeforeLeave.emit(e);handleLeave=e=>!this.destroyed&&this.onLeave.emit(e);handleAfterLeave=e=>!this.destroyed&&this.onAfterLeave.emit(e);handleLeaveCancelled=e=>!this.destroyed&&this.onLeaveCancelled.emit(e);constructor(){super(),H(()=>{this.motion||(this.motion=he(this.$el,this.motionOptions()))}),de(()=>{if(!this.$el)return;let e=this.isInitialMount&&this.visible()&&this.appear(),n=this.hideStrategy();this.visible()?(ee(this.$el,n),(e||!this.isInitialMount)&&(this.applyMotionDuration("enter"),this.motion?.enter())):this.isInitialMount?F(this.$el,n):(this.applyMotionDuration("leave"),this.motion?.leave()?.then(()=>{this.$el&&!this.cancelled&&!this.visible()&&F(this.$el,n)})),this.isInitialMount=!1})}applyMotionDuration(e){let n=se(this.motionOptions),o=J(n.duration,e);if(o==null||!this.$el)return;let l=this.$el,r=`${o}ms`;n.type==="transition"?l.style.transitionDuration=r:l.style.animationDuration=r}onDestroy(){this.destroyed=!0,this.cancelled=!0,this.motion?.cancel(),this.motion=void 0,ee(this.$el,this.hideStrategy()),this.$el?.remove(),this.isInitialMount=!0}static \u0275fac=function(n){return new(n||t)};static \u0275dir=V({type:t,selectors:[["","pMotion",""]],inputs:{visible:[1,"pMotion","visible"],name:[1,"pMotionName","name"],type:[1,"pMotionType","type"],safe:[1,"pMotionSafe","safe"],disabled:[1,"pMotionDisabled","disabled"],appear:[1,"pMotionAppear","appear"],enter:[1,"pMotionEnter","enter"],leave:[1,"pMotionLeave","leave"],duration:[1,"pMotionDuration","duration"],hideStrategy:[1,"pMotionHideStrategy","hideStrategy"],enterFromClass:[1,"pMotionEnterFromClass","enterFromClass"],enterToClass:[1,"pMotionEnterToClass","enterToClass"],enterActiveClass:[1,"pMotionEnterActiveClass","enterActiveClass"],leaveFromClass:[1,"pMotionLeaveFromClass","leaveFromClass"],leaveToClass:[1,"pMotionLeaveToClass","leaveToClass"],leaveActiveClass:[1,"pMotionLeaveActiveClass","leaveActiveClass"],options:[1,"pMotionOptions","options"]},outputs:{onBeforeEnter:"pMotionOnBeforeEnter",onEnter:"pMotionOnEnter",onAfterEnter:"pMotionOnAfterEnter",onEnterCancelled:"pMotionOnEnterCancelled",onBeforeLeave:"pMotionOnBeforeLeave",onLeave:"pMotionOnLeave",onAfterLeave:"pMotionOnAfterLeave",onLeaveCancelled:"pMotionOnLeaveCancelled"},features:[I([ve,{provide:Ue,useExisting:t},{provide:w,useExisting:t}]),C]})}return t})(),Yt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=j({type:t});static \u0275inj=$({imports:[yt]})}return t})();var Qe=`
|
|
6
|
+
.p-togglebutton {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
user-select: none;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
position: relative;
|
|
12
|
+
color: dt('togglebutton.color');
|
|
13
|
+
background: dt('togglebutton.background');
|
|
14
|
+
border: 1px solid dt('togglebutton.border.color');
|
|
15
|
+
padding: dt('togglebutton.padding');
|
|
16
|
+
font-size: 1rem;
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
font-feature-settings: inherit;
|
|
19
|
+
transition:
|
|
20
|
+
background dt('togglebutton.transition.duration'),
|
|
21
|
+
color dt('togglebutton.transition.duration'),
|
|
22
|
+
border-color dt('togglebutton.transition.duration'),
|
|
23
|
+
outline-color dt('togglebutton.transition.duration'),
|
|
24
|
+
box-shadow dt('togglebutton.transition.duration');
|
|
25
|
+
border-radius: dt('togglebutton.border.radius');
|
|
26
|
+
outline-color: transparent;
|
|
27
|
+
font-weight: dt('togglebutton.font.weight');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-togglebutton-content {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: dt('togglebutton.gap');
|
|
36
|
+
padding: dt('togglebutton.content.padding');
|
|
37
|
+
background: transparent;
|
|
38
|
+
border-radius: dt('togglebutton.content.border.radius');
|
|
39
|
+
transition:
|
|
40
|
+
background dt('togglebutton.transition.duration'),
|
|
41
|
+
color dt('togglebutton.transition.duration'),
|
|
42
|
+
border-color dt('togglebutton.transition.duration'),
|
|
43
|
+
outline-color dt('togglebutton.transition.duration'),
|
|
44
|
+
box-shadow dt('togglebutton.transition.duration');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover {
|
|
48
|
+
background: dt('togglebutton.hover.background');
|
|
49
|
+
color: dt('togglebutton.hover.color');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.p-togglebutton.p-togglebutton-checked {
|
|
53
|
+
background: dt('togglebutton.checked.background');
|
|
54
|
+
border-color: dt('togglebutton.checked.border.color');
|
|
55
|
+
color: dt('togglebutton.checked.color');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.p-togglebutton-checked .p-togglebutton-content {
|
|
59
|
+
background: dt('togglebutton.content.checked.background');
|
|
60
|
+
box-shadow: dt('togglebutton.content.checked.shadow');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-togglebutton:focus-visible {
|
|
64
|
+
box-shadow: dt('togglebutton.focus.ring.shadow');
|
|
65
|
+
outline: dt('togglebutton.focus.ring.width') dt('togglebutton.focus.ring.style') dt('togglebutton.focus.ring.color');
|
|
66
|
+
outline-offset: dt('togglebutton.focus.ring.offset');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.p-togglebutton.p-invalid {
|
|
70
|
+
border-color: dt('togglebutton.invalid.border.color');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.p-togglebutton:disabled {
|
|
74
|
+
opacity: 1;
|
|
75
|
+
cursor: default;
|
|
76
|
+
background: dt('togglebutton.disabled.background');
|
|
77
|
+
border-color: dt('togglebutton.disabled.border.color');
|
|
78
|
+
color: dt('togglebutton.disabled.color');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.p-togglebutton-label,
|
|
82
|
+
.p-togglebutton-icon {
|
|
83
|
+
position: relative;
|
|
84
|
+
transition: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.p-togglebutton-icon {
|
|
88
|
+
color: dt('togglebutton.icon.color');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover .p-togglebutton-icon {
|
|
92
|
+
color: dt('togglebutton.icon.hover.color');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.p-togglebutton.p-togglebutton-checked .p-togglebutton-icon {
|
|
96
|
+
color: dt('togglebutton.icon.checked.color');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.p-togglebutton:disabled .p-togglebutton-icon {
|
|
100
|
+
color: dt('togglebutton.icon.disabled.color');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.p-togglebutton-sm {
|
|
104
|
+
padding: dt('togglebutton.sm.padding');
|
|
105
|
+
font-size: dt('togglebutton.sm.font.size');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.p-togglebutton-sm .p-togglebutton-content {
|
|
109
|
+
padding: dt('togglebutton.content.sm.padding');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.p-togglebutton-lg {
|
|
113
|
+
padding: dt('togglebutton.lg.padding');
|
|
114
|
+
font-size: dt('togglebutton.lg.font.size');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.p-togglebutton-lg .p-togglebutton-content {
|
|
118
|
+
padding: dt('togglebutton.content.lg.padding');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.p-togglebutton-fluid {
|
|
122
|
+
width: 100%;
|
|
123
|
+
}
|
|
124
|
+
`;var We=(()=>{class t extends Ve{required=a(void 0,{transform:L});invalid=a(void 0,{transform:L});disabled=a(void 0,{transform:L});name=a();_disabled=P(!1);$disabled=_(()=>this.disabled()||this._disabled());onModelChange=()=>{};onModelTouched=()=>{};writeDisabledState(e){this._disabled.set(e)}writeControlValue(e,n){}writeValue(e){this.writeControlValue(e,this.writeModelValue.bind(this))}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.writeDisabledState(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=b(t)))(o||t)}})();static \u0275dir=V({type:t,inputs:{required:[1,"required"],invalid:[1,"invalid"],disabled:[1,"disabled"],name:[1,"name"]},features:[C]})}return t})();var Mt=["icon"],Et=["content"],Ze=t=>({$implicit:t});function Lt(t,i){t&1&&le(0)}function Dt(t,i){if(t&1&&Te(0,"span",0),t&2){let e=k(3);E(e.cn(e.cx("icon"),e.checked?e.onIcon:e.offIcon,e.iconPos==="left"?e.cx("iconLeft"):e.cx("iconRight"))),N("pBind",e.ptm("icon"))}}function Tt(t,i){if(t&1&&T(0,Dt,1,3,"span",2),t&2){let e=k(2);A(e.onIcon||e.offIcon?0:-1)}}function At(t,i){t&1&&le(0)}function Nt(t,i){if(t&1&&ne(0,At,1,0,"ng-container",1),t&2){let e=k(2);N("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",re(2,Ze,e.checked))}}function Bt(t,i){if(t&1&&(T(0,Tt,1,1)(1,Nt,1,4,"ng-container"),ie(2,"span",0),Ie(3),ae()),t&2){let e=k();A(e.iconTemplate?1:0),O(2),E(e.cx("label")),N("pBind",e.ptm("label")),O(),_e(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var Ot=`
|
|
125
|
+
${Qe}
|
|
126
|
+
|
|
127
|
+
/* For PrimeNG (iconPos) */
|
|
128
|
+
.p-togglebutton-icon-right {
|
|
129
|
+
order: 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.p-togglebutton.ng-invalid.ng-dirty {
|
|
133
|
+
border-color: dt('togglebutton.invalid.border.color');
|
|
134
|
+
}
|
|
135
|
+
`,kt={root:({instance:t})=>["p-togglebutton p-component",{"p-togglebutton-checked":t.checked,"p-invalid":t.invalid(),"p-disabled":t.$disabled(),"p-togglebutton-sm p-inputfield-sm":t.size==="small","p-togglebutton-lg p-inputfield-lg":t.size==="large","p-togglebutton-fluid":t.fluid()}],content:"p-togglebutton-content",icon:"p-togglebutton-icon",iconLeft:"p-togglebutton-icon-left",iconRight:"p-togglebutton-icon-right",label:"p-togglebutton-label"},Ke=(()=>{class t extends K{name="togglebutton";style=Ot;classes=kt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=b(t)))(o||t)}})();static \u0275prov=x({token:t,factory:t.\u0275fac})}return t})();var Ye=new B("TOGGLEBUTTON_INSTANCE"),It={provide:je,useExisting:Ee(()=>Je),multi:!0},Je=(()=>{class t extends We{componentName="ToggleButton";$pcToggleButton=m(Ye,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=m(y,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onKeyDown(e){switch(e.code){case"Enter":this.toggle(e),e.preventDefault();break;case"Space":this.toggle(e),e.preventDefault();break}}toggle(e){!this.$disabled()&&!(this.allowEmpty===!1&&this.checked)&&(this.checked=!this.checked,this.writeModelValue(this.checked),this.onModelChange(this.checked),this.onModelTouched(),this.onChange.emit({originalEvent:e,checked:this.checked}),this.cd.markForCheck())}onLabel="Yes";offLabel="No";onIcon;offIcon;ariaLabel;ariaLabelledBy;styleClass;inputId;tabindex=0;iconPos="left";autofocus;size;allowEmpty;fluid=a(void 0,{transform:L});onChange=new De;iconTemplate;contentTemplate;templates;checked=!1;onInit(){(this.checked===null||this.checked===void 0)&&(this.checked=!1)}_componentStyle=m(Ke);onBlur(){this.onModelTouched()}get hasOnLabel(){return this.onLabel&&this.onLabel.length>0}get hasOffLabel(){return this.offLabel&&this.offLabel.length>0}get active(){return this.checked===!0}_iconTemplate;_contentTemplate;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}writeControlValue(e,n){this.checked=e,n(e),this.cd.markForCheck()}get dataP(){return this.cn({checked:this.active,invalid:this.invalid(),[this.size]:this.size})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=b(t)))(o||t)}})();static \u0275cmp=D({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(n,o,l){if(n&1&&ke(l,Mt,4)(l,Et,4)(l,$e,4),n&2){let r;z(r=q())&&(o.iconTemplate=r.first),z(r=q())&&(o.contentTemplate=r.first),z(r=q())&&(o.templates=r)}},hostVars:11,hostBindings:function(n,o){n&1&&Ne("keydown",function(r){return o.onKeyDown(r)})("click",function(r){return o.toggle(r)}),n&2&&(oe("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("aria-pressed",o.checked?"true":"false")("role","button")("tabindex",o.tabindex!==void 0?o.tabindex:o.$disabled()?-1:0)("data-pc-name","togglebutton")("data-p-checked",o.active)("data-p-disabled",o.$disabled())("data-p",o.dataP),E(o.cn(o.cx("root"),o.styleClass)))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",we],iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",L],size:"size",allowEmpty:"allowEmpty",fluid:[1,"fluid"]},outputs:{onChange:"onChange"},features:[I([It,Ke,{provide:Ye,useExisting:t},{provide:w,useExisting:t}]),R([He,y]),C],decls:3,vars:9,consts:[[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class","pBind"]],template:function(n,o){n&1&&(ie(0,"span",0),ne(1,Lt,1,0,"ng-container",1),T(2,Bt,4,5),ae()),n&2&&(E(o.cx("content")),N("pBind",o.ptm("content")),oe("data-p",o.dataP),O(),N("ngTemplateOutlet",o.contentTemplate||o._contentTemplate)("ngTemplateOutletContext",re(7,Ze,o.checked)),O(),A(o.contentTemplate?-1:2))},dependencies:[G,Se,W,Y,y],encapsulation:2,changeDetection:0})}return t})(),Tn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=j({type:t});static \u0275inj=$({imports:[Je,W,W]})}return t})();export{wt as a,yt as b,Kt as c,Yt as d,We as e,Je as f,Tn as g};
|