lism-css 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/script-build-css.js +1 -1
- package/config/default-config.ts +9 -0
- package/config/defaults/{props.js → props.ts} +4 -4
- package/config/defaults/{states.js → states.ts} +2 -2
- 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/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 +44 -48
- 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 +838 -0
- package/dist/config/defaults/props.d.ts +797 -0
- package/dist/config/defaults/states.d.ts +29 -0
- 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 +1675 -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/reset.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 +19 -19
- package/dist/lib/getLayoutProps.test.d.ts +1 -0
- package/dist/lib/getLismProps.d.ts +77 -2
- package/dist/lib/getLismProps.js +122 -107
- 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 +30 -11
- package/src/scss/_auto_output.scss +2 -1
- package/src/scss/_with_layer.scss +1 -0
- package/src/scss/base/_base.scss +2 -2
- package/src/scss/base/set/_plain.scss +1 -0
- package/src/scss/reset.scss +1 -1
- 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
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
export function
|
|
3
|
-
export function
|
|
4
|
-
export function
|
|
5
|
-
export function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export function
|
|
11
|
-
export function
|
|
12
|
-
export function
|
|
13
|
-
export function
|
|
1
|
+
import { LismComponentProps } from '../Lism';
|
|
2
|
+
export declare function div(props: LismComponentProps<'div'>): import("react").JSX.Element;
|
|
3
|
+
export declare function p(props: LismComponentProps<'p'>): import("react").JSX.Element;
|
|
4
|
+
export declare function span(props: LismComponentProps<'span'>): import("react").JSX.Element;
|
|
5
|
+
export declare function a(props: LismComponentProps<'a'>): import("react").JSX.Element;
|
|
6
|
+
type HeadingLevel = '1' | '2' | '3' | '4' | '5' | '6';
|
|
7
|
+
type HeadingProps = LismComponentProps<'h1'> & {
|
|
8
|
+
lv?: HeadingLevel;
|
|
9
|
+
};
|
|
10
|
+
export declare function h({ lv, ...props }: HeadingProps): import("react").JSX.Element;
|
|
11
|
+
export declare function img(props: LismComponentProps<'img'>): import("react").JSX.Element;
|
|
12
|
+
export declare function ul(props: LismComponentProps<'ul'>): import("react").JSX.Element;
|
|
13
|
+
export declare function ol(props: LismComponentProps<'ol'>): import("react").JSX.Element;
|
|
14
|
+
export declare function li(props: LismComponentProps<'li'>): import("react").JSX.Element;
|
|
15
|
+
export declare function button(props: LismComponentProps<'button'>): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { div, p, span, img, a, h, ul, ol, li, button } from './HTML';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export default
|
|
2
|
+
declare const HTML: {
|
|
3
|
+
div: typeof div;
|
|
4
|
+
p: typeof p;
|
|
5
|
+
span: typeof span;
|
|
6
|
+
img: typeof img;
|
|
7
|
+
a: typeof a;
|
|
8
|
+
h: typeof h;
|
|
9
|
+
ul: typeof ul;
|
|
10
|
+
ol: typeof ol;
|
|
11
|
+
li: typeof li;
|
|
12
|
+
button: typeof button;
|
|
13
|
+
};
|
|
14
|
+
export default HTML;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { button as o, li as t, ol as
|
|
2
|
-
const
|
|
1
|
+
import { button as o, li as t, ol as a, ul as i, h as l, a as p, img as m, span as n, p as r, div as s } from "./index2.js";
|
|
2
|
+
const d = { div: s, p: r, span: n, img: m, a: p, h: l, ul: i, ol: a, li: t, button: o };
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
d as default
|
|
5
5
|
};
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import r from "../Lism/index.js";
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
3
|
+
function s(n) {
|
|
4
|
+
return /* @__PURE__ */ t(r, { as: "div", ...n });
|
|
5
5
|
}
|
|
6
|
-
function f(
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
function f(n) {
|
|
7
|
+
return /* @__PURE__ */ t(r, { as: "p", ...n });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
function c(n) {
|
|
10
|
+
return /* @__PURE__ */ t(r, { as: "span", ...n });
|
|
11
11
|
}
|
|
12
|
-
function e(
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
function e(n) {
|
|
13
|
+
return /* @__PURE__ */ t(r, { as: "a", ...n });
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
15
|
+
function m({ lv: n = "1", ...u }) {
|
|
16
|
+
const o = `h${n}`;
|
|
17
|
+
return /* @__PURE__ */ t(r, { as: o, ...u });
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
function p(n) {
|
|
20
|
+
return /* @__PURE__ */ t(r, { as: "img", ...n });
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
function l(n) {
|
|
23
|
+
return /* @__PURE__ */ t(r, { as: "ul", ...n });
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
function g(n) {
|
|
26
|
+
return /* @__PURE__ */ t(r, { as: "ol", ...n });
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
function b(n) {
|
|
29
|
+
return /* @__PURE__ */ t(r, { as: "li", ...n });
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
function d(n) {
|
|
32
|
+
return /* @__PURE__ */ t(r, { as: "button", ...n });
|
|
32
33
|
}
|
|
33
34
|
export {
|
|
34
35
|
e as a,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
d as button,
|
|
37
|
+
s as div,
|
|
38
|
+
m as h,
|
|
39
|
+
p as img,
|
|
40
|
+
b as li,
|
|
41
|
+
g as ol,
|
|
41
42
|
f as p,
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
c as span,
|
|
44
|
+
l as ul
|
|
44
45
|
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from '../Lism';
|
|
3
|
+
import { FilterProps } from '../getFilterProps';
|
|
4
|
+
type LayerProps<T extends ElementType = 'div'> = LismComponentProps<T> & FilterProps;
|
|
5
|
+
export default function Layer<T extends ElementType = 'div'>(props: LayerProps<T>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as getFilterProps } from '../getFilterProps';
|
|
2
|
+
type LayerProps = Parameters<typeof getFilterProps>[0];
|
|
3
|
+
type LayerOutput = ReturnType<typeof getFilterProps>;
|
|
4
|
+
export declare function getLayerProps(props: LayerProps): LayerOutput;
|
|
5
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
import { LismComponentProps } from '../Lism';
|
|
2
|
+
type LinkBoxProps = LismComponentProps<'a'>;
|
|
3
|
+
export default function LinkBox({ children, ...props }: LinkBoxProps): import("react").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, ReactNode, JSX } from 'react';
|
|
2
|
+
import { LismProps } from '../../lib/getLismProps';
|
|
3
|
+
import { LayoutSpecificProps } from '../../lib/types/LayoutProps';
|
|
4
|
+
/** HTML 要素 Props と共通オプションの基底型 */
|
|
5
|
+
type LismBaseProps<T extends ElementType> = Omit<ComponentPropsWithoutRef<T>, keyof LismProps> & {
|
|
6
|
+
/** レンダリングするコンポーネントまたは要素 */
|
|
7
|
+
as?: T;
|
|
8
|
+
/** レンダリングするHTML要素のタグ名(文字列のみ)*/
|
|
9
|
+
tag?: keyof JSX.IntrinsicElements;
|
|
10
|
+
/** 子要素 */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** getLismProps を経由せずに直接渡す追加の props */
|
|
13
|
+
exProps?: Record<string, unknown>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Lism コンポーネントの Props 型
|
|
17
|
+
* @template T - レンダリングする要素の型(デフォルトは 'div')
|
|
18
|
+
*/
|
|
19
|
+
export type LismComponentProps<T extends ElementType = 'div'> = LismProps & LayoutSpecificProps & LismBaseProps<T>;
|
|
20
|
+
/**
|
|
21
|
+
* layout が固定されたレイアウトコンポーネントの Props 型
|
|
22
|
+
* layout プロパティは固定されるため受け付けない
|
|
23
|
+
* @template T - レンダリングする要素の型(デフォルトは 'div')
|
|
24
|
+
* @template L - レイアウト固有の追加 Props 型
|
|
25
|
+
*/
|
|
26
|
+
export type LayoutComponentProps<T extends ElementType = 'div', L = object> = Omit<LismProps, 'layout'> & Omit<L, 'layout'> & LismBaseProps<T>;
|
|
1
27
|
/**
|
|
2
28
|
* Lism Propsを処理できるだけのコンポーネント
|
|
3
29
|
*/
|
|
4
|
-
export default function Lism({ children, as, tag, exProps, ...props }:
|
|
5
|
-
|
|
6
|
-
children: any;
|
|
7
|
-
as: any;
|
|
8
|
-
tag: any;
|
|
9
|
-
exProps: any;
|
|
10
|
-
}): import("react").JSX.Element;
|
|
30
|
+
export default function Lism<T extends ElementType = 'div'>({ children, as, tag, exProps, ...props }: LismComponentProps<T>): JSX.Element;
|
|
31
|
+
export {};
|