lism-css 0.11.0 → 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.
Files changed (175) hide show
  1. package/README.ja.md +5 -5
  2. package/README.md +7 -7
  3. package/config/defaults/props.ts +16 -26
  4. package/config/defaults/states.ts +0 -28
  5. package/dist/components/{atomic/Media → Media}/Media.d.ts +2 -2
  6. package/dist/components/{atomic/Media → Media}/index.js +1 -1
  7. package/dist/components/atomic/Icon/getProps.d.ts +1 -1
  8. package/dist/components/atomic/Icon/index.d.ts +1 -1
  9. package/dist/components/index.d.ts +18 -18
  10. package/dist/components/index.js +62 -62
  11. package/dist/components/{Box → layout/Box}/Box.d.ts +2 -2
  12. package/dist/components/{Box → layout/Box}/index.js +1 -1
  13. package/dist/components/{Center → layout/Center}/Center.d.ts +2 -2
  14. package/dist/components/{Center → layout/Center}/index.js +1 -1
  15. package/dist/components/{Cluster → layout/Cluster}/Cluster.d.ts +2 -2
  16. package/dist/components/{Cluster → layout/Cluster}/index.js +1 -1
  17. package/dist/components/{Columns → layout/Columns}/Columns.d.ts +2 -2
  18. package/dist/components/{Columns → layout/Columns}/index.js +1 -1
  19. package/dist/components/{Flex → layout/Flex}/Flex.d.ts +2 -2
  20. package/dist/components/{Flex → layout/Flex}/index.js +1 -1
  21. package/dist/components/{Flow → layout/Flow}/Flow.d.ts +2 -2
  22. package/dist/components/{Flow → layout/Flow}/index.js +1 -1
  23. package/dist/components/{FluidCols → layout/FluidCols}/FluidCols.d.ts +2 -2
  24. package/dist/components/{FluidCols → layout/FluidCols}/index.js +1 -1
  25. package/dist/components/{Frame → layout/Frame}/Frame.d.ts +2 -2
  26. package/dist/components/{Frame → layout/Frame}/index.js +1 -1
  27. package/dist/components/{Grid → layout/Grid}/Grid.d.ts +2 -2
  28. package/dist/components/{Grid → layout/Grid}/index.js +1 -1
  29. package/dist/components/{SideMain → layout/SideMain}/SideMain.d.ts +2 -2
  30. package/dist/components/{SideMain → layout/SideMain}/index.js +1 -1
  31. package/dist/components/{Stack → layout/Stack}/Stack.d.ts +2 -2
  32. package/dist/components/{Stack → layout/Stack}/index.js +1 -1
  33. package/dist/components/{SwitchCols → layout/SwitchCols}/SwitchCols.d.ts +2 -2
  34. package/dist/components/{SwitchCols → layout/SwitchCols}/index.js +1 -1
  35. package/dist/components/layout/TileGrid/TileGrid.d.ts +4 -0
  36. package/dist/components/layout/TileGrid/index.d.ts +1 -0
  37. package/dist/components/layout/TileGrid/index.js +8 -0
  38. package/dist/components/{Container → state/Container}/Container.d.ts +1 -1
  39. package/dist/components/{Container → state/Container}/index.js +1 -1
  40. package/dist/components/{Layer → state/Layer}/Layer.d.ts +1 -1
  41. package/dist/components/{Layer → state/Layer}/index.js +1 -1
  42. package/dist/components/{LinkBox → state/LinkBox}/LinkBox.d.ts +1 -1
  43. package/dist/components/{LinkBox → state/LinkBox}/index.js +1 -1
  44. package/dist/components/{Wrapper → state/Wrapper}/Wrapper.d.ts +1 -1
  45. package/dist/components/{Wrapper → state/Wrapper}/index.js +1 -1
  46. package/dist/config/default-config.d.ts +24 -71
  47. package/dist/config/defaults/props.d.ts +24 -58
  48. package/dist/config/defaults/props.js +16 -26
  49. package/dist/config/defaults/states.d.ts +0 -13
  50. package/dist/config/defaults/states.js +3 -23
  51. package/dist/config/index.d.ts +48 -142
  52. package/dist/css/base.css +1 -1
  53. package/dist/css/main.css +1 -1
  54. package/dist/css/main_no_layer.css +1 -1
  55. package/dist/css/modules/layout.css +1 -1
  56. package/dist/css/props.css +1 -1
  57. package/dist/lib/getLayoutProps.js +12 -15
  58. package/dist/lib/getLismProps.d.ts +3 -2
  59. package/dist/lib/getLismProps.js +91 -89
  60. package/dist/lib/helper/mergeSet.d.ts +5 -0
  61. package/dist/lib/helper/mergeSet.js +14 -0
  62. package/dist/lib/helper/mergeSet.test.d.ts +1 -0
  63. package/dist/lib/types/LayoutProps.d.ts +4 -1
  64. package/dist/lib/types/StateProps.d.ts +5 -3
  65. package/package.json +1 -1
  66. package/packages/astro/{Decorator → atomic/Decorator}/Decorator.astro +1 -1
  67. package/packages/astro/{Divider → atomic/Divider}/Divider.astro +2 -2
  68. package/packages/astro/{Icon → atomic/Icon}/Icon.astro +1 -1
  69. package/packages/astro/{Spacer → atomic/Spacer}/Spacer.astro +2 -2
  70. package/packages/astro/index.ts +26 -22
  71. package/packages/astro/{Box → layout/Box}/Box.astro +2 -2
  72. package/packages/astro/{Center → layout/Center}/Center.astro +2 -2
  73. package/packages/astro/{Cluster → layout/Cluster}/Cluster.astro +2 -2
  74. package/packages/astro/{Columns → layout/Columns}/Columns.astro +2 -2
  75. package/packages/astro/{Flex → layout/Flex}/Flex.astro +2 -2
  76. package/packages/astro/{Flow → layout/Flow}/Flow.astro +2 -2
  77. package/packages/astro/{FluidCols → layout/FluidCols}/FluidCols.astro +2 -2
  78. package/packages/astro/{Frame → layout/Frame}/Frame.astro +2 -2
  79. package/packages/astro/{Grid → layout/Grid}/Grid.astro +2 -2
  80. package/packages/astro/{SideMain → layout/SideMain}/SideMain.astro +2 -2
  81. package/packages/astro/{Stack → layout/Stack}/Stack.astro +2 -2
  82. package/packages/astro/{SwitchCols → layout/SwitchCols}/SwitchCols.astro +2 -2
  83. package/packages/astro/layout/TileGrid/TileGrid.astro +11 -0
  84. package/packages/astro/layout/TileGrid/index.ts +1 -0
  85. package/packages/astro/{Container → state/Container}/Container.astro +2 -2
  86. package/packages/astro/{Layer → state/Layer}/Layer.astro +2 -2
  87. package/packages/astro/{LinkBox → state/LinkBox}/LinkBox.astro +2 -2
  88. package/packages/astro/{Wrapper → state/Wrapper}/Wrapper.astro +2 -2
  89. package/src/scss/_auto_output.scss +1 -1
  90. package/src/scss/_prop-config.scss +24 -26
  91. package/src/scss/_with_layer.scss +4 -4
  92. package/src/scss/base/_html.scss +8 -8
  93. package/src/scss/base/tokens/_tokens.scss +0 -2
  94. package/src/scss/modules/layout/_grid.scss +0 -5
  95. package/src/scss/modules/layout/_tileGrid.scss +4 -0
  96. package/src/scss/modules/layout/index.scss +1 -0
  97. package/src/scss/props/index.scss +1 -1
  98. package/src/scss/utility/_cbox.scss +1 -1
  99. package/src/scss/utility/_clipText.scss +1 -1
  100. package/config/helper/getSvgUrl.ts +0 -26
  101. package/dist/components/HTML/HTML.d.ts +0 -26
  102. package/dist/components/HTML/index.d.ts +0 -14
  103. package/dist/components/HTML/index.js +0 -5
  104. package/dist/components/HTML/index2.js +0 -45
  105. package/dist/config/helper/getSvgUrl.d.ts +0 -5
  106. package/dist/config/helper/getSvgUrl.js +0 -4
  107. package/packages/astro/HTML/_index_memo.js +0 -29
  108. package/packages/astro/HTML/a.astro +0 -10
  109. package/packages/astro/HTML/button.astro +0 -10
  110. package/packages/astro/HTML/div.astro +0 -10
  111. package/packages/astro/HTML/h.astro +0 -13
  112. package/packages/astro/HTML/img.astro +0 -10
  113. package/packages/astro/HTML/index.ts +0 -12
  114. package/packages/astro/HTML/li.astro +0 -10
  115. package/packages/astro/HTML/ol.astro +0 -10
  116. package/packages/astro/HTML/p.astro +0 -10
  117. package/packages/astro/HTML/span.astro +0 -10
  118. package/packages/astro/HTML/ul.astro +0 -10
  119. /package/dist/components/{atomic/Media → Media}/Media.stories.d.ts +0 -0
  120. /package/dist/components/{atomic/Media → Media}/index.d.ts +0 -0
  121. /package/dist/components/{Box → layout/Box}/Box.stories.d.ts +0 -0
  122. /package/dist/components/{Box → layout/Box}/index.d.ts +0 -0
  123. /package/dist/components/{Center → layout/Center}/Center.stories.d.ts +0 -0
  124. /package/dist/components/{Center → layout/Center}/index.d.ts +0 -0
  125. /package/dist/components/{Cluster → layout/Cluster}/Cluster.stories.d.ts +0 -0
  126. /package/dist/components/{Cluster → layout/Cluster}/index.d.ts +0 -0
  127. /package/dist/components/{Columns → layout/Columns}/Columns.stories.d.ts +0 -0
  128. /package/dist/components/{Columns → layout/Columns}/index.d.ts +0 -0
  129. /package/dist/components/{Flex → layout/Flex}/Flex.stories.d.ts +0 -0
  130. /package/dist/components/{Flex → layout/Flex}/index.d.ts +0 -0
  131. /package/dist/components/{Flow → layout/Flow}/Flow.stories.d.ts +0 -0
  132. /package/dist/components/{Flow → layout/Flow}/index.d.ts +0 -0
  133. /package/dist/components/{FluidCols → layout/FluidCols}/FluidCols.stories.d.ts +0 -0
  134. /package/dist/components/{FluidCols → layout/FluidCols}/index.d.ts +0 -0
  135. /package/dist/components/{Frame → layout/Frame}/Frame.stories.d.ts +0 -0
  136. /package/dist/components/{Frame → layout/Frame}/index.d.ts +0 -0
  137. /package/dist/components/{Grid → layout/Grid}/Grid.stories.d.ts +0 -0
  138. /package/dist/components/{Grid → layout/Grid}/index.d.ts +0 -0
  139. /package/dist/components/{SideMain → layout/SideMain}/SideMain.stories.d.ts +0 -0
  140. /package/dist/components/{SideMain → layout/SideMain}/index.d.ts +0 -0
  141. /package/dist/components/{Stack → layout/Stack}/Stack.stories.d.ts +0 -0
  142. /package/dist/components/{Stack → layout/Stack}/index.d.ts +0 -0
  143. /package/dist/components/{SwitchCols → layout/SwitchCols}/SwitchCols.stories.d.ts +0 -0
  144. /package/dist/components/{SwitchCols → layout/SwitchCols}/index.d.ts +0 -0
  145. /package/dist/components/{Container → state/Container}/Container.stories.d.ts +0 -0
  146. /package/dist/components/{Container → state/Container}/index.d.ts +0 -0
  147. /package/dist/components/{Layer → state/Layer}/Layer.stories.d.ts +0 -0
  148. /package/dist/components/{Layer → state/Layer}/Layer.test.d.ts +0 -0
  149. /package/dist/components/{Layer → state/Layer}/index.d.ts +0 -0
  150. /package/dist/components/{LinkBox → state/LinkBox}/LinkBox.stories.d.ts +0 -0
  151. /package/dist/components/{LinkBox → state/LinkBox}/index.d.ts +0 -0
  152. /package/dist/components/{LinkBox → state/LinkBox}/script.d.ts +0 -0
  153. /package/dist/components/{Wrapper → state/Wrapper}/Wrapper.stories.d.ts +0 -0
  154. /package/dist/components/{Wrapper → state/Wrapper}/index.d.ts +0 -0
  155. /package/packages/astro/{Decorator → atomic/Decorator}/index.ts +0 -0
  156. /package/packages/astro/{Divider → atomic/Divider}/index.ts +0 -0
  157. /package/packages/astro/{Icon → atomic/Icon}/SVG.astro +0 -0
  158. /package/packages/astro/{Icon → atomic/Icon}/index.ts +0 -0
  159. /package/packages/astro/{Spacer → atomic/Spacer}/index.ts +0 -0
  160. /package/packages/astro/{Box → layout/Box}/index.ts +0 -0
  161. /package/packages/astro/{Center → layout/Center}/index.ts +0 -0
  162. /package/packages/astro/{Cluster → layout/Cluster}/index.ts +0 -0
  163. /package/packages/astro/{Columns → layout/Columns}/index.ts +0 -0
  164. /package/packages/astro/{Flex → layout/Flex}/index.ts +0 -0
  165. /package/packages/astro/{Flow → layout/Flow}/index.ts +0 -0
  166. /package/packages/astro/{FluidCols → layout/FluidCols}/index.ts +0 -0
  167. /package/packages/astro/{Frame → layout/Frame}/index.ts +0 -0
  168. /package/packages/astro/{Grid → layout/Grid}/index.ts +0 -0
  169. /package/packages/astro/{SideMain → layout/SideMain}/index.ts +0 -0
  170. /package/packages/astro/{Stack → layout/Stack}/index.ts +0 -0
  171. /package/packages/astro/{SwitchCols → layout/SwitchCols}/index.ts +0 -0
  172. /package/packages/astro/{Container → state/Container}/index.ts +0 -0
  173. /package/packages/astro/{Layer → state/Layer}/index.ts +0 -0
  174. /package/packages/astro/{LinkBox → state/LinkBox}/index.ts +0 -0
  175. /package/packages/astro/{Wrapper → state/Wrapper}/index.ts +0 -0
@@ -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,5 +0,0 @@
1
- import { button as o, li as t, ol as a, ul as i, h as l, a as p, img as m, span as n, p as r, div as s } from "./index2.js";
2
- const d = { div: s, p: r, span: n, img: m, a: p, h: l, ul: i, ol: a, li: t, button: o };
3
- export {
4
- d as default
5
- };
@@ -1,45 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import r from "../Lism/index.js";
3
- function s(n) {
4
- return /* @__PURE__ */ t(r, { as: "div", ...n });
5
- }
6
- function f(n) {
7
- return /* @__PURE__ */ t(r, { as: "p", ...n });
8
- }
9
- function c(n) {
10
- return /* @__PURE__ */ t(r, { as: "span", ...n });
11
- }
12
- function e(n) {
13
- return /* @__PURE__ */ t(r, { as: "a", ...n });
14
- }
15
- function m({ lv: n = "1", ...u }) {
16
- const o = `h${n}`;
17
- return /* @__PURE__ */ t(r, { as: o, ...u });
18
- }
19
- function p(n) {
20
- return /* @__PURE__ */ t(r, { as: "img", ...n });
21
- }
22
- function l(n) {
23
- return /* @__PURE__ */ t(r, { as: "ul", ...n });
24
- }
25
- function g(n) {
26
- return /* @__PURE__ */ t(r, { as: "ol", ...n });
27
- }
28
- function b(n) {
29
- return /* @__PURE__ */ t(r, { as: "li", ...n });
30
- }
31
- function d(n) {
32
- return /* @__PURE__ */ t(r, { as: "button", ...n });
33
- }
34
- export {
35
- e as a,
36
- d as button,
37
- s as div,
38
- m as h,
39
- p as img,
40
- b as li,
41
- g as ol,
42
- f as p,
43
- c as span,
44
- l as ul
45
- };
@@ -1,5 +0,0 @@
1
- /**
2
- * svgをcssの image url に変換
3
- */
4
- declare const getSvgUrl: (svg: string, encode?: string) => string;
5
- export default getSvgUrl;
@@ -1,4 +0,0 @@
1
- const a = (e, r = "") => e ? r === "base64" ? (e = Buffer.from(e).toString("base64"), `url(data:image/svg+xml;base64,${e})`) : (e = e.replace(/'/g, '"'), e = e.replace(/="#/g, '="%23'), `url('data:image/svg+xml,${e}')`) : "";
2
- export {
3
- a as default
4
- };
@@ -1,29 +0,0 @@
1
- // コンポーネントを動的に生成するユーティリティを使った方法.( Astro アプデで動かなくなるリスクあり)
2
-
3
- import { createComponent, renderComponent } from 'astro/runtime/server/index.js';
4
- import Lism from '../Lism/Lism.astro';
5
-
6
- // <Lism as="*"> の薄いラッパーを動的に生成するユーティリティ
7
- const createHTMLComponent = (tag, baseProps = {}) =>
8
- createComponent((result, props = {}, slots = {}) => {
9
- return renderComponent(result, 'Lism', Lism, { as: tag, ...baseProps, ...props }, slots);
10
- });
11
-
12
- // 見出しだけ lv でタグ名を変える
13
- const createHeadingComponent = () =>
14
- createComponent((result, props = {}, slots = {}) => {
15
- const { lv = '1', ...rest } = props;
16
- return renderComponent(result, 'Lism', Lism, { as: `h${lv}`, ...rest }, slots);
17
- });
18
-
19
- // よく使うタグをまとめてラップ
20
- const tags = ['div', 'p', 'span', 'a', 'img', 'ul', 'ol', 'li'];
21
- const HTML = Object.fromEntries(tags.map((tag) => [tag, createHTMLComponent(tag)]));
22
-
23
- // button だけ setPlain を付与
24
- HTML.button = createHTMLComponent('button', { setPlain: true });
25
-
26
- // h1~h6 を lv で分岐
27
- HTML.h = createHeadingComponent();
28
-
29
- export default HTML;
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.AnchorHTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="a" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.ButtonHTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="button" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="div" {...props}><slot /></Lism>
@@ -1,13 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps &
6
- Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps> & {
7
- lv?: '1' | '2' | '3' | '4' | '5' | '6';
8
- };
9
-
10
- const { lv = '1', ...props } = Astro.props;
11
- ---
12
-
13
- <Lism as={`h${lv}`} {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.ImgHTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="img" {...props}><slot /></Lism>
@@ -1,12 +0,0 @@
1
- import div from './div.astro';
2
- import p from './p.astro';
3
- import h from './h.astro';
4
- import span from './span.astro';
5
- import a from './a.astro';
6
- import button from './button.astro';
7
- import img from './img.astro';
8
- import ul from './ul.astro';
9
- import ol from './ol.astro';
10
- import li from './li.astro';
11
-
12
- export default { div, p, h, span, img, a, button, ul, ol, li };
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.LiHTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="li" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.OlHTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="ol" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="p" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="span" {...props}><slot /></Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { AstroLismBaseProps } from '../types';
3
- import Lism from '../Lism/Lism.astro';
4
-
5
- type Props = AstroLismBaseProps & Omit<astroHTML.JSX.HTMLAttributes, keyof AstroLismBaseProps>;
6
-
7
- const props = Astro.props;
8
- ---
9
-
10
- <Lism as="ul" {...props}><slot /></Lism>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes