lism-css 0.10.5 → 0.12.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 +5 -5
- package/README.md +7 -7
- package/config/defaults/props.ts +16 -26
- package/config/defaults/states.ts +0 -28
- package/config/defaults/tokens.ts +2 -2
- 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 +62 -62
- 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/{Container → state/Container}/Container.d.ts +1 -1
- package/dist/components/{Container → state/Container}/index.js +1 -1
- package/dist/components/{Layer → state/Layer}/Layer.d.ts +1 -1
- package/dist/components/{Layer → state/Layer}/index.js +1 -1
- package/dist/components/{LinkBox → state/LinkBox}/LinkBox.d.ts +1 -1
- package/dist/components/{LinkBox → state/LinkBox}/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 +26 -73
- package/dist/config/defaults/props.d.ts +24 -58
- package/dist/config/defaults/props.js +16 -26
- package/dist/config/defaults/states.d.ts +0 -13
- package/dist/config/defaults/states.js +3 -23
- package/dist/config/defaults/tokens.d.ts +2 -2
- package/dist/config/defaults/tokens.js +2 -2
- package/dist/config/index.d.ts +52 -146
- package/dist/css/base.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/modules/layout.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/css/utility.css +1 -1
- package/dist/lib/getLayoutProps.js +12 -15
- package/dist/lib/getLismProps.d.ts +3 -2
- package/dist/lib/getLismProps.js +91 -89
- package/dist/lib/helper/mergeSet.d.ts +5 -0
- package/dist/lib/helper/mergeSet.js +14 -0
- package/dist/lib/helper/mergeSet.test.d.ts +1 -0
- package/dist/lib/types/LayoutProps.d.ts +4 -1
- package/dist/lib/types/StateProps.d.ts +5 -3
- 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/{Container → state/Container}/Container.astro +2 -2
- package/packages/astro/{Layer → state/Layer}/Layer.astro +2 -2
- package/packages/astro/{LinkBox → state/LinkBox}/LinkBox.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 -30
- package/src/scss/_with_layer.scss +4 -4
- package/src/scss/base/_html.scss +9 -9
- package/src/scss/base/tokens/_shadow.scss +5 -8
- package/src/scss/base/tokens/_tokens.scss +5 -10
- package/src/scss/modules/layout/_grid.scss +0 -5
- package/src/scss/modules/layout/_tileGrid.scss +4 -0
- package/src/scss/modules/layout/index.scss +1 -0
- package/src/scss/props/index.scss +1 -1
- package/src/scss/utility/_cbox.scss +3 -3
- package/src/scss/utility/_clipText.scss +1 -0
- package/src/scss/utility/_hidden.scss +2 -2
- package/src/scss/utility/_trimHL.scss +4 -1
- package/config/helper/getSvgUrl.ts +0 -26
- 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/config/helper/getSvgUrl.d.ts +0 -5
- package/dist/config/helper/getSvgUrl.js +0 -4
- 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/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}/Container.stories.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/{LinkBox → state/LinkBox}/LinkBox.stories.d.ts +0 -0
- /package/dist/components/{LinkBox → state/LinkBox}/index.d.ts +0 -0
- /package/dist/components/{LinkBox → state/LinkBox}/script.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/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/{LinkBox → state/LinkBox}/index.ts +0 -0
- /package/packages/astro/{Wrapper → state/Wrapper}/index.ts +0 -0
|
@@ -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
|
),
|
|
@@ -303,12 +308,10 @@ $props: (
|
|
|
303
308
|
prop: 'border-radius',
|
|
304
309
|
utilities: (
|
|
305
310
|
'0': '0',
|
|
306
|
-
'5': 'var(--bdrs--5)',
|
|
307
311
|
'10': 'var(--bdrs--10)',
|
|
308
312
|
'20': 'var(--bdrs--20)',
|
|
309
313
|
'30': 'var(--bdrs--30)',
|
|
310
314
|
'40': 'var(--bdrs--40)',
|
|
311
|
-
'50': 'var(--bdrs--50)',
|
|
312
315
|
'99': 'var(--bdrs--99)',
|
|
313
316
|
'inner': 'var(--bdrs--inner)',
|
|
314
317
|
),
|
|
@@ -320,12 +323,10 @@ $props: (
|
|
|
320
323
|
prop: 'box-shadow',
|
|
321
324
|
utilities: (
|
|
322
325
|
'0': 'none',
|
|
323
|
-
'5': 'var(--bxsh--5)',
|
|
324
326
|
'10': 'var(--bxsh--10)',
|
|
325
327
|
'20': 'var(--bxsh--20)',
|
|
326
328
|
'30': 'var(--bxsh--30)',
|
|
327
329
|
'40': 'var(--bxsh--40)',
|
|
328
|
-
'50': 'var(--bxsh--50)',
|
|
329
330
|
),
|
|
330
331
|
bp: 1,
|
|
331
332
|
alwaysVar: 1,
|
|
@@ -336,8 +337,8 @@ $props: (
|
|
|
336
337
|
'static': 'static',
|
|
337
338
|
'fixed': 'fixed',
|
|
338
339
|
'sticky': 'sticky',
|
|
339
|
-
'
|
|
340
|
-
'
|
|
340
|
+
'relative': 'relative',
|
|
341
|
+
'absolute': 'absolute',
|
|
341
342
|
),
|
|
342
343
|
),
|
|
343
344
|
'z': (
|
|
@@ -611,11 +612,11 @@ $props: (
|
|
|
611
612
|
alwaysVar: 1,
|
|
612
613
|
overwriteBaseVar: 1,
|
|
613
614
|
),
|
|
614
|
-
'
|
|
615
|
+
'cg': (
|
|
615
616
|
prop: 'column-gap',
|
|
616
617
|
bp: 1,
|
|
617
618
|
),
|
|
618
|
-
'
|
|
619
|
+
'rg': (
|
|
619
620
|
prop: 'row-gap',
|
|
620
621
|
bp: 1,
|
|
621
622
|
),
|
|
@@ -639,9 +640,9 @@ $props: (
|
|
|
639
640
|
'fxd': (
|
|
640
641
|
prop: 'flex-direction',
|
|
641
642
|
utilities: (
|
|
642
|
-
'
|
|
643
|
-
'
|
|
644
|
-
'row-
|
|
643
|
+
'column': 'column',
|
|
644
|
+
'column-reverse': 'column-reverse',
|
|
645
|
+
'row-reverse': 'row-reverse',
|
|
645
646
|
),
|
|
646
647
|
bp: 1,
|
|
647
648
|
),
|
|
@@ -670,13 +671,6 @@ $props: (
|
|
|
670
671
|
),
|
|
671
672
|
'gt': (
|
|
672
673
|
prop: 'grid-template',
|
|
673
|
-
utilities: (
|
|
674
|
-
),
|
|
675
|
-
exUtility: (
|
|
676
|
-
'repeat': (
|
|
677
|
-
'grid-template': 'repeat(var(--rows,1), 1fr) / repeat(var(--cols,1), 1fr)',
|
|
678
|
-
),
|
|
679
|
-
),
|
|
680
674
|
bp: 1,
|
|
681
675
|
),
|
|
682
676
|
'gta': (
|
|
@@ -701,7 +695,7 @@ $props: (
|
|
|
701
695
|
prop: 'grid-auto-flow',
|
|
702
696
|
utilities: (
|
|
703
697
|
'row': 'row',
|
|
704
|
-
'
|
|
698
|
+
'column': 'column',
|
|
705
699
|
),
|
|
706
700
|
bp: 1,
|
|
707
701
|
),
|
|
@@ -733,8 +727,8 @@ $props: (
|
|
|
733
727
|
'center': 'center',
|
|
734
728
|
'end': 'end',
|
|
735
729
|
'stretch': 'stretch',
|
|
736
|
-
'flex-
|
|
737
|
-
'flex-
|
|
730
|
+
'flex-start': 'flex-start',
|
|
731
|
+
'flex-end': 'flex-end',
|
|
738
732
|
),
|
|
739
733
|
bp: 1,
|
|
740
734
|
),
|
|
@@ -744,8 +738,8 @@ $props: (
|
|
|
744
738
|
'start': 'start',
|
|
745
739
|
'center': 'center',
|
|
746
740
|
'end': 'end',
|
|
747
|
-
'flex-
|
|
748
|
-
'flex-
|
|
741
|
+
'flex-start': 'flex-start',
|
|
742
|
+
'flex-end': 'flex-end',
|
|
749
743
|
'between': 'space-between',
|
|
750
744
|
),
|
|
751
745
|
bp: 1,
|
|
@@ -757,8 +751,8 @@ $props: (
|
|
|
757
751
|
'center': 'center',
|
|
758
752
|
'end': 'end',
|
|
759
753
|
'stretch': 'stretch',
|
|
760
|
-
'flex-
|
|
761
|
-
'flex-
|
|
754
|
+
'flex-start': 'flex-start',
|
|
755
|
+
'flex-end': 'flex-end',
|
|
762
756
|
),
|
|
763
757
|
bp: 1,
|
|
764
758
|
),
|
|
@@ -768,8 +762,8 @@ $props: (
|
|
|
768
762
|
'start': 'start',
|
|
769
763
|
'center': 'center',
|
|
770
764
|
'end': 'end',
|
|
771
|
-
'flex-
|
|
772
|
-
'flex-
|
|
765
|
+
'flex-start': 'flex-start',
|
|
766
|
+
'flex-end': 'flex-end',
|
|
773
767
|
'between': 'space-between',
|
|
774
768
|
),
|
|
775
769
|
bp: 1,
|
|
@@ -827,7 +821,7 @@ $props: (
|
|
|
827
821
|
'ovwrap': (
|
|
828
822
|
prop: 'overflow-wrap',
|
|
829
823
|
utilities: (
|
|
830
|
-
'
|
|
824
|
+
'anywhere': 'anywhere',
|
|
831
825
|
),
|
|
832
826
|
),
|
|
833
827
|
'whspace': (
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/* stylelint-disable-next-line block-no-empty -- ユーザーの独自分類クラス用レイヤー */
|
|
26
|
+
@layer lism-custom {
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
@
|
|
29
|
+
@layer lism-utility {
|
|
30
|
+
@include meta.load-css('utility');
|
|
31
31
|
}
|
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 {
|
|
@@ -115,7 +115,7 @@ dd + dt {
|
|
|
115
115
|
table {
|
|
116
116
|
--td-c: inherit;
|
|
117
117
|
--td-bgc: transparent;
|
|
118
|
-
--td-p: var(--
|
|
118
|
+
--td-p: var(--s10);
|
|
119
119
|
--td-min-sz: initial;
|
|
120
120
|
}
|
|
121
121
|
td {
|
|
@@ -4,17 +4,14 @@
|
|
|
4
4
|
-------------------------------------------------- */
|
|
5
5
|
:root,
|
|
6
6
|
.set--shadow {
|
|
7
|
-
--sh--5: var(--
|
|
8
|
-
--sh--10: var(--
|
|
9
|
-
--sh--20: var(--
|
|
10
|
-
--sh--30: var(--
|
|
11
|
-
--sh--40: var(--
|
|
12
|
-
--sh--50: var(--sh-inset) var(--shsz--50) var(--shc);
|
|
7
|
+
--sh--5: var(--shsz--5) var(--shc);
|
|
8
|
+
--sh--10: var(--shsz--10) var(--shc);
|
|
9
|
+
--sh--20: var(--shsz--20) var(--shc);
|
|
10
|
+
--sh--30: var(--shsz--30) var(--shc);
|
|
11
|
+
--sh--40: var(--shsz--40) var(--shc);
|
|
13
12
|
|
|
14
|
-
--bxsh--5: var(--sh--5);
|
|
15
13
|
--bxsh--10: var(--sh--5), var(--sh--10);
|
|
16
14
|
--bxsh--20: var(--sh--10), var(--sh--20);
|
|
17
15
|
--bxsh--30: var(--sh--20), var(--sh--30);
|
|
18
16
|
--bxsh--40: var(--sh--30), var(--sh--40);
|
|
19
|
-
--bxsh--50: var(--sh--40), var(--sh--50);
|
|
20
17
|
}
|
|
@@ -72,27 +72,22 @@
|
|
|
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
|
/**
|
|
84
82
|
* shadow color, shadow inset, shadow size
|
|
85
83
|
*/
|
|
86
|
-
--sh-inset: ; // for inset
|
|
87
84
|
--shc: hsl(220 4% 8% / 5%);
|
|
88
85
|
|
|
89
|
-
|
|
90
|
-
--shsz--
|
|
91
|
-
--shsz--
|
|
92
|
-
--shsz--
|
|
93
|
-
--shsz--
|
|
94
|
-
--shsz--40: 3px 13px 26px;
|
|
95
|
-
--shsz--50: 5px 21px 42px;
|
|
86
|
+
--shsz--5: 0px 1px 3px;
|
|
87
|
+
--shsz--10: 0px 2px 6px;
|
|
88
|
+
--shsz--20: 0px 4px 12px;
|
|
89
|
+
--shsz--30: 0px 8px 24px;
|
|
90
|
+
--shsz--40: 0px 16px 48px;
|
|
96
91
|
|
|
97
92
|
/**
|
|
98
93
|
* aspect-ratio
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Note: Property Class より優先度が下で定義すること
|
|
3
|
+
Memo: bgcの mix は transparent ではなく --base と混ぜている → 背景メディアがあるときも可読性が落ちないように + chat のように同じ背景色の装飾が一部重なっていても大丈夫なように。
|
|
4
4
|
*/
|
|
5
5
|
.u--cbox {
|
|
6
6
|
--c: color-mix(in srgb, var(--text), var(--keycolor) var(--cbox-cPct, 32%));
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
color: var(--c);
|
|
11
11
|
background-color: var(--bgc);
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// 相対カラー構文をサポートしているブラウザでは、 shadowのカラーもキーカラーに寄せる
|
|
14
14
|
@supports (color: oklch(from red l c h)) {
|
|
15
15
|
--shc: oklch(from var(--keycolor) calc(l / 1.5) calc(c / 1.5) h / 0.1);
|
|
16
16
|
}
|
|
@@ -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,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>
|