lism-css 0.11.0 → 0.13.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/README.ja.md +9 -9
- package/README.md +12 -12
- package/config/default-config.ts +2 -2
- package/config/defaults/props.ts +16 -26
- package/config/defaults/traits.ts +16 -0
- package/config/index.ts +3 -3
- package/dist/components/{atomic/Media → Media}/Media.d.ts +2 -2
- package/dist/components/{atomic/Media → Media}/index.js +1 -1
- package/dist/components/atomic/Icon/getProps.d.ts +1 -1
- package/dist/components/atomic/Icon/index.d.ts +1 -1
- package/dist/components/index.d.ts +18 -18
- package/dist/components/index.js +45 -45
- package/dist/components/{Box → layout/Box}/Box.d.ts +2 -2
- package/dist/components/{Box → layout/Box}/index.js +1 -1
- package/dist/components/{Center → layout/Center}/Center.d.ts +2 -2
- package/dist/components/{Center → layout/Center}/index.js +1 -1
- package/dist/components/{Cluster → layout/Cluster}/Cluster.d.ts +2 -2
- package/dist/components/{Cluster → layout/Cluster}/index.js +1 -1
- package/dist/components/{Columns → layout/Columns}/Columns.d.ts +2 -2
- package/dist/components/{Columns → layout/Columns}/index.js +1 -1
- package/dist/components/{Flex → layout/Flex}/Flex.d.ts +2 -2
- package/dist/components/{Flex → layout/Flex}/index.js +1 -1
- package/dist/components/{Flow → layout/Flow}/Flow.d.ts +2 -2
- package/dist/components/{Flow → layout/Flow}/index.js +1 -1
- package/dist/components/{FluidCols → layout/FluidCols}/FluidCols.d.ts +2 -2
- package/dist/components/{FluidCols → layout/FluidCols}/index.js +1 -1
- package/dist/components/{Frame → layout/Frame}/Frame.d.ts +2 -2
- package/dist/components/{Frame → layout/Frame}/index.js +1 -1
- package/dist/components/{Grid → layout/Grid}/Grid.d.ts +2 -2
- package/dist/components/{Grid → layout/Grid}/index.js +1 -1
- package/dist/components/{SideMain → layout/SideMain}/SideMain.d.ts +2 -2
- package/dist/components/{SideMain → layout/SideMain}/index.js +1 -1
- package/dist/components/{Stack → layout/Stack}/Stack.d.ts +2 -2
- package/dist/components/{Stack → layout/Stack}/index.js +1 -1
- package/dist/components/{SwitchCols → layout/SwitchCols}/SwitchCols.d.ts +2 -2
- package/dist/components/{SwitchCols → layout/SwitchCols}/index.js +1 -1
- package/dist/components/layout/TileGrid/TileGrid.d.ts +4 -0
- package/dist/components/layout/TileGrid/index.d.ts +1 -0
- package/dist/components/layout/TileGrid/index.js +8 -0
- package/dist/components/state/BoxLink/BoxLink.d.ts +5 -0
- package/dist/components/{LinkBox/LinkBox.stories.d.ts → state/BoxLink/BoxLink.stories.d.ts} +3 -3
- package/dist/components/state/BoxLink/index.d.ts +1 -0
- package/dist/components/{LinkBox → state/BoxLink}/index.js +2 -2
- package/dist/components/state/BoxLink/script.d.ts +4 -0
- package/dist/components/state/Container/Container.d.ts +2 -0
- package/dist/components/{Container → state/Container}/Container.stories.d.ts +2 -2
- package/dist/components/state/Container/index.js +8 -0
- package/dist/components/{Layer → state/Layer}/Layer.d.ts +1 -1
- package/dist/components/{Layer → state/Layer}/index.js +1 -1
- package/dist/components/{Wrapper → state/Wrapper}/Wrapper.d.ts +1 -1
- package/dist/components/{Wrapper → state/Wrapper}/index.js +1 -1
- package/dist/config/default-config.d.ts +27 -73
- package/dist/config/default-config.js +4 -4
- package/dist/config/defaults/props.d.ts +24 -58
- package/dist/config/defaults/props.js +16 -26
- package/dist/config/defaults/{states.d.ts → traits.d.ts} +2 -14
- package/dist/config/defaults/traits.js +19 -0
- package/dist/config/index.d.ts +54 -146
- package/dist/config/index.js +5 -5
- 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/primitives/layout.css +1 -0
- package/dist/css/primitives/trait.css +1 -0
- package/dist/css/props.css +1 -1
- package/dist/css/utility.css +1 -1
- package/dist/lib/getLayoutProps.js +12 -15
- package/dist/lib/getLismProps.d.ts +9 -6
- package/dist/lib/getLismProps.js +113 -101
- package/dist/lib/helper/mergeSet.d.ts +10 -0
- package/dist/lib/helper/mergeSet.js +14 -0
- package/dist/lib/types/LayoutProps.d.ts +4 -1
- package/dist/lib/types/TraitProps.d.ts +47 -0
- package/dist/lib/types/TraitProps.spec-d.d.ts +1 -0
- package/package.json +1 -1
- package/packages/astro/{Decorator → atomic/Decorator}/Decorator.astro +1 -1
- package/packages/astro/{Divider → atomic/Divider}/Divider.astro +2 -2
- package/packages/astro/{Icon → atomic/Icon}/Icon.astro +1 -1
- package/packages/astro/{Spacer → atomic/Spacer}/Spacer.astro +2 -2
- package/packages/astro/index.ts +26 -22
- package/packages/astro/{Box → layout/Box}/Box.astro +2 -2
- package/packages/astro/{Center → layout/Center}/Center.astro +2 -2
- package/packages/astro/{Cluster → layout/Cluster}/Cluster.astro +2 -2
- package/packages/astro/{Columns → layout/Columns}/Columns.astro +2 -2
- package/packages/astro/{Flex → layout/Flex}/Flex.astro +2 -2
- package/packages/astro/{Flow → layout/Flow}/Flow.astro +2 -2
- package/packages/astro/{FluidCols → layout/FluidCols}/FluidCols.astro +2 -2
- package/packages/astro/{Frame → layout/Frame}/Frame.astro +2 -2
- package/packages/astro/{Grid → layout/Grid}/Grid.astro +2 -2
- package/packages/astro/{SideMain → layout/SideMain}/SideMain.astro +2 -2
- package/packages/astro/{Stack → layout/Stack}/Stack.astro +2 -2
- package/packages/astro/{SwitchCols → layout/SwitchCols}/SwitchCols.astro +2 -2
- package/packages/astro/layout/TileGrid/TileGrid.astro +11 -0
- package/packages/astro/layout/TileGrid/index.ts +1 -0
- package/packages/astro/{LinkBox/LinkBox.astro → state/BoxLink/BoxLink.astro} +4 -4
- package/packages/astro/state/BoxLink/index.ts +1 -0
- package/packages/astro/state/Container/Container.astro +11 -0
- package/packages/astro/{Layer → state/Layer}/Layer.astro +2 -2
- package/packages/astro/{Wrapper → state/Wrapper}/Wrapper.astro +2 -2
- package/src/scss/_auto_output.scss +1 -1
- package/src/scss/_prop-config.scss +24 -26
- package/src/scss/_with_layer.scss +15 -8
- package/src/scss/base/_html.scss +8 -8
- package/src/scss/base/tokens/_tokens.scss +1 -3
- package/src/scss/main_no_layer.scss +4 -4
- package/src/scss/primitives/layout/_grid.scss +7 -0
- package/src/scss/primitives/layout/_tileGrid.scss +4 -0
- package/src/scss/{modules → primitives}/layout/index.scss +2 -1
- package/src/scss/{modules/state/_linkbox.scss → primitives/trait/_boxLink.scss} +4 -4
- package/src/scss/{utility/_linkExpand.scss → primitives/trait/_coverLink.scss} +1 -1
- package/src/scss/primitives/trait/index.scss +7 -0
- package/src/scss/props/index.scss +1 -1
- package/src/scss/utility/_cbox.scss +1 -1
- package/src/scss/utility/_clipText.scss +1 -1
- package/src/scss/utility/index.scss +0 -1
- package/config/defaults/states.ts +0 -43
- package/config/helper/getSvgUrl.ts +0 -26
- package/dist/components/Container/Container.d.ts +0 -6
- package/dist/components/Container/index.js +0 -8
- package/dist/components/HTML/HTML.d.ts +0 -26
- package/dist/components/HTML/index.d.ts +0 -14
- package/dist/components/HTML/index.js +0 -5
- package/dist/components/HTML/index2.js +0 -45
- package/dist/components/LinkBox/LinkBox.d.ts +0 -5
- package/dist/components/LinkBox/index.d.ts +0 -1
- package/dist/components/LinkBox/script.d.ts +0 -4
- package/dist/config/defaults/states.js +0 -38
- package/dist/config/helper/getSvgUrl.d.ts +0 -5
- package/dist/config/helper/getSvgUrl.js +0 -4
- package/dist/css/modules/layout.css +0 -1
- package/dist/css/modules/state.css +0 -1
- package/dist/lib/types/StateProps.d.ts +0 -27
- package/packages/astro/Container/Container.astro +0 -14
- package/packages/astro/HTML/_index_memo.js +0 -29
- package/packages/astro/HTML/a.astro +0 -10
- package/packages/astro/HTML/button.astro +0 -10
- package/packages/astro/HTML/div.astro +0 -10
- package/packages/astro/HTML/h.astro +0 -13
- package/packages/astro/HTML/img.astro +0 -10
- package/packages/astro/HTML/index.ts +0 -12
- package/packages/astro/HTML/li.astro +0 -10
- package/packages/astro/HTML/ol.astro +0 -10
- package/packages/astro/HTML/p.astro +0 -10
- package/packages/astro/HTML/span.astro +0 -10
- package/packages/astro/HTML/ul.astro +0 -10
- package/packages/astro/LinkBox/index.ts +0 -1
- package/src/scss/modules/layout/_grid.scss +0 -12
- package/src/scss/modules/state/index.scss +0 -6
- /package/dist/components/{atomic/Media → Media}/Media.stories.d.ts +0 -0
- /package/dist/components/{atomic/Media → Media}/index.d.ts +0 -0
- /package/dist/components/{Box → layout/Box}/Box.stories.d.ts +0 -0
- /package/dist/components/{Box → layout/Box}/index.d.ts +0 -0
- /package/dist/components/{Center → layout/Center}/Center.stories.d.ts +0 -0
- /package/dist/components/{Center → layout/Center}/index.d.ts +0 -0
- /package/dist/components/{Cluster → layout/Cluster}/Cluster.stories.d.ts +0 -0
- /package/dist/components/{Cluster → layout/Cluster}/index.d.ts +0 -0
- /package/dist/components/{Columns → layout/Columns}/Columns.stories.d.ts +0 -0
- /package/dist/components/{Columns → layout/Columns}/index.d.ts +0 -0
- /package/dist/components/{Flex → layout/Flex}/Flex.stories.d.ts +0 -0
- /package/dist/components/{Flex → layout/Flex}/index.d.ts +0 -0
- /package/dist/components/{Flow → layout/Flow}/Flow.stories.d.ts +0 -0
- /package/dist/components/{Flow → layout/Flow}/index.d.ts +0 -0
- /package/dist/components/{FluidCols → layout/FluidCols}/FluidCols.stories.d.ts +0 -0
- /package/dist/components/{FluidCols → layout/FluidCols}/index.d.ts +0 -0
- /package/dist/components/{Frame → layout/Frame}/Frame.stories.d.ts +0 -0
- /package/dist/components/{Frame → layout/Frame}/index.d.ts +0 -0
- /package/dist/components/{Grid → layout/Grid}/Grid.stories.d.ts +0 -0
- /package/dist/components/{Grid → layout/Grid}/index.d.ts +0 -0
- /package/dist/components/{SideMain → layout/SideMain}/SideMain.stories.d.ts +0 -0
- /package/dist/components/{SideMain → layout/SideMain}/index.d.ts +0 -0
- /package/dist/components/{Stack → layout/Stack}/Stack.stories.d.ts +0 -0
- /package/dist/components/{Stack → layout/Stack}/index.d.ts +0 -0
- /package/dist/components/{SwitchCols → layout/SwitchCols}/SwitchCols.stories.d.ts +0 -0
- /package/dist/components/{SwitchCols → layout/SwitchCols}/index.d.ts +0 -0
- /package/dist/components/{Container → state/Container}/index.d.ts +0 -0
- /package/dist/components/{Layer → state/Layer}/Layer.stories.d.ts +0 -0
- /package/dist/components/{Layer → state/Layer}/Layer.test.d.ts +0 -0
- /package/dist/components/{Layer → state/Layer}/index.d.ts +0 -0
- /package/dist/components/{Wrapper → state/Wrapper}/Wrapper.stories.d.ts +0 -0
- /package/dist/components/{Wrapper → state/Wrapper}/index.d.ts +0 -0
- /package/dist/css/{modules → primitives}/atomic.css +0 -0
- /package/dist/lib/{types/StateProps.spec-d.d.ts → helper/mergeSet.test.d.ts} +0 -0
- /package/packages/astro/{Decorator → atomic/Decorator}/index.ts +0 -0
- /package/packages/astro/{Divider → atomic/Divider}/index.ts +0 -0
- /package/packages/astro/{Icon → atomic/Icon}/SVG.astro +0 -0
- /package/packages/astro/{Icon → atomic/Icon}/index.ts +0 -0
- /package/packages/astro/{Spacer → atomic/Spacer}/index.ts +0 -0
- /package/packages/astro/{Box → layout/Box}/index.ts +0 -0
- /package/packages/astro/{Center → layout/Center}/index.ts +0 -0
- /package/packages/astro/{Cluster → layout/Cluster}/index.ts +0 -0
- /package/packages/astro/{Columns → layout/Columns}/index.ts +0 -0
- /package/packages/astro/{Flex → layout/Flex}/index.ts +0 -0
- /package/packages/astro/{Flow → layout/Flow}/index.ts +0 -0
- /package/packages/astro/{FluidCols → layout/FluidCols}/index.ts +0 -0
- /package/packages/astro/{Frame → layout/Frame}/index.ts +0 -0
- /package/packages/astro/{Grid → layout/Grid}/index.ts +0 -0
- /package/packages/astro/{SideMain → layout/SideMain}/index.ts +0 -0
- /package/packages/astro/{Stack → layout/Stack}/index.ts +0 -0
- /package/packages/astro/{SwitchCols → layout/SwitchCols}/index.ts +0 -0
- /package/packages/astro/{Container → state/Container}/index.ts +0 -0
- /package/packages/astro/{Layer → state/Layer}/index.ts +0 -0
- /package/packages/astro/{Wrapper → state/Wrapper}/index.ts +0 -0
- /package/src/scss/{modules → primitives}/atomic/_divider.scss +0 -0
- /package/src/scss/{modules → primitives}/atomic/_icon.scss +0 -0
- /package/src/scss/{modules → primitives}/atomic/_spacer.scss +0 -0
- /package/src/scss/{modules → primitives}/atomic/index.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_center.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_cluster.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_columns.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_flex.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_flow.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_fluidCols.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_frame.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_sideMain.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_stack.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_switchCols.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_container.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_layer.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_vertical.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_wrapper.scss +0 -0
package/dist/lib/getLismProps.js
CHANGED
|
@@ -1,121 +1,133 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { TRAITS as P, PROPS as y } from "../config/index.js";
|
|
2
|
+
import p from "./getLayoutProps.js";
|
|
3
|
+
import S from "./isPresetValue.js";
|
|
4
|
+
import E from "./isTokenValue.js";
|
|
5
|
+
import C from "./getUtilKey.js";
|
|
6
|
+
import c from "./getMaybeCssVar.js";
|
|
7
|
+
import V from "./getBpData.js";
|
|
8
|
+
import x from "./helper/atts.js";
|
|
9
|
+
import w from "./helper/isEmptyObj.js";
|
|
10
|
+
import U from "./helper/filterEmptyObj.js";
|
|
11
|
+
import O from "./helper/mergeSet.js";
|
|
11
12
|
import j from "./helper/splitWithComma.js";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const _ = (n) => {
|
|
14
|
+
const i = y[n];
|
|
15
|
+
return i && i?.token || "";
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
function z(n, i) {
|
|
18
|
+
if (!n) return "";
|
|
19
|
+
if (!i) return n;
|
|
20
|
+
const t = n.split(" "), s = t[0];
|
|
21
|
+
return [s, `${s}--${i}`, ...t.slice(1)].join(" ");
|
|
22
|
+
}
|
|
23
|
+
class L {
|
|
24
|
+
// 最終出力 className
|
|
18
25
|
className = "";
|
|
26
|
+
// 出力順のためのクラスバケット: [lismClass] [lismTrait] [uClasses]
|
|
27
|
+
// - lismClass : コンポーネント基底クラス + variant + l--{layout}(getLayoutProps 側で付与済み)
|
|
28
|
+
// - lismTrait : is--* 等の trait クラス
|
|
29
|
+
// - uClasses : set--* → u--* → -property の順で push される utility クラス
|
|
30
|
+
lismClass = "";
|
|
31
|
+
lismTrait = [];
|
|
19
32
|
uClasses = [];
|
|
20
|
-
lismState = [];
|
|
21
33
|
styles = {};
|
|
22
34
|
attrs = {};
|
|
23
35
|
_propConfig;
|
|
24
|
-
constructor(
|
|
25
|
-
const { forwardedRef: t, class:
|
|
26
|
-
this.styles = { ...
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
x(u) || (this.attrs = { ...u }, this.analyzeProps()), t && (this.attrs.ref = t), this.className = A(e || i, h, this.lismState, this.uClasses);
|
|
36
|
+
constructor(i) {
|
|
37
|
+
const { forwardedRef: t, class: s, className: e, lismClass: l, variant: r, style: o = {}, _propConfig: d = {}, ...u } = i;
|
|
38
|
+
this.styles = { ...o }, this._propConfig = { ...d }, this.lismClass = z(l, r), w(u) || (this.attrs = { ...u }, this.analyzeProps()), t && (this.attrs.ref = t), this.className = this.buildClassName(e, s);
|
|
39
|
+
}
|
|
40
|
+
// 最終クラス文字列の組み立て(出力順の唯一の確定地点)
|
|
41
|
+
// 出力順: [user/astro className] [lismClass] [lismTrait] [uClasses]
|
|
42
|
+
buildClassName(i, t) {
|
|
43
|
+
return x(i || t, this.lismClass, this.lismTrait, this.uClasses);
|
|
33
44
|
}
|
|
34
|
-
|
|
35
|
-
const { className:
|
|
36
|
-
t === !0 ? this.
|
|
45
|
+
analyzeTrait(i, t) {
|
|
46
|
+
const { className: s, preset: e, presetClass: l, customVar: r, tokenKey: o } = i;
|
|
47
|
+
t === !0 ? this.lismTrait.push(s) : e && S(e, t) ? this.lismTrait.push(`${s} ${l}:${String(t)}`) : t && (this.lismTrait.push(s), o && r && this.addStyle(r, c(t, o)));
|
|
37
48
|
}
|
|
38
49
|
// prop解析
|
|
39
50
|
analyzeProps() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
const i = this.extractProp("set"), t = this.extractProp("util");
|
|
52
|
+
O(void 0, i).forEach((s) => this.addUtil(`set--${s}`)), O(void 0, t).forEach((s) => this.addUtil(`u--${s}`)), Object.keys(this.attrs).forEach((s) => {
|
|
53
|
+
if (Object.hasOwn(P, s)) {
|
|
54
|
+
const e = this.extractProp(s), l = P[s];
|
|
55
|
+
typeof l == "string" ? e && this.lismTrait.push(l) : this.analyzeTrait(l, e);
|
|
56
|
+
} else if (Object.hasOwn(y, s)) {
|
|
57
|
+
const e = this.attrs[s];
|
|
58
|
+
delete this.attrs[s], this.analyzeLismProp(s, e);
|
|
47
59
|
} else if (s === "hov") {
|
|
48
|
-
const
|
|
49
|
-
this.setHovProps(
|
|
60
|
+
const e = this.extractProp(s);
|
|
61
|
+
this.setHovProps(e);
|
|
50
62
|
} else if (s === "css") {
|
|
51
|
-
const
|
|
52
|
-
this.addStyles(
|
|
63
|
+
const e = this.extractProp("css");
|
|
64
|
+
this.addStyles(e);
|
|
53
65
|
}
|
|
54
66
|
});
|
|
55
67
|
}
|
|
56
68
|
// Lism Prop 解析
|
|
57
|
-
analyzeLismProp(
|
|
69
|
+
analyzeLismProp(i, t) {
|
|
58
70
|
if (t == null) return;
|
|
59
|
-
let
|
|
60
|
-
if (
|
|
61
|
-
this._propConfig?.[
|
|
62
|
-
const { base: e, ...l } =
|
|
63
|
-
this.setAttrs(
|
|
64
|
-
|
|
71
|
+
let s = y[i] || null;
|
|
72
|
+
if (s === null) return;
|
|
73
|
+
this._propConfig?.[i] && (s = Object.assign({}, s, this._propConfig[i]));
|
|
74
|
+
const { base: e, ...l } = V(t);
|
|
75
|
+
this.setAttrs(i, e, s), Object.keys(l).forEach((r) => {
|
|
76
|
+
s && this.setAttrs(i, l[r], s, r);
|
|
65
77
|
});
|
|
66
78
|
}
|
|
67
|
-
addUtil(
|
|
68
|
-
this.uClasses.push(
|
|
79
|
+
addUtil(i) {
|
|
80
|
+
this.uClasses.push(i);
|
|
69
81
|
}
|
|
70
|
-
addUtils(
|
|
71
|
-
this.uClasses.push(...
|
|
82
|
+
addUtils(i) {
|
|
83
|
+
this.uClasses.push(...i);
|
|
72
84
|
}
|
|
73
85
|
// addState(state) {
|
|
74
86
|
// this.stateClasses.push(state);
|
|
75
87
|
// }
|
|
76
|
-
addStyle(
|
|
77
|
-
this.styles[
|
|
88
|
+
addStyle(i, t) {
|
|
89
|
+
this.styles[i] = t;
|
|
78
90
|
}
|
|
79
|
-
addStyles(
|
|
80
|
-
this.styles = { ...this.styles, ...
|
|
91
|
+
addStyles(i) {
|
|
92
|
+
this.styles = { ...this.styles, ...i };
|
|
81
93
|
}
|
|
82
|
-
addAttrs(
|
|
83
|
-
this.addStyles(
|
|
94
|
+
addAttrs(i) {
|
|
95
|
+
this.addStyles(i.styles || {}), this.addUtils(i.utils || []);
|
|
84
96
|
}
|
|
85
|
-
extractProp(
|
|
86
|
-
const t = this.attrs[
|
|
87
|
-
return this.attrs[
|
|
97
|
+
extractProp(i) {
|
|
98
|
+
const t = this.attrs[i];
|
|
99
|
+
return this.attrs[i] === void 0 ? null : (delete this.attrs[i], t);
|
|
88
100
|
}
|
|
89
|
-
extractProps(
|
|
101
|
+
extractProps(i) {
|
|
90
102
|
const t = {};
|
|
91
|
-
return
|
|
92
|
-
this.attrs[
|
|
103
|
+
return i.forEach((s) => {
|
|
104
|
+
this.attrs[s] !== void 0 && (t[s] = this.attrs[s], delete this.attrs[s]);
|
|
93
105
|
}), t;
|
|
94
106
|
}
|
|
95
107
|
// utilクラスを追加するか、styleにセットするかの分岐処理 @base
|
|
96
108
|
// 値が null, undefined, '', false の時はスキップ
|
|
97
|
-
setAttrs(
|
|
109
|
+
setAttrs(i, t, s = {}, e = "") {
|
|
98
110
|
if (t == null || t === "" || t === !1) return;
|
|
99
|
-
let l = `--${
|
|
100
|
-
if (e && (l = `--${
|
|
111
|
+
let l = `--${i}`, r = `-${String(s.utilKey || i)}`;
|
|
112
|
+
if (e && (l = `--${i}_${e}`, r += `_${e}`), typeof t == "string" && t.startsWith(":")) {
|
|
101
113
|
this.addUtil(`${r}:${t.replace(":", "")}`);
|
|
102
114
|
return;
|
|
103
115
|
}
|
|
104
116
|
if (!e) {
|
|
105
|
-
const { presets:
|
|
106
|
-
if (
|
|
107
|
-
const
|
|
108
|
-
|
|
117
|
+
const { presets: g, tokenClass: T, utils: $, shorthands: b } = s;
|
|
118
|
+
if (g && S(g, t)) {
|
|
119
|
+
const h = typeof t == "string" || typeof t == "number" ? String(t) : "";
|
|
120
|
+
h && this.addUtil(`${r}:${h}`);
|
|
109
121
|
return;
|
|
110
122
|
}
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
|
|
123
|
+
if (T && s.token && E(s.token, t)) {
|
|
124
|
+
const h = typeof t == "string" || typeof t == "number" ? String(t) : "";
|
|
125
|
+
h && this.addUtil(`${r}:${h}`);
|
|
114
126
|
return;
|
|
115
127
|
}
|
|
116
|
-
let
|
|
117
|
-
if ($ && typeof t == "string" && (
|
|
118
|
-
this.addUtil(`${r}:${
|
|
128
|
+
let a = "";
|
|
129
|
+
if ($ && typeof t == "string" && (a = C($, t)), !a && b && typeof t == "string" && (a = C(b, t, !0)), a) {
|
|
130
|
+
this.addUtil(`${r}:${a}`);
|
|
119
131
|
return;
|
|
120
132
|
}
|
|
121
133
|
}
|
|
@@ -123,18 +135,18 @@ class w {
|
|
|
123
135
|
this.addUtil(r);
|
|
124
136
|
return;
|
|
125
137
|
}
|
|
126
|
-
const { prop:
|
|
127
|
-
let
|
|
128
|
-
if (
|
|
129
|
-
if (
|
|
130
|
-
this.addStyle(`--${
|
|
138
|
+
const { prop: o, isVar: d, alwaysVar: u, token: m, bp: k } = s;
|
|
139
|
+
let f;
|
|
140
|
+
if (m && (typeof t == "string" || typeof t == "number") ? f = c(t, m) : typeof t == "string" || typeof t == "number" ? f = t : f = JSON.stringify(t), !e) {
|
|
141
|
+
if (d) {
|
|
142
|
+
this.addStyle(`--${i}`, f);
|
|
131
143
|
return;
|
|
132
|
-
} else if (!
|
|
133
|
-
this.addStyle(
|
|
144
|
+
} else if (!k && !u) {
|
|
145
|
+
this.addStyle(o, f);
|
|
134
146
|
return;
|
|
135
147
|
}
|
|
136
148
|
}
|
|
137
|
-
this.addUtil(r), this.addStyle(l,
|
|
149
|
+
this.addUtil(r), this.addStyle(l, f);
|
|
138
150
|
}
|
|
139
151
|
// setPassProps(passVars) {
|
|
140
152
|
// let dataList = [];
|
|
@@ -149,40 +161,40 @@ class w {
|
|
|
149
161
|
// this.addStyle(`--pass_${propName}`, value);
|
|
150
162
|
// });
|
|
151
163
|
// }
|
|
152
|
-
setHovProps(
|
|
153
|
-
|
|
164
|
+
setHovProps(i) {
|
|
165
|
+
i && (i === "-" || i === !0 ? this.addUtil("-hov") : typeof i == "string" ? j(i).forEach((t) => {
|
|
154
166
|
this.addUtil(`-hov:${t}`);
|
|
155
|
-
}) : typeof
|
|
156
|
-
const
|
|
157
|
-
if (!(
|
|
158
|
-
if (
|
|
167
|
+
}) : typeof i == "object" && Object.keys(i).forEach((t) => {
|
|
168
|
+
const s = i[t];
|
|
169
|
+
if (!(s == null || s === "" || s === !1)) {
|
|
170
|
+
if (s === "-" || s === !0)
|
|
159
171
|
this.addUtil(`-hov:${t}`);
|
|
160
172
|
else if (t === "class")
|
|
161
|
-
j(
|
|
173
|
+
j(s).forEach((e) => {
|
|
162
174
|
this.addUtil(`-hov:${e}`);
|
|
163
175
|
});
|
|
164
|
-
else if (typeof
|
|
165
|
-
const e =
|
|
176
|
+
else if (typeof s == "string" || typeof s == "number") {
|
|
177
|
+
const e = c(s, _(t));
|
|
166
178
|
this.addUtil(`-hov:${t}`), this.addStyle(`--hov-${t}`, e);
|
|
167
179
|
}
|
|
168
180
|
}
|
|
169
181
|
}));
|
|
170
182
|
}
|
|
171
183
|
}
|
|
172
|
-
function
|
|
173
|
-
if (Object.keys(
|
|
184
|
+
function X(n) {
|
|
185
|
+
if (Object.keys(n).length === 0)
|
|
174
186
|
return {};
|
|
175
|
-
const { layout:
|
|
187
|
+
const { layout: i, ...t } = n, s = new L(p(i, t));
|
|
176
188
|
return {
|
|
177
|
-
...
|
|
178
|
-
className:
|
|
179
|
-
style:
|
|
189
|
+
...U({
|
|
190
|
+
className: s.className,
|
|
191
|
+
style: U(s.styles)
|
|
180
192
|
}),
|
|
181
|
-
...
|
|
193
|
+
...s.attrs
|
|
182
194
|
// data-* などHTMLの標準属性はそのまま渡す
|
|
183
195
|
};
|
|
184
196
|
}
|
|
185
197
|
export {
|
|
186
|
-
|
|
187
|
-
|
|
198
|
+
L as LismPropsData,
|
|
199
|
+
X as default
|
|
188
200
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* base / value を合成し、最終的なクラス識別子の配列を返す。
|
|
3
|
+
* 値内の `-` prefix は除外マーカーとして扱われ、その識別子は base + value から除外される。
|
|
4
|
+
*
|
|
5
|
+
* `set` / `util` のいずれの prop でも共用できる汎用処理。
|
|
6
|
+
*
|
|
7
|
+
* 入力は空白区切りを基本とし、カンマ区切りも互換のため受け付ける。
|
|
8
|
+
* 内部 API 用途として文字列配列も受け付けるが、配列形式はユーザー向けドキュメントでは紹介していない。
|
|
9
|
+
*/
|
|
10
|
+
export default function mergeSet(base: unknown, value: unknown): string[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function i(t) {
|
|
2
|
+
return t ? Array.isArray(t) ? t.flatMap((e) => i(e)) : typeof t != "string" ? [] : t.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
|
|
3
|
+
}
|
|
4
|
+
function o(t, e) {
|
|
5
|
+
const s = [...i(t), ...i(e)];
|
|
6
|
+
if (s.length === 0) return [];
|
|
7
|
+
const n = [], f = /* @__PURE__ */ new Set();
|
|
8
|
+
for (const r of s)
|
|
9
|
+
r.startsWith("-") ? f.add(r.slice(1)) : n.includes(r) || n.push(r);
|
|
10
|
+
return n.filter((r) => !f.has(r));
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
o as default
|
|
14
|
+
};
|
|
@@ -26,6 +26,9 @@ export interface StackProps {
|
|
|
26
26
|
export interface ColumnsProps {
|
|
27
27
|
layout: 'columns';
|
|
28
28
|
}
|
|
29
|
+
export interface TileGridProps {
|
|
30
|
+
layout: 'tileGrid';
|
|
31
|
+
}
|
|
29
32
|
export interface FlowLayoutProps {
|
|
30
33
|
layout: 'flow';
|
|
31
34
|
flow?: CssValue;
|
|
@@ -43,7 +46,7 @@ export interface SwitchColsProps {
|
|
|
43
46
|
layout: 'switchCols';
|
|
44
47
|
breakSize?: CssValue;
|
|
45
48
|
}
|
|
46
|
-
export type LayoutSpecificProps = NoLayoutProps | BoxProps | CenterProps | ClusterProps | ColumnsProps | FlexProps | FlowLayoutProps | FluidColsProps | FrameProps | GridLayoutProps | StackProps | SideMainProps | SwitchColsProps;
|
|
49
|
+
export type LayoutSpecificProps = NoLayoutProps | BoxProps | CenterProps | ClusterProps | ColumnsProps | FlexProps | FlowLayoutProps | FluidColsProps | FrameProps | GridLayoutProps | StackProps | SideMainProps | SwitchColsProps | TileGridProps;
|
|
47
50
|
export type LayoutType = Exclude<LayoutSpecificProps, NoLayoutProps>['layout'];
|
|
48
51
|
export interface LayoutProps {
|
|
49
52
|
layout?: LayoutType;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { TRAITS } from '../../../config/index';
|
|
2
|
+
import { WithArbitraryString, ArrayElement } from './utils';
|
|
3
|
+
/**
|
|
4
|
+
* config/index.ts から TRAITS の型を取得
|
|
5
|
+
* objDeepMerge の DeepMergeResult 型により literal types が保持される
|
|
6
|
+
*/
|
|
7
|
+
type TraitsConfig = typeof TRAITS;
|
|
8
|
+
/** preset を持つ Trait の値の型を抽出 */
|
|
9
|
+
type PresetElement<T> = T extends {
|
|
10
|
+
preset: readonly unknown[];
|
|
11
|
+
} ? ArrayElement<T['preset']> : never;
|
|
12
|
+
/**
|
|
13
|
+
* Trait 設定から Props の値の型を抽出するユーティリティ型
|
|
14
|
+
*/
|
|
15
|
+
type ExtractTraitValue<T> = T extends string ? boolean : T extends {
|
|
16
|
+
preset: readonly unknown[];
|
|
17
|
+
} ? WithArbitraryString<PresetElement<T>> | boolean : never;
|
|
18
|
+
/**
|
|
19
|
+
* config/index.ts の TRAITS から自動生成される Trait Props の型
|
|
20
|
+
* config/index.ts の TRAITS に新しいトレイトを追加すると自動的に反映される
|
|
21
|
+
*/
|
|
22
|
+
export type TraitProps = {
|
|
23
|
+
[K in keyof TraitsConfig]?: ExtractTraitValue<TraitsConfig[K]>;
|
|
24
|
+
};
|
|
25
|
+
/** set prop で使われるプリセット値(エディタ補完用) */
|
|
26
|
+
type SetPreset = 'gutter' | 'shadow' | 'hov' | 'transition' | 'mask' | 'plain' | 'innerRs' | 'bp';
|
|
27
|
+
/**
|
|
28
|
+
* set prop の値の型。プリセット値がサジェストされつつ、任意の文字列も受け付ける。
|
|
29
|
+
*
|
|
30
|
+
* - 値はスペース区切りで複数指定可能
|
|
31
|
+
* - 先頭に `-` を付けると、その識別子を除外する(例: `set="card -bd"`)
|
|
32
|
+
* - 文字列配列も受け付けるが、これは内部 API 用途(lism-ui など)であり、
|
|
33
|
+
* ユーザー向けドキュメントでは紹介していない
|
|
34
|
+
*/
|
|
35
|
+
export type SetPropValue = WithArbitraryString<SetPreset> | WithArbitraryString<SetPreset>[];
|
|
36
|
+
/** util prop で使われるプリセット値(既知の `u--` クラス名・エディタ補完用) */
|
|
37
|
+
type UtilPreset = 'cbox' | 'trim' | 'trimChildren' | 'srOnly' | 'clipText' | 'collapseGrid' | 'snap';
|
|
38
|
+
/**
|
|
39
|
+
* util prop の値の型。既知の `u--` クラス名がサジェストされつつ、任意の文字列も受け付ける。
|
|
40
|
+
*
|
|
41
|
+
* - 値はスペース区切りで複数指定可能
|
|
42
|
+
* - 先頭に `-` を付けると、その識別子を除外する(例: `util="cbox -trim"`)
|
|
43
|
+
* - 文字列配列も受け付けるが、これは内部 API 用途であり、
|
|
44
|
+
* ユーザー向けドキュメントでは紹介していない
|
|
45
|
+
*/
|
|
46
|
+
export type UtilPropValue = WithArbitraryString<UtilPreset> | WithArbitraryString<UtilPreset>[];
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
3
|
import type { DecoratorProps } from 'lism-css/react/atomic/Decorator/getProps';
|
|
4
|
-
import { Lism } from '
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
import getProps from 'lism-css/react/atomic/Decorator/getProps';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> &
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismBaseProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismBaseProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
import { getDividerProps } from 'lism-css/react/atomic/Divider/getProps';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismBaseProps;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
3
|
import type { ElementType } from 'react';
|
|
4
4
|
import type { IconProps, IconOwnProps } from 'lism-css/react/atomic/Icon/getProps';
|
|
5
|
-
import type { AstroLismBaseProps } from '
|
|
5
|
+
import type { AstroLismBaseProps } from '../../types';
|
|
6
6
|
import getLismProps from 'lism-css/lib/getLismProps';
|
|
7
7
|
import getProps from 'lism-css/react/atomic/Icon/getProps';
|
|
8
8
|
import SVG from './SVG.astro';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismBaseProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismBaseProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
import getProps from 'lism-css/react/atomic/Spacer/getProps';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismBaseProps;
|
package/packages/astro/index.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export * from './Lism';
|
|
6
|
-
export { default as HTML } from './HTML';
|
|
7
6
|
/** @deprecated DummyText / DummyImage (@lism-css/ui) を使用してください */
|
|
8
7
|
export * from './Dummy';
|
|
9
8
|
|
|
@@ -14,26 +13,31 @@ export * from './Group';
|
|
|
14
13
|
export * from './Heading';
|
|
15
14
|
export * from './Link';
|
|
16
15
|
export * from './List';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './Flow';
|
|
19
|
-
export * from './Flex';
|
|
20
|
-
export * from './Cluster';
|
|
21
|
-
export * from './Stack';
|
|
22
|
-
export * from './Grid';
|
|
23
|
-
export * from './FluidCols';
|
|
24
|
-
export * from './SwitchCols';
|
|
25
|
-
export * from './Columns';
|
|
26
|
-
export * from './Center';
|
|
27
|
-
export * from './SideMain';
|
|
28
|
-
export * from './Frame';
|
|
16
|
+
export * from './Media';
|
|
29
17
|
|
|
30
|
-
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
18
|
+
// layout (l--)
|
|
19
|
+
export * from './layout/Box';
|
|
20
|
+
export * from './layout/Center';
|
|
21
|
+
export * from './layout/Cluster';
|
|
22
|
+
export * from './layout/Columns';
|
|
23
|
+
export * from './layout/Flex';
|
|
24
|
+
export * from './layout/Flow';
|
|
25
|
+
export * from './layout/FluidCols';
|
|
26
|
+
export * from './layout/Frame';
|
|
27
|
+
export * from './layout/Grid';
|
|
28
|
+
export * from './layout/SideMain';
|
|
29
|
+
export * from './layout/Stack';
|
|
30
|
+
export * from './layout/SwitchCols';
|
|
31
|
+
export * from './layout/TileGrid';
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
38
|
-
export * from './
|
|
39
|
-
export * from './
|
|
33
|
+
// state (is--)
|
|
34
|
+
export * from './state/Container';
|
|
35
|
+
export * from './state/Layer';
|
|
36
|
+
export * from './state/BoxLink';
|
|
37
|
+
export * from './state/Wrapper';
|
|
38
|
+
|
|
39
|
+
// atomic (a--)
|
|
40
|
+
export * from './atomic/Decorator';
|
|
41
|
+
export * from './atomic/Divider';
|
|
42
|
+
export * from './atomic/Icon';
|
|
43
|
+
export * from './atomic/Spacer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
4
|
import type { FlowLayoutProps } from 'lism-css/lib/types/LayoutProps';
|
|
5
|
-
import { Lism } from '
|
|
5
|
+
import { Lism } from '../../Lism';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps & Omit<FlowLayoutProps, 'layout'>;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
4
|
import type { FluidColsProps } from 'lism-css/lib/types/LayoutProps';
|
|
5
|
-
import { Lism } from '
|
|
5
|
+
import { Lism } from '../../Lism';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps & Omit<FluidColsProps, 'layout'>;
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
4
|
import type { SideMainProps } from 'lism-css/lib/types/LayoutProps';
|
|
5
|
-
import { Lism } from '
|
|
5
|
+
import { Lism } from '../../Lism';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps & Omit<SideMainProps, 'layout'>;
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismFixedLayoutProps } from '
|
|
4
|
-
import { Lism } from '
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
5
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
7
|
|