lism-css 0.8.3 → 0.9.0
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/bin/script-build-css.js +1 -1
- package/config/__prop_list.js +1 -1
- package/config/default-config.ts +9 -0
- package/config/defaults/__props-memo.js +4 -4
- package/config/defaults/{props.js → props.ts} +8 -8
- package/config/defaults/{states.js → states.ts} +14 -13
- package/config/defaults/{tokens.js → tokens.ts} +1 -1
- package/config/helper/{getSvgUrl.js → getSvgUrl.ts} +1 -3
- package/config/helper/{minifyHtml.js → minifyHtml.ts} +1 -1
- package/config/helper.test.ts +238 -0
- package/config/helper.ts +79 -0
- package/config/{index.js → index.ts} +17 -4
- package/config/tsconfig.json +18 -0
- package/config.d.ts +2 -0
- package/config.js +1 -1
- package/dist/components/Box/Box.d.ts +4 -1
- package/dist/components/Box/index.d.ts +1 -1
- package/dist/components/Center/Center.d.ts +4 -1
- package/dist/components/Center/index.d.ts +1 -1
- package/dist/components/Cluster/Cluster.d.ts +4 -1
- package/dist/components/Cluster/index.js +2 -2
- package/dist/components/Columns/Columns.d.ts +4 -1
- package/dist/components/Container/Container.d.ts +6 -4
- package/dist/components/Dummy/Dummy.d.ts +10 -8
- package/dist/components/Dummy/getContent.d.ts +13 -7
- package/dist/components/Dummy/getContent.js +7 -6
- package/dist/components/Dummy/index.js +8 -7
- package/dist/components/Flex/Flex.d.ts +4 -1
- package/dist/components/Flow/Flow.d.ts +4 -1
- package/dist/components/Flow/index.d.ts +1 -1
- package/dist/components/FluidCols/FluidCols.d.ts +4 -1
- package/dist/components/Frame/Frame.d.ts +4 -1
- package/dist/components/Grid/Grid.d.ts +4 -1
- package/dist/components/HTML/HTML.d.ts +16 -13
- package/dist/components/HTML/index.d.ts +13 -13
- package/dist/components/HTML/index.js +3 -3
- package/dist/components/HTML/index2.js +30 -29
- package/dist/components/Layer/Layer.d.ts +6 -1
- package/dist/components/Layer/Layer.test.d.ts +1 -0
- package/dist/components/Layer/getProps.d.ts +5 -1
- package/dist/components/LinkBox/LinkBox.d.ts +4 -4
- package/dist/components/LinkBox/script.d.ts +3 -0
- package/dist/components/Lism/Lism.d.ts +28 -7
- package/dist/components/Lism/Lism.stories.d.ts +667 -0
- package/dist/components/Lism/Lism.test.d.ts +1 -0
- package/dist/components/Lism/index.d.ts +1 -3
- package/dist/components/Lism/index.js +3 -3
- package/dist/components/SideMain/SideMain.d.ts +4 -1
- package/dist/components/Stack/Stack.d.ts +4 -1
- package/dist/components/SwitchCols/SwitchCols.d.ts +4 -1
- package/dist/components/Wrapper/Wrapper.d.ts +6 -4
- package/dist/components/atomic/Decorator/Decorator.d.ts +2 -1
- package/dist/components/atomic/Decorator/getProps.d.ts +10 -12
- package/dist/components/atomic/Decorator/getProps.js +10 -9
- package/dist/components/atomic/Divider/Divider.d.ts +2 -1
- package/dist/components/atomic/Divider/getProps.d.ts +2 -7
- package/dist/components/atomic/Divider/getProps.js +8 -7
- package/dist/components/atomic/Icon/Icon.d.ts +4 -3
- package/dist/components/atomic/Icon/SVG.d.ts +8 -9
- package/dist/components/atomic/Icon/getProps.d.ts +21 -12
- package/dist/components/atomic/Icon/getProps.js +31 -25
- package/dist/components/atomic/Icon/index.js +9 -8
- package/dist/components/atomic/Icon/presets.d.ts +2 -2
- package/dist/components/atomic/Media/Media.d.ts +2 -1
- package/dist/components/atomic/Media/getProps.d.ts +9 -1
- package/dist/components/atomic/Media/getProps.js +5 -6
- package/dist/components/atomic/Media/index.js +3 -3
- package/dist/components/atomic/Spacer/Spacer.d.ts +2 -1
- package/dist/components/atomic/Spacer/getProps.d.ts +2 -7
- package/dist/components/atomic/Spacer/getProps.js +8 -2
- package/dist/components/getFilterProps.d.ts +10 -1
- package/dist/components/getFilterProps.js +15 -5
- package/dist/components/getFilterProps.test.d.ts +1 -0
- package/dist/components/index.js +46 -50
- package/dist/components/setMaybeTransformStyles.d.ts +12 -1
- package/dist/components/setMaybeTransformStyles.js +4 -4
- package/dist/components/setMaybeTransformStyles.test.d.ts +1 -0
- package/dist/config/default-config.d.ts +854 -0
- package/dist/config/defaults/props.d.ts +812 -0
- package/dist/config/defaults/props.js +4 -4
- package/dist/config/defaults/states.d.ts +30 -0
- package/dist/config/defaults/states.js +12 -11
- package/dist/config/defaults/tokens.d.ts +28 -0
- package/dist/config/helper/getSvgUrl.d.ts +5 -0
- package/dist/config/helper/minifyHtml.d.ts +5 -0
- package/dist/config/helper.d.ts +21 -0
- package/dist/config/helper.js +14 -18
- package/dist/config/index.d.ts +1707 -0
- package/dist/config/index.js +15 -11
- package/dist/css/base/set.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/modules/layout.css +1 -1
- package/dist/css/modules/state.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/css/reset.css +1 -1
- package/dist/css/utility.css +1 -1
- package/dist/lib/LismPropsData.test.d.ts +1 -0
- package/dist/lib/getBpData.d.ts +9 -1
- package/dist/lib/getBpData.js +16 -10
- package/dist/lib/getBpData.test.d.ts +1 -0
- package/dist/lib/getLayoutProps.d.ts +22 -1
- package/dist/lib/getLayoutProps.js +20 -20
- package/dist/lib/getLayoutProps.test.d.ts +1 -0
- package/dist/lib/getLismProps.d.ts +77 -2
- package/dist/lib/getLismProps.js +127 -111
- package/dist/lib/getLismProps.test.d.ts +1 -0
- package/dist/lib/getMaybeCssVar.d.ts +5 -3
- package/dist/lib/getMaybeCssVar.js +15 -15
- package/dist/lib/getMaybeCssVar.test.d.ts +1 -0
- package/dist/lib/getMaybeTokenValue.d.ts +10 -1
- package/dist/lib/getMaybeTokenValue.js +21 -21
- package/dist/lib/getMaybeTokenValue.test.d.ts +1 -0
- package/dist/lib/getUtilKey.d.ts +7 -1
- package/dist/lib/getUtilKey.js +6 -6
- package/dist/lib/getUtilKey.test.d.ts +1 -0
- package/dist/lib/helper/atts.d.ts +6 -3
- package/dist/lib/helper/atts.test.d.ts +1 -0
- package/dist/lib/helper/filterEmptyObj.d.ts +20 -1
- package/dist/lib/helper/filterEmptyObj.js +6 -5
- package/dist/lib/helper/filterEmptyObj.test.d.ts +1 -0
- package/dist/lib/helper/hasSomeKeys.d.ts +1 -1
- package/dist/lib/helper/isNumStr.d.ts +4 -1
- package/dist/lib/helper/isNumStr.test.d.ts +1 -0
- package/dist/lib/helper/objMap.d.ts +8 -1
- package/dist/lib/helper/objMap.test.d.ts +1 -0
- package/dist/lib/helper/splitWithComma.d.ts +1 -1
- package/dist/lib/helper/splitWithComma.test.d.ts +1 -0
- package/dist/lib/isPresetValue.d.ts +3 -1
- package/dist/lib/isPresetValue.js +10 -3
- package/dist/lib/isPresetValue.test.d.ts +1 -0
- package/dist/lib/isTokenValue.d.ts +1 -1
- package/dist/lib/isTokenValue.js +24 -7
- package/dist/lib/isTokenValue.test.d.ts +1 -0
- package/dist/lib/types/LayoutProps.d.ts +50 -0
- package/dist/lib/types/PropValueTypes.d.ts +83 -0
- package/dist/lib/types/PropValueTypes.spec-d.d.ts +1 -0
- package/dist/lib/types/ResponsiveProps.d.ts +50 -0
- package/dist/lib/types/ResponsiveProps.spec-d.d.ts +1 -0
- package/dist/lib/types/StateProps.d.ts +27 -0
- package/dist/lib/types/StateProps.spec-d.d.ts +1 -0
- package/dist/lib/types/utils.d.ts +79 -0
- package/dist/lib/types/utils.spec-d.d.ts +1 -0
- package/dist/lib/types.d.ts +2 -0
- package/package.json +39 -20
- package/packages/astro/Lism/index.js +0 -2
- package/packages/astro/index.js +0 -2
- package/src/scss/_auto_output.scss +2 -1
- package/src/scss/_prop-config.scss +19 -0
- package/src/scss/_with_layer.scss +7 -11
- package/src/scss/base/{_base.scss → _html.scss} +2 -3
- package/src/scss/base/index.scss +6 -6
- package/src/scss/base/set/_bp.scss +2 -2
- package/src/scss/base/set/_cqUnit.scss +31 -0
- package/src/scss/{modules/state → base/set}/_gutter.scss +1 -1
- package/src/scss/base/set/_hov.scss +4 -4
- package/src/scss/base/set/_innerRs.scss +1 -1
- package/src/scss/base/set/_mask.scss +1 -1
- package/src/scss/base/set/_plain.scss +3 -1
- package/src/scss/base/set/_transition.scss +1 -1
- package/src/scss/base/set/index.scss +2 -2
- package/src/scss/base/{set → tokens}/_shadow.scss +2 -2
- package/src/scss/base/{_typography.scss → tokens/_typography.scss} +2 -8
- package/src/scss/modules/layout/_flex.scss +4 -0
- package/src/scss/modules/layout/_flow.scss +1 -1
- package/src/scss/modules/layout/_grid.scss +4 -0
- package/src/scss/modules/state/_container.scss +2 -2
- package/src/scss/modules/state/_wrapper.scss +2 -2
- package/src/scss/modules/state/index.scss +0 -1
- package/src/scss/props/_size.scss +1 -1
- package/src/scss/reset.scss +10 -3
- package/src/scss/utility/_cbox.scss +1 -1
- package/src/scss/utility/_clipText.scss +4 -0
- package/src/scss/utility/_hidden.scss +3 -3
- package/src/scss/utility/_itemDivider.scss +1 -1
- package/src/scss/utility/_linkExpand.scss +1 -1
- package/src/scss/{base/set → utility}/_snap.scss +1 -1
- package/src/scss/utility/_trimHL.scss +5 -4
- package/src/scss/utility/index.scss +2 -0
- package/config/default-config.js +0 -9
- package/config/helper.js +0 -67
- package/dist/components/Lism/Link.d.ts +0 -1
- package/dist/components/Lism/Link.js +0 -8
- package/dist/components/Lism/Text.d.ts +0 -1
- package/dist/components/Lism/Text.js +0 -8
- package/dist/components/Lism/__Lism_with_forwardRef.d.ts +0 -5
- package/dist/components/Test/Test.d.ts +0 -9
- package/dist/components/Test/TestItem.d.ts +0 -2
- package/dist/components/Test/TestRoot.d.ts +0 -4
- package/dist/components/Test/index.d.ts +0 -7
- package/dist/components/__Core/Core.d.ts +0 -11
- package/dist/components/__Core/index.d.ts +0 -1
- package/packages/astro/Lism/Link.astro +0 -10
- package/packages/astro/Lism/Text.astro +0 -10
- package/packages/astro/Test/Test.astro +0 -14
- package/packages/astro/Test/TestItem.astro +0 -14
- package/packages/astro/Test/index.js +0 -4
- /package/src/scss/base/{_property.scss → tokens/_property.scss} +0 -0
- /package/src/scss/base/{_tokens.scss → tokens/_tokens.scss} +0 -0
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { DecoratorProps } from './getProps';
|
|
2
|
+
export default function Decorator(props: DecoratorProps): import("react").JSX.Element;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}): {
|
|
9
|
-
lismClass: string;
|
|
10
|
-
'aria-hidden': string;
|
|
11
|
-
} & {
|
|
12
|
-
[x: string]: any;
|
|
1
|
+
import { FilterProps } from '../../getFilterProps';
|
|
2
|
+
import { TransformStyleProps } from '../../setMaybeTransformStyles';
|
|
3
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
4
|
+
type DecoratorOwnProps = {
|
|
5
|
+
size?: string;
|
|
6
|
+
clipPath?: string;
|
|
7
|
+
boxSizing?: string;
|
|
13
8
|
};
|
|
9
|
+
export type DecoratorProps = LismComponentProps & TransformStyleProps & FilterProps & DecoratorOwnProps;
|
|
10
|
+
export default function getDecoratorProps({ lismClass, size, clipPath, boxSizing, style: outerStyle, ...rest }: DecoratorProps): LismComponentProps;
|
|
11
|
+
export {};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import n from "../../../lib/helper/atts.js";
|
|
2
|
+
import p from "../../getFilterProps.js";
|
|
3
|
+
import m from "../../setMaybeTransformStyles.js";
|
|
4
|
+
function y({ lismClass: a, size: o, clipPath: s, boxSizing: e, style: i, ...f }) {
|
|
5
|
+
const r = i ?? {}, t = p(m(f));
|
|
6
|
+
s && (r.clipPath = s), e && (r.boxSizing = e), o && (t.ar = "1/1", t.w = o), t.style = r;
|
|
7
|
+
const l = {
|
|
8
|
+
lismClass: n(a, "a--decorator"),
|
|
8
9
|
"aria-hidden": "true"
|
|
9
10
|
};
|
|
10
|
-
return Object.assign(
|
|
11
|
+
return Object.assign(l, t);
|
|
11
12
|
}
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
y as default
|
|
14
15
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
export default function Divider(props: LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
lismClass: any;
|
|
4
|
-
}): {
|
|
5
|
-
lismClass: string;
|
|
6
|
-
'aria-hidden': string;
|
|
7
|
-
};
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
export declare function getDividerProps({ lismClass, ...props }: LismComponentProps): LismComponentProps;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
return {
|
|
4
|
-
lismClass:
|
|
5
|
-
"aria-hidden": "true"
|
|
6
|
-
|
|
1
|
+
import t from "../../../lib/helper/atts.js";
|
|
2
|
+
function a({ lismClass: r, ...i }) {
|
|
3
|
+
return {
|
|
4
|
+
lismClass: t(r, "a--divider"),
|
|
5
|
+
"aria-hidden": "true",
|
|
6
|
+
...i
|
|
7
|
+
};
|
|
7
8
|
}
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
a as getDividerProps
|
|
10
11
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IconProps } from './getProps';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export default function Icon({ children, ...props }: IconProps & {
|
|
4
|
+
children?: ReactNode;
|
|
4
5
|
}): import("react").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
size?: string
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}): import("react").JSX.Element;
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
type SVGComponentProps = SVGProps<SVGSVGElement> & {
|
|
3
|
+
size?: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
__html?: string;
|
|
6
|
+
};
|
|
7
|
+
export default function SVG({ size, fill, viewBox, path, children, __html, ...props }: SVGComponentProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exProps
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
import { TransformStyleProps } from '../../setMaybeTransformStyles';
|
|
3
|
+
import { ElementType } from 'react';
|
|
4
|
+
type IconObject = {
|
|
5
|
+
as: ElementType;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
type IconProp = ElementType | IconObject;
|
|
9
|
+
type IconOwnProps = {
|
|
10
|
+
icon?: IconProp;
|
|
11
|
+
label?: string;
|
|
12
|
+
exProps?: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
export type IconProps = LismComponentProps & TransformStyleProps & IconOwnProps;
|
|
15
|
+
export default function getProps({ lismClass, as, tag, icon, label, exProps, ..._props }: IconProps): {
|
|
16
|
+
Component: ElementType | "_SVG_";
|
|
17
|
+
lismProps: {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
exProps: Record<string, unknown>;
|
|
13
21
|
content: string;
|
|
14
22
|
};
|
|
23
|
+
export {};
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
const [, e, m] =
|
|
1
|
+
import C from "./presets.js";
|
|
2
|
+
import y from "../../../lib/helper/atts.js";
|
|
3
|
+
import b from "../../setMaybeTransformStyles.js";
|
|
4
|
+
function d(u) {
|
|
5
|
+
const a = {}, o = u.match(/<svg([^>]*?)>([\s\S]*?)<\/svg>/i);
|
|
6
|
+
if (o) {
|
|
7
|
+
const [, e, m] = o, t = /([\w-]+)=["']([^"']*)["']/g;
|
|
8
8
|
let c;
|
|
9
9
|
for (; (c = t.exec(e)) !== null; ) {
|
|
10
10
|
const [, s, n] = c;
|
|
11
11
|
if (s === "style") {
|
|
12
|
-
const
|
|
13
|
-
n.split(";").forEach((
|
|
14
|
-
const [l,
|
|
15
|
-
l &&
|
|
16
|
-
}),
|
|
12
|
+
const g = {};
|
|
13
|
+
n.split(";").forEach((v) => {
|
|
14
|
+
const [l, i] = v.split(":").map((f) => f.trim());
|
|
15
|
+
l && i && (g[l] = i);
|
|
16
|
+
}), a[s] = g;
|
|
17
17
|
} else
|
|
18
|
-
|
|
18
|
+
a[s] = n;
|
|
19
19
|
}
|
|
20
|
-
return { svgProps:
|
|
20
|
+
return { svgProps: a, svgContent: m };
|
|
21
21
|
}
|
|
22
22
|
return {};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let s =
|
|
24
|
+
function j({ lismClass: u, as: a, tag: o, icon: e, label: m, exProps: t = {}, ...c }) {
|
|
25
|
+
let s = o || "span", n = "";
|
|
26
|
+
const {
|
|
27
|
+
style: g = {},
|
|
28
|
+
className: v = "",
|
|
29
|
+
...l
|
|
30
|
+
} = b(c);
|
|
31
|
+
let i = g, f = v;
|
|
26
32
|
if (l.viewBox)
|
|
27
33
|
s = "svg", l.width || (t.width = "1em"), l.height || (t.height = "1em");
|
|
28
34
|
else if (l.src)
|
|
@@ -31,20 +37,20 @@ function V({ lismClass: u, as: i, tag: g, icon: e, label: m, exProps: t = {}, ..
|
|
|
31
37
|
if (typeof e == "string")
|
|
32
38
|
if (e.startsWith("<svg")) {
|
|
33
39
|
s = "_SVG_";
|
|
34
|
-
const { svgProps:
|
|
35
|
-
f =
|
|
40
|
+
const { svgProps: r = {}, svgContent: h = "" } = d(e), { class: p, style: _, ...S } = r;
|
|
41
|
+
f = y(f, p), i = { ...i, ..._ }, t = { ...t, ...S, fill: "currentColor" }, n = h;
|
|
36
42
|
} else {
|
|
37
|
-
const
|
|
38
|
-
|
|
43
|
+
const r = C[e] || null;
|
|
44
|
+
r != null && (s = "_SVG_", t = { ...t, ...r });
|
|
39
45
|
}
|
|
40
46
|
else if (typeof e == "object" && e.as) {
|
|
41
|
-
const { as:
|
|
42
|
-
s =
|
|
47
|
+
const { as: r, ...h } = e;
|
|
48
|
+
s = r, t = { ...t, ...h };
|
|
43
49
|
} else
|
|
44
50
|
s = e;
|
|
45
|
-
else
|
|
46
|
-
return m ? (t["aria-label"] = m, t.role = "img") : t["aria-hidden"] = "true", l.lismClass =
|
|
51
|
+
else a && (s = a);
|
|
52
|
+
return m ? (t["aria-label"] = m, t.role = "img") : t["aria-hidden"] = "true", l.lismClass = y(u, "a--icon", f), l.style = { ...i }, { Component: s, lismProps: l, exProps: t, content: n };
|
|
47
53
|
}
|
|
48
54
|
export {
|
|
49
|
-
|
|
55
|
+
j as default
|
|
50
56
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../lib/getLismProps.js";
|
|
3
|
+
import f from "./getProps.js";
|
|
4
|
+
import l from "./SVG.js";
|
|
5
|
+
function x({ children: m, ...n }) {
|
|
6
|
+
const { Component: t, lismProps: p, exProps: r = {}, content: e } = f(n);
|
|
7
|
+
let o;
|
|
8
|
+
return t === "_SVG_" ? (o = l, e && (r.__html = e)) : o = t, /* @__PURE__ */ s(o, { ...i(p), ...r, children: m });
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
x as default
|
|
11
12
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const phIcons: {
|
|
1
|
+
export declare const phIcons: {
|
|
2
2
|
folder: {
|
|
3
3
|
viewBox: string;
|
|
4
4
|
path: string;
|
|
@@ -180,7 +180,7 @@ export const phIcons: {
|
|
|
180
180
|
path: string;
|
|
181
181
|
};
|
|
182
182
|
};
|
|
183
|
-
export const logoIcons: {
|
|
183
|
+
export declare const logoIcons: {
|
|
184
184
|
'logo-facebook': {
|
|
185
185
|
viewBox: string;
|
|
186
186
|
path: string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { MediaProps } from './getProps';
|
|
2
|
+
export default function Media(props: MediaProps): import("react").JSX.Element;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
type MediaOwnProps = {
|
|
4
|
+
objectPosition?: CSSProperties['objectPosition'];
|
|
5
|
+
objectFit?: CSSProperties['objectFit'];
|
|
6
|
+
};
|
|
7
|
+
export type MediaProps = LismComponentProps & MediaOwnProps;
|
|
8
|
+
export default function getMediaProps({ objectPosition, objectFit, lismClass, style, ...rest }: MediaProps): LismComponentProps;
|
|
9
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
return i && (t.objectPosition = i), s && (t.objectFit = s), o.lismClass = a(r, "a--media"), o.style = t, l(o);
|
|
1
|
+
import e from "../../../lib/helper/atts.js";
|
|
2
|
+
import f from "../../getFilterProps.js";
|
|
3
|
+
function s({ objectPosition: i, objectFit: t, lismClass: o, style: r = {}, ...a }) {
|
|
4
|
+
return i && (r.objectPosition = i), t && (r.objectFit = t), f({ ...a, lismClass: e(o, "a--media"), style: r });
|
|
6
5
|
}
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
s as default
|
|
9
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import i from "./getProps.js";
|
|
3
|
+
import m from "../../Lism/index.js";
|
|
4
4
|
function f(r) {
|
|
5
|
-
return /* @__PURE__ */ o(
|
|
5
|
+
return /* @__PURE__ */ o(m, { as: "img", ...i(r) });
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
f as default
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
export default function Spacer(props: LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
lismClass: any;
|
|
4
|
-
}): {
|
|
5
|
-
lismClass: string;
|
|
6
|
-
'aria-hidden': string;
|
|
7
|
-
};
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
export default function getSpacerProps({ lismClass, ...props }: LismComponentProps): LismComponentProps;
|
|
@@ -8,11 +8,17 @@ function h({ lismClass: l, ...e }) {
|
|
|
8
8
|
};
|
|
9
9
|
if (e.h != null) {
|
|
10
10
|
let t = u(e.h);
|
|
11
|
-
t = Object.entries(t).reduce(
|
|
11
|
+
t = Object.entries(t).reduce(
|
|
12
|
+
(r, [a, i]) => (r[a] = c(i, "space"), r),
|
|
13
|
+
{}
|
|
14
|
+
), e.h = t;
|
|
12
15
|
}
|
|
13
16
|
if (e.w != null) {
|
|
14
17
|
let t = u(e.w);
|
|
15
|
-
t = Object.entries(t).reduce(
|
|
18
|
+
t = Object.entries(t).reduce(
|
|
19
|
+
(r, [a, i]) => (r[a] = c(i, "space"), r),
|
|
20
|
+
{}
|
|
21
|
+
), e.w = t;
|
|
16
22
|
}
|
|
17
23
|
return { ...n, ...e };
|
|
18
24
|
}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { LismProps } from '../lib/getLismProps';
|
|
2
|
+
import { StyleWithCustomProps } from '../lib/types';
|
|
3
|
+
type FilterName = 'blur' | 'contrast' | 'brightness' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia';
|
|
4
|
+
export type FilterProps = {
|
|
5
|
+
[K in FilterName]?: string | number;
|
|
6
|
+
};
|
|
7
|
+
export default function getFilterProps(props: LismProps & FilterProps, filterType?: string): LismProps & {
|
|
8
|
+
style: StyleWithCustomProps;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const c = [
|
|
2
|
+
"blur",
|
|
3
|
+
"contrast",
|
|
4
|
+
"brightness",
|
|
5
|
+
"dropShadow",
|
|
6
|
+
"grayscale",
|
|
7
|
+
"hueRotate",
|
|
8
|
+
"invert",
|
|
9
|
+
"saturate",
|
|
10
|
+
"sepia"
|
|
11
|
+
];
|
|
12
|
+
function l(o, a = "filter") {
|
|
3
13
|
const s = [], { style: r = {}, ...t } = o;
|
|
4
|
-
return
|
|
14
|
+
return c.forEach((e) => {
|
|
5
15
|
if (t[e]) {
|
|
6
16
|
const n = e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
7
17
|
s.push(`${n}(${t[e]})`), delete t[e];
|
|
8
18
|
}
|
|
9
|
-
}), s.length > 0 && (r[a] = s.join(" ")), t
|
|
19
|
+
}), s.length > 0 && (r[a] = s.join(" ")), { ...t, style: r };
|
|
10
20
|
}
|
|
11
21
|
export {
|
|
12
|
-
|
|
22
|
+
l as default
|
|
13
23
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/components/index.js
CHANGED
|
@@ -1,54 +1,50 @@
|
|
|
1
1
|
import { default as o } from "./HTML/index.js";
|
|
2
|
-
import { default as t } from "./
|
|
3
|
-
import { default as l } from "./
|
|
4
|
-
import { default as m } from "./
|
|
5
|
-
import { default as u } from "./
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as n } from "./
|
|
8
|
-
import { default as c } from "./
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as y } from "./
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as W } from "./
|
|
17
|
-
import { default as g } from "./
|
|
18
|
-
import { default as q } from "./
|
|
19
|
-
import { default as A } from "./
|
|
20
|
-
import { default as J } from "./
|
|
21
|
-
import { default as N } from "./
|
|
22
|
-
import { default as P } from "./
|
|
23
|
-
import { default as R } from "./
|
|
24
|
-
import { default as V } from "./
|
|
25
|
-
import { default as Y } from "./atomic/Media/index.js";
|
|
26
|
-
import { default as _ } from "./atomic/Spacer/index.js";
|
|
2
|
+
import { default as t } from "./Box/index.js";
|
|
3
|
+
import { default as l } from "./Center/index.js";
|
|
4
|
+
import { default as m } from "./Cluster/index.js";
|
|
5
|
+
import { default as u } from "./Columns/index.js";
|
|
6
|
+
import { default as x } from "./Container/index.js";
|
|
7
|
+
import { default as n } from "./atomic/Decorator/index.js";
|
|
8
|
+
import { default as c } from "./atomic/Divider/index.js";
|
|
9
|
+
import { default as L } from "./Dummy/index.js";
|
|
10
|
+
import { default as D } from "./Flex/index.js";
|
|
11
|
+
import { default as k } from "./Flow/index.js";
|
|
12
|
+
import { default as y } from "./FluidCols/index.js";
|
|
13
|
+
import { default as h } from "./Frame/index.js";
|
|
14
|
+
import { default as G } from "./Grid/index.js";
|
|
15
|
+
import { default as I } from "./atomic/Icon/index.js";
|
|
16
|
+
import { default as W } from "./Layer/index.js";
|
|
17
|
+
import { default as g } from "./LinkBox/index.js";
|
|
18
|
+
import { default as q } from "./Lism/index.js";
|
|
19
|
+
import { default as A } from "./atomic/Media/index.js";
|
|
20
|
+
import { default as J } from "./SideMain/index.js";
|
|
21
|
+
import { default as N } from "./atomic/Spacer/index.js";
|
|
22
|
+
import { default as P } from "./Stack/index.js";
|
|
23
|
+
import { default as R } from "./SwitchCols/index.js";
|
|
24
|
+
import { default as V } from "./Wrapper/index.js";
|
|
27
25
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
t as Box,
|
|
27
|
+
l as Center,
|
|
28
|
+
m as Cluster,
|
|
29
|
+
u as Columns,
|
|
30
|
+
x as Container,
|
|
31
|
+
n as Decorator,
|
|
32
|
+
c as Divider,
|
|
33
|
+
L as Dummy,
|
|
34
|
+
D as Flex,
|
|
35
|
+
k as Flow,
|
|
36
|
+
y as FluidCols,
|
|
37
|
+
h as Frame,
|
|
38
|
+
G as Grid,
|
|
41
39
|
o as HTML,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
l as Text,
|
|
53
|
-
n as Wrapper
|
|
40
|
+
I as Icon,
|
|
41
|
+
W as Layer,
|
|
42
|
+
g as LinkBox,
|
|
43
|
+
q as Lism,
|
|
44
|
+
A as Media,
|
|
45
|
+
J as SideMain,
|
|
46
|
+
N as Spacer,
|
|
47
|
+
P as Stack,
|
|
48
|
+
R as SwitchCols,
|
|
49
|
+
V as Wrapper
|
|
54
50
|
};
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { StyleWithCustomProps } from '../lib/types';
|
|
2
|
+
export type TransformStyleProps = {
|
|
3
|
+
translate?: string;
|
|
4
|
+
rotate?: string;
|
|
5
|
+
scale?: string;
|
|
6
|
+
transform?: string;
|
|
7
|
+
};
|
|
8
|
+
type TransformKeys = keyof TransformStyleProps;
|
|
9
|
+
export default function setMaybeTransformStyles<P extends object>(props: P): Omit<P, TransformKeys> & {
|
|
10
|
+
style: StyleWithCustomProps;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
2
|
-
const {
|
|
3
|
-
return e && (t.translate = e),
|
|
1
|
+
function o(n) {
|
|
2
|
+
const { translate: e, rotate: s, scale: a, transform: r, style: f, ...l } = n, t = f ?? {};
|
|
3
|
+
return e && (t.translate = e), s && (t.rotate = s), a && (t.scale = a), r && (t.transform = r), { ...l, style: t };
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
o as default
|
|
7
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|