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,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 { SwitchColsProps } 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<SwitchColsProps, 'layout'>;
|
|
8
8
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
+
import type { AstroLismFixedLayoutProps } from '../../types';
|
|
4
|
+
import { Lism } from '../../Lism';
|
|
5
|
+
|
|
6
|
+
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismFixedLayoutProps;
|
|
7
|
+
|
|
8
|
+
const props = Astro.props;
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Lism layout="tileGrid" {...props}><slot /></Lism>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TileGrid } from './TileGrid.astro';
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'a'> = Polymorphic<{ as: Tag }> & AstroLismBaseProps;
|
|
7
7
|
|
|
8
8
|
const { as, exProps, ...props } = Astro.props;
|
|
9
9
|
|
|
10
10
|
const hasHref = !!props.href;
|
|
11
|
-
//
|
|
11
|
+
// BoxLinkは基本的にリンク要素(aタグ)として機能するため、
|
|
12
12
|
// hrefがないかつ、aタグとしてレンダリングする場合はdivタグに置き換える
|
|
13
13
|
const tag: HTMLTag = !hasHref && (as ?? 'a') === 'a' ? 'div' : (as ?? 'a');
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<Lism
|
|
16
|
+
<Lism isBoxLink as={tag} {...props} {...exProps}><slot /></Lism>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BoxLink } from './BoxLink.astro';
|
|
@@ -0,0 +1,11 @@
|
|
|
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 }> & AstroLismBaseProps;
|
|
7
|
+
|
|
8
|
+
const props = Astro.props;
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<Lism isContainer {...props}><slot /></Lism>
|
|
@@ -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
|
|
|
6
6
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> & AstroLismBaseProps;
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLTag, Polymorphic } from 'astro/types';
|
|
3
|
-
import type { AstroLismBaseProps } from '
|
|
3
|
+
import type { AstroLismBaseProps } from '../../types';
|
|
4
4
|
import type { LismProps } from 'lism-css/lib/getLismProps';
|
|
5
|
-
import { Lism } from '
|
|
5
|
+
import { Lism } from '../../Lism';
|
|
6
6
|
|
|
7
7
|
type Props<Tag extends HTMLTag = 'div'> = Polymorphic<{ as: Tag }> &
|
|
8
8
|
AstroLismBaseProps & {
|
|
@@ -14,7 +14,7 @@ base_type:
|
|
|
14
14
|
常に変数で管理されるようになるので、他の処理と絡ませることがしやすい。
|
|
15
15
|
デメリット: *= は処理負荷が高い。また、途中のBPから使えるようにするにはCSS記述増える)
|
|
16
16
|
|
|
17
|
-
3 → BPクラスには変数使わないが、文字数省略のため baseの
|
|
17
|
+
3 → BPクラスには変数使わないが、文字数省略のため baseのProperty Classだけ変数化して *= セレクタ使う
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
// マップから値を取得し、nullの場合はデフォルト値を返す
|
|
@@ -101,7 +101,12 @@ $props: (
|
|
|
101
101
|
utilities: (
|
|
102
102
|
'none': 'none',
|
|
103
103
|
'block': 'block',
|
|
104
|
-
'
|
|
104
|
+
'flex': 'flex',
|
|
105
|
+
'inline-flex': 'inline-flex',
|
|
106
|
+
'grid': 'grid',
|
|
107
|
+
'inline-grid': 'inline-grid',
|
|
108
|
+
'inline': 'inline',
|
|
109
|
+
'inline-block': 'inline-block',
|
|
105
110
|
),
|
|
106
111
|
bp: 1,
|
|
107
112
|
),
|
|
@@ -290,7 +295,7 @@ $props: (
|
|
|
290
295
|
'divider': 'var(--divider)',
|
|
291
296
|
'inherit': 'inherit',
|
|
292
297
|
'transparent': 'transparent',
|
|
293
|
-
'
|
|
298
|
+
'current': 'currentColor',
|
|
294
299
|
),
|
|
295
300
|
isVar: 1,
|
|
296
301
|
),
|
|
@@ -332,8 +337,8 @@ $props: (
|
|
|
332
337
|
'static': 'static',
|
|
333
338
|
'fixed': 'fixed',
|
|
334
339
|
'sticky': 'sticky',
|
|
335
|
-
'
|
|
336
|
-
'
|
|
340
|
+
'relative': 'relative',
|
|
341
|
+
'absolute': 'absolute',
|
|
337
342
|
),
|
|
338
343
|
),
|
|
339
344
|
'z': (
|
|
@@ -607,11 +612,11 @@ $props: (
|
|
|
607
612
|
alwaysVar: 1,
|
|
608
613
|
overwriteBaseVar: 1,
|
|
609
614
|
),
|
|
610
|
-
'
|
|
615
|
+
'cg': (
|
|
611
616
|
prop: 'column-gap',
|
|
612
617
|
bp: 1,
|
|
613
618
|
),
|
|
614
|
-
'
|
|
619
|
+
'rg': (
|
|
615
620
|
prop: 'row-gap',
|
|
616
621
|
bp: 1,
|
|
617
622
|
),
|
|
@@ -635,9 +640,9 @@ $props: (
|
|
|
635
640
|
'fxd': (
|
|
636
641
|
prop: 'flex-direction',
|
|
637
642
|
utilities: (
|
|
638
|
-
'
|
|
639
|
-
'
|
|
640
|
-
'row-
|
|
643
|
+
'column': 'column',
|
|
644
|
+
'column-reverse': 'column-reverse',
|
|
645
|
+
'row-reverse': 'row-reverse',
|
|
641
646
|
),
|
|
642
647
|
bp: 1,
|
|
643
648
|
),
|
|
@@ -666,13 +671,6 @@ $props: (
|
|
|
666
671
|
),
|
|
667
672
|
'gt': (
|
|
668
673
|
prop: 'grid-template',
|
|
669
|
-
utilities: (
|
|
670
|
-
),
|
|
671
|
-
exUtility: (
|
|
672
|
-
'repeat': (
|
|
673
|
-
'grid-template': 'repeat(var(--rows,1), 1fr) / repeat(var(--cols,1), 1fr)',
|
|
674
|
-
),
|
|
675
|
-
),
|
|
676
674
|
bp: 1,
|
|
677
675
|
),
|
|
678
676
|
'gta': (
|
|
@@ -697,7 +695,7 @@ $props: (
|
|
|
697
695
|
prop: 'grid-auto-flow',
|
|
698
696
|
utilities: (
|
|
699
697
|
'row': 'row',
|
|
700
|
-
'
|
|
698
|
+
'column': 'column',
|
|
701
699
|
),
|
|
702
700
|
bp: 1,
|
|
703
701
|
),
|
|
@@ -729,8 +727,8 @@ $props: (
|
|
|
729
727
|
'center': 'center',
|
|
730
728
|
'end': 'end',
|
|
731
729
|
'stretch': 'stretch',
|
|
732
|
-
'flex-
|
|
733
|
-
'flex-
|
|
730
|
+
'flex-start': 'flex-start',
|
|
731
|
+
'flex-end': 'flex-end',
|
|
734
732
|
),
|
|
735
733
|
bp: 1,
|
|
736
734
|
),
|
|
@@ -740,8 +738,8 @@ $props: (
|
|
|
740
738
|
'start': 'start',
|
|
741
739
|
'center': 'center',
|
|
742
740
|
'end': 'end',
|
|
743
|
-
'flex-
|
|
744
|
-
'flex-
|
|
741
|
+
'flex-start': 'flex-start',
|
|
742
|
+
'flex-end': 'flex-end',
|
|
745
743
|
'between': 'space-between',
|
|
746
744
|
),
|
|
747
745
|
bp: 1,
|
|
@@ -753,8 +751,8 @@ $props: (
|
|
|
753
751
|
'center': 'center',
|
|
754
752
|
'end': 'end',
|
|
755
753
|
'stretch': 'stretch',
|
|
756
|
-
'flex-
|
|
757
|
-
'flex-
|
|
754
|
+
'flex-start': 'flex-start',
|
|
755
|
+
'flex-end': 'flex-end',
|
|
758
756
|
),
|
|
759
757
|
bp: 1,
|
|
760
758
|
),
|
|
@@ -764,8 +762,8 @@ $props: (
|
|
|
764
762
|
'start': 'start',
|
|
765
763
|
'center': 'center',
|
|
766
764
|
'end': 'end',
|
|
767
|
-
'flex-
|
|
768
|
-
'flex-
|
|
765
|
+
'flex-start': 'flex-start',
|
|
766
|
+
'flex-end': 'flex-end',
|
|
769
767
|
'between': 'space-between',
|
|
770
768
|
),
|
|
771
769
|
bp: 1,
|
|
@@ -823,7 +821,7 @@ $props: (
|
|
|
823
821
|
'ovwrap': (
|
|
824
822
|
prop: 'overflow-wrap',
|
|
825
823
|
utilities: (
|
|
826
|
-
'
|
|
824
|
+
'anywhere': 'anywhere',
|
|
827
825
|
),
|
|
828
826
|
),
|
|
829
827
|
'whspace': (
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
@use 'sass:meta';
|
|
5
5
|
|
|
6
|
+
// レイヤー順序を明示的に宣言(詳細度: 上ほど弱い)
|
|
7
|
+
@layer lism-base, lism-primitive, lism-component, lism-custom, lism-utility;
|
|
8
|
+
|
|
6
9
|
@layer lism-base {
|
|
7
10
|
// resetは中でも layer定義済み。 lism-base.reset となる
|
|
8
11
|
@include meta.load-css('reset');
|
|
@@ -10,22 +13,26 @@
|
|
|
10
13
|
@include meta.load-css('base');
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
@layer lism-
|
|
14
|
-
@layer
|
|
15
|
-
@include meta.load-css('
|
|
16
|
+
@layer lism-primitive {
|
|
17
|
+
@layer trait {
|
|
18
|
+
@include meta.load-css('primitives/trait');
|
|
16
19
|
}
|
|
17
20
|
@layer layout {
|
|
18
|
-
@include meta.load-css('
|
|
21
|
+
@include meta.load-css('primitives/layout');
|
|
19
22
|
}
|
|
20
23
|
@layer atomic {
|
|
21
|
-
@include meta.load-css('
|
|
24
|
+
@include meta.load-css('primitives/atomic');
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
/* stylelint-disable-next-line block-no-empty -- BEM 構造を持つ UI コンポーネント(c--)用レイヤー。コアでは空、@lism-css/ui やユーザー定義クラスがここに配置される。 */
|
|
29
|
+
@layer lism-component {
|
|
27
30
|
}
|
|
28
31
|
|
|
29
|
-
/* stylelint-disable-next-line block-no-empty --
|
|
32
|
+
/* stylelint-disable-next-line block-no-empty -- ユーザーの独自分類クラス用レイヤー */
|
|
30
33
|
@layer lism-custom {
|
|
31
34
|
}
|
|
35
|
+
|
|
36
|
+
@layer lism-utility {
|
|
37
|
+
@include meta.load-css('utility');
|
|
38
|
+
}
|
package/src/scss/base/_html.scss
CHANGED
|
@@ -68,12 +68,6 @@ sub {
|
|
|
68
68
|
font-size: 80%;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
legend,
|
|
72
|
-
caption,
|
|
73
|
-
figcaption {
|
|
74
|
-
font-size: var(--fz--s);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
71
|
code,
|
|
78
72
|
kbd,
|
|
79
73
|
var,
|
|
@@ -86,6 +80,12 @@ blockquote {
|
|
|
86
80
|
padding: var(--s30);
|
|
87
81
|
}
|
|
88
82
|
|
|
83
|
+
legend,
|
|
84
|
+
caption,
|
|
85
|
+
figcaption {
|
|
86
|
+
font-size: var(--fz--s);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
89
|
hr {
|
|
90
90
|
border: none;
|
|
91
91
|
block-size: 0;
|
|
@@ -95,11 +95,11 @@ hr {
|
|
|
95
95
|
/* --------------------------------------------------
|
|
96
96
|
list
|
|
97
97
|
-------------------------------------------------- */
|
|
98
|
-
// classを持たない、もしくは
|
|
98
|
+
// classを持たない、もしくは Property Classしかない(≒ Property Class で始まる) リスト要素はブラウザ標準のスタイルを復活させる。
|
|
99
99
|
:is(ul, ol):where(:not([class])),
|
|
100
100
|
:is(ul, ol):where([class^='-']) {
|
|
101
101
|
list-style: revert;
|
|
102
|
-
padding-inline-start: var(--s30);
|
|
102
|
+
padding-inline-start: var(--list-px-s, var(--s30));
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
dt {
|
|
@@ -72,12 +72,10 @@
|
|
|
72
72
|
/**
|
|
73
73
|
* border-radius
|
|
74
74
|
*/
|
|
75
|
-
--bdrs--5: 2px;
|
|
76
75
|
--bdrs--10: 0.25rem; // ≒ 4px
|
|
77
76
|
--bdrs--20: 0.5rem; // ≒ 8px
|
|
78
77
|
--bdrs--30: 1rem; // ≒ 16px
|
|
79
78
|
--bdrs--40: 1.5rem; // ≒ 24px
|
|
80
|
-
// --bdrs--50: 2rem; // ≒ 32px
|
|
81
79
|
--bdrs--99: 99rem;
|
|
82
80
|
|
|
83
81
|
/**
|
|
@@ -97,7 +95,7 @@
|
|
|
97
95
|
--ar--og: 1.91/1;
|
|
98
96
|
|
|
99
97
|
/**
|
|
100
|
-
*
|
|
98
|
+
* Trait Primitive用の初期値
|
|
101
99
|
*/
|
|
102
100
|
--gutter-size: var(--s30); // サイトコンテンツの左右につける余白
|
|
103
101
|
--vertical-mode: vertical-rl; // 縦書きモード
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
// base
|
|
12
12
|
@use './base/index' as base;
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
@use './
|
|
16
|
-
@use './
|
|
17
|
-
@use './
|
|
14
|
+
// Primitives
|
|
15
|
+
@use './primitives/trait/index' as trait;
|
|
16
|
+
@use './primitives/layout/index' as layout;
|
|
17
|
+
@use './primitives/atomic/index' as atomic;
|
|
18
18
|
|
|
19
19
|
// @use './component/index' as component;
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '../../_mixin' as mixin;
|
|
2
2
|
|
|
3
|
-
.is--
|
|
3
|
+
.is--boxLink {
|
|
4
4
|
position: relative;
|
|
5
5
|
display: block;
|
|
6
6
|
color: inherit;
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// リンクをクリック可能にするためにz-indexあげる
|
|
14
|
-
.is--
|
|
14
|
+
.is--boxLink a {
|
|
15
15
|
position: relative;
|
|
16
|
-
z-index: 2; // .
|
|
16
|
+
z-index: 2; // .is--coverLink::before + 1
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* これをしてしまうと z-index 関係がややこしくなる。リンク以外のz-indexはデフォのままにする。 */
|
|
20
|
-
// .is--
|
|
20
|
+
// .is--boxLink > * {
|
|
21
21
|
// z-index: 0;
|
|
22
22
|
// }
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import getSvgUrl from '../helper/getSvgUrl.js';
|
|
2
|
-
// import minifyHtml from '../helper/minifyHtml.js';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
isContainer: 'is--container',
|
|
6
|
-
isWrapper: {
|
|
7
|
-
className: 'is--wrapper',
|
|
8
|
-
preset: ['s', 'l'],
|
|
9
|
-
presetClass: '-contentSize',
|
|
10
|
-
customVar: '--contentSize',
|
|
11
|
-
tokenKey: 'sz',
|
|
12
|
-
},
|
|
13
|
-
isLayer: 'is--layer',
|
|
14
|
-
isLinkBox: 'is--linkBox',
|
|
15
|
-
isSide: 'is--side',
|
|
16
|
-
isSkipFlow: 'is--skipFlow',
|
|
17
|
-
isVertical: 'is--vertical',
|
|
18
|
-
setGutter: 'set--gutter',
|
|
19
|
-
|
|
20
|
-
// set class
|
|
21
|
-
setShadow: 'set--shadow',
|
|
22
|
-
setHov: 'set--hov',
|
|
23
|
-
setTransition: 'set--transition',
|
|
24
|
-
setMask: {
|
|
25
|
-
// 'set--mask',
|
|
26
|
-
className: 'set--mask',
|
|
27
|
-
setStyles: (propVal: string) => {
|
|
28
|
-
// minify化
|
|
29
|
-
// propVal = minifyHtml(propVal);
|
|
30
|
-
let imgUrl = propVal;
|
|
31
|
-
if (imgUrl.startsWith('<svg')) {
|
|
32
|
-
imgUrl = getSvgUrl(propVal, 'base64');
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
'--maskImg': imgUrl,
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
setPlain: 'set--plain',
|
|
40
|
-
// setRevert: 'set--revert',
|
|
41
|
-
setInnerRs: 'set--innerRs',
|
|
42
|
-
setBp: 'set--bp',
|
|
43
|
-
} as const;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* svgをcssの image url に変換
|
|
3
|
-
*/
|
|
4
|
-
const getSvgUrl = (svg: string, encode = '') => {
|
|
5
|
-
if (!svg) return '';
|
|
6
|
-
|
|
7
|
-
// minify化
|
|
8
|
-
// svg = minifyHtml(svg);
|
|
9
|
-
|
|
10
|
-
if ('base64' === encode) {
|
|
11
|
-
// memo: btoa() だけだとマルチバイト文字が入った時にエラーになる。
|
|
12
|
-
// encodeURIComponent() でそれを回避できるがそれだとSVGとして描画できず、 unescape() と組み合わせることで期待する動作になった。 see: https://www.softel.co.jp/blogs/tech/archives/4133
|
|
13
|
-
// svg = window.btoa(unescape(encodeURIComponent(svg)));
|
|
14
|
-
|
|
15
|
-
// memo: Buffer 使えば非推奨な関数を使わなくてもいい see: https://hackersheet.com/naopoyo/sheets/bvtrkwt
|
|
16
|
-
svg = Buffer.from(svg).toString('base64');
|
|
17
|
-
return `url(data:image/svg+xml;base64,${svg})`;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// シングルクォートをダブルクォートに変換
|
|
21
|
-
svg = svg.replace(/'/g, '"');
|
|
22
|
-
// カラーコードの先頭の # → %23 に置換
|
|
23
|
-
svg = svg.replace(/="#/g, '="%23');
|
|
24
|
-
return `url('data:image/svg+xml,${svg}')`;
|
|
25
|
-
};
|
|
26
|
-
export default getSvgUrl;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { LismComponentProps } from '../Lism';
|
|
2
|
-
/** @deprecated Group を使用してください */
|
|
3
|
-
export declare function div(props: LismComponentProps<'div'>): import("react").JSX.Element;
|
|
4
|
-
/** @deprecated Text を使用してください */
|
|
5
|
-
export declare function p(props: LismComponentProps<'p'>): import("react").JSX.Element;
|
|
6
|
-
/** @deprecated Inline を使用してください */
|
|
7
|
-
export declare function span(props: LismComponentProps<'span'>): import("react").JSX.Element;
|
|
8
|
-
/** @deprecated Link を使用してください */
|
|
9
|
-
export declare function a(props: LismComponentProps<'a'>): import("react").JSX.Element;
|
|
10
|
-
type HeadingLevel = '1' | '2' | '3' | '4' | '5' | '6';
|
|
11
|
-
type HeadingProps = LismComponentProps<'h1'> & {
|
|
12
|
-
lv?: HeadingLevel;
|
|
13
|
-
};
|
|
14
|
-
/** @deprecated Heading を使用してください */
|
|
15
|
-
export declare function h({ lv, ...props }: HeadingProps): import("react").JSX.Element;
|
|
16
|
-
/** @deprecated Media を使用してください */
|
|
17
|
-
export declare function img(props: LismComponentProps<'img'>): import("react").JSX.Element;
|
|
18
|
-
/** @deprecated List を使用してください */
|
|
19
|
-
export declare function ul(props: LismComponentProps<'ul'>): import("react").JSX.Element;
|
|
20
|
-
/** @deprecated List as="ol" を使用してください */
|
|
21
|
-
export declare function ol(props: LismComponentProps<'ol'>): import("react").JSX.Element;
|
|
22
|
-
/** @deprecated ListItem を使用してください */
|
|
23
|
-
export declare function li(props: LismComponentProps<'li'>): import("react").JSX.Element;
|
|
24
|
-
/** @deprecated Lism as="button" を使用してください */
|
|
25
|
-
export declare function button(props: LismComponentProps<'button'>): import("react").JSX.Element;
|
|
26
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { div, p, span, img, a, h, ul, ol, li, button } from './HTML';
|
|
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,45 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import r from "../Lism/index.js";
|
|
3
|
-
function s(n) {
|
|
4
|
-
return /* @__PURE__ */ t(r, { as: "div", ...n });
|
|
5
|
-
}
|
|
6
|
-
function f(n) {
|
|
7
|
-
return /* @__PURE__ */ t(r, { as: "p", ...n });
|
|
8
|
-
}
|
|
9
|
-
function c(n) {
|
|
10
|
-
return /* @__PURE__ */ t(r, { as: "span", ...n });
|
|
11
|
-
}
|
|
12
|
-
function e(n) {
|
|
13
|
-
return /* @__PURE__ */ t(r, { as: "a", ...n });
|
|
14
|
-
}
|
|
15
|
-
function m({ lv: n = "1", ...u }) {
|
|
16
|
-
const o = `h${n}`;
|
|
17
|
-
return /* @__PURE__ */ t(r, { as: o, ...u });
|
|
18
|
-
}
|
|
19
|
-
function p(n) {
|
|
20
|
-
return /* @__PURE__ */ t(r, { as: "img", ...n });
|
|
21
|
-
}
|
|
22
|
-
function l(n) {
|
|
23
|
-
return /* @__PURE__ */ t(r, { as: "ul", ...n });
|
|
24
|
-
}
|
|
25
|
-
function g(n) {
|
|
26
|
-
return /* @__PURE__ */ t(r, { as: "ol", ...n });
|
|
27
|
-
}
|
|
28
|
-
function b(n) {
|
|
29
|
-
return /* @__PURE__ */ t(r, { as: "li", ...n });
|
|
30
|
-
}
|
|
31
|
-
function d(n) {
|
|
32
|
-
return /* @__PURE__ */ t(r, { as: "button", ...n });
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
e as a,
|
|
36
|
-
d as button,
|
|
37
|
-
s as div,
|
|
38
|
-
m as h,
|
|
39
|
-
p as img,
|
|
40
|
-
b as li,
|
|
41
|
-
g as ol,
|
|
42
|
-
f as p,
|
|
43
|
-
c as span,
|
|
44
|
-
l as ul
|
|
45
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ElementType } from 'react';
|
|
2
|
-
import { LismComponentProps } from '../Lism';
|
|
3
|
-
type LinkBoxProps<T extends ElementType = 'a'> = LismComponentProps<T>;
|
|
4
|
-
export default function LinkBox<T extends ElementType = 'a'>({ as, children, ...props }: LinkBoxProps<T>): import("react").JSX.Element;
|
|
5
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as LinkBox } from './LinkBox';
|