amotify 0.0.2 → 0.0.4
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/src/@jsminAmotifyExtension/_.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +9 -0
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +1 -0
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/src/@types/_.d.ts +6 -0
- package/dist/src/@types/amot.d.ts +260 -0
- package/dist/src/@types/fn.d.ts +1040 -0
- package/dist/src/@types/index.d.ts +62 -0
- package/dist/src/@types/jsminAmotifyExtension.d.ts +134 -0
- package/dist/src/@types/module.d.ts +2 -0
- package/dist/src/@types/state.d.ts +145 -0
- package/dist/src/Atoms/@export.d.ts +4 -0
- package/dist/src/Atoms/FAIcon/parts.d.ts +2 -0
- package/dist/src/Atoms/Logo/parts.d.ts +1 -0
- package/dist/src/Atoms/Various/parts.d.ts +9 -0
- package/dist/src/Functions/@export.d.ts +12 -0
- package/dist/src/Functions/Button/_.d.ts +1 -0
- package/dist/src/Functions/Cropper/parts.d.ts +1 -0
- package/dist/src/Functions/Effects/Fade.d.ts +1 -0
- package/dist/src/Functions/Effects/Ripple.d.ts +1 -0
- package/dist/src/Functions/Effects/_.d.ts +3 -0
- package/dist/src/Functions/Input/Chips/Selector.d.ts +1 -0
- package/dist/src/Functions/Input/Chips/_.d.ts +2 -0
- package/dist/src/Functions/Input/DigitCharacters.d.ts +1 -0
- package/dist/src/Functions/Input/File/_.d.ts +2 -0
- package/dist/src/Functions/Input/Hidden.d.ts +1 -0
- package/dist/src/Functions/Input/List/_.d.ts +1 -0
- package/dist/src/Functions/Input/Segmented/_.d.ts +1 -0
- package/dist/src/Functions/Input/Select/_.d.ts +1 -0
- package/dist/src/Functions/Input/Slider/_.d.ts +1 -0
- package/dist/src/Functions/Input/Switch/_.d.ts +1 -0
- package/dist/src/Functions/Input/Text.d.ts +5 -0
- package/dist/src/Functions/Input/TextArea.d.ts +1 -0
- package/dist/src/Functions/Input/Time/Picker.d.ts +1 -0
- package/dist/src/Functions/Input/Time/_.d.ts +2 -0
- package/dist/src/Functions/Input/_.d.ts +5 -0
- package/dist/src/Functions/Input/core.d.ts +34 -0
- package/dist/src/Functions/Inputs/_.d.ts +3 -0
- package/dist/src/Functions/Inputs/text.d.ts +12 -0
- package/dist/src/Functions/Layout/PageNotFound.d.ts +1 -0
- package/dist/src/Functions/Layout/PageRouter.d.ts +2 -0
- package/dist/src/Functions/Layout/PageViewController/parts.d.ts +1 -0
- package/dist/src/Functions/Layout/Plate.d.ts +1 -0
- package/dist/src/Functions/Layout/RootViewController/parts.d.ts +1 -0
- package/dist/src/Functions/Layout/SwipeView/parts.d.ts +2 -0
- package/dist/src/Functions/Layout/TabBar.d.ts +1 -0
- package/dist/src/Functions/Layout/_.d.ts +2 -0
- package/dist/src/Functions/Loader/corner.d.ts +1 -0
- package/dist/src/Functions/Loader/mini.d.ts +33 -0
- package/dist/src/Functions/Loader/parts.d.ts +3 -0
- package/dist/src/Functions/Loader/top.d.ts +1 -0
- package/dist/src/Functions/Sheet/parts.d.ts +2 -0
- package/dist/src/Functions/SnackBar/parts.d.ts +2 -0
- package/dist/src/Functions/Table/Data/parts.d.ts +3 -0
- package/dist/src/Functions/Table/Drag/parts.d.ts +1 -0
- package/dist/src/Functions/Table/Normal/parts.d.ts +1 -0
- package/dist/src/Functions/Table/_.d.ts +9 -0
- package/dist/src/Functions/Tooltips/parts.d.ts +2 -0
- package/dist/src/Global/@export.d.ts +12 -0
- package/dist/src/Global/LaunchReactApplication.d.ts +1 -0
- package/dist/src/Global/styleConverter.d.ts +2 -0
- package/dist/src/Molecules/@export.d.ts +21 -0
- package/dist/src/Molecules/Accordion/parts.d.ts +2 -0
- package/dist/src/Molecules/LinkifyText/parts.d.ts +1 -0
- package/dist/src/Molecules/List.d.ts +1 -0
- package/dist/src/Organisms/@export.d.ts +2 -0
- package/dist/src/Organisms/DisplayStyleInput/_.d.ts +1 -0
- package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
- package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
- package/dist/src/Templates/@export.d.ts +2 -0
- package/dist/src/Templates/PlayGround/parts.d.ts +1 -0
- package/dist/src/config.d.ts +16 -0
- package/dist/src/launch.d.ts +9 -0
- package/dist/src/preload.d.ts +1 -0
- package/package.json +2 -2
- package/src/@jsminAmotifyExtension/_.tsx +4 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +107 -0
- package/src/@jsminAmotifyExtension/formCollect.tsx +89 -0
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +159 -0
- package/src/@jsminAmotifyExtension/variables.tsx +130 -0
- package/src/@styles/@app.scss +4 -0
- package/src/@styles/@variables/customProps.scss +109 -0
- package/src/@styles/@variables/styleSet.scss +38 -0
- package/src/@styles/@variables/themeColor.scss +71 -0
- package/src/@styles/@variables/var.scss +171 -0
- package/src/@styles/UniStyling.scss +996 -0
- package/src/@styles/init.scss +154 -0
- package/src/@types/_.tsx +6 -0
- package/src/@types/amot.tsx +323 -0
- package/src/@types/fn.tsx +1210 -0
- package/src/@types/index.tsx +74 -0
- package/src/@types/jsminAmotifyExtension.tsx +143 -0
- package/src/@types/module.tsx +2 -0
- package/src/@types/state.tsx +199 -0
- package/src/Atoms/@export.tsx +32 -0
- package/src/Atoms/FAIcon/parts.tsx +117 -0
- package/src/Atoms/FAIcon/style.module.scss +9 -0
- package/src/Atoms/Logo/parts.tsx +335 -0
- package/src/Atoms/Logo/style.module.scss +96 -0
- package/src/Atoms/Various/parts.tsx +157 -0
- package/src/Atoms/Various/style.module.scss +40 -0
- package/src/Functions/@export.tsx +29 -0
- package/src/Functions/Button/_.tsx +305 -0
- package/src/Functions/Button/style.module.scss +183 -0
- package/src/Functions/Cropper/parts.tsx +1061 -0
- package/src/Functions/Cropper/style.module.scss +62 -0
- package/src/Functions/Effects/Fade.tsx +81 -0
- package/src/Functions/Effects/Ripple.tsx +141 -0
- package/src/Functions/Effects/_.tsx +33 -0
- package/src/Functions/Effects/style.module.scss +83 -0
- package/src/Functions/Input/Chips/Selector.tsx +451 -0
- package/src/Functions/Input/Chips/_.tsx +286 -0
- package/src/Functions/Input/Chips/style.module.scss +6 -0
- package/src/Functions/Input/DigitCharacters.tsx +241 -0
- package/src/Functions/Input/File/_.tsx +596 -0
- package/src/Functions/Input/File/style.module.scss +34 -0
- package/src/Functions/Input/Hidden.tsx +18 -0
- package/src/Functions/Input/List/_.tsx +383 -0
- package/src/Functions/Input/List/style.module.scss +84 -0
- package/src/Functions/Input/Segmented/_.tsx +238 -0
- package/src/Functions/Input/Segmented/style.module.scss +81 -0
- package/src/Functions/Input/Select/_.tsx +225 -0
- package/src/Functions/Input/Select/style.module.scss +10 -0
- package/src/Functions/Input/Slider/_.tsx +519 -0
- package/src/Functions/Input/Slider/style.module.scss +67 -0
- package/src/Functions/Input/Switch/_.tsx +177 -0
- package/src/Functions/Input/Switch/style.module.scss +18 -0
- package/src/Functions/Input/Text.tsx +437 -0
- package/src/Functions/Input/TextArea.tsx +115 -0
- package/src/Functions/Input/Time/Picker.tsx +950 -0
- package/src/Functions/Input/Time/_.tsx +736 -0
- package/src/Functions/Input/Time/style.module.scss +72 -0
- package/src/Functions/Input/_.tsx +793 -0
- package/src/Functions/Input/core.tsx +461 -0
- package/src/Functions/Input/style.module.scss +43 -0
- package/src/Functions/Inputs/_.tsx +5 -0
- package/src/Functions/Inputs/style.module.scss +15 -0
- package/src/Functions/Inputs/text.tsx +67 -0
- package/src/Functions/Inputs/types.d.ts +1 -0
- package/src/Functions/Layout/PageNotFound.tsx +81 -0
- package/src/Functions/Layout/PageRouter.tsx +107 -0
- package/src/Functions/Layout/PageViewController/parts.tsx +32 -0
- package/src/Functions/Layout/Plate.tsx +30 -0
- package/src/Functions/Layout/RootViewController/parts.tsx +290 -0
- package/src/Functions/Layout/RootViewController/style.module.scss +24 -0
- package/src/Functions/Layout/SwipeView/parts.tsx +380 -0
- package/src/Functions/Layout/SwipeView/style.module.scss +19 -0
- package/src/Functions/Layout/TabBar.tsx +64 -0
- package/src/Functions/Layout/_.tsx +20 -0
- package/src/Functions/Loader/corner.tsx +78 -0
- package/src/Functions/Loader/mini.tsx +117 -0
- package/src/Functions/Loader/parts.tsx +105 -0
- package/src/Functions/Loader/style.module.scss +222 -0
- package/src/Functions/Loader/top.tsx +90 -0
- package/src/Functions/Sheet/parts.tsx +972 -0
- package/src/Functions/Sheet/style.module.scss +235 -0
- package/src/Functions/SnackBar/parts.tsx +215 -0
- package/src/Functions/SnackBar/style.module.scss +25 -0
- package/src/Functions/Table/Data/parts.tsx +955 -0
- package/src/Functions/Table/Drag/parts.tsx +448 -0
- package/src/Functions/Table/Normal/parts.tsx +123 -0
- package/src/Functions/Table/_.tsx +170 -0
- package/src/Functions/Table/style.module.scss +92 -0
- package/src/Functions/Tooltips/parts.tsx +52 -0
- package/src/Global/@export.tsx +138 -0
- package/src/Global/LaunchReactApplication.tsx +30 -0
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +435 -0
- package/src/Molecules/@export.tsx +95 -0
- package/src/Molecules/Accordion/parts.tsx +146 -0
- package/src/Molecules/Accordion/style.module.scss +13 -0
- package/src/Molecules/LinkifyText/parts.tsx +54 -0
- package/src/Molecules/List.tsx +30 -0
- package/src/Organisms/@export.tsx +5 -0
- package/src/Organisms/DisplayStyleInput/_.tsx +18 -0
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +112 -0
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +210 -0
- package/src/Templates/@export.tsx +7 -0
- package/src/Templates/PlayGround/parts.tsx +115 -0
- package/src/Templates/PlayGround/style.module.scss +38 -0
- package/src/config.tsx +132 -0
- package/src/launch.tsx +100 -0
- package/src/preload.tsx +49 -0
- package/tsconfig.json +27 -14
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useStore
|
|
3
|
+
} from '@global';
|
|
4
|
+
|
|
5
|
+
type StyleType = '¥' | '¥_h' | '¥_f' | '¥_a' | '¥bk';
|
|
6
|
+
|
|
7
|
+
const FNs = {
|
|
8
|
+
toConcreteBorderRadius: ( br?: amotify.UniStyles.Borders.RadiusParams ) => {
|
|
9
|
+
let roundness = amotify.config.roundness | 0;
|
|
10
|
+
|
|
11
|
+
if ( br == '1.tone.primary' ) {
|
|
12
|
+
br = [ 0,2,3,4,5,5 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
|
|
13
|
+
} else if ( br == '2.tone.secondary' ) {
|
|
14
|
+
br = [ 0,1,2,3,4,5 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
|
|
15
|
+
} else if ( br == '3.tone.tertiary' ) {
|
|
16
|
+
br = [ 0,'1/3','2/3',1,2,3 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
|
|
17
|
+
}
|
|
18
|
+
return br;
|
|
19
|
+
},
|
|
20
|
+
ev: ( v: any ) => $.is.nullish( v ),
|
|
21
|
+
ClassNames: ( type: StyleType,params: amotifyUniStyleParams ) => {
|
|
22
|
+
let CLS = [];
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
gap,
|
|
26
|
+
|
|
27
|
+
display: disp,
|
|
28
|
+
position,
|
|
29
|
+
overflow,
|
|
30
|
+
fontColor,fontSize,fontWeight,
|
|
31
|
+
backgroundColor: bgc,
|
|
32
|
+
textAlign,
|
|
33
|
+
boxShadow,
|
|
34
|
+
|
|
35
|
+
margin: mrg,
|
|
36
|
+
marginTop: mrgT,
|
|
37
|
+
marginRight: mrgR,
|
|
38
|
+
marginBottom: mrgB,
|
|
39
|
+
marginLeft: mrgL,
|
|
40
|
+
|
|
41
|
+
padding: pd,
|
|
42
|
+
paddingTop: pdT,
|
|
43
|
+
paddingRight: pdR,
|
|
44
|
+
paddingBottom: pdB,
|
|
45
|
+
paddingLeft: pdL,
|
|
46
|
+
|
|
47
|
+
top: T,
|
|
48
|
+
right: R,
|
|
49
|
+
bottom: B,
|
|
50
|
+
left: L,
|
|
51
|
+
|
|
52
|
+
border: b,
|
|
53
|
+
borderTop: bT,
|
|
54
|
+
borderRight: bR,
|
|
55
|
+
borderBottom: bB,
|
|
56
|
+
borderLeft: bL,
|
|
57
|
+
|
|
58
|
+
borderWidth: bWidth,
|
|
59
|
+
// borderTopWidth: bTWidth,
|
|
60
|
+
// borderRightWidth: bRWidth,
|
|
61
|
+
// borderBottomWidth: bBWidth,
|
|
62
|
+
// borderLeftWidth: bLWidth,
|
|
63
|
+
|
|
64
|
+
borderColor: bColor,
|
|
65
|
+
// borderTopColor: bTColor,
|
|
66
|
+
// borderRightColor: bRColor,
|
|
67
|
+
// borderBottomColor: bBColor,
|
|
68
|
+
// borderLeftColor: bLColor,
|
|
69
|
+
|
|
70
|
+
borderStyle: bStyle,
|
|
71
|
+
// borderTopStyle: bTStyle,
|
|
72
|
+
// borderRightStyle: bRStyle,
|
|
73
|
+
// borderBottomStyle: bBStyle,
|
|
74
|
+
// borderLeftStyle: bLStyle,
|
|
75
|
+
|
|
76
|
+
borderRadius: br,
|
|
77
|
+
borderTopLeftRadius: brTL,
|
|
78
|
+
borderTopRightRadius: brTR,
|
|
79
|
+
borderBottomLeftRadius: brBL,
|
|
80
|
+
borderBottomRightRadius: brBR,
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
flexSizing,
|
|
85
|
+
flexWrap,
|
|
86
|
+
flexType,
|
|
87
|
+
flexChilds,
|
|
88
|
+
flexGrid,
|
|
89
|
+
horizontalAlign,
|
|
90
|
+
verticalAlign,
|
|
91
|
+
|
|
92
|
+
transition,
|
|
93
|
+
|
|
94
|
+
gridCenter,
|
|
95
|
+
gridCols,
|
|
96
|
+
maxHeight,minHeight,maxWidth,minWidth,
|
|
97
|
+
width,height,
|
|
98
|
+
unitHeight,unitWidth,
|
|
99
|
+
|
|
100
|
+
opacity,
|
|
101
|
+
|
|
102
|
+
...others
|
|
103
|
+
} = params;
|
|
104
|
+
|
|
105
|
+
{
|
|
106
|
+
FNs.ev( disp ) || CLS.push( 'dsp' + disp );
|
|
107
|
+
|
|
108
|
+
if ( overflow ) {
|
|
109
|
+
let arr = $.flatArray( overflow );
|
|
110
|
+
CLS.push( 'ovfl-x-' + arr[ 0 ] );
|
|
111
|
+
CLS.push( 'ovfl-y-' + ( arr[ 1 ] || arr[ 0 ] ) );
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
FNs.ev( position ) || ( CLS.push( 'ps' + position ) );
|
|
115
|
+
FNs.ev( textAlign ) || ( CLS.push( 'txalg' + textAlign ) );
|
|
116
|
+
|
|
117
|
+
FNs.ev( fontColor ) || ( CLS.push( 'ftcl' + String( fontColor )?.replace( /\..*/,'' ) ) );
|
|
118
|
+
|
|
119
|
+
FNs.ev( fontSize ) || ( CLS.push( 'ftsz' + String( fontSize )?.replace( /\..*/,'' ) ) );
|
|
120
|
+
FNs.ev( fontWeight ) || ( CLS.push( 'ftwt' + fontWeight?.replace( /\..*/,'' ) ) );
|
|
121
|
+
|
|
122
|
+
FNs.ev( bgc ) || CLS.push( 'bgc' + String( bgc )?.replace( /\..*/,'' ) );
|
|
123
|
+
|
|
124
|
+
FNs.ev( boxShadow ) || ( CLS.push( 'bs' + boxShadow ) );
|
|
125
|
+
|
|
126
|
+
let _mrgT,_mrgR,_mrgB,_mrgL;
|
|
127
|
+
if ( $.is.exist( mrg ) ) {
|
|
128
|
+
if ( $.is.array( mrg ) ) {
|
|
129
|
+
if ( mrg.length == 2 ) [ _mrgT,_mrgR,_mrgB,_mrgL ] = [ ...mrg,...mrg ];
|
|
130
|
+
else if ( mrg.length == 4 ) [ _mrgT,_mrgR,_mrgB,_mrgL ] = mrg;
|
|
131
|
+
} else _mrgT = _mrgR = _mrgB = _mrgL = mrg;
|
|
132
|
+
mrgT = mrgT ?? _mrgT;
|
|
133
|
+
mrgR = mrgR ?? _mrgR;
|
|
134
|
+
mrgB = mrgB ?? _mrgB;
|
|
135
|
+
mrgL = mrgL ?? _mrgL;
|
|
136
|
+
}
|
|
137
|
+
FNs.ev( mrgT ) || ( CLS.push( 'mrgt' + mrgT ) );
|
|
138
|
+
FNs.ev( mrgR ) || ( CLS.push( 'mrgr' + mrgR ) );
|
|
139
|
+
FNs.ev( mrgB ) || ( CLS.push( 'mrgb' + mrgB ) );
|
|
140
|
+
FNs.ev( mrgL ) || ( CLS.push( 'mrgl' + mrgL ) );
|
|
141
|
+
|
|
142
|
+
let _pdT,_pdR,_pdB,_pdL;
|
|
143
|
+
if ( $.is.exist( pd ) ) {
|
|
144
|
+
if ( $.is.array( pd ) ) {
|
|
145
|
+
if ( pd.length == 2 ) [ _pdT,_pdR,_pdB,_pdL ] = [ ...pd,...pd ];
|
|
146
|
+
else if ( pd.length == 4 ) [ _pdT,_pdR,_pdB,_pdL ] = pd;
|
|
147
|
+
} else _pdT = _pdR = _pdB = _pdL = pd;
|
|
148
|
+
pdT = pdT ?? _pdT;
|
|
149
|
+
pdR = pdR ?? _pdR;
|
|
150
|
+
pdB = pdB ?? _pdB;
|
|
151
|
+
pdL = pdL ?? _pdL;
|
|
152
|
+
}
|
|
153
|
+
FNs.ev( pdT ) || ( CLS.push( 'pdt' + pdT ) );
|
|
154
|
+
FNs.ev( pdR ) || ( CLS.push( 'pdr' + pdR ) );
|
|
155
|
+
FNs.ev( pdB ) || ( CLS.push( 'pdb' + pdB ) );
|
|
156
|
+
FNs.ev( pdL ) || ( CLS.push( 'pdl' + pdL ) );
|
|
157
|
+
|
|
158
|
+
FNs.ev( T ) || ( CLS.push( 'pstt' + T ) );
|
|
159
|
+
FNs.ev( R ) || ( CLS.push( 'pstr' + R ) );
|
|
160
|
+
FNs.ev( B ) || ( CLS.push( 'pstb' + B ) );
|
|
161
|
+
FNs.ev( L ) || ( CLS.push( 'pstl' + L ) );
|
|
162
|
+
|
|
163
|
+
{
|
|
164
|
+
{
|
|
165
|
+
if ( $.is.exist( b ) ) {
|
|
166
|
+
bT = bT ?? b;
|
|
167
|
+
bR = bR ?? b;
|
|
168
|
+
bB = bB ?? b;
|
|
169
|
+
bL = bL ?? b;
|
|
170
|
+
}
|
|
171
|
+
if ( $.is.boolean( bT ) ) bT = [ 'unset','2.normal' ][ Number( bT ) ] as amotify.UniStyles.Borders.BorderParams;
|
|
172
|
+
if ( $.is.boolean( bR ) ) bR = [ 'unset','2.normal' ][ Number( bR ) ] as amotify.UniStyles.Borders.BorderParams;
|
|
173
|
+
if ( $.is.boolean( bB ) ) bB = [ 'unset','2.normal' ][ Number( bB ) ] as amotify.UniStyles.Borders.BorderParams;
|
|
174
|
+
if ( $.is.boolean( bL ) ) bL = [ 'unset','2.normal' ][ Number( bL ) ] as amotify.UniStyles.Borders.BorderParams;
|
|
175
|
+
FNs.ev( bT ) || ( CLS.push( 'b_t_ss' + String( bT )?.replace( /\..*/,'' ) ) );
|
|
176
|
+
FNs.ev( bR ) || ( CLS.push( 'b_r_ss' + String( bR )?.replace( /\..*/,'' ) ) );
|
|
177
|
+
FNs.ev( bB ) || ( CLS.push( 'b_b_ss' + String( bB )?.replace( /\..*/,'' ) ) );
|
|
178
|
+
FNs.ev( bL ) || ( CLS.push( 'b_l_ss' + String( bL )?.replace( /\..*/,'' ) ) );
|
|
179
|
+
}
|
|
180
|
+
if ( $.is.exist( bWidth ) ) CLS.push( 'b_wth' + String( bWidth ) );
|
|
181
|
+
if ( $.is.exist( bColor ) ) CLS.push( 'b_cl' + String( bColor ) );
|
|
182
|
+
if ( $.is.exist( bStyle ) ) CLS.push( 'b_st' + String( bStyle ) );
|
|
183
|
+
|
|
184
|
+
{
|
|
185
|
+
let _brTL,_brTR,_brBL,_brBR;
|
|
186
|
+
if ( $.is.exist( br ) ) {
|
|
187
|
+
if ( $.is.array( br ) ) {
|
|
188
|
+
if ( br.length == 4 ) [ _brTL,_brTR,_brBR,_brBL ] = br;
|
|
189
|
+
} else {
|
|
190
|
+
_brTL = _brTR = _brBL = _brBR = br;
|
|
191
|
+
}
|
|
192
|
+
brTL = brTL ?? _brTL;
|
|
193
|
+
brTR = brTR ?? _brTR;
|
|
194
|
+
brBL = brBL ?? _brBL;
|
|
195
|
+
brBR = brBR ?? _brBR;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
FNs.ev( brTL ) || ( CLS.push( 'br_tl' + FNs.toConcreteBorderRadius( brTL ) ) );
|
|
199
|
+
FNs.ev( brTR ) || ( CLS.push( 'br_tr' + FNs.toConcreteBorderRadius( brTR ) ) );
|
|
200
|
+
FNs.ev( brBL ) || ( CLS.push( 'br_bl' + FNs.toConcreteBorderRadius( brBL ) ) );
|
|
201
|
+
FNs.ev( brBR ) || ( CLS.push( 'br_br' + FNs.toConcreteBorderRadius( brBR ) ) );
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
FNs.ev( opacity ) || ( CLS.push( 'op' + opacity ) );
|
|
205
|
+
|
|
206
|
+
if ( $.is.exist( gap ) ) {
|
|
207
|
+
let gapRow,gapCol;
|
|
208
|
+
if ( $.is.array( gap ) ) gapRow = gap[ 0 ],gapCol = gap[ 1 ];
|
|
209
|
+
else gapRow = gapCol = gap;
|
|
210
|
+
CLS.push( ...[ 'gapRow' + gapRow,'gapCol' + gapCol ] );
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
FNs.ev( flexSizing ) || ( CLS.push( 'flsz' + flexSizing ) );
|
|
214
|
+
FNs.ev( flexWrap ) || ( CLS.push( 'flwrp' + flexWrap ) );
|
|
215
|
+
FNs.ev( flexType ) || ( CLS.push( 'fltyp' + flexType ) );
|
|
216
|
+
FNs.ev( flexChilds ) || ( CLS.push( 'flchld' + flexChilds ) );
|
|
217
|
+
FNs.ev( flexGrid ) || ( CLS.push( 'flgrid' + flexGrid ) );
|
|
218
|
+
FNs.ev( verticalAlign ) || ( CLS.push( 'flvrt' + verticalAlign ) );
|
|
219
|
+
FNs.ev( horizontalAlign ) || ( CLS.push( 'flhrz' + horizontalAlign ) );
|
|
220
|
+
|
|
221
|
+
FNs.ev( gridCenter ) || ( CLS.push( 'grcnt' + gridCenter ) );
|
|
222
|
+
FNs.ev( gridCols ) || ( CLS.push( 'grcol' + gridCols ) );
|
|
223
|
+
|
|
224
|
+
FNs.ev( height ) || ( CLS.push( 'hgt' + height ) );
|
|
225
|
+
FNs.ev( width ) || ( CLS.push( 'wdt' + width ) );
|
|
226
|
+
|
|
227
|
+
FNs.ev( unitHeight ) || ( CLS.push( 'unthgt' + unitHeight ) );
|
|
228
|
+
FNs.ev( unitWidth ) || ( CLS.push( 'untwdt' + unitWidth ) );
|
|
229
|
+
|
|
230
|
+
FNs.ev( transition ) || ( CLS.push( 'trnst' + transition ) );
|
|
231
|
+
|
|
232
|
+
FNs.ev( maxHeight ) || ( CLS.push( 'maxh' + maxHeight ) );
|
|
233
|
+
FNs.ev( minHeight ) || ( CLS.push( 'minh' + minHeight ) );
|
|
234
|
+
FNs.ev( maxWidth ) || ( CLS.push( 'maxw' + maxWidth ) );
|
|
235
|
+
FNs.ev( minWidth ) || ( CLS.push( 'minw' + minWidth ) );
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
otherParams: others,
|
|
240
|
+
className: CLS.length ? type + CLS.join( ' ' + type ) : ''
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export const ReadStyleSet: amotify.glob.StyleConverter.ReadStyleSet = ( rawParams ) => {
|
|
246
|
+
let params: amotifyBasicElement = { ...rawParams } as any;
|
|
247
|
+
let {
|
|
248
|
+
gradients,
|
|
249
|
+
ssCardBox,
|
|
250
|
+
ssSphere,
|
|
251
|
+
ssSquare,
|
|
252
|
+
ssPushable,
|
|
253
|
+
ssAbsoluteCovered,
|
|
254
|
+
ssTextEllipsis,
|
|
255
|
+
flexCenter,
|
|
256
|
+
flexNewLine,
|
|
257
|
+
|
|
258
|
+
isBoldFont,
|
|
259
|
+
isRounded,
|
|
260
|
+
...ReturnParams
|
|
261
|
+
} = params;
|
|
262
|
+
|
|
263
|
+
if ( gradients ) {
|
|
264
|
+
let {
|
|
265
|
+
deg,
|
|
266
|
+
colors
|
|
267
|
+
} = gradients;
|
|
268
|
+
|
|
269
|
+
ReturnParams = {
|
|
270
|
+
...ReturnParams,
|
|
271
|
+
freeCSS: {
|
|
272
|
+
background: `linear-gradient(${ deg }deg,${ colors.join( ',' ) })`,
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if ( ssCardBox ) {
|
|
277
|
+
if ( ssCardBox === true ) {
|
|
278
|
+
ssCardBox = 'border';
|
|
279
|
+
if ( amotify.config.tone == 'flat' ) ssCardBox = 'cloud';
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
let exStyles: amotifyUniStyleParams = {
|
|
283
|
+
backgroundColor: '1.layer.base',
|
|
284
|
+
borderRadius: '1.tone.primary',
|
|
285
|
+
boxShadow: 0,
|
|
286
|
+
freeCSS: {
|
|
287
|
+
zIndex: 1
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if ( ssCardBox == 'border' ) {
|
|
292
|
+
exStyles.border = true;
|
|
293
|
+
} else if ( ssCardBox == 'layer' ) {
|
|
294
|
+
exStyles.backgroundColor = '1.layer.base';
|
|
295
|
+
} else if ( ssCardBox == 'cloud' ) {
|
|
296
|
+
exStyles.backgroundColor = 'cloud';
|
|
297
|
+
} else if ( ssCardBox == 'shadow' ) {
|
|
298
|
+
exStyles.boxShadow = 1;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if ( [ 'dim','dark' ].includes( amotify.config.darkMode ) ) exStyles.boxShadow = 2;
|
|
302
|
+
ReturnParams = $.deepMerge( exStyles,ReturnParams );
|
|
303
|
+
}
|
|
304
|
+
if ( ssSphere ) {
|
|
305
|
+
flexCenter = flexCenter ?? true;
|
|
306
|
+
ReturnParams = {
|
|
307
|
+
padding: 0,
|
|
308
|
+
unitWidth: ssSphere,
|
|
309
|
+
unitHeight: ssSphere,
|
|
310
|
+
borderRadius: 'sphere',
|
|
311
|
+
flexSizing: 'none',
|
|
312
|
+
...ReturnParams,
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if ( ssSquare ) {
|
|
316
|
+
flexCenter = flexCenter ?? true;
|
|
317
|
+
ReturnParams = {
|
|
318
|
+
padding: 0,
|
|
319
|
+
unitWidth: ssSquare,
|
|
320
|
+
unitHeight: ssSquare,
|
|
321
|
+
flexSizing: 'none',
|
|
322
|
+
...ReturnParams,
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
!ssPushable || ( ReturnParams = {
|
|
327
|
+
transition: 'middle',
|
|
328
|
+
...ReturnParams,
|
|
329
|
+
className: [
|
|
330
|
+
ReturnParams.className,
|
|
331
|
+
'ssPushable'
|
|
332
|
+
].join( ' ' )
|
|
333
|
+
} );
|
|
334
|
+
|
|
335
|
+
!ssAbsoluteCovered || ( ReturnParams = {
|
|
336
|
+
position: 'absolute',
|
|
337
|
+
top: 0,
|
|
338
|
+
left: 0,
|
|
339
|
+
right: 0,
|
|
340
|
+
bottom: 0,
|
|
341
|
+
...ReturnParams
|
|
342
|
+
} );
|
|
343
|
+
!ssTextEllipsis || ( ReturnParams = {
|
|
344
|
+
overflow: 'hidden',
|
|
345
|
+
...ReturnParams,
|
|
346
|
+
freeCSS: {
|
|
347
|
+
whiteSpace: 'nowrap',
|
|
348
|
+
textOverflow: 'ellipsis',
|
|
349
|
+
...ReturnParams.freeCSS
|
|
350
|
+
}
|
|
351
|
+
} );
|
|
352
|
+
!flexNewLine || ( ReturnParams = {
|
|
353
|
+
width: 1,
|
|
354
|
+
flexSizing: 'none',
|
|
355
|
+
...ReturnParams
|
|
356
|
+
} )
|
|
357
|
+
!flexCenter || ( ReturnParams = {
|
|
358
|
+
display: 'flex',
|
|
359
|
+
horizontalAlign: 'center',
|
|
360
|
+
verticalAlign: 'center',
|
|
361
|
+
...ReturnParams
|
|
362
|
+
} );
|
|
363
|
+
!isBoldFont || ( ReturnParams = {
|
|
364
|
+
...ReturnParams,
|
|
365
|
+
fontWeight: '3.bold',
|
|
366
|
+
} );
|
|
367
|
+
!isRounded || ( ReturnParams = {
|
|
368
|
+
...ReturnParams,
|
|
369
|
+
borderRadius: 'sphere'
|
|
370
|
+
} );
|
|
371
|
+
|
|
372
|
+
return ReturnParams as any;
|
|
373
|
+
}
|
|
374
|
+
export const ToClassName: amotify.glob.StyleConverter.ToClassName = ( rawParams ) => {
|
|
375
|
+
let params = ReadStyleSet( rawParams ) as amotifyBasicElement;
|
|
376
|
+
|
|
377
|
+
let {
|
|
378
|
+
componentID,
|
|
379
|
+
UnderBreakPointStyles = {},
|
|
380
|
+
hoverStyles = {},
|
|
381
|
+
focusStyles = {},
|
|
382
|
+
activeStyles = {},
|
|
383
|
+
|
|
384
|
+
className = '',
|
|
385
|
+
|
|
386
|
+
freeCSS = {},
|
|
387
|
+
|
|
388
|
+
ssEffectsOnActive,
|
|
389
|
+
ssLastChildLossBorder,
|
|
390
|
+
...others
|
|
391
|
+
} = params;
|
|
392
|
+
|
|
393
|
+
let ClassNames = [ className ];
|
|
394
|
+
|
|
395
|
+
if ( ssLastChildLossBorder ) {
|
|
396
|
+
ClassNames.push( 'ssLastChildLossBorder_' + ssLastChildLossBorder );
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if ( ssEffectsOnActive ) {
|
|
400
|
+
ssEffectsOnActive = $.flatArray( ssEffectsOnActive );
|
|
401
|
+
for ( let effect of ssEffectsOnActive as any[] ) ClassNames.push( ...[ 'eff_' + effect,'eff_' + effect.split( '.' )[ 0 ] ] );
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
{
|
|
405
|
+
let result = FNs.ClassNames( '¥',others );
|
|
406
|
+
|
|
407
|
+
ClassNames.push( result.className );
|
|
408
|
+
others = result.otherParams;
|
|
409
|
+
}
|
|
410
|
+
if ( UnderBreakPointStyles ) ClassNames.push( FNs.ClassNames( '¥bk',UnderBreakPointStyles ).className );
|
|
411
|
+
if ( hoverStyles ) ClassNames.push( FNs.ClassNames( '¥_h',hoverStyles ).className );
|
|
412
|
+
if ( focusStyles ) ClassNames.push( FNs.ClassNames( '¥_f',focusStyles ).className );
|
|
413
|
+
if ( activeStyles ) ClassNames.push( FNs.ClassNames( '¥_a',activeStyles ).className );
|
|
414
|
+
|
|
415
|
+
let states = { ...others } as any
|
|
416
|
+
if ( freeCSS ) states.style = {
|
|
417
|
+
...freeCSS,
|
|
418
|
+
...states.style
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
if ( componentID || states[ 'data-component-id' ] ) {
|
|
422
|
+
states[ 'data-component-id' ] = states[ 'data-component-id' ] || componentID;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if ( ClassNames.length ) {
|
|
426
|
+
states.className = ClassNames.join( ' ' )
|
|
427
|
+
.trim()
|
|
428
|
+
.replace( /%/ig,'P' )
|
|
429
|
+
.replace( /\d+px/ig,'PIX' )
|
|
430
|
+
.replace( /\s+/ig,' ' )
|
|
431
|
+
.replace( /\//ig,'_' )
|
|
432
|
+
.replace( /\./ig,'-' );
|
|
433
|
+
}
|
|
434
|
+
return states;
|
|
435
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Span,
|
|
3
|
+
Box,
|
|
4
|
+
Flex
|
|
5
|
+
} from '@atoms';
|
|
6
|
+
import { List } from './List';
|
|
7
|
+
import { Accordion } from './Accordion/parts';
|
|
8
|
+
import { LinkifyText } from './LinkifyText/parts';
|
|
9
|
+
|
|
10
|
+
const Text = {
|
|
11
|
+
Title: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
12
|
+
fontSize='6.title'
|
|
13
|
+
fontWeight='3.bold'
|
|
14
|
+
{ ...params }
|
|
15
|
+
/> ),
|
|
16
|
+
SubTitle: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
17
|
+
fontSize='5.subTitle'
|
|
18
|
+
fontWeight='3.bold'
|
|
19
|
+
{ ...params }
|
|
20
|
+
/> ),
|
|
21
|
+
ThirdTitle: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
22
|
+
fontSize='4.thirdTitle'
|
|
23
|
+
fontWeight='3.bold'
|
|
24
|
+
{ ...params }
|
|
25
|
+
/> ),
|
|
26
|
+
Paragraph: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
27
|
+
fontSize='3.paragraph'
|
|
28
|
+
fontWeight='3.bold'
|
|
29
|
+
{ ...params }
|
|
30
|
+
/> ),
|
|
31
|
+
Normal: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
32
|
+
{ ...params }
|
|
33
|
+
/> ),
|
|
34
|
+
Description: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
35
|
+
{ ...params }
|
|
36
|
+
freeCSS={ {
|
|
37
|
+
whiteSpace: 'pre-wrap',
|
|
38
|
+
...params.freeCSS
|
|
39
|
+
} }
|
|
40
|
+
/> ),
|
|
41
|
+
Supplement: ( params: amotify.atoms.BoxInput ) => ( <Box
|
|
42
|
+
fontSize='1.mini'
|
|
43
|
+
{ ...params }
|
|
44
|
+
/> ),
|
|
45
|
+
NowrapSpan: ( params: amotify.atoms.SpanProps ) => ( <Span
|
|
46
|
+
{ ...params }
|
|
47
|
+
freeCSS={ {
|
|
48
|
+
whiteSpace: 'nowrap',
|
|
49
|
+
...params.freeCSS
|
|
50
|
+
} }
|
|
51
|
+
/> )
|
|
52
|
+
}
|
|
53
|
+
const Row = {
|
|
54
|
+
Center: ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
55
|
+
horizontalAlign='center'
|
|
56
|
+
verticalAlign='center'
|
|
57
|
+
flexWrap={ false }
|
|
58
|
+
gap={ 1 }
|
|
59
|
+
{ ...params }
|
|
60
|
+
/> ),
|
|
61
|
+
Left: ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
62
|
+
horizontalAlign='left'
|
|
63
|
+
verticalAlign='center'
|
|
64
|
+
flexWrap={ false }
|
|
65
|
+
gap={ 1 }
|
|
66
|
+
{ ...params }
|
|
67
|
+
/> ),
|
|
68
|
+
Right: ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
69
|
+
horizontalAlign='right'
|
|
70
|
+
verticalAlign='center'
|
|
71
|
+
flexWrap={ false }
|
|
72
|
+
gap={ 1 }
|
|
73
|
+
{ ...params }
|
|
74
|
+
/> ),
|
|
75
|
+
Separate: ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
76
|
+
horizontalAlign='between'
|
|
77
|
+
verticalAlign='center'
|
|
78
|
+
flexWrap={ false }
|
|
79
|
+
gap={ 1 }
|
|
80
|
+
{ ...params }
|
|
81
|
+
/> ),
|
|
82
|
+
}
|
|
83
|
+
const Column = ( params: amotify.atoms.FlexProps ) => ( <Flex
|
|
84
|
+
flexType='col'
|
|
85
|
+
gap={ 1 }
|
|
86
|
+
{ ...params }
|
|
87
|
+
/> );
|
|
88
|
+
export {
|
|
89
|
+
List,
|
|
90
|
+
Accordion,
|
|
91
|
+
LinkifyText,
|
|
92
|
+
Text,
|
|
93
|
+
Column,
|
|
94
|
+
Row
|
|
95
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useStore,
|
|
3
|
+
React
|
|
4
|
+
} from '@global';
|
|
5
|
+
import {
|
|
6
|
+
Box
|
|
7
|
+
} from '@atoms';
|
|
8
|
+
const {
|
|
9
|
+
useEffect,
|
|
10
|
+
useState,
|
|
11
|
+
} = React;
|
|
12
|
+
|
|
13
|
+
import style from './style.module.scss';
|
|
14
|
+
|
|
15
|
+
const Component: FNC<amotify.mols.Accordion.Params> = ( params ) => {
|
|
16
|
+
let {
|
|
17
|
+
accordionID = '',
|
|
18
|
+
slideAnimation = 'fast',
|
|
19
|
+
open = false,
|
|
20
|
+
...others
|
|
21
|
+
} = params;
|
|
22
|
+
|
|
23
|
+
let [ val_wrapID ] = useState( $.uuidGen() );
|
|
24
|
+
let [ val_contentID ] = useState( $.uuidGen() );
|
|
25
|
+
let [ val_open,set_open ] = useState( open );
|
|
26
|
+
|
|
27
|
+
if ( val_open != open ) set_open( open );
|
|
28
|
+
|
|
29
|
+
let Query = '[data-accordion-content-id="' + val_contentID + '"]';
|
|
30
|
+
|
|
31
|
+
const mounted = React.useRef( false );
|
|
32
|
+
useEffect( () => {
|
|
33
|
+
let Content = $( Query )[ 0 ];
|
|
34
|
+
if ( Content ) {
|
|
35
|
+
let contentHeight = Content.offsetHeight;
|
|
36
|
+
let transitionTime = 0;
|
|
37
|
+
if ( slideAnimation == 'fast' ) {
|
|
38
|
+
transitionTime = contentHeight / 1000;
|
|
39
|
+
transitionTime = Math.max( transitionTime,.2 );
|
|
40
|
+
} else if ( slideAnimation == 'slow' ) {
|
|
41
|
+
transitionTime = contentHeight / 300;
|
|
42
|
+
}
|
|
43
|
+
$( '#' + val_wrapID ).css( {
|
|
44
|
+
transition: transitionTime + 's'
|
|
45
|
+
} )
|
|
46
|
+
}
|
|
47
|
+
},[] );
|
|
48
|
+
useEffect( () => {
|
|
49
|
+
let Wrap = $( '#' + val_wrapID );
|
|
50
|
+
let Content = $( Query )[ 0 ];
|
|
51
|
+
if ( mounted.current ) {
|
|
52
|
+
if ( Content ) {
|
|
53
|
+
let contentHeight = Content.offsetHeight;
|
|
54
|
+
if ( $.is.exist( contentHeight ) ) {
|
|
55
|
+
if ( val_open ) {
|
|
56
|
+
Wrap.css( {
|
|
57
|
+
maxHeight: ( contentHeight + 1 ) + 'px',
|
|
58
|
+
} ).await( 200 ).css( {
|
|
59
|
+
maxHeight: 'unset',
|
|
60
|
+
overflow: ( params.overflow as any ) || 'unset'
|
|
61
|
+
} );
|
|
62
|
+
} else {
|
|
63
|
+
Wrap.css( {
|
|
64
|
+
maxHeight: ( contentHeight + 1 ) + 'px',
|
|
65
|
+
} ).await( 100 ).css( {
|
|
66
|
+
maxHeight: 0 + 'px',
|
|
67
|
+
overflow: 'hidden'
|
|
68
|
+
} );
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
} else {
|
|
73
|
+
mounted.current = true;
|
|
74
|
+
if ( Content ) {
|
|
75
|
+
let contentHeight = Content.offsetHeight;
|
|
76
|
+
if ( $.is.exist( contentHeight ) ) {
|
|
77
|
+
if ( val_open ) {
|
|
78
|
+
Wrap.css( {
|
|
79
|
+
maxHeight: ( contentHeight + 1 ) + 'px',
|
|
80
|
+
} ).await( 200 ).css( {
|
|
81
|
+
maxHeight: 'unset',
|
|
82
|
+
overflow: ( params.overflow as any ) || 'unset'
|
|
83
|
+
} );
|
|
84
|
+
} else {
|
|
85
|
+
Wrap
|
|
86
|
+
.css( {
|
|
87
|
+
maxHeight: 0 + 'px',
|
|
88
|
+
overflow: 'hidden'
|
|
89
|
+
} );
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},[ val_open ] );
|
|
95
|
+
|
|
96
|
+
if ( accordionID ) {
|
|
97
|
+
useStore.set( {
|
|
98
|
+
key: 'Accordion-' + accordionID,
|
|
99
|
+
value: {
|
|
100
|
+
open: () => {
|
|
101
|
+
set_open( true );
|
|
102
|
+
params.open = true;
|
|
103
|
+
},
|
|
104
|
+
close: () => {
|
|
105
|
+
set_open( false );
|
|
106
|
+
params.open = false;
|
|
107
|
+
},
|
|
108
|
+
toggle: () => {
|
|
109
|
+
set_open( !val_open );
|
|
110
|
+
params.open = !val_open;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} );
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return ( <Box
|
|
117
|
+
className={ [
|
|
118
|
+
style.Wrap,
|
|
119
|
+
style[ 'Open_' + val_open ]
|
|
120
|
+
].join( ' ' ) }
|
|
121
|
+
id={ val_wrapID }
|
|
122
|
+
>
|
|
123
|
+
<Box
|
|
124
|
+
data-accordion-content-id={ val_contentID }
|
|
125
|
+
{ ...others }
|
|
126
|
+
/>
|
|
127
|
+
</Box> );
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const Accordion: amotify.mols.Accordion.SetParams = Component as any
|
|
131
|
+
Accordion.fn = {
|
|
132
|
+
open: ( id ) => {
|
|
133
|
+
let component = useStore.get( 'Accordion-' + id );
|
|
134
|
+
!component || component.open();
|
|
135
|
+
},
|
|
136
|
+
close: ( id ) => {
|
|
137
|
+
let component = useStore.get( 'Accordion-' + id );
|
|
138
|
+
!component || component.close();
|
|
139
|
+
},
|
|
140
|
+
toggle: ( id ) => {
|
|
141
|
+
let component = useStore.get( 'Accordion-' + id );
|
|
142
|
+
!component || component.toggle();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { Accordion }
|