@e1011/es-kit 1.0.48 → 1.0.50
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/hooks/esm/index.css +19 -19
- package/dist/hooks/index.css +19 -19
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/container/FBox.js +1 -1
- package/dist/lib/esm/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js +1 -1
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
- package/dist/lib/src/core/ui/components/container/FBox.js +20 -6
- package/dist/lib/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/src/core/ui/components/dividers/DividerLine.js +1 -1
- package/dist/lib/src/core/ui/components/dividers/DividerLine.js.map +1 -1
- package/dist/lib/src/core/utils/test/testRenderer.js +12 -0
- package/dist/lib/src/core/utils/test/testRenderer.js.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/ui/components/container/FBox.d.ts +2 -2
- package/dist/types/src/core/ui/components/container/FBox.d.ts.map +1 -1
- package/dist/types/src/core/ui/components/container/Flex.d.ts +3 -3
- package/dist/types/src/core/utils/test/testRenderer.d.ts +6 -0
- package/dist/types/src/core/utils/test/testRenderer.d.ts.map +1 -0
- package/dist/ui/esm/src/core/ui/components/container/FBox.js +1 -1
- package/dist/ui/esm/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js +1 -1
- package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
- package/dist/ui/src/core/ui/components/container/FBox.js +1 -1
- package/dist/ui/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/ui/src/core/ui/components/dividers/DividerLine.js +1 -1
- package/dist/ui/src/core/ui/components/dividers/DividerLine.js.map +1 -1
- package/dist/utils/esm/index.css +19 -19
- package/dist/utils/index.css +19 -19
- package/package.json +8 -5
- package/dist/lib/cjs/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/lib/cjs/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/lib/esm/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/lib/esm/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/lib/src/core/utils/web-components/coreElements/coreElements.js +0 -23
- package/dist/lib/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/lib/src/core/utils/web-components/coreElements/exampleCustomElement.js +0 -41
- package/dist/lib/src/core/utils/web-components/coreElements/exampleCustomElement.js.map +0 -1
- package/dist/lib/src/core/utils/web-components/coreElements/index.js +0 -2
- package/dist/lib/src/core/utils/web-components/coreElements/index.js.map +0 -1
- package/dist/lib/src/core/utils/web-components/index.js +0 -2
- package/dist/lib/src/core/utils/web-components/index.js.map +0 -1
- package/dist/types/src/core/utils/web-components/coreElements/coreElements.d.ts +0 -6
- package/dist/types/src/core/utils/web-components/coreElements/coreElements.d.ts.map +0 -1
- package/dist/types/src/core/utils/web-components/coreElements/exampleCustomElement.d.ts +0 -7
- package/dist/types/src/core/utils/web-components/coreElements/exampleCustomElement.d.ts.map +0 -1
- package/dist/types/src/core/utils/web-components/coreElements/index.d.ts +0 -2
- package/dist/types/src/core/utils/web-components/coreElements/index.d.ts.map +0 -1
- package/dist/types/src/core/utils/web-components/index.d.ts +0 -2
- package/dist/types/src/core/utils/web-components/index.d.ts.map +0 -1
- package/dist/ui/esm/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/ui/esm/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/ui/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/ui/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/utils/esm/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/utils/esm/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
- package/dist/utils/src/core/utils/web-components/coreElements/coreElements.js +0 -2
- package/dist/utils/src/core/utils/web-components/coreElements/coreElements.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren, CSSProperties } from 'react';
|
|
1
|
+
import { FC, PropsWithChildren, CSSProperties } from 'react';
|
|
2
2
|
export type FBoxProps = PropsWithChildren<any> & {
|
|
3
3
|
flex?: string;
|
|
4
4
|
flexGrow?: string | number;
|
|
@@ -24,5 +24,5 @@ export type FBoxProps = PropsWithChildren<any> & {
|
|
|
24
24
|
style?: CSSProperties;
|
|
25
25
|
className?: string;
|
|
26
26
|
};
|
|
27
|
-
export declare const FBox:
|
|
27
|
+
export declare const FBox: FC<FBoxProps>;
|
|
28
28
|
//# sourceMappingURL=FBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,iBAAiB,EAAW,aAAa,EAAyB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FBox.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAE,iBAAiB,EAAW,aAAa,EAAyB,MAAM,OAAO,CAAA;AAMlG,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAE;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAuDD,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAAqC,CAAA"}
|
|
@@ -45,7 +45,7 @@ export declare const FlexWrapper: import("react").MemoExoticComponent<import("st
|
|
|
45
45
|
gap?: string | undefined;
|
|
46
46
|
css?: string | undefined;
|
|
47
47
|
borderRadius?: string | undefined;
|
|
48
|
-
}, "
|
|
48
|
+
}, "width" | "height" | "align" | "justify" | "direction" | "flex" | "flexGrow" | "alignText" | "flexShrink" | "flexBasis" | "flexWrap" | "alignSelf" | "margin" | "padding" | "maxWidth" | "maxHeight" | "minWidth" | "minHeight" | "gap" | "css" | "borderRadius">>;
|
|
49
49
|
export declare const FlexTight: import("react").MemoExoticComponent<import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("styled-components").StyledComponent<"div", any, FlexProps, never>>, any, {
|
|
50
50
|
flex?: string | undefined;
|
|
51
51
|
flexGrow?: string | number | undefined;
|
|
@@ -68,7 +68,7 @@ export declare const FlexTight: import("react").MemoExoticComponent<import("styl
|
|
|
68
68
|
gap?: string | undefined;
|
|
69
69
|
css?: string | undefined;
|
|
70
70
|
borderRadius?: string | undefined;
|
|
71
|
-
}, "
|
|
71
|
+
}, "width" | "height" | "align" | "justify" | "direction" | "flex" | "flexGrow" | "alignText" | "flexShrink" | "flexBasis" | "flexWrap" | "alignSelf" | "margin" | "padding" | "maxWidth" | "maxHeight" | "minWidth" | "minHeight" | "gap" | "css" | "borderRadius">>;
|
|
72
72
|
export declare const FlexTightStyled: import("react").MemoExoticComponent<import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("styled-components").StyledComponent<"div", any, FlexProps, never>>, any, {
|
|
73
73
|
flex?: string | undefined;
|
|
74
74
|
flexGrow?: string | number | undefined;
|
|
@@ -96,5 +96,5 @@ export declare const FlexTightStyled: import("react").MemoExoticComponent<import
|
|
|
96
96
|
padding: string;
|
|
97
97
|
border: string;
|
|
98
98
|
};
|
|
99
|
-
}, "
|
|
99
|
+
}, "width" | "height" | "style" | "align" | "justify" | "direction" | "flex" | "flexGrow" | "alignText" | "flexShrink" | "flexBasis" | "flexWrap" | "alignSelf" | "margin" | "padding" | "maxWidth" | "maxHeight" | "minWidth" | "minHeight" | "gap" | "css" | "borderRadius">>;
|
|
100
100
|
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
3
|
+
declare const customRender: (ui: ReactElement, options?: RenderOptions) => RenderResult;
|
|
4
|
+
export * from '@testing-library/react';
|
|
5
|
+
export { customRender as render };
|
|
6
|
+
//# sourceMappingURL=testRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/core/utils/test/testRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAyB,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAU,aAAa,EAAE,YAAY,EAAa,MAAM,wBAAwB,CAAA;AAYvF,QAAA,MAAM,YAAY,OACZ,YAAY,YAAY,aAAa,KACxC,YAAoE,CAAA;AAGvE,cAAc,wBAAwB,CAAA;AAKtC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,objectSpread2 as
|
|
1
|
+
import{objectWithoutProperties as e,slicedToArray as t,objectSpread2 as o,extends as r}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.object.to-string.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as s,forwardRef as a,useMemo as n}from"react";import l from"./fbox.module.scss.js";var i=["style","children","tabIndex","className"],c={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},d=function(e){return e&&c[e]||e},m=a((function(s,a){var c=s.style,m=s.children,u=s.tabIndex,f=s.className,j=void 0===f?"":f,x=e(s,i),b=n((function(){var e={},o={};return Object.entries(x).forEach((function(r){var s=t(r,2),a=s[0],n=s[1];"data"===a.substr(0,4)?e[a]=n:o[a]=n})),[e,o]}),[x]),p=t(b,2),y=p[0],v=p[1],_=n((function(){return o(o(o(o(o({},v),v.align?{alignItems:d(v.align)}:{}),v.justify?{justifyContent:d(v.justify)}:{}),v.direction?{flexDirection:v.direction}:{}),c)}),[v,c]);return React.createElement("div",r({ref:a,tabIndex:u,className:"".concat(l["flexible-box"]," ").concat(j),style:_},y),m)}));m.displayName="FBoxRefForwarded";var u=s(m);u.displayName="FBox";export{u as FBox};
|
|
2
2
|
//# sourceMappingURL=FBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const styles = useMemo(() => (\n {\n ...
|
|
1
|
+
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n console.log('key', key, 'value', value)\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"klBAgCMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAG1GC,EAAmBC,GAAW,SAAAC,EAEtBC,GAA+C,IAD3DC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAR,EAAAS,GAEnDC,EAA8BC,GAAQ,WACpC,IAAMC,EAAqC,CAAA,EACrCC,EAAoC,CAAA,EAU1C,OARAC,OAAOC,QAAQR,GAAOS,SAAQ,SAAAC,GAAkB,IAAAC,EAAAC,EAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAErB,EAAKqB,EAAA,GAEf,SAArBE,EAAIC,OAAO,EAAG,GAChBT,EAAUQ,GAAOvB,EAEjBgB,EAASO,GAAOvB,CAEpB,IACO,CAACe,EAAWC,EACrB,GAAG,CAACN,IAAOe,EAAAH,EAAAT,EAAA,GAbJE,EAASU,EAAA,GAAET,EAAQS,EAAA,GAepBC,EAASZ,GAAQ,WAAA,OAAAa,EAAAA,EAAAA,EAAAA,EAAAA,KAEhBX,GACCA,EAASY,MAAQ,CAAEC,WAAY9B,EAAiBiB,EAASY,QAAqB,CAAE,GAChFZ,EAASc,QAAU,CAAEC,eAAgBhC,EAAiBiB,EAASc,UAAuB,CAAE,GACxFd,EAASgB,UAAY,CAAEC,cAAejB,EAASgB,WAAc,CAAE,GAChE3B,EAAK,GAET,CAACW,EAAUX,IAEd,OACE6B,MAAAC,cAAA,MAAAC,EAAA,CACEhC,IAAKA,EACLG,SAAUA,EACVE,UAAS,GAAA4B,OAAMC,EAAgB,gBAAeD,KAAAA,OAAI5B,GAClDJ,MAAOqB,GACHX,GAEHT,EAGP,IAEAL,EAAiBsC,YAAc,uBAElBC,EAAsBC,EAAgBxC,GAGnDuC,EAAKD,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as t,useMemo as i}from"react";import r from"./divider.module.scss.js";var a=t((function(e){var t=e.orientation,a=e.vertical,o=e.color,n=void 0===o?"#999999":o,l=e.opacity,c=e.length,d=void 0===c?"80%":c,s=e.left,
|
|
1
|
+
import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as t,useMemo as i}from"react";import r from"./divider.module.scss.js";var a=t((function(e){var t=e.orientation,a=e.vertical,o=e.color,n=void 0===o?"#999999":o,l=e.opacity,c=e.length,d=void 0===c?"80%":c,s=e.left,v=void 0===s?"0":s,m=e.width,u=void 0===m?"1px":m,p=e.height,h=void 0===p?"1px":p,f=e.margin,g=e.className,y=void 0===g?"":g,N=i((function(){return"vertical"===t||!0===a}),[t,a]),j=i((function(){return{"--width":u,"--height":h,"--length":d,"--opacity":l,"--color":n,"--left":v,"--margin":f||(N?"auto 0":"0 auto")}}),[u,h,d,l,n,v,f,N]),x=N?r.vertical:r.horizontal;return React.createElement("div",{className:"".concat(r["divider-line"]," ").concat(x," ").concat(y),style:j})}));a.displayName="DividerLine";var o=t((function(t){return React.createElement(a,e({vertical:!0,length:"100%"},t))}));o.displayName="DividerVertical";var n=t((function(t){return React.createElement(a,e({length:"100%"},t))}));n.displayName="DividerHorizontal";export{n as DividerHorizontal,a as DividerLine,o as DividerVertical};
|
|
2
2
|
//# sourceMappingURL=DividerLine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className,\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"4OAkBaA,EAAgCC,GAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,
|
|
1
|
+
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"4OAkBaA,EAAgCC,GAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,GAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,GAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAQnB,SAAWmB,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),t=require("./fbox.module.scss.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.object.to-string.js"),require("../../../../../node_modules/core-js/modules/web.dom-collections.for-each.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js"),require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),t=require("./fbox.module.scss.js"),o=["style","children","tabIndex","className"],s={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},a=function(e){return e&&s[e]||e},n=r.forwardRef((function(s,n){var c=s.style,l=s.children,d=s.tabIndex,i=s.className,u=void 0===i?"":i,f=e.objectWithoutProperties(s,o),j=r.useMemo((function(){var r={},t={};return Object.entries(f).forEach((function(o){var s=e.slicedToArray(o,2),a=s[0],n=s[1];"data"===a.substr(0,4)?r[a]=n:t[a]=n})),[r,t]}),[f]),m=e.slicedToArray(j,2),b=m[0],x=m[1],p=r.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2({},x),x.align?{alignItems:a(x.align)}:{}),x.justify?{justifyContent:a(x.justify)}:{}),x.direction?{flexDirection:x.direction}:{}),c)}),[x,c]);return React.createElement("div",e.extends({ref:n,tabIndex:d,className:"".concat(t["flexible-box"]," ").concat(u),style:p},b),l)}));n.displayName="FBoxRefForwarded";var c=r.memo(n);c.displayName="FBox",exports.FBox=c;
|
|
2
2
|
//# sourceMappingURL=FBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const styles = useMemo(() => (\n {\n ...
|
|
1
|
+
{"version":3,"file":"FBox.js","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n console.log('key', key, 'value', value)\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","objectSpread2","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"6iBAgCMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAG1GC,EAAmBC,EAAUA,YAAC,SAAAC,EAEtBC,GAA+C,IAD3DC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAC,wBAAAT,EAAAU,GAEnDC,EAA8BC,EAAAA,SAAQ,WACpC,IAAMC,EAAqC,CAAA,EACrCC,EAAoC,CAAA,EAU1C,OARAC,OAAOC,QAAQT,GAAOU,SAAQ,SAAAC,GAAkB,IAAAC,EAAAC,EAAAA,cAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAEtB,EAAKsB,EAAA,GAEf,SAArBE,EAAIC,OAAO,EAAG,GAChBT,EAAUQ,GAAOxB,EAEjBiB,EAASO,GAAOxB,CAEpB,IACO,CAACgB,EAAWC,EACrB,GAAG,CAACP,IAAOgB,EAAAH,EAAAA,cAAAT,EAAA,GAbJE,EAASU,EAAA,GAAET,EAAQS,EAAA,GAepBC,EAASZ,EAAAA,SAAQ,WAAA,OAAAa,EAAAC,cAAAD,gBAAAA,EAAAA,cAAAA,EAAAC,cAAAD,mBAEhBX,GACCA,EAASa,MAAQ,CAAEC,WAAYhC,EAAiBkB,EAASa,QAAqB,CAAE,GAChFb,EAASe,QAAU,CAAEC,eAAgBlC,EAAiBkB,EAASe,UAAuB,CAAE,GACxFf,EAASiB,UAAY,CAAEC,cAAelB,EAASiB,WAAc,CAAE,GAChE7B,EAAK,GAET,CAACY,EAAUZ,IAEd,OACE+B,MAAAC,cAAA,MAAAC,UAAA,CACElC,IAAKA,EACLG,SAAUA,EACVE,UAAS,GAAA8B,OAAMC,EAAgB,gBAAeD,KAAAA,OAAI9B,GAClDJ,MAAOsB,GACHX,GAEHV,EAGP,IAEAL,EAAiBwC,YAAc,uBAElBC,EAAsBC,EAAIA,KAAY1C,GAGnDyC,EAAKD,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),i=require("./divider.module.scss.js"),t=r.memo((function(e){var t=e.orientation,o=e.vertical,a=e.color,n=void 0===a?"#999999":a,l=e.opacity,c=e.length,d=void 0===c?"80%":c,s=e.left,u=void 0===s?"0":s,v=e.width,m=void 0===v?"1px":v,p=e.height,h=void 0===p?"1px":p,g=e.margin,f=e.className,x=void 0===f?"":f,y=r.useMemo((function(){return"vertical"===t||!0===o}),[t,o]),D=r.useMemo((function(){return{"--width":m,"--height":h,"--length":d,"--opacity":l,"--color":n,"--left":u,"--margin":g||(y?"auto 0":"0 auto")}}),[m,h,d,l,n,u,g,y]),j=y?i.vertical:i.horizontal;return React.createElement("div",{className:"".concat(i["divider-line"]," ").concat(j," ").concat(x),style:D})}));t.displayName="DividerLine";var o=r.memo((function(r){return React.createElement(t,e.extends({vertical:!0,length:"100%"},r))}));o.displayName="DividerVertical";var a=r.memo((function(r){return React.createElement(t,e.extends({length:"100%"},r))}));a.displayName="DividerHorizontal",exports.DividerHorizontal=a,exports.DividerLine=t,exports.DividerVertical=o;
|
|
2
2
|
//# sourceMappingURL=DividerLine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className,\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"iRAkBaA,EAAgCC,EAAAA,MAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,
|
|
1
|
+
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"iRAkBaA,EAAgCC,EAAAA,MAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,EAAAA,SAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,EAAAA,SAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAQnB,SAAWmB,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
|
package/dist/utils/esm/index.css
CHANGED
|
@@ -28,6 +28,25 @@
|
|
|
28
28
|
width: var(--height);
|
|
29
29
|
height: var(--width);
|
|
30
30
|
}
|
|
31
|
+
.divider-module_divider-line__6CesR {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: block;
|
|
34
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
35
|
+
background-color: var(--color);
|
|
36
|
+
opacity: var(--opacity);
|
|
37
|
+
}
|
|
38
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
39
|
+
height: var(--length);
|
|
40
|
+
left: var(--left);
|
|
41
|
+
width: var(--width);
|
|
42
|
+
margin: var(--margin);
|
|
43
|
+
}
|
|
44
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
45
|
+
width: var(--length);
|
|
46
|
+
left: var(--left);
|
|
47
|
+
height: var(--height);
|
|
48
|
+
margin: var(--margin);
|
|
49
|
+
}
|
|
31
50
|
.fbox-module_flexible-box__rLJ93 {
|
|
32
51
|
display: flex;
|
|
33
52
|
position: relative;
|
|
@@ -51,23 +70,4 @@
|
|
|
51
70
|
min-width: 0;
|
|
52
71
|
min-height: 0;
|
|
53
72
|
border-radius: initial;
|
|
54
|
-
}
|
|
55
|
-
.divider-module_divider-line__6CesR {
|
|
56
|
-
position: relative;
|
|
57
|
-
display: block;
|
|
58
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
59
|
-
background-color: var(--color);
|
|
60
|
-
opacity: var(--opacity);
|
|
61
|
-
}
|
|
62
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
63
|
-
height: var(--length);
|
|
64
|
-
left: var(--left);
|
|
65
|
-
width: var(--width);
|
|
66
|
-
margin: var(--margin);
|
|
67
|
-
}
|
|
68
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
69
|
-
width: var(--length);
|
|
70
|
-
left: var(--left);
|
|
71
|
-
height: var(--height);
|
|
72
|
-
margin: var(--margin);
|
|
73
73
|
}
|
package/dist/utils/index.css
CHANGED
|
@@ -28,6 +28,25 @@
|
|
|
28
28
|
width: var(--height);
|
|
29
29
|
height: var(--width);
|
|
30
30
|
}
|
|
31
|
+
.divider-module_divider-line__6CesR {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: block;
|
|
34
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
35
|
+
background-color: var(--color);
|
|
36
|
+
opacity: var(--opacity);
|
|
37
|
+
}
|
|
38
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
39
|
+
height: var(--length);
|
|
40
|
+
left: var(--left);
|
|
41
|
+
width: var(--width);
|
|
42
|
+
margin: var(--margin);
|
|
43
|
+
}
|
|
44
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
45
|
+
width: var(--length);
|
|
46
|
+
left: var(--left);
|
|
47
|
+
height: var(--height);
|
|
48
|
+
margin: var(--margin);
|
|
49
|
+
}
|
|
31
50
|
.fbox-module_flexible-box__rLJ93 {
|
|
32
51
|
display: flex;
|
|
33
52
|
position: relative;
|
|
@@ -51,23 +70,4 @@
|
|
|
51
70
|
min-width: 0;
|
|
52
71
|
min-height: 0;
|
|
53
72
|
border-radius: initial;
|
|
54
|
-
}
|
|
55
|
-
.divider-module_divider-line__6CesR {
|
|
56
|
-
position: relative;
|
|
57
|
-
display: block;
|
|
58
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
59
|
-
background-color: var(--color);
|
|
60
|
-
opacity: var(--opacity);
|
|
61
|
-
}
|
|
62
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
63
|
-
height: var(--length);
|
|
64
|
-
left: var(--left);
|
|
65
|
-
width: var(--width);
|
|
66
|
-
margin: var(--margin);
|
|
67
|
-
}
|
|
68
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
69
|
-
width: var(--length);
|
|
70
|
-
left: var(--left);
|
|
71
|
-
height: var(--height);
|
|
72
|
-
margin: var(--margin);
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e1011/es-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
4
4
|
"main": "dist/lib/cjs/src/index.js",
|
|
5
5
|
"module": "dist/lib/esm/src/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"lint:quiet:watch": "nodemon --watch './src/**/*' --exec yarn lint:ts:quiet",
|
|
50
50
|
"lint:fix": "yarn lint -- --fix",
|
|
51
51
|
"test": "jest ./src --verbose",
|
|
52
|
-
"test:coverage": "jest --coverage",
|
|
53
|
-
"test:watch": "jest --watch",
|
|
52
|
+
"test:coverage": "jest ./src --coverage --verbose",
|
|
53
|
+
"test:watch": "jest ./src --watch --verbose",
|
|
54
54
|
"tsc": "tsc",
|
|
55
55
|
"prepush": "yarn lint && yarn test && yarn tsc"
|
|
56
56
|
},
|
|
@@ -90,11 +90,14 @@
|
|
|
90
90
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
91
91
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
92
92
|
"husky": "^7.0.4",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
93
|
+
"identity-obj-proxy": "^3.0.0",
|
|
94
|
+
"jest": "^29.3.1",
|
|
95
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
95
96
|
"prettier": "^2.7.1",
|
|
96
97
|
"prettier-eslint": "^15.0.1",
|
|
97
98
|
"prettier-eslint-cli": "^7.1.0",
|
|
99
|
+
"pretty-format": "^29.5.0",
|
|
100
|
+
"react-dom": "^17.0.2 || ^18.2.0",
|
|
98
101
|
"reflect-metadata": "^0.1.13",
|
|
99
102
|
"rollup": "^2.60.1",
|
|
100
103
|
"rollup-plugin-postcss": "^4.0.2",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){return function(t){customElements.get(e)||customElements.define(e,t)}},t=e;exports.ced=e,exports.createResolveAttribute=function(e){return function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,u=e.getAttribute(t);"true"!==u&&"false"!==u||(u="true"===u);var s=null!=u;return s&&(r||void 0===e[t]||null===e[t])&&(e[t]=n?n(u):u),s}},exports.customElementDefine=t,exports.stringArrayParser=function(e){return JSON.parse(e)},exports.stringObjectParser=function(e){return JSON.parse(e)};
|
|
2
|
-
//# sourceMappingURL=coreElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["ced","name","componentClass","customElements","get","define","customElementDefine","component","attributeName","overrideProperty","arguments","length","undefined","valueMap","resolvedAttrValue","getAttribute","attrValueDefined","value","JSON","parse"],"mappings":"wEAGaA,EAAM,SAACC,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD,EAEYI,EAAsBN,+CAGG,SACpCO,GAAwC,OACrC,SACHC,GAIY,IAFZC,IAAgBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAChBG,EAAsCH,UAAAC,OAAAD,EAAAA,kBAAAE,EAGlCE,EADcP,EAAUQ,aAAaP,GAGf,SAAtBM,GAAsD,UAAtBA,IAClCA,EAA0C,SAAtBA,GAGtB,IAAME,EAAoBF,QAS1B,OAPIE,IACFP,QAAiDG,IAA7BL,EAAUC,IAA6D,OAA7BD,EAAUC,MAGxED,EAAUC,GAAiBK,EAAWA,EAASC,GAAqBA,GAG/DE,EACR,0DAGgC,SAACC,GAAa,OAAKC,KAAKC,MAAMF,EAAM,6BAEnC,SAACA,GAAa,OAAKC,KAAKC,MAAMF,EAAM"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=function(t){return function(n){customElements.get(t)||customElements.define(t,n)}},n=t,e=function(t){return function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,u=t.getAttribute(n);"true"!==u&&"false"!==u||(u="true"===u);var o=null!=u;return o&&(e||void 0===t[n]||null===t[n])&&(t[n]=r?r(u):u),o}},r=function(t){return JSON.parse(t)},u=function(t){return JSON.parse(t)};export{t as ced,e as createResolveAttribute,n as customElementDefine,r as stringArrayParser,u as stringObjectParser};
|
|
2
|
-
//# sourceMappingURL=coreElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["ced","name","componentClass","customElements","get","define","customElementDefine","createResolveAttribute","component","attributeName","overrideProperty","arguments","length","undefined","valueMap","resolvedAttrValue","getAttribute","attrValueDefined","stringArrayParser","value","JSON","parse","stringObjectParser"],"mappings":"IAGaA,EAAM,SAACC,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD,EAEYI,EAAsBN,EAGtBO,EAAyB,SACpCC,GAAwC,OACrC,SACHC,GAIY,IAFZC,IAAgBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAChBG,EAAsCH,UAAAC,OAAAD,EAAAA,kBAAAE,EAGlCE,EADcP,EAAUQ,aAAaP,GAGf,SAAtBM,GAAsD,UAAtBA,IAClCA,EAA0C,SAAtBA,GAGtB,IAAME,EAAoBF,QAS1B,OAPIE,IACFP,QAAiDG,IAA7BL,EAAUC,IAA6D,OAA7BD,EAAUC,MAGxED,EAAUC,GAAiBK,EAAWA,EAASC,GAAqBA,GAG/DE,EACR,EAGYC,EAAoB,SAACC,GAAa,OAAKC,KAAKC,MAAMF,EAAM,EAExDG,EAAqB,SAACH,GAAa,OAAKC,KAAKC,MAAMF,EAAM"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* custom elements define */
|
|
2
|
-
export const ced = (name) => (componentClass) => {
|
|
3
|
-
customElements.get(name) || customElements.define(name, componentClass);
|
|
4
|
-
};
|
|
5
|
-
export const customElementDefine = ced;
|
|
6
|
-
export const createResolveAttribute = (component) => (attributeName,
|
|
7
|
-
// eslint-disable-next-line default-param-last
|
|
8
|
-
overrideProperty = true, valueMap) => {
|
|
9
|
-
const attrValue = component.getAttribute(attributeName);
|
|
10
|
-
let resolvedAttrValue = attrValue;
|
|
11
|
-
if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {
|
|
12
|
-
resolvedAttrValue = resolvedAttrValue === 'true';
|
|
13
|
-
}
|
|
14
|
-
const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null);
|
|
15
|
-
if (attrValueDefined && (overrideProperty || component[attributeName] === undefined || component[attributeName] === null)) {
|
|
16
|
-
// eslint-disable-next-line no-param-reassign
|
|
17
|
-
component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue;
|
|
18
|
-
}
|
|
19
|
-
return attrValueDefined;
|
|
20
|
-
};
|
|
21
|
-
export const stringArrayParser = (value) => JSON.parse(value);
|
|
22
|
-
export const stringObjectParser = (value) => JSON.parse(value);
|
|
23
|
-
//# sourceMappingURL=coreElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CACnC,cAAkC,EAClC,EAAE;IACF,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;AACzE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAGtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,SAAwC,EACxC,EAAE,CAAC,CACH,aAAqB;AACrB,8CAA8C;AAC9C,gBAAgB,GAAG,IAAI,EACvB,QAAsC,EAC7B,EAAE;IACX,MAAM,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;IACvD,IAAI,iBAAiB,GAA4B,SAAS,CAAA;IAE1D,IAAI,iBAAiB,KAAK,MAAM,IAAI,iBAAiB,KAAK,OAAO,EAAE;QACjE,iBAAiB,GAAG,iBAAiB,KAAK,MAAM,CAAA;KACjD;IAED,MAAM,gBAAgB,GAAG,CAAC,iBAAiB,KAAK,SAAS,IAAI,iBAAiB,KAAK,IAAI,CAAC,CAAA;IAExF,IAAI,gBAAgB,IAAI,CACtB,gBAAgB,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,SAAS,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,IAAI,CAChG,EAAE;QACD,6CAA6C;QAC7C,SAAS,CAAC,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAA;KACtF;IAED,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA;AAGD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAa,CAAA;AAEjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAA4B,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { ced } from './coreElements';
|
|
11
|
-
let CustomTitle = class CustomTitle extends HTMLElement {
|
|
12
|
-
static get observedAttributes() {
|
|
13
|
-
return ['text'];
|
|
14
|
-
}
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.attachShadow({ mode: 'open' });
|
|
18
|
-
this.shadowRoot.innerHTML = '<div class=\'title\'><b>Title</b><i><slot id=\'subtitle\'></slot></i></div>';
|
|
19
|
-
}
|
|
20
|
-
attributeChangedCallback(attrName, oldVal, newVal) {
|
|
21
|
-
switch (attrName) {
|
|
22
|
-
case 'text': {
|
|
23
|
-
this.text = newVal;
|
|
24
|
-
const mainElement = this.shadowRoot?.querySelector('b');
|
|
25
|
-
if (mainElement) {
|
|
26
|
-
mainElement.innerText = newVal;
|
|
27
|
-
}
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
default: {
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
CustomTitle = __decorate([
|
|
37
|
-
ced('custom-title'),
|
|
38
|
-
__metadata("design:paramtypes", [])
|
|
39
|
-
], CustomTitle);
|
|
40
|
-
export { CustomTitle };
|
|
41
|
-
//# sourceMappingURL=exampleCustomElement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exampleCustomElement.js","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/exampleCustomElement.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAG7B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,WAAW;IAG1C,MAAM,KAAK,kBAAkB;QAC3B,OAAO,CAAC,MAAM,CAAC,CAAA;IACjB,CAAC;IAED;QACE,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;QACnC,IAAI,CAAC,UAAW,CAAC,SAAS,GAAG,6EAA6E,CAAA;IAC5G,CAAC;IAED,wBAAwB,CAAC,QAAgB,EAAE,MAAc,EAAE,MAAc;QACvE,QAAQ,QAAQ,EAAE;YAChB,KAAK,MAAM,CAAC,CAAC;gBACX,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;gBAClB,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,CAAgB,CAAA;gBAEtE,IAAI,WAAW,EAAE;oBACf,WAAW,CAAC,SAAS,GAAG,MAAM,CAAA;iBAC/B;gBACD,MAAK;aACN;YACD,OAAO,CAAC,CAAC;gBACP,MAAK;aACN;SACF;IACH,CAAC;CACF,CAAA;AA7BY,WAAW;IADvB,GAAG,CAAC,cAAc,CAAC;;GACP,WAAW,CA6BvB;SA7BY,WAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/core/utils/web-components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const ced: (name: string) => (componentClass: typeof HTMLElement) => void;
|
|
2
|
-
export declare const customElementDefine: (name: string) => (componentClass: typeof HTMLElement) => void;
|
|
3
|
-
export declare const createResolveAttribute: (component: Element & Record<string, any>) => (attributeName: string, overrideProperty?: boolean, valueMap?: ((value: unknown) => unknown) | undefined) => boolean;
|
|
4
|
-
export declare const stringArrayParser: (value: string) => string[];
|
|
5
|
-
export declare const stringObjectParser: (value: string) => Record<string, unknown>;
|
|
6
|
-
//# sourceMappingURL=coreElements.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,GAAG,SAAU,MAAM,sBACd,kBAAkB,SAGnC,CAAA;AAED,eAAO,MAAM,mBAAmB,SANN,MAAM,sBACd,kBAAkB,SAKE,CAAA;AAGtC,eAAO,MAAM,sBAAsB,cACtB,OAAO,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC,qBAEzB,MAAM,kDAGF,OAAO,KAAK,OAAO,kBACrC,OAkBF,CAAA;AAGD,eAAO,MAAM,iBAAiB,UAAW,MAAM,aAAkC,CAAA;AAEjF,eAAO,MAAM,kBAAkB,UAAW,MAAM,4BAAiD,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare class CustomTitle extends HTMLElement {
|
|
2
|
-
text: string;
|
|
3
|
-
static get observedAttributes(): string[];
|
|
4
|
-
constructor();
|
|
5
|
-
attributeChangedCallback(attrName: string, oldVal: string, newVal: string): void;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=exampleCustomElement.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exampleCustomElement.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/exampleCustomElement.ts"],"names":[],"mappings":"AAEA,qBACa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAE,MAAM,CAAA;IAEZ,MAAM,KAAK,kBAAkB,aAE5B;;IAQD,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAgB1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/utils/web-components/coreElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/utils/web-components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["ced","name","componentClass","customElements","get","define"],"mappings":"IAGaA,EAAM,SAACC,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["name","componentClass","customElements","get","define"],"mappings":"gFAGmB,SAACA,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=function(t){return function(n){customElements.get(t)||customElements.define(t,n)}},n=t,e=function(t){return function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,u=t.getAttribute(n);"true"!==u&&"false"!==u||(u="true"===u);var o=null!=u;return o&&(e||void 0===t[n]||null===t[n])&&(t[n]=r?r(u):u),o}},r=function(t){return JSON.parse(t)},u=function(t){return JSON.parse(t)};export{t as ced,e as createResolveAttribute,n as customElementDefine,r as stringArrayParser,u as stringObjectParser};
|
|
2
|
-
//# sourceMappingURL=coreElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["ced","name","componentClass","customElements","get","define","customElementDefine","createResolveAttribute","component","attributeName","overrideProperty","arguments","length","undefined","valueMap","resolvedAttrValue","getAttribute","attrValueDefined","stringArrayParser","value","JSON","parse","stringObjectParser"],"mappings":"IAGaA,EAAM,SAACC,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD,EAEYI,EAAsBN,EAGtBO,EAAyB,SACpCC,GAAwC,OACrC,SACHC,GAIY,IAFZC,IAAgBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAChBG,EAAsCH,UAAAC,OAAAD,EAAAA,kBAAAE,EAGlCE,EADcP,EAAUQ,aAAaP,GAGf,SAAtBM,GAAsD,UAAtBA,IAClCA,EAA0C,SAAtBA,GAGtB,IAAME,EAAoBF,QAS1B,OAPIE,IACFP,QAAiDG,IAA7BL,EAAUC,IAA6D,OAA7BD,EAAUC,MAGxED,EAAUC,GAAiBK,EAAWA,EAASC,GAAqBA,GAG/DE,EACR,EAGYC,EAAoB,SAACC,GAAa,OAAKC,KAAKC,MAAMF,EAAM,EAExDG,EAAqB,SAACH,GAAa,OAAKC,KAAKC,MAAMF,EAAM"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(e){return function(t){customElements.get(e)||customElements.define(e,t)}},t=e;exports.ced=e,exports.createResolveAttribute=function(e){return function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,u=e.getAttribute(t);"true"!==u&&"false"!==u||(u="true"===u);var s=null!=u;return s&&(r||void 0===e[t]||null===e[t])&&(e[t]=n?n(u):u),s}},exports.customElementDefine=t,exports.stringArrayParser=function(e){return JSON.parse(e)},exports.stringObjectParser=function(e){return JSON.parse(e)};
|
|
2
|
-
//# sourceMappingURL=coreElements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreElements.js","sources":["../../../../../../../src/core/utils/web-components/coreElements/coreElements.ts"],"sourcesContent":["\n\n/* custom elements define */\nexport const ced = (name: string) => (\n componentClass: typeof HTMLElement,\n) => {\n customElements.get(name) || customElements.define(name, componentClass)\n}\n\nexport const customElementDefine = ced\n\n\nexport const createResolveAttribute = (\n component: Element & Record<string, any>,\n) => (\n attributeName: string,\n // eslint-disable-next-line default-param-last\n overrideProperty = true,\n valueMap?: (value: unknown) => unknown,\n): boolean => {\n const attrValue = component.getAttribute(attributeName)\n let resolvedAttrValue: string | boolean | null = attrValue\n\n if (resolvedAttrValue === 'true' || resolvedAttrValue === 'false') {\n resolvedAttrValue = resolvedAttrValue === 'true'\n }\n\n const attrValueDefined = (resolvedAttrValue !== undefined && resolvedAttrValue !== null)\n\n if (attrValueDefined && (\n overrideProperty || component[attributeName] === undefined || component[attributeName] === null\n )) {\n // eslint-disable-next-line no-param-reassign\n component[attributeName] = valueMap ? valueMap(resolvedAttrValue) : resolvedAttrValue\n }\n\n return attrValueDefined\n}\n\n\nexport const stringArrayParser = (value: string) => JSON.parse(value) as string[]\n\nexport const stringObjectParser = (value: string) => JSON.parse(value) as Record<string, unknown>\n"],"names":["ced","name","componentClass","customElements","get","define","customElementDefine","component","attributeName","overrideProperty","arguments","length","undefined","valueMap","resolvedAttrValue","getAttribute","attrValueDefined","value","JSON","parse"],"mappings":"wEAGaA,EAAM,SAACC,GAAY,OAAK,SACnCC,GAEAC,eAAeC,IAAIH,IAASE,eAAeE,OAAOJ,EAAMC,GACzD,EAEYI,EAAsBN,+CAGG,SACpCO,GAAwC,OACrC,SACHC,GAIY,IAFZC,IAAgBC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,KAAAA,UAAA,GAChBG,EAAsCH,UAAAC,OAAAD,EAAAA,kBAAAE,EAGlCE,EADcP,EAAUQ,aAAaP,GAGf,SAAtBM,GAAsD,UAAtBA,IAClCA,EAA0C,SAAtBA,GAGtB,IAAME,EAAoBF,QAS1B,OAPIE,IACFP,QAAiDG,IAA7BL,EAAUC,IAA6D,OAA7BD,EAAUC,MAGxED,EAAUC,GAAiBK,EAAWA,EAASC,GAAqBA,GAG/DE,EACR,0DAGgC,SAACC,GAAa,OAAKC,KAAKC,MAAMF,EAAM,6BAEnC,SAACA,GAAa,OAAKC,KAAKC,MAAMF,EAAM"}
|