amotify 0.2.295 → 0.2.296
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/@utils/color.d.ts +3 -3
- package/dist/fn/Input/Color.d.ts +2 -2
- package/dist/fn/Input/Color.js +1 -1
- package/dist/fn/Input/Slider.d.ts +6 -2
- package/dist/fn/Input/Slider.js +1 -1
- package/dist/fn/Input/Switch.d.ts +2 -2
- package/dist/fn/Input/Switch.js +1 -1
- package/dist/fn/Input/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/@utils/color.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Themecolor } from '../@declares';
|
|
2
2
|
export declare const ColorObjects: {
|
|
3
|
-
key:
|
|
3
|
+
key: Themecolor;
|
|
4
4
|
isBrand: boolean;
|
|
5
5
|
isAvocado: boolean;
|
|
6
6
|
}[];
|
|
@@ -12,7 +12,7 @@ declare const DarkmodeColors: {
|
|
|
12
12
|
auto(): string;
|
|
13
13
|
};
|
|
14
14
|
declare const ThemeColors: {
|
|
15
|
-
[key in
|
|
15
|
+
[key in Themecolor]: {
|
|
16
16
|
alfa(alfa?: number): string;
|
|
17
17
|
isBrand: boolean;
|
|
18
18
|
isAvocado: boolean;
|
package/dist/fn/Input/Color.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Themecolor } from '../../@declares';
|
|
3
3
|
import { InputTypes } from '.';
|
|
4
4
|
declare namespace Color {
|
|
5
5
|
type Input = InputTypes.CoreInput<string> & React.DOMAttributes<HTMLInputElement> & {
|
|
@@ -8,7 +8,7 @@ declare namespace Color {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
value?: string;
|
|
10
10
|
};
|
|
11
|
-
type Color =
|
|
11
|
+
type Color = Themecolor | 'theme' | 'posi' | 'nega' | 'warn';
|
|
12
12
|
}
|
|
13
13
|
declare const Color: React.FC<Color.Input>;
|
|
14
14
|
export { Color, Color as default };
|
package/dist/fn/Input/Color.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n,c as a,d as v}from"../../chunk-C5N2D3ZX.js";import{jsx as d}from"react/jsx-runtime";import{UUID as m}from"jmini";import{useState as T}from"react";import x from"../../atoms/Box";import{OptionalInputWrapper as F,BoxWrapper as h,CoreEffects as c,DefaultBoxishStyles as w}from"./core";import{InputSwitchClasses as B}from"../../@styles/componentClasses";function S(e){let{value:r,states:I}=e,{required:p}=I,l=[];return p&&!r&&l.push({type:"invalid",label:"ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093"}),{ok:!l.filter(({type:f})=>f=="invalid").length,notice:l}}const U=e=>{let g=e,{componentId:r,required:I,form:p,enableFormSubmit:l,showInitValidation:f,onChange:
|
|
1
|
+
import{b as n,c as a,d as v}from"../../chunk-C5N2D3ZX.js";import{jsx as d}from"react/jsx-runtime";import{UUID as m}from"jmini";import{useState as T}from"react";import x from"../../atoms/Box";import{OptionalInputWrapper as F,BoxWrapper as h,CoreEffects as c,DefaultBoxishStyles as w}from"./core";import{InputSwitchClasses as B}from"../../@styles/componentClasses";function S(e){let{value:r,states:I}=e,{required:p}=I,l=[];return p&&!r&&l.push({type:"invalid",label:"ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093"}),{ok:!l.filter(({type:f})=>f=="invalid").length,notice:l}}const U=e=>{let g=e,{componentId:r,required:I,form:p,enableFormSubmit:l,showInitValidation:f,onChange:y,onKeyDown:C,onValidate:E,onValidateDelay:R,onUpdateValue:W,onUpdateValidValue:_,onUserAction:H,value:b=""}=g,t=v(g,["componentId","required","form","enableFormSubmit","showInitValidation","onChange","onKeyDown","onValidate","onValidateDelay","onUpdateValue","onUpdateValidValue","onUserAction","value"]),[i,s]=T(c.DefaultStatus(e.componentId||"",b));return c.CommonEffects({type:"color",states:e,val_status:i,set_status:s,SystemValidation:S}),d(h,{val_status:i,set_status:s,states:e,children:d(x,n({htmlTag:"input",type:"color","data-component-id":i.componentId,value:i.rawValue,className:B("Input"),onKeyDown:o=>{C&&C(o),l&&c.SubmitForm(o,p)},onChange:o=>{let{value:u}=o.target;s(D=>a(n({},D),{rawValue:u,eventType:"update",eventID:m(12),isInspected:!1,isValidated:!1,notice:[]})),y&&y(o)},onFocus:o=>{t!=null&&t.onFocus&&(t==null||t.onFocus(o)),s(u=>a(n({},u),{eventID:m(12),isFocusing:!0}))},onBlur:o=>{t!=null&&t.onBlur&&(t==null||t.onBlur(o)),s(u=>a(n({},u),{eventID:m(12),isFocusing:!1}))}},t))})},V=e=>{let r=a(n(a(n({},w(e)),{backgroundColor:"cloud",unitHeight:3}),e),{xcss:n({minWidth:108},e.xcss)});return d(F,{componentId:e.componentId,children:U,states:r})};export{V as Color,V as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ReactElement,
|
|
2
|
+
import { ReactElement, Themecolor } from '../../@declares';
|
|
3
3
|
import { InputTypes } from '.';
|
|
4
4
|
declare namespace Slider {
|
|
5
5
|
type Size = 'small' | 'medium' | 'large';
|
|
@@ -12,6 +12,10 @@ declare namespace Slider {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
value?: number | [number, number];
|
|
14
14
|
color?: Color;
|
|
15
|
+
/**
|
|
16
|
+
* default min
|
|
17
|
+
*/
|
|
18
|
+
trackMin?: number;
|
|
15
19
|
min: number;
|
|
16
20
|
max: number;
|
|
17
21
|
step: number;
|
|
@@ -26,7 +30,7 @@ declare namespace Slider {
|
|
|
26
30
|
};
|
|
27
31
|
}
|
|
28
32
|
type Input = Input.Single | Input.Range;
|
|
29
|
-
type Color =
|
|
33
|
+
type Color = Themecolor | 'theme' | 'posi' | 'nega' | 'warn';
|
|
30
34
|
type LegendsCallback = {
|
|
31
35
|
(value: number): ReactElement;
|
|
32
36
|
};
|
package/dist/fn/Input/Slider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as d,c as h,d as F,e as P}from"../../chunk-C5N2D3ZX.js";import{Fragment as ee,jsx as m,jsxs as C}from"react/jsx-runtime";import x,{UUID as E}from"jmini";import{useState as W,useEffect as K}from"react";import{$$fromRoot as _,GenerateHTMLProps as $}from"../../@utils";import{Box as b,Flex as q,Column as z}from"../../atoms";import{Literal as O}from"../../mols";import{Button as Y}from"../Button";import{OptionalInputWrapper as G,BoxWrapper as j,CoreEffects as X}from"./core";import{InputSliderClasses as V}from"../../@styles/componentClasses";function Q(e){let{value:n,states:t}=e,{required:o}=t,a=[],[l,r]=x.Arrayify(n);return o&&!l&&!r&&a.push({type:"invalid",label:"\u5FC5\u9808\u9805\u76EE\u3067\u3059"}),{ok:!a.filter(({type:i})=>i=="invalid").length,notice:a}}const f={getOffsetLeft:e=>{let{trackMin:n,min:t,max:o,value:a}=e,l=(a-(n!=null?n:t))/(o-(n!=null?n:t));return Math.min(l,1)*100},normalize:e=>{let{min:n,max:t,step:o,value:a}=e;a=Math.max(a,n),a=Math.min(a,t);let l=Math.round(a/o)*o;return{value:l,offsetLeft:f.getOffsetLeft(h(d({},e),{value:l}))}},Effects:{Start:(e,n)=>{let t=x.getCursor(e).x,{val_status:o}=n,{componentId:a}=o,l=_("#"+a+"_Bar"),{width:r,left:i}=l.position(),c=(t-i)/r;c=Math.max(c,0),c=Math.min(c,1);let u=c*o.max;x(document).onEvent("mousemove",p=>{f.Effects.Move(p,n,u)},{eventID:"SliderMouseMove",passive:!1}).onEvent("touchmove",p=>{f.Effects.Move(p,n,u)},{eventID:"SliderTouchMove",passive:!1}).onEvent("mouseup",()=>{f.Effects.End()},{eventID:"SliderMouseUp"}).onEvent("touchend",()=>{f.Effects.End()},{eventID:"SliderTouchEnd"})},Move:(e,n,t)=>{var I;let o=x.getCursor(e).x,{val_status:a}=n,{componentId:l}=a,r=_("#"+l+"_Bar"),{width:i,left:c}=r.position(),u=(o-c)/i;u=Math.max(u,0),u=Math.min(u,1);let p=(I=a.trackMin)!=null?I:a.min,v=u*(a.max-p)+p,S=f.normalize(h(d({},a),{value:v})).value,s=Math.round(v-t);return n.onChange(S,s),e.preventDefault(),e.stopPropagation(),!1},End:()=>{x(document).removeEvent(["SliderMouseMove","SliderTouchMove","SliderMouseUp","SliderTouchEnd"])}},Rail:e=>{let{rootStates:n,val_status:t,set_status:o}=e,{componentId:a}=t,l=2;n.size=="small"?l=1.5:n.size=="large"&&(l=2.5);let r=[f.normalize(h(d({},t),{value:t.safeValue[0]})),f.normalize(h(d({},t),{value:t.safeValue[1]||0}))];const i=(c,u)=>{let{min:p,max:v,step:g}=t;c=Math.max(Math.min(c,v),p),o(S=>{let s=d({},S);return s.safeValue[u]==c?s:(s.safeValue[u]=c,t.ranged&&s.safeValue[0]>s.safeValue[1]&&(s.safeValue=[s.safeValue[1],s.safeValue[0]]),h(d({},s),{rawValue:s.ranged?s.safeValue:s.safeValue[0],eventType:"update",eventID:E(12),isInspected:!1}))})};return m(z,{padding:[1,"1/2"],onPointerDown:c=>{e.rootStates.disabled||(c.stopPropagation(),!t.ranged&&f.Effects.Start(c,{val_status:t,onChange:u=>{i(u,0)}}))},children:C(b,{className:V("Bar"),height:0,position:"relative",transition:"middle",flexSizing:"none",id:a+"_Bar",children:[m(b,{position:"absolute",isRounded:!0,backgroundColor:"cloud",xcss:{top:-2*l,left:-2*l,right:-2*l,bottom:-2*l}}),m(f.Range,{rootStates:n,val_status:t,set_status:o,formatData:r,onUpdateValue:i}),m(f.DiscreteScale,{rootStates:n,val_status:t}),m(f.Edge,{focusIndex:0,rootStates:n,val_status:t,set_status:o,formatData:r[0],onUpdateValue:i}),t.ranged&&m(f.Edge,{focusIndex:1,rootStates:n,val_status:t,set_status:o,formatData:r[1],onUpdateValue:i})]})})},DiscreteScale:e=>{let{rootStates:n,val_status:t}=e;if(!n.discreteScale)return null;let{trackMin:o,min:a,max:l,step:r}=t,i=Math.round(a/r),u=Math.round(l/r)-i+1,p=0,v=t.safeValue[0]||0;return t.ranged&&(p=t.safeValue[0]||0,v=t.safeValue[1]||0),m(ee,{children:Array.from({length:u},(g,S)=>S+i).map(g=>{let S=g*r;S=Math.max(S,a),S=Math.min(S,l);let s=f.getOffsetLeft(h(d({},t),{value:S}))+"%",I=x.isInRange(S,p,v);return m(z,{gap:0,position:"absolute",verticalAlign:"center",horizontalAlign:"center",width:0,height:0,transition:"middle",fontColor:"1.clear",xcss:{pointerEvents:"none",top:"50%",left:s,transform:"translateY(-50%)"},children:m(b,{isRounded:!0,backgroundColor:I?"layer.0":"gray",ssSphere:"1/4"})},S)})})},Range:e=>{let{rootStates:n,formatData:t,val_status:o}=e,a=2;return n.size=="small"?a=1.5:n.size=="large"&&(a=2.5),C(b,{className:V("Range"),position:"absolute",transition:"middle",xcss:d({cursor:"pointer",top:"50%",transform:"translateY(-50%)"},o.ranged?{left:t[0].offsetLeft+"%",width:t[1].offsetLeft-t[0].offsetLeft+"%"}:{left:0,width:(t[0].offsetLeft||0)+"%"}),onPointerDown:l=>{if(!e.rootStates.disabled){if(l.stopPropagation(),o.ranged){let[r,i]=o.safeValue;l.stopPropagation(),f.Effects.Start(l,{val_status:o,onChange:(c,u)=>{e.set_status(p=>{let v=p.safeValue,g=d({},p);return g.safeValue=[f.normalize(h(d({},o),{value:r+u})).value,f.normalize(h(d({},o),{value:i+u})).value],g.safeValue[0]==v[0]&&g.safeValue[1]==v[1]?h(d({},p),{eventType:"update",eventID:E(12)}):h(d({},g),{rawValue:g.ranged?g.safeValue:g.safeValue[0],eventType:"update",eventID:E(12),isInspected:!1})})}});return}f.Effects.Start(l,{val_status:o,onChange:r=>{e.onUpdateValue(r,0)}})}},children:[m(b,{className:V("Field"),transition:"middle",position:"absolute",isRounded:!0,backgroundColor:n.color,xcss:{top:-6*a,bottom:-6*a,left:-6*a,right:-6*a}}),m(b,{className:V("Child"),transition:"middle",position:"absolute",isRounded:!0,backgroundColor:n.color,xcss:{pointerEvents:"none",top:-2*a,left:-2*a,right:-2*a,bottom:-2*a}})]})},Edge:e=>{let{formatData:n,rootStates:t,val_status:o,set_status:a}=e,l=2;return t.size=="small"?l=1.5:t.size=="large"&&(l=2.5),C(Y.Plain,{className:V("Edge"),position:"absolute",transition:"middle",height:0,width:0,flexCenter:!0,xcss:{left:n.offsetLeft+"%"},onPointerDown:r=>{e.rootStates.disabled||e.focusIndex==1&&!o.ranged||(r.stopPropagation(),f.Effects.Start(r,{val_status:o,onChange:i=>{e.onUpdateValue(i,e.focusIndex)}}))},onKeyDown:r=>{t.enableFormSubmit&&X.SubmitForm(r,t.form);let{min:i,max:c,step:u}=o,{key:p,metaKey:v,ctrlKey:g}=r,S=g||v,s=o.safeValue[e.focusIndex];if(!p.match(/Arrow/))return;r.preventDefault(),p.match(/Left|Up/)?S?s=i:s-=u:p.match(/Right|Down/)&&(S?s=c:s+=u);let I=f.normalize(h(d({},o),{value:s}));e.onUpdateValue(I.value,e.focusIndex)},onFocus:r=>{a(i=>h(d({},i),{eventID:E(12),isFocusing:!0}))},onBlur:r=>{a(i=>h(d({},i),{eventID:E(12),isFocusing:!1}))},children:[m(b,{className:V("EdgeChild"),transition:"middle",position:"absolute",backgroundColor:t.color,isRounded:!0,opacity:"trans",xcss:{pointerEvents:"all",top:-12*l,bottom:-12*l,left:-12*l,right:-12*l}}),m(b,{transition:"long",boxShadow:"1.remark",fontSize:"0.xs",backgroundColor:!o.ranged||e.focusIndex==1?t.color:"layer.0",ssSphere:l,xcss:{pointerEvents:"all"}})]})},Legends:e=>{var g;let{val_status:n,rootStates:t}=e,{trackMin:o,min:a,max:l,step:r}=n,[i]=W(E()),c=(g=t.legends)!=null?g:!0,u=Math.round(a/r),p=Math.round(l/r),v=p-u+1;return K(()=>{if(!c)return;const S=()=>P(void 0,null,function*(){yield x.pending(100);let s=_("#"+i),I=_("#"+i+"-"+a),T=s.position().width-I.position().left,B=12*4,k=Math.round(T/B),U=Math.max(1,Math.floor(v/k));for(let y=u;y<=p;y++){let D=y*r,A=y==u||y==p||y%U==0;_("#"+i+"-"+D).css({display:A?"flex":"none"})}});return x(window).onEvent("resize",S,{eventID:"SliderResizeCB-"+i}),S(),()=>{x(window).removeEvent("SliderResizeCB-"+i)}},[]),c?C(q,{fontSize:"0.xs",position:"relative",padding:[0,"1/2"],id:i,xcss:{pointerEvents:"none",userSelect:"none"},children:[C(z,{gap:0,unitWidth:0,opacity:"trans",children:[m(b,{unitHeight:"1/2"}),m(O.Supplement,{fontHeight:1.2,children:"A"})]}),Array.from({length:v},(S,s)=>s+u).map(S=>{let s=S*r;s=Math.max(s,a),s=Math.min(s,l);let I=f.getOffsetLeft(h(d({},n),{value:s}))+"%";return C(z,{gap:0,id:i+"-"+s,className:V("Legend"),position:"relative",verticalAlign:"center",unitWidth:0,display:"none",transition:"middle",fontColor:"1.clear",textAlign:"center",xcss:{left:I,whiteSpace:"nowrap"},children:[m(b,{isRounded:!0,backgroundColor:"mono.positive",opacity:"low",unitWidth:"1/12",unitHeight:"1/2"}),m(O.Supplement,{fontHeight:1.2,fontSize:"0.xs",children:t.onLegendRender?t.onLegendRender(s):s.rank()})]},s)})]}):null},index:e=>{let N=e,{color:n="theme",required:t,form:o="",discreteScale:a,size:l,ranged:r,legends:i,onLegendRender:c,trackMin:u,min:p,max:v,step:g,enableFormSubmit:S,showInitValidation:s,onValidate:I,onValidateDelay:T,onUpdateValue:B,onUpdateValidValue:k,onUserAction:U,value:y=0,className:D,wrapStyles:A}=N,J=F(N,["color","required","form","discreteScale","size","ranged","legends","onLegendRender","trackMin","min","max","step","enableFormSubmit","showInitValidation","onValidate","onValidateDelay","onUpdateValue","onUpdateValidValue","onUserAction","value","className","wrapStyles"]),[L,w]=W({componentId:e.componentId||"",rawValue:y,safeValue:x.Arrayify(y),ranged:!!r,trackMin:Math.min(u!=null?u:p,p),min:p,max:v,step:g,eventType:"init",eventID:E(12)});return X.CommonEffects({type:"slider",states:e,val_status:L,set_status:w,SystemValidation:Q,ExtraOverrideStates:H=>({safeValue:x.Arrayify(H)})}),m(j,{val_status:L,set_status:w,states:e,children:C(z,h(d({gap:0,padding:[0,"1/2"],flexSizing:"auto"},J),{className:[D,V("Wrap")].join(" "),children:[m(f.Rail,{rootStates:e,val_status:L,set_status:w}),m(f.Legends,{rootStates:e,val_status:L})]}))})}},M=e=>{let n=h(d({color:"theme",size:"medium",discreteScale:!0},e),{xcss:d({minWidth:120},e.xcss)});return m(G,{componentId:e.componentId,children:f.index,states:$(n)})},R=M;R.Small=e=>m(M,d({size:"small"},e)),R.Medium=e=>m(M,d({size:"medium"},e)),R.Large=e=>m(M,d({size:"large"},e));const Z=e=>m(M,d({ranged:!0},e));R.Range=Z,R.Range.Small=e=>m(M,d({ranged:!0,size:"small"},e)),R.Range.Medium=e=>m(M,d({ranged:!0,size:"medium"},e)),R.Range.Large=e=>m(M,d({ranged:!0,size:"large"},e));export{R as Slider,R as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Themecolor, ReactElement } from '../../@declares';
|
|
3
3
|
import { InputTypes } from '.';
|
|
4
4
|
declare namespace Switch {
|
|
5
5
|
type Size = 'small' | 'regular' | 'large';
|
|
@@ -13,7 +13,7 @@ declare namespace Switch {
|
|
|
13
13
|
value?: boolean;
|
|
14
14
|
icon?: ReactElement;
|
|
15
15
|
};
|
|
16
|
-
type Color =
|
|
16
|
+
type Color = Themecolor | 'theme' | 'posi' | 'nega' | 'warn';
|
|
17
17
|
namespace Methods {
|
|
18
18
|
type Component = React.FC<Input>;
|
|
19
19
|
type FNs = {
|
package/dist/fn/Input/Switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,c as s,d as T}from"../../chunk-C5N2D3ZX.js";import{jsx as a,jsxs as k}from"react/jsx-runtime";import{UUID as
|
|
1
|
+
import{b as o,c as s,d as T}from"../../chunk-C5N2D3ZX.js";import{jsx as a,jsxs as k}from"react/jsx-runtime";import{UUID as b}from"jmini";import{useState as E}from"react";import h from"../../atoms/Box";import{Row as L}from"../../mols";import{Label as U}from"../Button";import{OptionalInputWrapper as P,BoxWrapper as W,CoreEffects as B}from"./core";import{InputSwitchClasses as g}from"../../@styles/componentClasses";function A(e){let{value:n,states:l}=e,{required:S}=l,r=[];return S&&!n&&r.push({type:"invalid",label:"ON\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093"}),{ok:!r.filter(({type:I})=>I=="invalid").length,notice:r}}const O=e=>{let V=e,{componentId:n,color:l="posi",required:S,form:r,id:I,enableFormSubmit:M,showInitValidation:_,onChange:R,onKeyDown:F,onValidate:H,onValidateDelay:q,onUpdateValue:K,onUpdateValidValue:$,onUserAction:j,size:C="regular",value:N="",icon:v="",isApply:p=!1}=V,t=T(V,["componentId","color","required","form","id","enableFormSubmit","showInitValidation","onChange","onKeyDown","onValidate","onValidateDelay","onUpdateValue","onUpdateValidValue","onUserAction","size","value","icon","isApply"]),[c,u]=E({componentId:e.componentId||"",rawValue:N,eventType:"init",eventID:b(12)}),d=!!c.rawValue;B.CommonEffects({type:"switch",states:e,val_status:c,set_status:u,SystemValidation:A});let f="middle",x=5,y=3;return p&&(y=4),k(W,{val_status:c,set_status:u,states:e,children:[a(h,s(o({htmlTag:"input",type:"checkbox","data-component-id":c.componentId,checked:c.rawValue,className:g("Input"),id:I,onKeyDown:i=>{F&&F(i),M&&B.SubmitForm(i,r)},onChange:i=>{let{checked:m}=i.target;u(z=>s(o({},z),{rawValue:m,eventType:"update",eventID:b(12),isInspected:!1,isValidated:!1,notice:[]})),R&&R(i)}},t),{onFocus:i=>{t!=null&&t.onFocus&&(t==null||t.onFocus(i)),u(m=>s(o({},m),{eventID:b(12),isFocusing:!0}))},onBlur:i=>{t!=null&&t.onBlur&&(t==null||t.onBlur(i)),u(m=>s(o({},m),{eventID:b(12),isFocusing:!1}))}})),a(U.Plain,{tabIndex:-1,htmlFor:I,padding:"1/4",transition:f,borderRadius:"1.tone.primary",className:g("Label"),children:a(h,s(o({},p?{padding:"1/4",isRounded:!0,backgroundColor:d?l:"layer.3"}:{}),{children:k(L.Center,{unitHeight:C=="small"?2:C=="regular"?2.5:C=="large"?3:0,position:"relative",xcss:{aspectRatio:(x+y)/x},children:[!p&&a(h,{position:"absolute",backgroundColor:d?l:"layer.5",isRounded:!0,transition:f,width:1,opacity:"middle",className:g("Bar"),xcss:{height:"40%"}}),a(h,{position:"absolute",top:0,backgroundColor:!p&&d?l:"white",transition:f,isRounded:!0,flexCenter:!0,boxShadow:"1.remark",className:g("Dot"),xcss:{height:"100%",aspectRatio:"1",left:d?`calc(${y.ratio(x+y)}%)`:0},children:v&&a(h,{transition:f,flexCenter:!0,fontColor:d?p?l:"white":"6.clear",children:v})})]})}))})]})},w=e=>{let n=o({},e);return n.value=!!n.value,n.color=n.color||"theme",a(P,{componentId:n.componentId,children:O,states:n})},D=Object.assign(w,{S:e=>a(w,s(o({},e),{size:"small"})),R:e=>a(w,s(o({},e),{size:"regular"})),L:e=>a(w,s(o({},e),{size:"large"}))});export{D as Switch,D as default};
|
package/dist/fn/Input/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ declare const amotify: {
|
|
|
80
80
|
useUpdateEffect: (effect: () => void | (() => void), deps: any[]) => void;
|
|
81
81
|
pageRouter: utils.pageRouter.Methods;
|
|
82
82
|
ColorObjects: {
|
|
83
|
-
key: utils.
|
|
83
|
+
key: utils.Themecolor;
|
|
84
84
|
isBrand: boolean;
|
|
85
85
|
isAvocado: boolean;
|
|
86
86
|
}[];
|