@fewbox/den 0.0.83

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.
Files changed (231) hide show
  1. package/index-app.d.ts +15 -0
  2. package/index.css +12225 -0
  3. package/index.js +2 -0
  4. package/index.js.map +1 -0
  5. package/package.json +30 -0
  6. package/scripts/copy-templates.js +29 -0
  7. package/src/action/index.d.ts +8 -0
  8. package/src/components/Analyze/GA4/index.d.ts +9 -0
  9. package/src/components/Analyze/GA4NextJS/index.d.ts +5 -0
  10. package/src/components/Analyze/util.d.ts +115 -0
  11. package/src/components/Api/GAPI/index.d.ts +7 -0
  12. package/src/components/Auth/FigmaSignin/index.d.ts +9 -0
  13. package/src/components/Auth/GoogleSignin/index.d.ts +14 -0
  14. package/src/components/Auth/WeComSignin/index.d.ts +8 -0
  15. package/src/components/Auth/util.d.ts +17 -0
  16. package/src/components/Debug/index.d.ts +6 -0
  17. package/src/components/Engine/Base/index.d.ts +222 -0
  18. package/src/components/Engine/BaseComponent/index.d.ts +9 -0
  19. package/src/components/Engine/index.d.ts +212 -0
  20. package/src/components/Layout/Display/index.d.ts +18 -0
  21. package/src/components/Layout/Dock/index.d.ts +23 -0
  22. package/src/components/Layout/DockBak/index.d.ts +24 -0
  23. package/src/components/Layout/Flex/index.d.ts +44 -0
  24. package/src/components/Layout/FlexItem/index.d.ts +18 -0
  25. package/src/components/Layout/Position/index.d.ts +33 -0
  26. package/src/components/Layout/PositionArea/index.d.ts +10 -0
  27. package/src/components/Layout/SBaseline/index.d.ts +5 -0
  28. package/src/components/Layout/SBottom/index.d.ts +6 -0
  29. package/src/components/Layout/SCenter/index.d.ts +5 -0
  30. package/src/components/Layout/SLeft/index.d.ts +5 -0
  31. package/src/components/Layout/SMiddle/index.d.ts +5 -0
  32. package/src/components/Layout/SRight/index.d.ts +5 -0
  33. package/src/components/Layout/SStretch/index.d.ts +5 -0
  34. package/src/components/Layout/STop/index.d.ts +5 -0
  35. package/src/components/Layout/X/index.d.ts +5 -0
  36. package/src/components/Layout/XAround/index.d.ts +5 -0
  37. package/src/components/Layout/XAutoBoth/index.d.ts +5 -0
  38. package/src/components/Layout/XAutoCenter/index.d.ts +5 -0
  39. package/src/components/Layout/XAutoLeft/index.d.ts +5 -0
  40. package/src/components/Layout/XAutoLefts/index.d.ts +5 -0
  41. package/src/components/Layout/XAutoRight/index.d.ts +5 -0
  42. package/src/components/Layout/XAutoRights/index.d.ts +5 -0
  43. package/src/components/Layout/XBase/index.d.ts +18 -0
  44. package/src/components/Layout/XBetween/index.d.ts +5 -0
  45. package/src/components/Layout/XCenter/index.d.ts +5 -0
  46. package/src/components/Layout/XCustom/index.d.ts +7 -0
  47. package/src/components/Layout/XCustomBoth/index.d.ts +7 -0
  48. package/src/components/Layout/XEvenly/index.d.ts +5 -0
  49. package/src/components/Layout/XLeft/index.d.ts +5 -0
  50. package/src/components/Layout/XRight/index.d.ts +5 -0
  51. package/src/components/Layout/XWrapAround/index.d.ts +5 -0
  52. package/src/components/Layout/XWrapBetween/index.d.ts +5 -0
  53. package/src/components/Layout/XWrapBottom/index.d.ts +5 -0
  54. package/src/components/Layout/XWrapEvenly/index.d.ts +5 -0
  55. package/src/components/Layout/XWrapMiddle/index.d.ts +5 -0
  56. package/src/components/Layout/XWrapTop/index.d.ts +5 -0
  57. package/src/components/Layout/Y/index.d.ts +5 -0
  58. package/src/components/Layout/YAround/index.d.ts +5 -0
  59. package/src/components/Layout/YAutoBoth/index.d.ts +5 -0
  60. package/src/components/Layout/YAutoBottom/index.d.ts +5 -0
  61. package/src/components/Layout/YAutoBottoms/index.d.ts +5 -0
  62. package/src/components/Layout/YAutoCenter/index.d.ts +5 -0
  63. package/src/components/Layout/YAutoTop/index.d.ts +5 -0
  64. package/src/components/Layout/YAutoTops/index.d.ts +5 -0
  65. package/src/components/Layout/YBase/index.d.ts +16 -0
  66. package/src/components/Layout/YBetween/index.d.ts +5 -0
  67. package/src/components/Layout/YBottom/index.d.ts +5 -0
  68. package/src/components/Layout/YCustom/index.d.ts +7 -0
  69. package/src/components/Layout/YCustomBoth/index.d.ts +7 -0
  70. package/src/components/Layout/YEvenly/index.d.ts +5 -0
  71. package/src/components/Layout/YMiddle/index.d.ts +5 -0
  72. package/src/components/Layout/YTop/index.d.ts +5 -0
  73. package/src/components/Layout/YWrapAround/index.d.ts +5 -0
  74. package/src/components/Layout/YWrapBetween/index.d.ts +5 -0
  75. package/src/components/Layout/YWrapCenter/index.d.ts +5 -0
  76. package/src/components/Layout/YWrapEvenly/index.d.ts +5 -0
  77. package/src/components/Layout/YWrapLeft/index.d.ts +5 -0
  78. package/src/components/Layout/YWrapRight/index.d.ts +5 -0
  79. package/src/components/Layout/index.d.ts +8 -0
  80. package/src/components/Layout/util.d.ts +6 -0
  81. package/src/components/View/VActionForm/index.d.ts +10 -0
  82. package/src/components/View/VAnimation/index.d.ts +127 -0
  83. package/src/components/View/VAudio/index.d.ts +10 -0
  84. package/src/components/View/VAvatar/index.d.ts +11 -0
  85. package/src/components/View/VBackground/index.d.ts +18 -0
  86. package/src/components/View/VBadge/index.d.ts +6 -0
  87. package/src/components/View/VBlock/index.d.ts +9 -0
  88. package/src/components/View/VBoundary/index.d.ts +6 -0
  89. package/src/components/View/VButton/index.d.ts +17 -0
  90. package/src/components/View/VCard/index.d.ts +8 -0
  91. package/src/components/View/VCardMedia/index.d.ts +9 -0
  92. package/src/components/View/VCardSocial/index.d.ts +13 -0
  93. package/src/components/View/VCardWindow/index.d.ts +15 -0
  94. package/src/components/View/VChromeExtensionValidator/index.d.ts +25 -0
  95. package/src/components/View/VDesigner/VDesignerConnection/index.d.ts +10 -0
  96. package/src/components/View/VDesigner/VDesignerElement/index.d.ts +11 -0
  97. package/src/components/View/VDesigner/VDesignerGroup/index.d.ts +10 -0
  98. package/src/components/View/VDesigner/VDesignerNode/index.d.ts +68 -0
  99. package/src/components/View/VDesigner/index.d.ts +35 -0
  100. package/src/components/View/VDynamic/index.d.ts +7 -0
  101. package/src/components/View/VFooter/index.d.ts +5 -0
  102. package/src/components/View/VForm/index.d.ts +13 -0
  103. package/src/components/View/VFrame/index.d.ts +14 -0
  104. package/src/components/View/VGoogleFont/index.d.ts +18 -0
  105. package/src/components/View/VHR/index.d.ts +5 -0
  106. package/src/components/View/VHeader/index.d.ts +5 -0
  107. package/src/components/View/VHyperlink/index.d.ts +13 -0
  108. package/src/components/View/VImage/App/index.d.ts +16 -0
  109. package/src/components/View/VImage/Web/index.d.ts +6 -0
  110. package/src/components/View/VInput/VBase64File/App/index.d.ts +10 -0
  111. package/src/components/View/VInput/VBase64File/Web/index.d.ts +10 -0
  112. package/src/components/View/VInput/VCheckBox/index.d.ts +9 -0
  113. package/src/components/View/VInput/VColor/index.d.ts +7 -0
  114. package/src/components/View/VInput/VDate/index.d.ts +7 -0
  115. package/src/components/View/VInput/VDatetimeLocal/index.d.ts +7 -0
  116. package/src/components/View/VInput/VDropdown/index.d.ts +31 -0
  117. package/src/components/View/VInput/VEmail/index.d.ts +5 -0
  118. package/src/components/View/VInput/VFile/index.d.ts +22 -0
  119. package/src/components/View/VInput/VGroup/index.d.ts +11 -0
  120. package/src/components/View/VInput/VHidden/index.d.ts +8 -0
  121. package/src/components/View/VInput/VMonth/index.d.ts +5 -0
  122. package/src/components/View/VInput/VNumber/index.d.ts +5 -0
  123. package/src/components/View/VInput/VPassword/index.d.ts +5 -0
  124. package/src/components/View/VInput/VRadio/index.d.ts +6 -0
  125. package/src/components/View/VInput/VRange/index.d.ts +8 -0
  126. package/src/components/View/VInput/VSearch/index.d.ts +5 -0
  127. package/src/components/View/VInput/VSubmit/index.d.ts +7 -0
  128. package/src/components/View/VInput/VSubmitWrapper/index.d.ts +6 -0
  129. package/src/components/View/VInput/VTel/index.d.ts +5 -0
  130. package/src/components/View/VInput/VTextBox/index.d.ts +7 -0
  131. package/src/components/View/VInput/VTime/index.d.ts +5 -0
  132. package/src/components/View/VInput/VUrl/index.d.ts +5 -0
  133. package/src/components/View/VInput/VWeek/index.d.ts +5 -0
  134. package/src/components/View/VInput/index.d.ts +47 -0
  135. package/src/components/View/VLabel/index.d.ts +60 -0
  136. package/src/components/View/VLink/App/index.d.ts +6 -0
  137. package/src/components/View/VLink/Web/index.d.ts +6 -0
  138. package/src/components/View/VLoading/index.d.ts +8 -0
  139. package/src/components/View/VMain/index.d.ts +5 -0
  140. package/src/components/View/VMask/index.d.ts +5 -0
  141. package/src/components/View/VPaypal/index.d.ts +10 -0
  142. package/src/components/View/VPhoto/index.d.ts +20 -0
  143. package/src/components/View/VPureRoot/index.d.ts +7 -0
  144. package/src/components/View/VRoot/index.d.ts +7 -0
  145. package/src/components/View/VSection/index.d.ts +5 -0
  146. package/src/components/View/VSelect/index.d.ts +14 -0
  147. package/src/components/View/VShadow/index.d.ts +15 -0
  148. package/src/components/View/VShape/VEllipse/index.d.ts +10 -0
  149. package/src/components/View/VShape/VLine/index.d.ts +10 -0
  150. package/src/components/View/VShape/VRectangle/index.d.ts +10 -0
  151. package/src/components/View/VStack/index.d.ts +5 -0
  152. package/src/components/View/VSvg/index.d.ts +16 -0
  153. package/src/components/View/VSwitch/index.d.ts +13 -0
  154. package/src/components/View/VTemplate/index.d.ts +5 -0
  155. package/src/components/View/VText/index.d.ts +22 -0
  156. package/src/components/View/VTextArea/index.d.ts +17 -0
  157. package/src/components/View/VTheme/index.d.ts +43 -0
  158. package/src/components/View/VTooltip/index.d.ts +20 -0
  159. package/src/components/View/VTree/Block/index.d.ts +14 -0
  160. package/src/components/View/VTree/index.d.ts +15 -0
  161. package/src/components/View/VVideo/index.d.ts +10 -0
  162. package/src/components/View/VZone/index.d.ts +14 -0
  163. package/src/components/app.d.ts +138 -0
  164. package/src/components/util.d.ts +1 -0
  165. package/src/fewbox/index.d.ts +26 -0
  166. package/src/language/index.d.ts +5 -0
  167. package/src/network/Delete.d.ts +6 -0
  168. package/src/network/DeleteExternal.d.ts +6 -0
  169. package/src/network/DeleteForm.d.ts +6 -0
  170. package/src/network/DeleteFormExternal.d.ts +6 -0
  171. package/src/network/FormHeaders.d.ts +2 -0
  172. package/src/network/GQL.d.ts +7 -0
  173. package/src/network/GQLExternal.d.ts +7 -0
  174. package/src/network/GQLExternalUpload.d.ts +7 -0
  175. package/src/network/GQLUpload.d.ts +7 -0
  176. package/src/network/Get.d.ts +6 -0
  177. package/src/network/GetExternal.d.ts +6 -0
  178. package/src/network/GetFetch.d.ts +6 -0
  179. package/src/network/GetFetchExternal.d.ts +6 -0
  180. package/src/network/GetForm.d.ts +6 -0
  181. package/src/network/GetFormExternal.d.ts +6 -0
  182. package/src/network/GetLocal.d.ts +5 -0
  183. package/src/network/GetSSE.d.ts +5 -0
  184. package/src/network/IGraphQL.d.ts +6 -0
  185. package/src/network/JsonHeaders.d.ts +5 -0
  186. package/src/network/LoadPayload.d.ts +1 -0
  187. package/src/network/Network.d.ts +45 -0
  188. package/src/network/NetworkObservableAjax.d.ts +8 -0
  189. package/src/network/NetworkObservableAjaxExternal.d.ts +9 -0
  190. package/src/network/NetworkObservableBase.d.ts +11 -0
  191. package/src/network/NetworkObservableFetch.d.ts +7 -0
  192. package/src/network/NetworkObservableFetchExternal.d.ts +8 -0
  193. package/src/network/NetworkObservableGQL.d.ts +8 -0
  194. package/src/network/NetworkObservableGQLExternal.d.ts +9 -0
  195. package/src/network/Patch.d.ts +6 -0
  196. package/src/network/PatchExternal.d.ts +6 -0
  197. package/src/network/PatchFetch.d.ts +6 -0
  198. package/src/network/PatchFetchExternal.d.ts +6 -0
  199. package/src/network/PatchForm.d.ts +6 -0
  200. package/src/network/PatchFormExternal.d.ts +6 -0
  201. package/src/network/Post.d.ts +6 -0
  202. package/src/network/PostExternal.d.ts +6 -0
  203. package/src/network/PostFetch.d.ts +6 -0
  204. package/src/network/PostFetchExternal.d.ts +6 -0
  205. package/src/network/PostForm.d.ts +6 -0
  206. package/src/network/PostFormExternal.d.ts +6 -0
  207. package/src/network/PostSSE.d.ts +5 -0
  208. package/src/network/Put.d.ts +6 -0
  209. package/src/network/PutExternal.d.ts +6 -0
  210. package/src/network/PutFetch.d.ts +6 -0
  211. package/src/network/PutFetchExternal.d.ts +6 -0
  212. package/src/network/PutForm.d.ts +6 -0
  213. package/src/network/PutFormExternal.d.ts +6 -0
  214. package/src/network/SSEObservableBase.d.ts +12 -0
  215. package/src/network/UploadHeaders.d.ts +2 -0
  216. package/src/network/WS.d.ts +11 -0
  217. package/src/network/index.d.ts +43 -0
  218. package/src/network/util.d.ts +4 -0
  219. package/src/store/EnumDictionary.d.ts +3 -0
  220. package/src/store/IContinuePaging.d.ts +4 -0
  221. package/src/store/IList.d.ts +3 -0
  222. package/src/store/IMetaResponse.d.ts +5 -0
  223. package/src/store/IPaging.d.ts +6 -0
  224. package/src/store/IPayloadResponse.d.ts +4 -0
  225. package/src/store/Json.d.ts +9 -0
  226. package/src/store/index.d.ts +6 -0
  227. package/templates/FEWBOX.md +73 -0
  228. package/templates/style/_core.scss +297 -0
  229. package/templates/style/_root-properties.scss +56 -0
  230. package/templates/style/_root.scss +6 -0
  231. package/templates/style/_variables.scss +194 -0
@@ -0,0 +1,12 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare abstract class SSEObservableBase extends Observable<any> {
3
+ protected Path: string;
4
+ protected External: string;
5
+ protected Action: (value: any) => void;
6
+ protected ErrorHandler: (error: any) => void;
7
+ protected DoneHandler?: () => void;
8
+ constructor(path: string, external: string, action: (value: any) => void, errorHandler: (error: any) => void, doneHandler?: () => void);
9
+ protected GetHeader(customHeaders?: Record<string, string>): Record<string, string>;
10
+ protected GetUrl(): string;
11
+ protected Pipe(method: string, body?: any): Promise<void>;
12
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { IWebsocketOptions } from "./Network";
2
+ declare class WS {
3
+ private websocket;
4
+ constructor(options: IWebsocketOptions);
5
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
6
+ receive(onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null): void;
7
+ open(onopen: ((this: WebSocket, ev: Event) => any) | null): void;
8
+ close(onclose: ((this: WebSocket, ev: CloseEvent) => any) | null): void;
9
+ handleError(onerror: ((this: WebSocket, ev: Event) => any) | null): void;
10
+ }
11
+ export default WS;
@@ -0,0 +1,43 @@
1
+ export { default as NetworkObservableAjax } from './NetworkObservableAjax';
2
+ export { default as Delete } from './Delete';
3
+ export { default as NetworkObservableAjaxExternal } from './NetworkObservableAjaxExternal';
4
+ export { default as DeleteExternal } from './DeleteExternal';
5
+ export { default as GetExternal } from './GetExternal';
6
+ export { default as PatchExternal } from './PatchExternal';
7
+ export { default as PostExternal } from './PostExternal';
8
+ export { default as PutExternal } from './PutExternal';
9
+ export { default as GQL } from './GQL';
10
+ export { default as GQLExternal } from './GQLExternal';
11
+ export { default as GQLUpload } from './GQLUpload';
12
+ export { default as GQLExternalUpload } from './GQLExternalUpload';
13
+ export { default as NetworkObservableGQL } from './NetworkObservableGQL';
14
+ export { default as Get } from './Get';
15
+ export { default as JsonHeaders } from './JsonHeaders';
16
+ export { default as GetLocal } from './GetLocal';
17
+ export { default as Patch } from './Patch';
18
+ export { default as Post } from './Post';
19
+ export { default as Put } from './Put';
20
+ export { default as GetFetch } from './GetFetch';
21
+ export { default as GetFetchExternal } from './GetFetchExternal';
22
+ export { default as PostFetch } from './PostFetch';
23
+ export { default as PostFetchExternal } from './PostFetchExternal';
24
+ export { default as PutFetch } from './PutFetch';
25
+ export { default as PutFetchExternal } from './PutFetchExternal';
26
+ export { default as PatchFetch } from './PatchFetch';
27
+ export { default as PatchFetchExternal } from './PatchFetchExternal';
28
+ export { default as PostSSE } from './PostSSE';
29
+ export { default as PostForm } from './PostForm';
30
+ export { default as PostFormExternal } from './PostFormExternal';
31
+ export { default as PutForm } from './PutForm';
32
+ export { default as PutFormExternal } from './PutFormExternal';
33
+ export { default as PatchForm } from './PatchForm';
34
+ export { default as PatchFormExternal } from './PatchFormExternal';
35
+ export { default as GetForm } from './GetForm';
36
+ export { default as GetFormExternal } from './GetFormExternal';
37
+ export { default as DeleteForm } from './DeleteForm';
38
+ export { default as DeleteFormExternal } from './DeleteFormExternal';
39
+ export { default as IGraphQL } from './IGraphQL';
40
+ export { LoadPayload } from './LoadPayload';
41
+ export { parseGQLAjaxData, parseAjaxData, parseFetchData, convertJsonToGraphQLSchema } from './util';
42
+ export { buildHeaders, buildUrl, buildExternalUrl, _verbsGet, _verbsDelete, _verbsPost, _verbsPut, _verbsPatch, _verbsGetPromise, _verbsDeletePromise, _verbsPostPromise, _verbsPutPromise, _verbsPatchPromise, verbsGet, verbsDelete, verbsPost, verbsPut, verbsPatch, verbsGetPromise, verbsDeletePromise, verbsPostPromise, verbsPutPromise, verbsPatchPromise, verbsGetExternal, verbsDeleteExternal, verbsPostExternal, verbsPutExternal, verbsPatchExternal, verbsGetPromiseExternal, verbsDeletePromiseExternal, verbsPostPromiseExternal, verbsPutPromiseExternal, verbsPatchPromiseExternal, ws, IWebsocketOptions } from './Network';
43
+ export { default as WS } from './WS';
@@ -0,0 +1,4 @@
1
+ export declare const parseGQLAjaxData: (input: any, field: string) => any;
2
+ export declare const parseAjaxData: (input: any) => any;
3
+ export declare const parseFetchData: (input: any) => any;
4
+ export declare const convertJsonToGraphQLSchema: (json: any) => string;
@@ -0,0 +1,3 @@
1
+ export type EnumDictionary<T extends string | symbol | number, U> = {
2
+ [K in T]: U;
3
+ };
@@ -0,0 +1,4 @@
1
+ export default interface IContinuePaging<T> {
2
+ continueToken: string;
3
+ items: T[];
4
+ }
@@ -0,0 +1,3 @@
1
+ export default interface IList<T> {
2
+ items: T[];
3
+ }
@@ -0,0 +1,5 @@
1
+ export default interface IMetaResponse {
2
+ isSuccessful: boolean;
3
+ errorCode: string;
4
+ errorMessage: string;
5
+ }
@@ -0,0 +1,6 @@
1
+ export default interface IPaging<T> {
2
+ currentIndex: number;
3
+ size: number;
4
+ total: number;
5
+ items: T[];
6
+ }
@@ -0,0 +1,4 @@
1
+ import IMetaResponse from "./IMetaResponse";
2
+ export default interface IPayloadResponse<P> extends IMetaResponse {
3
+ payload: P;
4
+ }
@@ -0,0 +1,9 @@
1
+ type JsonValue = string | number | boolean | null | {
2
+ [key: string]: JsonValue;
3
+ } | JsonValue[];
4
+ type JsonObject = {
5
+ [key: string]: JsonValue;
6
+ };
7
+ type JsonArray = JsonValue[];
8
+ export type Json = JsonObject | JsonArray;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ export { default as IList } from './IList';
2
+ export { default as IPaging } from './IPaging';
3
+ export { default as IContinuePaging } from './IContinuePaging';
4
+ export { EnumDictionary } from './EnumDictionary';
5
+ export { default as IMetaResponse } from './IMetaResponse';
6
+ export { default as IPayloadResponse } from './IPayloadResponse';
@@ -0,0 +1,73 @@
1
+ # How to use?
2
+ ## 1. Init
3
+ ```shell
4
+ yarn add sass -D
5
+ yarn add @paypal/react-paypal-js
6
+ yarn add jwt-decode
7
+ yarn add react-ga4
8
+ yarn add react-intl
9
+
10
+ ```
11
+ ```typescript
12
+ import '../style/_root.scss';
13
+ ```
14
+ ## 2. Config
15
+ Change the variables. ( ***root/_variables.scss*** )
16
+
17
+ **EG :**
18
+ ``` scss
19
+ $body-color: #e1e1e1;
20
+ ```
21
+
22
+ ## 3. Use
23
+ ```tsx
24
+ import { Den } from '@fewbox/den'; // @fewbox/den-web @fewbox/den-lite
25
+ <Den.Components.VLabel frontColor={Den.Components.ColorType.Primary} caption='Hello, FewBox!' />
26
+ ```
27
+
28
+ ## 4. Custom Component
29
+ ```tsx
30
+ // Class Component
31
+ import * as React from 'react';
32
+ import { Den } from '@fewbox/den';
33
+ import './index.scss';
34
+
35
+ export interface IClassComponentProps extends Den.Interface.IBaseProps {
36
+ message: string;
37
+ }
38
+
39
+ export interface IClassComponentStates extends Den.Interface.IBaseStates {
40
+ }
41
+
42
+ export default class ClassComponent extends Den.Components.BaseComponent<IClassComponentProps, IClassComponentStates> {
43
+ render(): React.ReactNode {
44
+ return <Den.Components.VBoundary {...this.props} className={this.getClassName('class-component')} style={this.getStyle()}>
45
+ <Den.Components.VLabel caption={this.props.message} />
46
+ </Den.Components.VBoundary>;
47
+ }
48
+ }
49
+ // Function Component
50
+ import * as React from 'react';
51
+ import { Den } from '@fewbox/den';
52
+ import './index.scss';
53
+
54
+ export interface IFunctionComponentProps extends Den.Interface.IBaseProps {
55
+ isSelected: boolean;
56
+ }
57
+
58
+ export interface IFunctionComponentStates extends Den.Interface.IBaseStates {
59
+ isSelected: boolean;
60
+ }
61
+
62
+ const FunctionComponent = (props: IFunctionComponentProps) => {
63
+ const _base = Den.Components.Base(props);
64
+ const [state, setState] = React.useState<IFunctionComponentStates>({ isSelected: props.isSelected });
65
+ return (
66
+ <div className={_base.getClassName(`function-component${state.isSelected ? ' selected' : ''}`)} style={_base.getStyle()} onClick={() => { setState({ ...state, isSelected: !state.isSelected }); }}>
67
+ Click Me
68
+ </div>
69
+ );
70
+ }
71
+
72
+ export default FunctionComponent;
73
+ ```
@@ -0,0 +1,297 @@
1
+ @use './variables' as v;
2
+
3
+ $border-positions: "all", "top", "right", "bottom", "left", "except-top", "except-right", "except-bottom", "except-left",
4
+ "right-top", "right-bottom", "left-top", "left-bottom", "top-bottom", "left-right";
5
+
6
+ /* border position */
7
+ @each $color, $value in v.$colors {
8
+ @each $border-position in $border-positions {
9
+ .#{$color}-border-#{$border-position} {
10
+ @if ($border-position == "all") {
11
+ border-color: var(#{v.$var-prefix}color-#{$color});
12
+ }
13
+ @if ($border-position == "top") {
14
+ border-color: var(#{v.$var-prefix}color-#{$color}) transparent transparent transparent;
15
+ }
16
+ @if ($border-position == "right") {
17
+ border-color: transparent var(#{v.$var-prefix}color-#{$color}) transparent transparent;
18
+ }
19
+ @if ($border-position == "bottom") {
20
+ border-color: transparent transparent var(#{v.$var-prefix}color-#{$color}) transparent;
21
+ }
22
+ @if ($border-position == "left") {
23
+ border-color: transparent transparent transparent var(#{v.$var-prefix}color-#{$color});
24
+ }
25
+ @if ($border-position == "except-top") {
26
+ border-color: transparent
27
+ var(#{v.$var-prefix}color-#{$color})
28
+ var(#{v.$var-prefix}color-#{$color})
29
+ var(#{v.$var-prefix}color-#{$color});
30
+ }
31
+ @if ($border-position == "except-right") {
32
+ border-color: var(#{v.$var-prefix}color-#{$color})
33
+ transparent
34
+ var(#{v.$var-prefix}color-#{$color})
35
+ var(#{v.$var-prefix}color-#{$color});
36
+ }
37
+ @if ($border-position == "except-bottom") {
38
+ border-color: var(#{v.$var-prefix}color-#{$color})
39
+ var(#{v.$var-prefix}color-#{$color})
40
+ transparent
41
+ var(#{v.$var-prefix}color-#{$color});
42
+ }
43
+ @if ($border-position == "except-left") {
44
+ border-color: var(#{v.$var-prefix}color-#{$color})
45
+ var(#{v.$var-prefix}color-#{$color})
46
+ var(#{v.$var-prefix}color-#{$color})
47
+ transparent;
48
+ }
49
+ @if ($border-position == "right-top") {
50
+ border-color: var(#{v.$var-prefix}color-#{$color})
51
+ var(#{v.$var-prefix}color-#{$color})
52
+ transparent
53
+ transparent;
54
+ }
55
+ @if ($border-position == "right-bottom") {
56
+ border-color: transparent
57
+ var(#{v.$var-prefix}color-#{$color})
58
+ var(#{v.$var-prefix}color-#{$color})
59
+ transparent;
60
+ }
61
+ @if ($border-position == "left-top") {
62
+ border-color: var(#{v.$var-prefix}color-#{$color})
63
+ transparent
64
+ transparent
65
+ var(#{v.$var-prefix}color-#{$color});
66
+ }
67
+ @if ($border-position == "left-bottom") {
68
+ border-color: transparent
69
+ transparent
70
+ var(#{v.$var-prefix}color-#{$color})
71
+ var(#{v.$var-prefix}color-#{$color});
72
+ }
73
+ @if ($border-position == "top-bottom") {
74
+ border-color: var(#{v.$var-prefix}color-#{$color})
75
+ transparent
76
+ var(#{v.$var-prefix}color-#{$color})
77
+ transparent;
78
+ }
79
+ @if ($border-position == "left-right") {
80
+ border-color: transparent
81
+ var(#{v.$var-prefix}color-#{$color})
82
+ transparent
83
+ var(#{v.$var-prefix}color-#{$color});
84
+ }
85
+ }
86
+ }
87
+ }
88
+ /* pseudo - after */
89
+ @each $color, $value in v.$colors {
90
+ @each $border-position in $border-positions {
91
+ .#{$color}-after-border-#{$border-position}::after {
92
+ @if ($border-position == "all") {
93
+ border-color: var(#{v.$var-prefix}color-#{$color});
94
+ }
95
+ @if ($border-position == "top") {
96
+ border-color: var(#{v.$var-prefix}color-#{$color}) transparent transparent transparent;
97
+ }
98
+ @if ($border-position == "right") {
99
+ border-color: transparent var(#{v.$var-prefix}color-#{$color}) transparent transparent;
100
+ }
101
+ @if ($border-position == "bottom") {
102
+ border-color: transparent transparent var(#{v.$var-prefix}color-#{$color}) transparent;
103
+ }
104
+ @if ($border-position == "left") {
105
+ border-color: transparent transparent transparent var(#{v.$var-prefix}color-#{$color});
106
+ }
107
+ @if ($border-position == "except-top") {
108
+ border-color: transparent
109
+ var(#{v.$var-prefix}color-#{$color})
110
+ var(#{v.$var-prefix}color-#{$color})
111
+ var(#{v.$var-prefix}color-#{$color});
112
+ }
113
+ @if ($border-position == "except-right") {
114
+ border-color: var(#{v.$var-prefix}color-#{$color})
115
+ transparent
116
+ var(#{v.$var-prefix}color-#{$color})
117
+ var(#{v.$var-prefix}color-#{$color});
118
+ }
119
+ @if ($border-position == "except-bottom") {
120
+ border-color: var(#{v.$var-prefix}color-#{$color})
121
+ var(#{v.$var-prefix}color-#{$color})
122
+ transparent
123
+ var(#{v.$var-prefix}color-#{$color});
124
+ }
125
+ @if ($border-position == "except-left") {
126
+ border-color: var(#{v.$var-prefix}color-#{$color})
127
+ var(#{v.$var-prefix}color-#{$color})
128
+ var(#{v.$var-prefix}color-#{$color})
129
+ transparent;
130
+ }
131
+ @if ($border-position == "right-top") {
132
+ border-color: var(#{v.$var-prefix}color-#{$color})
133
+ var(#{v.$var-prefix}color-#{$color})
134
+ transparent
135
+ transparent;
136
+ }
137
+ @if ($border-position == "right-bottom") {
138
+ border-color: transparent
139
+ var(#{v.$var-prefix}color-#{$color})
140
+ var(#{v.$var-prefix}color-#{$color})
141
+ transparent;
142
+ }
143
+ @if ($border-position == "left-top") {
144
+ border-color: var(#{v.$var-prefix}color-#{$color})
145
+ transparent
146
+ transparent
147
+ var(#{v.$var-prefix}color-#{$color});
148
+ }
149
+ @if ($border-position == "left-bottom") {
150
+ border-color: transparent
151
+ transparent
152
+ var(#{v.$var-prefix}color-#{$color})
153
+ var(#{v.$var-prefix}color-#{$color});
154
+ }
155
+ @if ($border-position == "top-bottom") {
156
+ border-color: var(#{v.$var-prefix}color-#{$color})
157
+ transparent
158
+ var(#{v.$var-prefix}color-#{$color})
159
+ transparent;
160
+ }
161
+ @if ($border-position == "left-right") {
162
+ border-color: transparent
163
+ var(#{v.$var-prefix}color-#{$color})
164
+ transparent
165
+ var(#{v.$var-prefix}color-#{$color});
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ /* pseudo - before */
172
+ @each $color, $value in v.$colors {
173
+ @each $border-position in $border-positions {
174
+ .#{$color}-before-border-#{$border-position}::before {
175
+ @if ($border-position == "all") {
176
+ border-color: var(#{v.$var-prefix}color-#{$color});
177
+ }
178
+ @if ($border-position == "top") {
179
+ border-color: var(#{v.$var-prefix}color-#{$color}) transparent transparent transparent;
180
+ }
181
+ @if ($border-position == "right") {
182
+ border-color: transparent var(#{v.$var-prefix}color-#{$color}) transparent transparent;
183
+ }
184
+ @if ($border-position == "bottom") {
185
+ border-color: transparent transparent var(#{v.$var-prefix}color-#{$color}) transparent;
186
+ }
187
+ @if ($border-position == "left") {
188
+ border-color: transparent transparent transparent var(#{v.$var-prefix}color-#{$color});
189
+ }
190
+ @if ($border-position == "except-top") {
191
+ border-color: transparent
192
+ var(#{v.$var-prefix}color-#{$color})
193
+ var(#{v.$var-prefix}color-#{$color})
194
+ var(#{v.$var-prefix}color-#{$color});
195
+ }
196
+ @if ($border-position == "except-right") {
197
+ border-color: var(#{v.$var-prefix}color-#{$color})
198
+ transparent
199
+ var(#{v.$var-prefix}color-#{$color})
200
+ var(#{v.$var-prefix}color-#{$color});
201
+ }
202
+ @if ($border-position == "except-bottom") {
203
+ border-color: var(#{v.$var-prefix}color-#{$color})
204
+ var(#{v.$var-prefix}color-#{$color})
205
+ transparent
206
+ var(#{v.$var-prefix}color-#{$color});
207
+ }
208
+ @if ($border-position == "except-left") {
209
+ border-color: var(#{v.$var-prefix}color-#{$color})
210
+ var(#{v.$var-prefix}color-#{$color})
211
+ var(#{v.$var-prefix}color-#{$color})
212
+ transparent;
213
+ }
214
+ @if ($border-position == "right-top") {
215
+ border-color: var(#{v.$var-prefix}color-#{$color})
216
+ var(#{v.$var-prefix}color-#{$color})
217
+ transparent
218
+ transparent;
219
+ }
220
+ @if ($border-position == "right-bottom") {
221
+ border-color: transparent
222
+ var(#{v.$var-prefix}color-#{$color})
223
+ var(#{v.$var-prefix}color-#{$color})
224
+ transparent;
225
+ }
226
+ @if ($border-position == "left-top") {
227
+ border-color: var(#{v.$var-prefix}color-#{$color})
228
+ transparent
229
+ transparent
230
+ var(#{v.$var-prefix}color-#{$color});
231
+ }
232
+ @if ($border-position == "left-bottom") {
233
+ border-color: transparent
234
+ transparent
235
+ var(#{v.$var-prefix}color-#{$color})
236
+ var(#{v.$var-prefix}color-#{$color});
237
+ }
238
+ @if ($border-position == "top-bottom") {
239
+ border-color: var(#{v.$var-prefix}color-#{$color})
240
+ transparent
241
+ var(#{v.$var-prefix}color-#{$color})
242
+ transparent;
243
+ }
244
+ @if ($border-position == "left-right") {
245
+ border-color: transparent
246
+ var(#{v.$var-prefix}color-#{$color})
247
+ transparent
248
+ var(#{v.$var-prefix}color-#{$color});
249
+ }
250
+ }
251
+ }
252
+ }
253
+ /* background */
254
+ @each $color, $value in v.$colors {
255
+ .#{$color}-background {
256
+ background-color: var(#{v.$var-prefix}color-#{$color});
257
+ @if ($color == "primary") {
258
+ color: var(#{v.$var-prefix}color-white);
259
+ }
260
+ &::-webkit-slider-thumb {
261
+ background-color: var(#{v.$var-prefix}color-#{$color});
262
+ }
263
+ }
264
+ }
265
+ /* front */
266
+ @each $color, $value in v.$colors {
267
+ .#{$color}-front {
268
+ color: var(#{v.$var-prefix}color-#{$color});
269
+ }
270
+ }
271
+ /* border */
272
+ @each $color, $value in v.$colors {
273
+ .#{$color}-border {
274
+ border-color: var(#{v.$var-prefix}color-#{$color}) !important;
275
+ &::-webkit-slider-thumb {
276
+ border-color: var(#{v.$var-prefix}color-#{$color}) !important;
277
+ }
278
+ }
279
+ }
280
+ /* size */
281
+ @each $font-size, $value in v.$font-sizes {
282
+ .font-size-#{$font-size} {
283
+ font-size: var(#{v.$var-prefix}font-size-#{$font-size});
284
+ }
285
+ }
286
+ /* auto size */
287
+ @each $font-size, $value in v.$auto-font-sizes {
288
+ .auto-font-size-#{$font-size} {
289
+ font-size: var(#{v.$var-prefix}auto-font-size-#{$font-size});
290
+ }
291
+ }
292
+ /* weight */
293
+ @each $font-weight, $value in v.$font-weights {
294
+ .font-weight-#{$font-weight} {
295
+ font-weight: var(#{v.$var-prefix}font-weight-#{$font-weight});
296
+ }
297
+ }
@@ -0,0 +1,56 @@
1
+ @use './variables' as v;
2
+
3
+ %root-properties {
4
+
5
+ /* variable */
6
+ @each $color, $value in v.$colors {
7
+ #{v.$var-prefix}color-#{$color}: #{$value};
8
+ }
9
+
10
+ @each $font-size, $value in v.$font-sizes {
11
+ #{v.$var-prefix}font-size-#{$font-size}: #{$value};
12
+ }
13
+
14
+ @each $font-size, $value in v.$auto-font-sizes {
15
+ #{v.$var-prefix}auto-font-size-#{$font-size}: #{$value};
16
+ }
17
+
18
+ @each $font-weight, $value in v.$font-weights {
19
+ #{v.$var-prefix}font-weight-#{$font-weight}: #{$value}
20
+ }
21
+
22
+ @each $border-size, $value in v.$border-radius-sizes {
23
+ #{v.$var-prefix}border-radius-#{$border-size}: #{$value};
24
+ }
25
+ // Build-In
26
+ #{v.$var-prefix}font-family: #{v.$font-family};
27
+ #{v.$var-prefix}font-size: #{v.$font-size};
28
+ #{v.$var-prefix}line-height: #{v.$line-height};
29
+ #{v.$var-prefix}letter-spacing: #{v.$letter-spacing};
30
+ #{v.$var-prefix}padding: #{v.$padding};
31
+ #{v.$var-prefix}margin: #{v.$margin};
32
+ #{v.$var-prefix}box-sizing: #{v.$box-sizing};
33
+ #{v.$var-prefix}scrollbar-size: #{v.$scrollbar-size};
34
+ #{v.$var-prefix}scrollbar-track-color: #{v.$scrollbar-track-color};
35
+ #{v.$var-prefix}scrollbar-thumb-color: #{v.$scrollbar-thumb-color};
36
+ #{v.$var-prefix}scrollbar-thumb-hover-color: #{v.$scrollbar-thumb-hover-color};
37
+ #{v.$var-prefix}scrollbar-radius: #{v.$scrollbar-radius};
38
+ // Component
39
+ #{v.$var-prefix}input-padding: #{v.$input-padding};
40
+ #{v.$var-prefix}input-padding: #{v.$input-padding};
41
+ #{v.$var-prefix}dropdown-hover-background-color: #{v.$dropdown-hover-background-color};
42
+ #{v.$var-prefix}dropdown-hover-color: #{v.$dropdown-hover-color};
43
+
44
+ #{v.$var-prefix}v-ellipse-size: #{v.$v-ellipse-size};
45
+ #{v.$var-prefix}v-rectangle-size: #{v.$v-ellipse-size};
46
+ #{v.$var-prefix}v-image-size: #{v.$v-image-size};
47
+ #{v.$var-prefix}v-svg-size: #{v.$v-svg-size};
48
+ #{v.$var-prefix}v-window--size: #{v.$v-window-size};
49
+
50
+
51
+ *,
52
+ ::before,
53
+ ::after {
54
+ box-sizing: inherit;
55
+ }
56
+ }
@@ -0,0 +1,6 @@
1
+ @forward './root-properties';
2
+ @forward "./core";
3
+
4
+ :root {
5
+ @extend %root-properties;
6
+ }