lism-css 0.3.5 → 0.5.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.
Files changed (244) hide show
  1. package/README.md +2 -2
  2. package/bin/build-config.js +157 -0
  3. package/bin/build-css.cjs +92 -0
  4. package/bin/build-css.js +90 -0
  5. package/bin/cli.mjs +69 -0
  6. package/bin/script-build-css.js +6 -0
  7. package/config/__prop_list.js +44 -0
  8. package/config/__props.scss +25 -0
  9. package/config/default-config.js +9 -0
  10. package/config/defaults/__props-memo.js +45 -0
  11. package/config/defaults/props.js +370 -0
  12. package/config/defaults/states.js +42 -0
  13. package/config/defaults/tokens.js +26 -0
  14. package/config/helper/getSvgUrl.js +28 -0
  15. package/config/helper/minifyHtml.js +22 -0
  16. package/config/helper.js +67 -0
  17. package/config/index.js +15 -0
  18. package/config.js +2 -0
  19. package/dist/components/Accordion/AccIcon.js +1 -1
  20. package/dist/components/Accordion/getProps.js +15 -17
  21. package/dist/components/Accordion/index.js +4 -4
  22. package/dist/components/Accordion/index2.js +28 -23
  23. package/dist/components/Accordion/setAccordion.js +11 -11
  24. package/dist/components/Box/index.js +5 -6
  25. package/dist/components/Center/index.js +2 -2
  26. package/dist/components/Cluster/index.js +8 -0
  27. package/dist/components/Columns/index.js +5 -6
  28. package/dist/components/Container/index.js +3 -3
  29. package/dist/components/Dummy/index.js +9 -14
  30. package/dist/components/Dummy/texts.js +6 -6
  31. package/dist/components/Flex/index.js +5 -6
  32. package/dist/components/Flow/index.js +8 -0
  33. package/dist/components/Frame/index.js +5 -6
  34. package/dist/components/Grid/index.js +5 -6
  35. package/dist/components/HTML/index.js +5 -0
  36. package/dist/components/HTML/index2.js +44 -0
  37. package/dist/components/Layer/index.js +5 -5
  38. package/dist/components/LinkBox/index.js +6 -6
  39. package/dist/components/Lism/Link.js +5 -5
  40. package/dist/components/Lism/Text.js +4 -4
  41. package/dist/components/Lism/index.js +5 -4
  42. package/dist/components/Modal/Body.js +5 -5
  43. package/dist/components/Modal/CloseBtn.js +13 -0
  44. package/dist/components/Modal/Inner.js +5 -5
  45. package/dist/components/Modal/OpenBtn.js +9 -0
  46. package/dist/components/Modal/getProps.js +12 -13
  47. package/dist/components/Modal/index.js +4 -5
  48. package/dist/components/Modal/index2.js +12 -12
  49. package/dist/components/Stack/index.js +5 -5
  50. package/dist/components/Tabs/Tab.js +7 -9
  51. package/dist/components/Tabs/TabList.js +4 -4
  52. package/dist/components/Tabs/TabPanel.js +6 -7
  53. package/dist/components/Tabs/getProps.js +1 -8
  54. package/dist/components/Tabs/index2.js +14 -23
  55. package/dist/components/WithSide/index.js +4 -5
  56. package/dist/components/atomic/Decorator/getProps.js +13 -0
  57. package/dist/components/{Decorator → atomic/Decorator}/index.js +1 -1
  58. package/dist/components/atomic/Divider/getProps.js +10 -0
  59. package/dist/components/atomic/Divider/index.js +9 -0
  60. package/dist/components/atomic/Icon/getProps.js +59 -0
  61. package/dist/components/{Icon → atomic/Icon}/index.js +1 -1
  62. package/dist/components/atomic/Media/getProps.js +9 -0
  63. package/dist/components/atomic/Media/index.js +9 -0
  64. package/dist/components/atomic/Spacer/getProps.js +21 -0
  65. package/dist/components/atomic/Spacer/index.js +9 -0
  66. package/dist/components/getFilterProps.js +8 -18
  67. package/dist/components/getLayoutProps.js +27 -0
  68. package/dist/config/default-config.js +11 -0
  69. package/dist/config/defaults/props.js +342 -0
  70. package/dist/config/defaults/states.js +36 -0
  71. package/dist/config/defaults/tokens.js +29 -0
  72. package/dist/config/helper/getSvgUrl.js +4 -0
  73. package/dist/config/helper.js +31 -0
  74. package/dist/config/index.js +11 -0
  75. package/dist/index.js +50 -50
  76. package/dist/lib/getBpData.js +1 -1
  77. package/dist/lib/getLismProps.js +109 -177
  78. package/dist/lib/getMaybeCssVar.js +30 -54
  79. package/dist/lib/getMaybeTokenValue.js +26 -0
  80. package/dist/lib/getUtilKey.js +13 -0
  81. package/dist/lib/isPresetValue.js +3 -3
  82. package/dist/lib/isTokenValue.js +6 -5
  83. package/package.json +16 -3
  84. package/packages/astro/Accordion/AccBody.astro +5 -6
  85. package/packages/astro/Accordion/AccHeader.astro +4 -4
  86. package/packages/astro/Accordion/AccHeaderLabel.astro +12 -0
  87. package/packages/astro/Accordion/AccIcon.astro +1 -1
  88. package/packages/astro/Accordion/AccLabel.astro +1 -1
  89. package/packages/astro/Accordion/Accordion.astro +1 -1
  90. package/packages/astro/Accordion/index.js +2 -1
  91. package/packages/astro/Box/Box.astro +2 -3
  92. package/packages/astro/Center/Center.astro +2 -8
  93. package/packages/astro/Cluster/Cluster.astro +5 -0
  94. package/packages/astro/Cluster/index.js +1 -0
  95. package/packages/astro/Columns/Columns.astro +2 -8
  96. package/packages/astro/Container/Container.astro +3 -4
  97. package/packages/astro/Decorator/Decorator.astro +2 -2
  98. package/packages/astro/Divider/Divider.astro +3 -3
  99. package/packages/astro/Dummy/Dummy.astro +3 -2
  100. package/packages/astro/Flex/Flex.astro +1 -10
  101. package/packages/astro/Flex/index.js +0 -1
  102. package/packages/astro/Flow/Flow.astro +5 -0
  103. package/packages/astro/Flow/index.js +1 -0
  104. package/packages/astro/Frame/Frame.astro +1 -8
  105. package/packages/astro/Grid/Grid.astro +1 -9
  106. package/packages/astro/Grid/index.js +0 -1
  107. package/packages/astro/HTML/a.astro +5 -0
  108. package/packages/astro/HTML/button.astro +5 -0
  109. package/packages/astro/HTML/div.astro +5 -0
  110. package/packages/astro/HTML/h.astro +6 -0
  111. package/packages/astro/HTML/img.astro +5 -0
  112. package/packages/astro/HTML/index.js +12 -0
  113. package/packages/astro/HTML/li.astro +5 -0
  114. package/packages/astro/HTML/ol.astro +5 -0
  115. package/packages/astro/HTML/p.astro +5 -0
  116. package/packages/astro/HTML/span.astro +5 -0
  117. package/packages/astro/HTML/ul.astro +5 -0
  118. package/packages/astro/Icon/Icon.astro +3 -5
  119. package/packages/astro/Layer/Layer.astro +3 -10
  120. package/packages/astro/LinkBox/LinkBox.astro +4 -5
  121. package/packages/astro/Lism/Link.astro +2 -2
  122. package/packages/astro/Lism/Lism.astro +4 -3
  123. package/packages/astro/Lism/Text.astro +2 -2
  124. package/packages/astro/Lism/index.js +0 -1
  125. package/packages/astro/{Lism → Media}/Media.astro +1 -9
  126. package/packages/astro/Media/index.js +1 -0
  127. package/packages/astro/Modal/Body.astro +4 -5
  128. package/packages/astro/Modal/CloseBtn.astro +24 -0
  129. package/packages/astro/Modal/Inner.astro +4 -4
  130. package/packages/astro/Modal/Modal.astro +4 -5
  131. package/packages/astro/Modal/OpenBtn.astro +14 -0
  132. package/packages/astro/Modal/index.js +3 -4
  133. package/packages/astro/OverlayLink/OverlayLink.astro +1 -1
  134. package/packages/astro/Spacer/Spacer.astro +3 -3
  135. package/packages/astro/Stack/Stack.astro +2 -4
  136. package/packages/astro/Tabs/Tab.astro +2 -11
  137. package/packages/astro/Tabs/TabList.astro +4 -4
  138. package/packages/astro/Tabs/TabPanel.astro +1 -1
  139. package/packages/astro/Tabs/Tabs.astro +6 -10
  140. package/packages/astro/Test/Test.astro +1 -1
  141. package/packages/astro/Test/TestItem.astro +1 -1
  142. package/packages/astro/WithSide/WithSide.astro +1 -8
  143. package/packages/astro/index.js +6 -2
  144. package/packages/types/index.d.ts +22 -26
  145. package/src/scss/{_props.scss → __props copy.scss } +146 -169
  146. package/src/scss/__props.scss +786 -0
  147. package/src/scss/_auto_output.scss +102 -76
  148. package/src/scss/_prop-config.scss +862 -0
  149. package/src/scss/_setting.scss +2 -3
  150. package/src/scss/_with_layer.scss +19 -14
  151. package/src/scss/base/_dom.scss +35 -26
  152. package/src/scss/base/_property.scss +4 -16
  153. package/src/scss/base/_tokens.scss +105 -116
  154. package/src/scss/base/index.scss +18 -42
  155. package/src/scss/base/set/_hover.scss +13 -0
  156. package/src/scss/base/set/_innerRs.scss +3 -0
  157. package/src/scss/base/set/_mask.scss +6 -0
  158. package/src/scss/base/set/_plain.scss +14 -0
  159. package/src/scss/base/set/_shadow.scss +27 -0
  160. package/src/scss/base/set/_snap.scss +8 -0
  161. package/src/scss/base/set/_transition.scss +20 -0
  162. package/src/scss/main.scss +0 -1
  163. package/src/scss/main_no_layer.scss +6 -14
  164. package/src/scss/modules/atomic/_divider.scss +6 -0
  165. package/src/scss/{layout → modules/atomic}/_icon.scss +3 -9
  166. package/src/scss/modules/atomic/_media.scss +3 -0
  167. package/src/scss/{layout → modules/atomic}/_spacer.scss +1 -1
  168. package/src/scss/modules/atomic/index.scss +6 -0
  169. package/src/scss/{dynamic → modules/dynamic}/_accordion.scss +24 -24
  170. package/src/scss/modules/dynamic/_modal.scss +33 -0
  171. package/src/scss/{dynamic → modules/dynamic}/_tabs.scss +4 -5
  172. package/src/scss/{layout/_flex.scss → modules/layout/_cluster.scss} +1 -4
  173. package/src/scss/modules/layout/_columns.scss +9 -0
  174. package/src/scss/modules/layout/_flex.scss +3 -0
  175. package/src/scss/modules/layout/_flow.scss +46 -0
  176. package/src/scss/{layout → modules/layout}/_frame.scss +1 -1
  177. package/src/scss/modules/layout/_grid.scss +35 -0
  178. package/src/scss/{layout → modules/layout}/_withSide.scss +3 -3
  179. package/src/scss/{layout → modules/layout}/index.scss +4 -6
  180. package/src/scss/modules/state/_container.scss +37 -0
  181. package/src/scss/{state → modules/state}/_linkbox.scss +1 -1
  182. package/src/scss/modules/state/index.scss +5 -0
  183. package/src/scss/props/_border.scss +25 -40
  184. package/src/scss/props/_hover.scss +12 -23
  185. package/src/scss/props/_size.scss +17 -0
  186. package/src/scss/props/index.scss +1 -2
  187. package/src/scss/reset.scss +1 -1
  188. package/src/scss/utility/_cbox.scss +5 -4
  189. package/src/scss/utility/_hidden.scss +14 -0
  190. package/src/scss/utility/_itemDivider.scss +11 -0
  191. package/src/scss/utility/_linkExpand.scss +10 -0
  192. package/src/scss/utility/_trimHL.scss +29 -13
  193. package/src/scss/utility/index.scss +3 -45
  194. package/dist/components/Box/getProps.js +0 -7
  195. package/dist/components/Columns/getProps.js +0 -6
  196. package/dist/components/Decorator/getProps.js +0 -17
  197. package/dist/components/Divider/getProps.js +0 -11
  198. package/dist/components/Divider/index.js +0 -9
  199. package/dist/components/Flex/Cluster.js +0 -8
  200. package/dist/components/Flex/FlexItem.js +0 -8
  201. package/dist/components/Flex/getProps.js +0 -13
  202. package/dist/components/Frame/getProps.js +0 -7
  203. package/dist/components/Grid/GridItem.js +0 -9
  204. package/dist/components/Grid/getProps.js +0 -28
  205. package/dist/components/Icon/getProps.js +0 -60
  206. package/dist/components/Layer/getProps.js +0 -9
  207. package/dist/components/Lism/Media.js +0 -9
  208. package/dist/components/Modal/CloseIconBtn.js +0 -19
  209. package/dist/components/Modal/Footer.js +0 -9
  210. package/dist/components/Modal/Header.js +0 -9
  211. package/dist/components/Spacer/getProps.js +0 -21
  212. package/dist/components/Spacer/index.js +0 -9
  213. package/dist/components/WithSide/getProps.js +0 -14
  214. package/dist/components/getInsetProps.js +0 -8
  215. package/dist/components/getMediaProps.js +0 -7
  216. package/dist/components/getTransformProps.js +0 -8
  217. package/dist/config/prop_list.js +0 -386
  218. package/dist/config/tokens.js +0 -43
  219. package/dist/config.js +0 -9
  220. package/dist/lib/getMaybeUtilValue.js +0 -6
  221. package/packages/astro/Flex/Cluster.astro +0 -11
  222. package/packages/astro/Grid/GridItem.astro +0 -14
  223. package/packages/astro/Modal/CloseIconBtn.astro +0 -24
  224. package/packages/astro/Modal/Footer.astro +0 -14
  225. package/packages/astro/Modal/Header.astro +0 -14
  226. package/src/scss/dynamic/_modal.scss +0 -30
  227. package/src/scss/layout/_columns.scss +0 -13
  228. package/src/scss/layout/_divider.scss +0 -3
  229. package/src/scss/layout/_grid.scss +0 -9
  230. package/src/scss/props/__memo.scss +0 -15
  231. package/src/scss/props/_color.scss +0 -7
  232. package/src/scss/props/_transition.scss +0 -20
  233. package/src/scss/state/_container.scss +0 -34
  234. package/src/scss/state/_flow.scss +0 -45
  235. package/src/scss/state/_size.scss +0 -22
  236. package/src/scss/state/index.scss +0 -12
  237. /package/dist/components/{Icon → atomic/Icon}/SVG.js +0 -0
  238. /package/dist/components/{Icon → atomic/Icon}/presets.js +0 -0
  239. /package/packages/astro/{helper/index.js → helper.js} +0 -0
  240. /package/src/scss/{dynamic → modules/dynamic}/index.scss +0 -0
  241. /package/src/scss/{layout → modules/layout}/_center.scss +0 -0
  242. /package/src/scss/{layout → modules/layout}/_stack.scss +0 -0
  243. /package/src/scss/{state → modules/state}/_gutter.scss +0 -0
  244. /package/src/scss/{state → modules/state}/_layer.scss +0 -0
@@ -1,11 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
- import { Grid } from '../Grid';
4
- // import getProps from '../../../dist/components/Center/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
- const props = Astro.props || {};
2
+ import { Lism } from '../Lism';
9
3
  ---
10
4
 
11
- <Grid _grid='center' {...props}><slot /></Grid>
5
+ <Lism layout='center' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import { Lism } from '../Lism';
3
+ ---
4
+
5
+ <Lism layout='cluster' {...Astro.props}><slot /></Lism>
@@ -0,0 +1 @@
1
+ export { default as Cluster } from './Cluster.astro';
@@ -1,11 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
- import { Grid } from '../Grid';
4
- import getProps from '../../../dist/components/Columns/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
- const props = Astro.props || {};
2
+ import { Lism } from '../Lism';
9
3
  ---
10
4
 
11
- <Grid _grid='columns' {...getProps(props)}><slot /></Grid>
5
+ <Lism layout='columns' {...Astro.props}><slot /></Lism>
@@ -1,11 +1,10 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
 
5
5
  interface Props extends LismProps {}
6
6
 
7
- const { layout, size = true, ...props } = Astro.props || {};
8
- const Layout = layout || Lism;
7
+ const { size = true, ...props } = Astro.props || {};
9
8
  ---
10
9
 
11
- <Layout isContainer={size} {...props}><slot /></Layout>
10
+ <Lism isContainer={size} {...props}><slot /></Lism>
@@ -1,7 +1,7 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
- import getProps from '../../../dist/components/Decorator/getProps';
4
+ import getProps from '../../../dist/components/atomic/Decorator/getProps';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
@@ -1,7 +1,7 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
- import { getDividerProps } from '../../../dist/components/Divider/getProps';
4
+ import { getDividerProps } from '../../../dist/components/atomic/Divider/getProps';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
@@ -9,4 +9,4 @@ interface Props extends LismProps {}
9
9
  const props = Astro.props || {};
10
10
  ---
11
11
 
12
- <Lism skipState {...getDividerProps(props)} />
12
+ <Lism {...getDividerProps(props)} />
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
  import getContent from '../../../dist/components/Dummy/getContent';
5
5
 
@@ -9,4 +9,5 @@ const { tag = 'p', pre = '', length = 'm', lang = 'en', offset = 0, ...props } =
9
9
  const content = getContent({ tag, pre, lang, length, offset });
10
10
  ---
11
11
 
12
- <Lism tag={tag} {...props} set:html={content} />
12
+ {tag === 'img' && <Lism tag='img' src='https://placehold.co/300x200?text=placeholder' width='300' height='200' alt='' {...props} />}
13
+ {tag !== 'img' && <Lism tag={tag} {...props} set:html={content} />}
@@ -1,14 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
2
  import { Lism } from '../Lism';
4
- import { getFlexProps } from '../../../dist/components/Flex/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
-
9
- let props = Astro.props || {};
10
3
  ---
11
4
 
12
- <Lism {...getFlexProps(props)}>
13
- <slot />
14
- </Lism>
5
+ <Lism layout='flex' {...Astro.props}><slot /></Lism>
@@ -1,2 +1 @@
1
1
  export { default as Flex } from './Flex.astro';
2
- export { default as Cluster } from './Cluster.astro';
@@ -0,0 +1,5 @@
1
+ ---
2
+ import { Lism } from '../Lism';
3
+ ---
4
+
5
+ <Lism layout='flow' {...Astro.props}><slot /></Lism>
@@ -0,0 +1 @@
1
+ export { default as Flow } from './Flow.astro';
@@ -1,12 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
2
  import { Lism } from '../Lism';
4
- import getProps from '../../../dist/components/Frame/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
-
9
- const props = Astro.props || {};
10
3
  ---
11
4
 
12
- <Lism {...getProps(props)}><slot /></Lism>
5
+ <Lism layout='frame' {...Astro.props}><slot /></Lism>
@@ -1,13 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
2
  import { Lism } from '../Lism';
4
- import { getGridProps } from '../../../dist/components/Grid/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
- let props = Astro.props;
9
3
  ---
10
4
 
11
- <Lism {...getGridProps(props)}>
12
- <slot />
13
- </Lism>
5
+ <Lism layout='grid' {...Astro.props}><slot /></Lism>
@@ -1,2 +1 @@
1
1
  export { default as Grid } from './Grid.astro';
2
- export { default as GridItem } from './GridItem.astro';
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='a' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='button' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='div' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,6 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ const { lv = '1', ...props } = Astro.props;
4
+ ---
5
+
6
+ <Lism tag={`h${lv}`} {...props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='img' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,12 @@
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 };
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='li' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='ol' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='p' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='span' {...Astro.props}><slot /></Lism>
@@ -0,0 +1,5 @@
1
+ ---
2
+ import Lism from '../Lism/Lism.astro';
3
+ ---
4
+
5
+ <Lism tag='ul' {...Astro.props}><slot /></Lism>
@@ -1,7 +1,7 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import getLismProps from '../../../dist/lib/getLismProps';
4
- import getProps from '../../../dist/components/Icon/getProps';
4
+ import getProps from '../../../dist/components/atomic/Icon/getProps';
5
5
  import SVG from './SVG.astro';
6
6
 
7
7
  // Propsの定義
@@ -28,6 +28,4 @@ if (Component === '_SVG_') {
28
28
  }
29
29
  ---
30
30
 
31
- <Component {...getLismProps(lismProps)} {...exProps}>
32
- <slot />
33
- </Component>
31
+ <Component {...getLismProps(lismProps)} {...exProps}><slot /></Component>
@@ -1,15 +1,8 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
2
  import { Lism } from '../Lism';
4
- import { getLayerProps } from '../../../dist/components/Layer/getProps';
5
-
6
- // Propsの定義
7
- interface Props extends LismProps {}
8
-
9
- let { layout, ...props } = Astro.props || {};
10
- const Layout = layout || Lism;
3
+ import getFilterProps from '../../../dist/components/getFilterProps';
11
4
  ---
12
5
 
13
- <Layout isLayer {...getLayerProps(props)}>
6
+ <Lism isLayer {...getFilterProps(Astro.props, 'backdropFilter')}>
14
7
  <slot />
15
- </Layout>
8
+ </Lism>
@@ -1,16 +1,15 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
  // import getProps from '../../../dist/components/LinkBox/getProps';
5
5
 
6
6
  interface Props extends LismProps {}
7
- const { layout, ...props } = Astro.props || {};
7
+ const props = Astro.props || {};
8
8
 
9
9
  const hasHref = !!props.href;
10
10
  const tag = hasHref ? 'a' : 'div';
11
- const LismComponent = layout || Lism;
12
11
  ---
13
12
 
14
- <LismComponent isLinkBox hov='op' tag={tag} {...props}>
13
+ <Lism isLinkBox tag={tag} {...props}>
15
14
  <slot />
16
- </LismComponent>
15
+ </Lism>
@@ -1,10 +1,10 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import Lism from './Lism.astro';
4
4
 
5
5
  interface Props extends LismProps {}
6
6
  ---
7
7
 
8
- <Lism skipState tag='a' {...Astro.props || {}}>
8
+ <Lism tag='a' {...Astro.props || {}}>
9
9
  <slot />
10
10
  </Lism>
@@ -1,14 +1,15 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import getLismProps from '../../../dist/lib/getLismProps';
4
+ import getLayoutProps from '../../../dist/components/getLayoutProps';
4
5
 
5
6
  // Propsの定義
6
7
  interface Props extends LismProps {}
7
8
 
8
- const { as, exProps, tag, ...props } = Astro.props || {};
9
+ const { as, tag, layout, exProps, ...props } = Astro.props || {};
9
10
  const JSX = as || tag || 'div';
10
11
  ---
11
12
 
12
- <JSX {...getLismProps(props)} {...exProps}>
13
+ <JSX {...getLismProps(getLayoutProps(layout, props))} {...exProps}>
13
14
  <slot />
14
15
  </JSX>
@@ -1,10 +1,10 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import Lism from './Lism.astro';
4
4
 
5
5
  interface Props extends LismProps {}
6
6
  ---
7
7
 
8
- <Lism skipState tag='p' {...Astro.props || {}}>
8
+ <Lism tag='p' {...Astro.props || {}}>
9
9
  <slot />
10
10
  </Lism>
@@ -1,4 +1,3 @@
1
1
  export { default as Lism } from './Lism.astro';
2
2
  export { default as Text } from './Text.astro';
3
- export { default as Media } from './Media.astro';
4
3
  export { default as Link } from './Link.astro';
@@ -1,16 +1,8 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
2
  import getLismProps from '../../../dist/lib/getLismProps';
4
- import getMediaProps from '../../../dist/components/getMediaProps';
3
+ import getMediaProps from '../../../dist/components/atomic/Media/getProps';
5
4
  import { Image } from 'astro:assets';
6
5
 
7
- // Propsの定義
8
- interface Props extends LismProps {
9
- // src?: string;
10
- // alt?: string;
11
- // width?: string | number;
12
- // height?: string | number;
13
- }
14
6
  const { as, exProps, tag, ...props } = Astro.props || {};
15
7
 
16
8
  let JSX = as || tag || 'img';
@@ -0,0 +1 @@
1
+ export { default as Media } from './Media.astro';
@@ -1,14 +1,13 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { defaultProps } from '../../../dist/components/Modal/getProps';
4
4
  import { Lism } from '../Lism';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
8
- const { layout, ...props } = Astro.props || {};
9
- const Layout = layout || Lism;
8
+ const props = Astro.props || {};
10
9
  ---
11
10
 
12
- <Layout {...defaultProps.body} {...props}>
11
+ <Lism {...defaultProps.body} {...props}>
13
12
  <slot />
14
- </Layout>
13
+ </Lism>
@@ -0,0 +1,24 @@
1
+ ---
2
+ import type { LismProps } from '../../types';
3
+ import { defaultProps } from '../../../dist/components/Modal/getProps';
4
+ import { Lism } from '../Lism';
5
+ import { Icon } from '../Icon';
6
+
7
+ // Propsの定義
8
+ interface Props extends LismProps {}
9
+ const { modalId = '', icon, srText = 'Close', ...props } = Astro.props || {};
10
+ const btnProps = { ...defaultProps.closeBtn, ...props };
11
+ ---
12
+
13
+ {
14
+ Astro.slots.has('default') ? (
15
+ <Lism data-modal-close={modalId} {...btnProps}>
16
+ <slot />
17
+ </Lism>
18
+ ) : (
19
+ <Lism data-modal-close={modalId} {...btnProps}>
20
+ <Icon icon={icon || 'x'} />
21
+ <span class='u-hidden'>{srText || 'Close'}</span>
22
+ </Lism>
23
+ )
24
+ }
@@ -1,13 +1,13 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { defaultProps } from '../../../dist/components/Modal/getProps';
4
- import { Stack } from '../Stack';
4
+ import { Lism } from '../Lism';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
8
8
  const props = Astro.props || {};
9
9
  ---
10
10
 
11
- <Stack {...defaultProps.inner} {...props}>
11
+ <Lism {...defaultProps.inner} {...props}>
12
12
  <slot />
13
- </Stack>
13
+ </Lism>
@@ -1,17 +1,16 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { getProps } from '../../../dist/components/Modal/getProps';
4
4
  import { Lism } from '../Lism';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
8
- const { layout, ...props } = Astro.props || {};
9
- const Layout = layout || Lism;
8
+ const props = Astro.props || {};
10
9
  ---
11
10
 
12
- <Layout tag='dialog' {...getProps(props)}>
11
+ <Lism {...getProps(props)}>
13
12
  <slot />
14
- </Layout>
13
+ </Lism>
15
14
 
16
15
  <script>
17
16
  import setModal from '../../../dist/components/Modal/setModal';
@@ -0,0 +1,14 @@
1
+ ---
2
+ import type { LismProps } from '../../types';
3
+ import { defaultProps } from '../../../dist/components/Modal/getProps';
4
+ import { Lism } from '../Lism';
5
+
6
+ // Propsの定義
7
+ interface Props extends LismProps {}
8
+ const { modalId = '', ...props } = Astro.props || {};
9
+ const btnProps = { ...defaultProps.openBtn, ...props };
10
+ ---
11
+
12
+ <Lism data-modal-open={modalId} {...btnProps}>
13
+ <slot />
14
+ </Lism>
@@ -1,8 +1,7 @@
1
1
  import Root from './Modal.astro';
2
2
  import Inner from './Inner.astro';
3
3
  import Body from './Body.astro';
4
- import CloseIconBtn from './CloseIconBtn.astro';
5
- import Header from './Header.astro';
6
- import Footer from './Footer.astro';
4
+ import CloseBtn from './CloseBtn.astro';
5
+ import OpenBtn from './OpenBtn.astro';
7
6
 
8
- export default { Root, Inner, Body, CloseIconBtn, Header, Footer };
7
+ export default { Root, Inner, Body, CloseBtn, OpenBtn };
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
  import getOverlayLinkProps from '../../../dist/components/OverlayLink/getProps';
5
5
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
- import getProps from '../../../dist/components/Spacer/getProps';
4
+ import getProps from '../../../dist/components/atomic/Spacer/getProps';
5
5
 
6
6
  // Propsの定義
7
7
  interface Props extends LismProps {}
8
8
  const props = Astro.props || {};
9
9
  ---
10
10
 
11
- <Lism skipState {...getProps(props)} />
11
+ <Lism {...getProps(props)} />
@@ -1,7 +1,5 @@
1
1
  ---
2
- import Flex from '../Flex/Flex.astro';
2
+ import { Lism } from '../Lism';
3
3
  ---
4
4
 
5
- <Flex _flex='stack' {...Astro.props}>
6
- <slot />
7
- </Flex>
5
+ <Lism layout='stack' {...Astro.props}><slot /></Lism>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
 
5
5
  export interface Props extends LismProps {
@@ -12,15 +12,6 @@ const { tabId = 'tab', index = 0, isActive, ...props } = Astro.props;
12
12
  const controlId = `${tabId}-${index}`;
13
13
  ---
14
14
 
15
- <Lism
16
- tag='button'
17
- lismClass='d--tabs_tab'
18
- className='re--style'
19
- role='tab'
20
- aria-controls={controlId}
21
- aria-selected={isActive ? 'true' : 'false'}
22
- skipState
23
- {...props}
24
- >
15
+ <Lism tag='button' lismClass='d--tabs_tab' setPlain role='tab' aria-controls={controlId} aria-selected={isActive ? 'true' : 'false'} {...props}>
25
16
  <slot />
26
17
  </Lism>
@@ -1,8 +1,8 @@
1
1
  ---
2
- // import type { LismProps } from '../types';
3
- import { Flex } from '../Flex';
2
+ // import type { LismProps } from '../../types';
3
+ import { Lism } from '../Lism';
4
4
  ---
5
5
 
6
- <Flex lismClass='d--tabs_list' role='tablist' {...Astro.props}>
6
+ <Lism lismClass='d--tabs_list' role='tablist' {...Astro.props}>
7
7
  <slot />
8
- </Flex>
8
+ </Lism>
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
 
5
5
  export interface Props extends LismProps {
@@ -1,10 +1,10 @@
1
1
  ---
2
- import type { LismProps } from '../types';
3
- import { Grid } from '../Grid';
2
+ import type { LismProps } from '../../types';
3
+ import { Lism } from '../Lism';
4
4
  // import Tab from './Tab.astro';
5
5
  // import TabPanel from './TabPanel.astro';
6
6
  import TabList from './TabList.astro';
7
- import { uuidv4 } from '../helper/index.js';
7
+ import { uuidv4 } from '../helper.js';
8
8
  import transformTabitems from './transformTabitems.js';
9
9
  import getTabsProps from '../../../dist/components/Tabs/getProps';
10
10
 
@@ -23,16 +23,12 @@ const { defaultIndex = 1, tabId = '', listProps = {}, ...props } = Astro.props |
23
23
  const theTabID = tabId ? tabId : uuidv4();
24
24
 
25
25
  // 子要素の方から順番に処理されていくので、文字列処理でデータを抽出
26
- const { btns, panels } = transformTabitems(
27
- await Astro.slots.render('default'),
28
- theTabID,
29
- defaultIndex
30
- );
26
+ const { btns, panels } = transformTabitems(await Astro.slots.render('default'), theTabID, defaultIndex);
31
27
 
32
28
  const hasItems = btns.length > 0;
33
29
  ---
34
30
 
35
- <Grid {...getTabsProps(props)}>
31
+ <Lism {...getTabsProps(props)}>
36
32
  {
37
33
  btns && (
38
34
  <TabList {...listProps}>
@@ -48,7 +44,7 @@ const hasItems = btns.length > 0;
48
44
  })
49
45
  }
50
46
  {!hasItems && <slot />}
51
- </Grid>
47
+ </Lism>
52
48
 
53
49
  <script>
54
50
  // import setEvent from './setEvent';
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
4
 
5
5
  // Propsの定義