lism-css 0.3.5 → 0.5.1

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 (254) 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/css/base.css +1 -0
  76. package/dist/css/main.css +1 -0
  77. package/dist/css/main_no_layer.css +1 -0
  78. package/dist/css/modules/atomic.css +1 -0
  79. package/dist/css/modules/dynamic.css +1 -0
  80. package/dist/css/modules/layout.css +1 -0
  81. package/dist/css/modules/state.css +1 -0
  82. package/dist/css/props.css +1 -0
  83. package/dist/css/reset.css +1 -0
  84. package/dist/css/utility.css +1 -0
  85. package/dist/index.js +50 -50
  86. package/dist/lib/getBpData.js +1 -1
  87. package/dist/lib/getLismProps.js +109 -177
  88. package/dist/lib/getMaybeCssVar.js +30 -54
  89. package/dist/lib/getMaybeTokenValue.js +26 -0
  90. package/dist/lib/getUtilKey.js +13 -0
  91. package/dist/lib/isPresetValue.js +3 -3
  92. package/dist/lib/isTokenValue.js +6 -5
  93. package/package.json +16 -3
  94. package/packages/astro/Accordion/AccBody.astro +5 -6
  95. package/packages/astro/Accordion/AccHeader.astro +4 -4
  96. package/packages/astro/Accordion/AccHeaderLabel.astro +12 -0
  97. package/packages/astro/Accordion/AccIcon.astro +1 -1
  98. package/packages/astro/Accordion/AccLabel.astro +1 -1
  99. package/packages/astro/Accordion/Accordion.astro +1 -1
  100. package/packages/astro/Accordion/index.js +2 -1
  101. package/packages/astro/Box/Box.astro +2 -3
  102. package/packages/astro/Center/Center.astro +2 -8
  103. package/packages/astro/Cluster/Cluster.astro +5 -0
  104. package/packages/astro/Cluster/index.js +1 -0
  105. package/packages/astro/Columns/Columns.astro +2 -8
  106. package/packages/astro/Container/Container.astro +3 -4
  107. package/packages/astro/Decorator/Decorator.astro +2 -2
  108. package/packages/astro/Divider/Divider.astro +3 -3
  109. package/packages/astro/Dummy/Dummy.astro +3 -2
  110. package/packages/astro/Flex/Flex.astro +1 -10
  111. package/packages/astro/Flex/index.js +0 -1
  112. package/packages/astro/Flow/Flow.astro +5 -0
  113. package/packages/astro/Flow/index.js +1 -0
  114. package/packages/astro/Frame/Frame.astro +1 -8
  115. package/packages/astro/Grid/Grid.astro +1 -9
  116. package/packages/astro/Grid/index.js +0 -1
  117. package/packages/astro/HTML/a.astro +5 -0
  118. package/packages/astro/HTML/button.astro +5 -0
  119. package/packages/astro/HTML/div.astro +5 -0
  120. package/packages/astro/HTML/h.astro +6 -0
  121. package/packages/astro/HTML/img.astro +5 -0
  122. package/packages/astro/HTML/index.js +12 -0
  123. package/packages/astro/HTML/li.astro +5 -0
  124. package/packages/astro/HTML/ol.astro +5 -0
  125. package/packages/astro/HTML/p.astro +5 -0
  126. package/packages/astro/HTML/span.astro +5 -0
  127. package/packages/astro/HTML/ul.astro +5 -0
  128. package/packages/astro/Icon/Icon.astro +3 -5
  129. package/packages/astro/Layer/Layer.astro +3 -10
  130. package/packages/astro/LinkBox/LinkBox.astro +4 -5
  131. package/packages/astro/Lism/Link.astro +2 -2
  132. package/packages/astro/Lism/Lism.astro +4 -3
  133. package/packages/astro/Lism/Text.astro +2 -2
  134. package/packages/astro/Lism/index.js +0 -1
  135. package/packages/astro/{Lism → Media}/Media.astro +1 -9
  136. package/packages/astro/Media/index.js +1 -0
  137. package/packages/astro/Modal/Body.astro +4 -5
  138. package/packages/astro/Modal/CloseBtn.astro +24 -0
  139. package/packages/astro/Modal/Inner.astro +4 -4
  140. package/packages/astro/Modal/Modal.astro +4 -5
  141. package/packages/astro/Modal/OpenBtn.astro +14 -0
  142. package/packages/astro/Modal/index.js +3 -4
  143. package/packages/astro/OverlayLink/OverlayLink.astro +1 -1
  144. package/packages/astro/Spacer/Spacer.astro +3 -3
  145. package/packages/astro/Stack/Stack.astro +2 -4
  146. package/packages/astro/Tabs/Tab.astro +2 -11
  147. package/packages/astro/Tabs/TabList.astro +4 -4
  148. package/packages/astro/Tabs/TabPanel.astro +1 -1
  149. package/packages/astro/Tabs/Tabs.astro +6 -10
  150. package/packages/astro/Test/Test.astro +1 -1
  151. package/packages/astro/Test/TestItem.astro +1 -1
  152. package/packages/astro/WithSide/WithSide.astro +1 -8
  153. package/packages/astro/index.js +6 -2
  154. package/packages/types/index.d.ts +22 -26
  155. package/src/scss/{_props.scss → __props copy.scss } +146 -169
  156. package/src/scss/__props.scss +786 -0
  157. package/src/scss/_auto_output.scss +102 -76
  158. package/src/scss/_prop-config.scss +862 -0
  159. package/src/scss/_setting.scss +2 -3
  160. package/src/scss/_with_layer.scss +19 -14
  161. package/src/scss/base/_dom.scss +35 -26
  162. package/src/scss/base/_property.scss +4 -16
  163. package/src/scss/base/_tokens.scss +105 -116
  164. package/src/scss/base/index.scss +18 -42
  165. package/src/scss/base/set/_hover.scss +13 -0
  166. package/src/scss/base/set/_innerRs.scss +3 -0
  167. package/src/scss/base/set/_mask.scss +6 -0
  168. package/src/scss/base/set/_plain.scss +14 -0
  169. package/src/scss/base/set/_shadow.scss +27 -0
  170. package/src/scss/base/set/_snap.scss +8 -0
  171. package/src/scss/base/set/_transition.scss +20 -0
  172. package/src/scss/main.scss +0 -1
  173. package/src/scss/main_no_layer.scss +6 -14
  174. package/src/scss/modules/atomic/_divider.scss +6 -0
  175. package/src/scss/{layout → modules/atomic}/_icon.scss +3 -9
  176. package/src/scss/modules/atomic/_media.scss +3 -0
  177. package/src/scss/{layout → modules/atomic}/_spacer.scss +1 -1
  178. package/src/scss/modules/atomic/index.scss +6 -0
  179. package/src/scss/{dynamic → modules/dynamic}/_accordion.scss +24 -24
  180. package/src/scss/modules/dynamic/_modal.scss +33 -0
  181. package/src/scss/{dynamic → modules/dynamic}/_tabs.scss +4 -5
  182. package/src/scss/{layout/_flex.scss → modules/layout/_cluster.scss} +1 -4
  183. package/src/scss/modules/layout/_columns.scss +9 -0
  184. package/src/scss/modules/layout/_flex.scss +3 -0
  185. package/src/scss/modules/layout/_flow.scss +46 -0
  186. package/src/scss/{layout → modules/layout}/_frame.scss +1 -1
  187. package/src/scss/modules/layout/_grid.scss +35 -0
  188. package/src/scss/{layout → modules/layout}/_withSide.scss +3 -3
  189. package/src/scss/{layout → modules/layout}/index.scss +4 -6
  190. package/src/scss/modules/state/_container.scss +37 -0
  191. package/src/scss/{state → modules/state}/_linkbox.scss +1 -1
  192. package/src/scss/modules/state/index.scss +5 -0
  193. package/src/scss/props/_border.scss +25 -40
  194. package/src/scss/props/_hover.scss +12 -23
  195. package/src/scss/props/_size.scss +17 -0
  196. package/src/scss/props/index.scss +1 -2
  197. package/src/scss/reset.scss +1 -1
  198. package/src/scss/utility/_cbox.scss +5 -4
  199. package/src/scss/utility/_hidden.scss +14 -0
  200. package/src/scss/utility/_itemDivider.scss +11 -0
  201. package/src/scss/utility/_linkExpand.scss +10 -0
  202. package/src/scss/utility/_trimHL.scss +29 -13
  203. package/src/scss/utility/index.scss +3 -45
  204. package/dist/components/Box/getProps.js +0 -7
  205. package/dist/components/Columns/getProps.js +0 -6
  206. package/dist/components/Decorator/getProps.js +0 -17
  207. package/dist/components/Divider/getProps.js +0 -11
  208. package/dist/components/Divider/index.js +0 -9
  209. package/dist/components/Flex/Cluster.js +0 -8
  210. package/dist/components/Flex/FlexItem.js +0 -8
  211. package/dist/components/Flex/getProps.js +0 -13
  212. package/dist/components/Frame/getProps.js +0 -7
  213. package/dist/components/Grid/GridItem.js +0 -9
  214. package/dist/components/Grid/getProps.js +0 -28
  215. package/dist/components/Icon/getProps.js +0 -60
  216. package/dist/components/Layer/getProps.js +0 -9
  217. package/dist/components/Lism/Media.js +0 -9
  218. package/dist/components/Modal/CloseIconBtn.js +0 -19
  219. package/dist/components/Modal/Footer.js +0 -9
  220. package/dist/components/Modal/Header.js +0 -9
  221. package/dist/components/Spacer/getProps.js +0 -21
  222. package/dist/components/Spacer/index.js +0 -9
  223. package/dist/components/WithSide/getProps.js +0 -14
  224. package/dist/components/getInsetProps.js +0 -8
  225. package/dist/components/getMediaProps.js +0 -7
  226. package/dist/components/getTransformProps.js +0 -8
  227. package/dist/config/prop_list.js +0 -386
  228. package/dist/config/tokens.js +0 -43
  229. package/dist/config.js +0 -9
  230. package/dist/lib/getMaybeUtilValue.js +0 -6
  231. package/packages/astro/Flex/Cluster.astro +0 -11
  232. package/packages/astro/Grid/GridItem.astro +0 -14
  233. package/packages/astro/Modal/CloseIconBtn.astro +0 -24
  234. package/packages/astro/Modal/Footer.astro +0 -14
  235. package/packages/astro/Modal/Header.astro +0 -14
  236. package/src/scss/dynamic/_modal.scss +0 -30
  237. package/src/scss/layout/_columns.scss +0 -13
  238. package/src/scss/layout/_divider.scss +0 -3
  239. package/src/scss/layout/_grid.scss +0 -9
  240. package/src/scss/props/__memo.scss +0 -15
  241. package/src/scss/props/_color.scss +0 -7
  242. package/src/scss/props/_transition.scss +0 -20
  243. package/src/scss/state/_container.scss +0 -34
  244. package/src/scss/state/_flow.scss +0 -45
  245. package/src/scss/state/_size.scss +0 -22
  246. package/src/scss/state/index.scss +0 -12
  247. /package/dist/components/{Icon → atomic/Icon}/SVG.js +0 -0
  248. /package/dist/components/{Icon → atomic/Icon}/presets.js +0 -0
  249. /package/packages/astro/{helper/index.js → helper.js} +0 -0
  250. /package/src/scss/{dynamic → modules/dynamic}/index.scss +0 -0
  251. /package/src/scss/{layout → modules/layout}/_center.scss +0 -0
  252. /package/src/scss/{layout → modules/layout}/_stack.scss +0 -0
  253. /package/src/scss/{state → modules/state}/_gutter.scss +0 -0
  254. /package/src/scss/{state → modules/state}/_layer.scss +0 -0
@@ -1,8 +1,9 @@
1
- import t from "../config/tokens.js";
2
- function i(n, r) {
3
- if (typeof n != "string") return !1;
4
- const e = t[n];
5
- return Array.isArray(e) ? typeof r == "number" ? e.includes(`${r}`) : e.includes(r) : !1;
1
+ import { TOKENS as s } from "../config/index.js";
2
+ function i(t, e) {
3
+ if (typeof t != "string") return !1;
4
+ typeof e == "number" && (e = `${e}`);
5
+ const r = s[t];
6
+ return r instanceof Set ? r.has(e) : Array.isArray(r) ? r.includes(e) : typeof r == "object" ? (r.values || /* @__PURE__ */ new Set()).has(e) : !1;
6
7
  }
7
8
  export {
8
9
  i as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lism-css",
3
- "version": "0.3.5",
3
+ "version": "0.5.1",
4
4
  "description": "A layout-first CSS framework for websites.",
5
5
  "author": {
6
6
  "name": "ddryo",
@@ -16,13 +16,20 @@
16
16
  "dev": "vite",
17
17
  "build": "vite build && pnpm build:css",
18
18
  "build:vite": "vite build",
19
- "build:css": "node scss-builder.cjs",
19
+ "build:css": "node bin/script-build-css.js",
20
20
  "lint": "pnpm lint:style",
21
21
  "lint:style": "stylelint '**/*.{css,scss}'",
22
22
  "preview": "vite preview"
23
23
  },
24
+ "bin": {
25
+ "lism-css": "./bin/cli.mjs"
26
+ },
24
27
  "files": [
25
28
  "dist",
29
+ "config",
30
+ "config.js",
31
+ "vite-plugin.js",
32
+ "bin",
26
33
  "packages",
27
34
  "src/scss"
28
35
  ],
@@ -31,7 +38,12 @@
31
38
  "types": "./packages/types/index.d.ts",
32
39
  "exports": {
33
40
  ".": "./dist/index.js",
34
- "./*": "./dist/*",
41
+ "./config.js": "./config.js",
42
+ "./config": "./config/index.js",
43
+ "./default-config": "./config/default-config.js",
44
+ "./vite-plugin": "./vite-plugin.mjs",
45
+ "./lib/*": "./dist/lib/*",
46
+ "./components/*": "./dist/components/*",
35
47
  "./react": {
36
48
  "import": "./dist/index.js",
37
49
  "types": "./packages/types/index.d.ts"
@@ -43,6 +55,7 @@
43
55
  "types": "./packages/types/index.d.ts"
44
56
  },
45
57
  "./astro/*": "./packages/astro/*",
58
+ "./types": "./packages/types/index.d.ts",
46
59
  "./scss/*": "./src/scss/*",
47
60
  "./*.css": "./dist/css/*.css"
48
61
  },
@@ -1,15 +1,14 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import { Lism } from '../Lism';
4
- import { Grid } from '../Grid';
5
4
  import { defaultProps } from '../../../dist/components/Accordion/getProps';
6
5
 
7
6
  interface Props extends LismProps {}
8
- const { isFlow, innerProps, ...props } = Astro.props || {};
7
+ const { flow, innerProps, ...props } = Astro.props || {};
9
8
  ---
10
9
 
11
- <Grid {...defaultProps.body} {...props}>
12
- <Lism isFlow={isFlow} {...defaultProps.inner} {...innerProps}>
10
+ <Lism {...defaultProps.body} {...props}>
11
+ <Lism layout='flow' flow={flow} {...defaultProps.inner} {...innerProps}>
13
12
  <slot />
14
13
  </Lism>
15
- </Grid>
14
+ </Lism>
@@ -1,6 +1,6 @@
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
  import { defaultProps } from '../../../dist/components/Accordion/getProps';
5
5
 
6
6
  interface Props extends LismProps {}
@@ -8,6 +8,6 @@ interface Props extends LismProps {}
8
8
  const props = Astro.props || {};
9
9
  ---
10
10
 
11
- <Flex tag='summary' {...defaultProps.header} {...props}>
11
+ <Lism tag='summary' {...defaultProps.header} {...props}>
12
12
  <slot />
13
- </Flex>
13
+ </Lism>
@@ -0,0 +1,12 @@
1
+ ---
2
+ import AccHeader from './AccHeader.astro';
3
+ import AccLabel from './AccLabel.astro';
4
+ import AccIcon from './AccIcon.astro';
5
+ ---
6
+
7
+ <AccHeader {...Astro.props || {}}>
8
+ <AccLabel>
9
+ <slot />
10
+ </AccLabel>
11
+ <AccIcon />
12
+ </AccHeader>
@@ -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 { Icon } from '../Icon';
5
5
  import { getAccIconProps } from '../../../dist/components/Accordion/getProps';
@@ -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 { defaultProps } from '../../../dist/components/Accordion/getProps';
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- import type { LismProps } from '../types';
2
+ import type { LismProps } from '../../types';
3
3
  import getLismProps from '../../../dist/lib/getLismProps';
4
4
  import { getAccProps } from '../../../dist/components/Accordion/getProps';
5
5
 
@@ -3,5 +3,6 @@ import Header from './AccHeader.astro';
3
3
  import Label from './AccLabel.astro';
4
4
  import Icon from './AccIcon.astro';
5
5
  import Body from './AccBody.astro';
6
+ import HeaderLabel from './AccHeaderLabel.astro';
6
7
 
7
- export default { Root, Header, Body, Icon, Label };
8
+ export default { Root, Header, HeaderLabel, Body, Icon, Label };
@@ -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
- import getProps from '../../../dist/components/Box/getProps';
5
4
 
6
5
  // Propsの定義
7
6
  interface Props extends LismProps {}
8
7
  const props = Astro.props || {};
9
8
  ---
10
9
 
11
- <Lism {...getProps(props)}><slot /></Lism>
10
+ <Lism layout='box' {...props}><slot /></Lism>
@@ -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://cdn.lism-css.com/dummy-image.jpg' width='600' height='400' 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>