amotify 0.0.13 → 0.0.14
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/@types/amot.tsx +48 -63
- package/@types/fn.tsx +10 -16
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +8 -9
- package/dist/coreVender.js +14 -0
- package/package.json +27 -22
- package/src/@atoms.tsx +4 -2
- package/src/@global.tsx +5 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +2 -0
- package/src/@jsminAmotifyExtension/variables.tsx +4 -0
- package/src/@organisms.tsx +1 -5
- package/src/@styles/init.scss +1 -1
- package/src/@variables.tsx +70 -0
- package/src/atoms/FAI/parts.tsx +134 -0
- package/src/config.tsx +31 -5
- package/src/functions/Button/_.tsx +0 -1
- package/src/functions/Cropper/parts.tsx +18 -10
- package/src/functions/Effects/Ripple.tsx +1 -1
- package/src/functions/Input/Chips/Selector.tsx +9 -9
- package/src/functions/Input/Chips/_.tsx +10 -3
- package/src/functions/Input/DigitCharacters.tsx +13 -15
- package/src/functions/Input/File/_.tsx +35 -63
- package/src/functions/Input/Hidden.tsx +3 -1
- package/src/functions/Input/List/_.tsx +8 -8
- package/src/functions/Input/Select/_.tsx +8 -7
- package/src/functions/Input/Slider/_.tsx +5 -5
- package/src/functions/Input/Switch/_.tsx +9 -8
- package/src/functions/Input/Text.tsx +3 -4
- package/src/functions/Input/TextArea.tsx +3 -3
- package/src/functions/Input/Time/Picker.tsx +10 -17
- package/src/functions/Input/Time/_.tsx +3 -2
- package/src/functions/Input/Time/style.module.scss +9 -2
- package/src/functions/Input/_.tsx +24 -12
- package/src/functions/Input/core.tsx +10 -10
- package/src/functions/Input/style.module.scss +16 -3
- package/src/functions/Layout/PageNotFound.tsx +2 -4
- package/src/functions/Layout/PageRouter.tsx +2 -3
- package/src/functions/Loader/parts.tsx +3 -1
- package/src/functions/Loader/style.module.scss +1 -1
- package/src/functions/Sheet/parts.tsx +45 -42
- package/src/functions/Sheet/style.module.scss +16 -23
- package/src/functions/SnackBar/parts.tsx +5 -3
- package/src/functions/SnackBar/style.module.scss +1 -1
- package/src/functions/Table/Data/parts.tsx +18 -12
- package/src/functions/Table/Drag/parts.tsx +7 -9
- package/src/functions/Table/_.tsx +2 -2
- package/src/global/LaunchReactApplication.tsx +16 -5
- package/src/launch.tsx +12 -5
- package/src/molecules/Accordion/parts.tsx +4 -1
- package/src/molecules/LinkifyText/parts.tsx +2 -3
- package/src/preload.tsx +19 -30
- package/tsconfig.json +19 -8
- package/webpack.config.js +16 -5
- package/src/atoms/FAIcon/parts.tsx +0 -118
- package/src/atoms/FAIcon/style.module.scss +0 -8
- package/src/organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/organisms/DisplayStyleInput/darkmode.tsx +0 -107
- package/src/organisms/DisplayStyleInput/themeColor.tsx +0 -205
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
React
|
|
3
|
-
} from '@global';
|
|
4
|
-
import {
|
|
5
|
-
Box,
|
|
6
|
-
Flex,
|
|
7
|
-
Img,
|
|
8
|
-
FAIcon
|
|
9
|
-
} from '@atoms';
|
|
10
|
-
import {
|
|
11
|
-
Column,
|
|
12
|
-
Row,
|
|
13
|
-
Text
|
|
14
|
-
} from '@mols';
|
|
15
|
-
import {
|
|
16
|
-
Input
|
|
17
|
-
} from '@fn';
|
|
18
|
-
|
|
19
|
-
type ColorIconParams = {
|
|
20
|
-
key: string
|
|
21
|
-
icon: ReactElement
|
|
22
|
-
label?: ReactElement
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const Colors = {
|
|
26
|
-
Basics: [
|
|
27
|
-
{
|
|
28
|
-
key: 'comun',icon: <Box
|
|
29
|
-
padding={ '1/2' }
|
|
30
|
-
>
|
|
31
|
-
<Img src={ Img.uri.comunIconClear } />
|
|
32
|
-
</Box>
|
|
33
|
-
},
|
|
34
|
-
{ key: 'leaf',icon: 'leaf' },
|
|
35
|
-
{ key: 'heart',icon: 'heart' },
|
|
36
|
-
{ key: 'droplet',icon: 'droplet' },
|
|
37
|
-
],
|
|
38
|
-
Brands: [
|
|
39
|
-
{ key: 'line',icon: <FAIcon isBrandIcon d="line" />,label: 'LINE' },
|
|
40
|
-
{ key: 'twitter',icon: <FAIcon isBrandIcon d="twitter" />,label: 'Twitter' },
|
|
41
|
-
{ key: 'amazon',icon: <FAIcon isBrandIcon d="amazon" />,label: 'Amazon' },
|
|
42
|
-
{ key: 'facebook',icon: <FAIcon isBrandIcon d="facebook" />,label: 'Facebook' },
|
|
43
|
-
{ key: 'android',icon: <FAIcon isBrandIcon d="android" />,label: 'Android' },
|
|
44
|
-
{ key: 'slackBlue',icon: <FAIcon isBrandIcon d="slack" />,label: 'Slack Blue' },
|
|
45
|
-
{ key: 'slackGreen',icon: <FAIcon isBrandIcon d="slack" />,label: 'Slack Green' },
|
|
46
|
-
{ key: 'slackRed',icon: <FAIcon isBrandIcon d="slack" />,label: 'Slack Red' },
|
|
47
|
-
{ key: 'slackYellow',icon: <FAIcon isBrandIcon d="slack" />,label: 'Slack Yellow' },
|
|
48
|
-
{ key: 'slackBase',icon: <FAIcon isBrandIcon d="slack" />,label: 'Slack Base' },
|
|
49
|
-
{ key: 'googleBlue',icon: <FAIcon isBrandIcon d="google" />,label: 'Google Blue' },
|
|
50
|
-
{ key: 'googleGreen',icon: <FAIcon isBrandIcon d="google" />,label: 'Google Green' },
|
|
51
|
-
{ key: 'googleYellow',icon: <FAIcon isBrandIcon d="google" />,label: 'Google Yellow' },
|
|
52
|
-
{ key: 'googleRed',icon: <FAIcon isBrandIcon d="google" />,label: 'Google Red' }
|
|
53
|
-
],
|
|
54
|
-
Originals: [
|
|
55
|
-
{ key: 'brick',icon: 'block-brick' },
|
|
56
|
-
{ key: 'flower',icon: 'flower-tulip' },
|
|
57
|
-
{ key: 'lip',icon: 'lips' },
|
|
58
|
-
{ key: 'wine',icon: 'wine-glass' },
|
|
59
|
-
{ key: 'theater',icon: 'theater-masks',label: 'entertainment' },
|
|
60
|
-
{ key: 'bat',icon: 'bat' },
|
|
61
|
-
{ key: 'poizon',icon: 'flask-poison' },
|
|
62
|
-
{ key: 'eggplant',icon: 'eggplant' },
|
|
63
|
-
{ key: 'ufo',icon: 'ufo',label: 'UFO' },
|
|
64
|
-
{ key: 'alien',icon: 'alien' },
|
|
65
|
-
{ key: 'tombstone',icon: 'tombstone' },
|
|
66
|
-
{ key: 'ninja',icon: 'user-ninja' },
|
|
67
|
-
{ key: 'moon',icon: 'moon' },
|
|
68
|
-
{ key: 'rain',icon: 'cloud-showers-heavy' },
|
|
69
|
-
{ key: 'unicorn',icon: 'alicorn' },
|
|
70
|
-
{ key: 'axe',icon: 'axe' },
|
|
71
|
-
{ key: 'gem',icon: 'gem' },
|
|
72
|
-
{ key: 'soap',icon: 'soap' },
|
|
73
|
-
{ key: 'drizzle',icon: 'cloud-drizzle' },
|
|
74
|
-
{ key: 'building',icon: 'building' },
|
|
75
|
-
{ key: 'fish',icon: 'fish' },
|
|
76
|
-
{ key: 'icicles',icon: 'icicles',label: 'ice' },
|
|
77
|
-
{ key: 'water',icon: 'water' },
|
|
78
|
-
{ key: 'tree1',icon: 'tree-alt' },
|
|
79
|
-
{ key: 'tree2',icon: 'trees' },
|
|
80
|
-
{ key: 'tree3',icon: 'tree' },
|
|
81
|
-
{ key: 'battery',icon: 'battery-bolt' },
|
|
82
|
-
{ key: 'seedle',icon: 'seedling' },
|
|
83
|
-
{ key: 'greenTea',icon: 'mug-tea' },
|
|
84
|
-
{ key: 'oak',icon: 'leaf-oak' },
|
|
85
|
-
{ key: 'salad',icon: 'salad' },
|
|
86
|
-
{ key: 'cloud',icon: 'cloud' },
|
|
87
|
-
{ key: 'lemon',icon: 'lemon' },
|
|
88
|
-
{ key: 'angel',icon: 'angel' },
|
|
89
|
-
{ key: 'parasol',icon: 'umbrella-beach' },
|
|
90
|
-
{ key: 'pizza',icon: 'pizza-slice' },
|
|
91
|
-
{ key: 'thunder',icon: 'thunderstorm' },
|
|
92
|
-
{ key: 'latte',icon: 'coffee-togo' },
|
|
93
|
-
{ key: 'island',icon: 'island-tropical' },
|
|
94
|
-
{ key: 'shovel',icon: 'shovel' },
|
|
95
|
-
{ key: 'coffee',icon: 'coffee' },
|
|
96
|
-
{ key: 'carrot',icon: 'carrot' },
|
|
97
|
-
{ key: 'cactus',icon: 'cactus' },
|
|
98
|
-
{ key: 'volcano',icon: 'volcano' },
|
|
99
|
-
{ key: 'choco',icon: 'candy-bar' },
|
|
100
|
-
{ key: 'industry',icon: 'industry-windows' },
|
|
101
|
-
{ key: 'gun',icon: 'gun' },
|
|
102
|
-
{ key: 'galaxy',icon: 'galaxy',label: 'blakchole' },
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
const GenOption = ( params: ColorIconParams ) => {
|
|
106
|
-
let { key,icon,label = '' } = params;
|
|
107
|
-
|
|
108
|
-
let Color = ( alfa?: number ) => ( `hsla( var( --cH_${ key } ),var( --cS_${ key } ),var( --cL_${ key } ),${ alfa ?? 1 } ) ` );
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
value: params.key,
|
|
112
|
-
label: <>
|
|
113
|
-
{ $.is.string( icon ) ? <FAIcon
|
|
114
|
-
isSolidIcon
|
|
115
|
-
d={ icon }
|
|
116
|
-
/> : icon }
|
|
117
|
-
</>,
|
|
118
|
-
freeCSS: {
|
|
119
|
-
backgroundColor: Color( 0.15 ),
|
|
120
|
-
color: Color()
|
|
121
|
-
},
|
|
122
|
-
checkedStyles: {
|
|
123
|
-
fontColor: 'white',
|
|
124
|
-
boxShadow: 3,
|
|
125
|
-
freeCSS: {
|
|
126
|
-
backgroundColor: Color(),
|
|
127
|
-
color: 'white',
|
|
128
|
-
transform: 'scale(1.1)'
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
} as amotify.fn.Input.List.OptionParams
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const ThemeColor: {
|
|
135
|
-
( type: 'all' | 'brand' | 'original' | 'basic' ): React.FC<amotify.orgs.DisplayStyleInput.ThemeColorInput>
|
|
136
|
-
} = ( type ) => {
|
|
137
|
-
let ColorsArray: ColorIconParams[][] = [];
|
|
138
|
-
if ( type == 'all' ) {
|
|
139
|
-
ColorsArray = [
|
|
140
|
-
Colors.Basics,
|
|
141
|
-
Colors.Brands,
|
|
142
|
-
Colors.Originals,
|
|
143
|
-
];
|
|
144
|
-
} else if ( type == 'original' ) {
|
|
145
|
-
ColorsArray = [ Colors.Originals ];
|
|
146
|
-
} else if ( type == 'basic' ) {
|
|
147
|
-
ColorsArray = [ Colors.Basics ];
|
|
148
|
-
} else if ( type = 'brand' ) {
|
|
149
|
-
ColorsArray = [ Colors.Brands ];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
let UniParams: amotify.fn.Input.List.PlainParams = {
|
|
153
|
-
...{} as any,
|
|
154
|
-
tone: 'plain',
|
|
155
|
-
icon: false,
|
|
156
|
-
override: 'force',
|
|
157
|
-
flexType: 'row',
|
|
158
|
-
gap: 1,
|
|
159
|
-
horizontalAlign: 'around',
|
|
160
|
-
cellStyles: {
|
|
161
|
-
ssSphere: 3,
|
|
162
|
-
flexCenter: true,
|
|
163
|
-
borderRadius: '1.tone.primary',
|
|
164
|
-
fontSize: '3.paragraph',
|
|
165
|
-
transition: 'middle'
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const Comp = ( params: amotify.orgs.DisplayStyleInput.ThemeColorInput ) => {
|
|
169
|
-
const mounted = React.useRef( false );
|
|
170
|
-
let [ val_ColorKey,set_ColorKey ] = React.useState( amotify.config.themeColor );
|
|
171
|
-
|
|
172
|
-
React.useEffect( () => {
|
|
173
|
-
if ( mounted.current ) {
|
|
174
|
-
params.onUpdate( val_ColorKey );
|
|
175
|
-
} else {
|
|
176
|
-
mounted.current = true;
|
|
177
|
-
}
|
|
178
|
-
},[ val_ColorKey ] );
|
|
179
|
-
|
|
180
|
-
let Inputer: ReactElement[] = ColorsArray.map( ( Colors ) => {
|
|
181
|
-
return <Input.Radio
|
|
182
|
-
{ ...UniParams }
|
|
183
|
-
value={ val_ColorKey }
|
|
184
|
-
options={ Colors.map( ( info ) => {
|
|
185
|
-
return GenOption( info );
|
|
186
|
-
} ) }
|
|
187
|
-
onUpdateValidValue={ ( { value } ) => {
|
|
188
|
-
set_ColorKey( value[ 0 ] );
|
|
189
|
-
} }
|
|
190
|
-
/>;
|
|
191
|
-
} );
|
|
192
|
-
|
|
193
|
-
return <Column
|
|
194
|
-
gap={ 2 }
|
|
195
|
-
>
|
|
196
|
-
{ Inputer }
|
|
197
|
-
</Column>;
|
|
198
|
-
}
|
|
199
|
-
return Comp;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export const ThemeColorALL = ThemeColor( 'all' );
|
|
203
|
-
export const ThemeColorBasic = ThemeColor( 'basic' );
|
|
204
|
-
export const ThemeColorOriginal = ThemeColor( 'original' );
|
|
205
|
-
export const ThemeColorBrands = ThemeColor( 'brand' );
|