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
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import t from "../helper/getSvgUrl.js";
|
|
2
|
-
const a = {
|
|
3
|
-
isContainer: "is--container",
|
|
4
|
-
isWrapper: {
|
|
5
|
-
className: "is--wrapper",
|
|
6
|
-
preset: ["s", "l"],
|
|
7
|
-
presetClass: "-contentSize",
|
|
8
|
-
customVar: "--contentSize",
|
|
9
|
-
tokenKey: "sz"
|
|
10
|
-
},
|
|
11
|
-
isLayer: "is--layer",
|
|
12
|
-
isLinkBox: "is--linkBox",
|
|
13
|
-
isSide: "is--side",
|
|
14
|
-
isSkipFlow: "is--skipFlow",
|
|
15
|
-
isVertical: "is--vertical",
|
|
16
|
-
setGutter: "set--gutter",
|
|
17
|
-
// set class
|
|
18
|
-
setShadow: "set--shadow",
|
|
19
|
-
setHov: "set--hov",
|
|
20
|
-
setTransition: "set--transition",
|
|
21
|
-
setMask: {
|
|
22
|
-
// 'set--mask',
|
|
23
|
-
className: "set--mask",
|
|
24
|
-
setStyles: (e) => {
|
|
25
|
-
let s = e;
|
|
26
|
-
return s.startsWith("<svg") && (s = t(e, "base64")), {
|
|
27
|
-
"--maskImg": s
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
setPlain: "set--plain",
|
|
32
|
-
// setRevert: 'set--revert',
|
|
33
|
-
setInnerRs: "set--innerRs",
|
|
34
|
-
setBp: "set--bp"
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
a as default
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.l--flow{--flow--base:var(--s30);--flow--s:var(--s20);display:flow-root}.l--flow>*+*{--flow:var(--flow--base);margin-block-start:var(--flow)}.l--flow>:where(img,video,iframe){display:block}.-flow\:s>*{--flow:var(--flow--s)}.-flow\:>*{--flow:inherit}.l--flow>:where(h1,h2,h3,h4,h5,h6){margin-block-start:calc(var(--flow)*var(--flow-hScale, 2))}.is--skipFlow+*,.l--flow>:first-child{--flow:0px}.l--flex{display:flex}.l--flex>*{min-width:0}.l--cluster{align-items:center;display:flex;flex-wrap:wrap}.l--stack{display:flex;flex-direction:column}.l--grid{--gtr:none;--gtc:none;--gta:none;display:grid;grid-template:var(--gtr)/var(--gtc);grid-template-areas:var(--gta)}.l--grid>*{min-width:0}.l--center{display:grid;place-content:center;place-items:center}.l--fluidCols{--cols:var(--sz--min);--autoMode:auto-fit;display:grid;grid-template-columns:repeat(var(--autoMode),minmax(min(var(--cols),100%),1fr))}.l--columns{--cols:2;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr))}.l--sideMain{--sideW:auto;--mainW:max(var(--sz--min),50%);display:flex;flex-wrap:wrap}.l--sideMain>.is--side{flex-basis:var(--sideW);flex-grow:1}.l--sideMain>:not(.is--side){flex-basis:min(100%,var(--mainW));flex-grow:9999999}.l--switchCols{--breakSize:var(--sz--xs);display:flex;flex-wrap:wrap}.l--switchCols>*{flex-basis:calc((var(--breakSize) - 100%)*9999);flex-grow:1}.l--frame{overflow:hidden}.l--frame>:where(img,video,iframe){display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.is--container{container-type:inline-size}.is--container>*{--sz--container:100cqi}.is--container.set--gutter>*{--sz--container:calc(100cqi + var(--gutter-size)*2)}.is--wrapper{--contentSize:var(--sz--m,100%)}.is--wrapper>*{margin-inline:auto;max-inline-size:min(100%,var(--contentSize))}.-contentSize\:s{--contentSize:var(--sz--s)}.-contentSize\:l{--contentSize:var(--sz--l)}.is--linkBox{color:inherit;cursor:pointer;display:block;isolation:isolate;pointer-events:auto;position:relative;text-decoration:none}.is--linkBox a{position:relative;z-index:2}.is--layer{inset:0;overflow:hidden;position:absolute}.is--vertical{writing-mode:var(--vertical-mode)}.is--vertical\@sm{writing-mode:var(--_is_sm) var(--vertical-mode)}.is--vertical\@md{writing-mode:var(--_is_md) var(--vertical-mode)}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { STATES } from '../../../config/index';
|
|
2
|
-
import { WithArbitraryString, ArrayElement } from './utils';
|
|
3
|
-
/**
|
|
4
|
-
* config/index.ts から STATES の型を取得
|
|
5
|
-
* objDeepMerge の DeepMergeResult 型により literal types が保持される
|
|
6
|
-
*/
|
|
7
|
-
type StatesConfig = typeof STATES;
|
|
8
|
-
/** preset を持つ State の値の型を抽出 */
|
|
9
|
-
type PresetElement<T> = T extends {
|
|
10
|
-
preset: readonly unknown[];
|
|
11
|
-
} ? ArrayElement<T['preset']> : never;
|
|
12
|
-
/**
|
|
13
|
-
* State 設定から Props の値の型を抽出するユーティリティ型
|
|
14
|
-
*/
|
|
15
|
-
type ExtractStateValue<T> = T extends string ? boolean : T extends {
|
|
16
|
-
preset: readonly unknown[];
|
|
17
|
-
} ? WithArbitraryString<PresetElement<T>> | boolean : T extends {
|
|
18
|
-
setStyles: unknown;
|
|
19
|
-
} ? string : never;
|
|
20
|
-
/**
|
|
21
|
-
* config/index.ts の STATES から自動生成される State Props の型
|
|
22
|
-
* config/index.ts の STATES に新しいステートを追加すると自動的に反映される
|
|
23
|
-
*/
|
|
24
|
-
export type StateProps = {
|
|
25
|
-
[K in keyof StatesConfig]?: ExtractStateValue<StatesConfig[K]>;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismBaseProps } from '../types';
|
|
4
|
-
import { Lism } from '../Lism';
|
|
5
|
-
|
|
6
|
-
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> &
|
|
7
|
-
AstroLismBaseProps & {
|
|
8
|
-
size?: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const { size, ...props } = Astro.props;
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<Lism isContainer isWrapper={size} {...props}><slot /></Lism>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// コンポーネントを動的に生成するユーティリティを使った方法.( Astro アプデで動かなくなるリスクあり)
|
|
2
|
-
|
|
3
|
-
import { createComponent, renderComponent } from 'astro/runtime/server/index.js';
|
|
4
|
-
import Lism from '../Lism/Lism.astro';
|
|
5
|
-
|
|
6
|
-
// <Lism as="*"> の薄いラッパーを動的に生成するユーティリティ
|
|
7
|
-
const createHTMLComponent = (tag, baseProps = {}) =>
|
|
8
|
-
createComponent((result, props = {}, slots = {}) => {
|
|
9
|
-
return renderComponent(result, 'Lism', Lism, { as: tag, ...baseProps, ...props }, slots);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
// 見出しだけ lv でタグ名を変える
|
|
13
|
-
const createHeadingComponent = () =>
|
|
14
|
-
createComponent((result, props = {}, slots = {}) => {
|
|
15
|
-
const { lv = '1', ...rest } = props;
|
|
16
|
-
return renderComponent(result, 'Lism', Lism, { as: `h${lv}`, ...rest }, slots);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// よく使うタグをまとめてラップ
|
|
20
|
-
const tags = ['div', 'p', 'span', 'a', 'img', 'ul', 'ol', 'li'];
|
|
21
|
-
const HTML = Object.fromEntries(tags.map((tag) => [tag, createHTMLComponent(tag)]));
|
|
22
|
-
|
|
23
|
-
// button だけ setPlain を付与
|
|
24
|
-
HTML.button = createHTMLComponent('button', { setPlain: true });
|
|
25
|
-
|
|
26
|
-
// h1~h6 を lv で分岐
|
|
27
|
-
HTML.h = createHeadingComponent();
|
|
28
|
-
|
|
29
|
-
export default HTML;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.AnchorHTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="a" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.ButtonHTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="button" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="div" {...props}><slot /></Lism>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps &
|
|
6
|
-
Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps> & {
|
|
7
|
-
lv?: '1' | '2' | '3' | '4' | '5' | '6';
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const { lv = '1', ...props } = Astro.props;
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<Lism as={`h${lv}`} {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.ImgHTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="img" {...props}><slot /></Lism>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import div from './div.astro';
|
|
2
|
-
import p from './p.astro';
|
|
3
|
-
import h from './h.astro';
|
|
4
|
-
import span from './span.astro';
|
|
5
|
-
import a from './a.astro';
|
|
6
|
-
import button from './button.astro';
|
|
7
|
-
import img from './img.astro';
|
|
8
|
-
import ul from './ul.astro';
|
|
9
|
-
import ol from './ol.astro';
|
|
10
|
-
import li from './li.astro';
|
|
11
|
-
|
|
12
|
-
export default { div, p, h, span, img, a, button, ul, ol, li };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.LiHTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="li" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.OlHTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="ol" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="p" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="span" {...props}><slot /></Lism>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { AstroLismBaseProps } from '../types';
|
|
3
|
-
import Lism from '../Lism/Lism.astro';
|
|
4
|
-
|
|
5
|
-
type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
|
|
6
|
-
|
|
7
|
-
const props = Astro.props;
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Lism as="ul" {...props}><slot /></Lism>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as LinkBox } from './LinkBox.astro';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|