lism-css 0.8.3 → 0.9.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 (200) hide show
  1. package/bin/script-build-css.js +1 -1
  2. package/config/__prop_list.js +1 -1
  3. package/config/default-config.ts +9 -0
  4. package/config/defaults/__props-memo.js +4 -4
  5. package/config/defaults/{props.js → props.ts} +8 -8
  6. package/config/defaults/{states.js → states.ts} +14 -13
  7. package/config/defaults/{tokens.js → tokens.ts} +1 -1
  8. package/config/helper/{getSvgUrl.js → getSvgUrl.ts} +1 -3
  9. package/config/helper/{minifyHtml.js → minifyHtml.ts} +1 -1
  10. package/config/helper.test.ts +238 -0
  11. package/config/helper.ts +79 -0
  12. package/config/{index.js → index.ts} +17 -4
  13. package/config/tsconfig.json +18 -0
  14. package/config.d.ts +2 -0
  15. package/config.js +1 -1
  16. package/dist/components/Box/Box.d.ts +4 -1
  17. package/dist/components/Box/index.d.ts +1 -1
  18. package/dist/components/Center/Center.d.ts +4 -1
  19. package/dist/components/Center/index.d.ts +1 -1
  20. package/dist/components/Cluster/Cluster.d.ts +4 -1
  21. package/dist/components/Cluster/index.js +2 -2
  22. package/dist/components/Columns/Columns.d.ts +4 -1
  23. package/dist/components/Container/Container.d.ts +6 -4
  24. package/dist/components/Dummy/Dummy.d.ts +10 -8
  25. package/dist/components/Dummy/getContent.d.ts +13 -7
  26. package/dist/components/Dummy/getContent.js +7 -6
  27. package/dist/components/Dummy/index.js +8 -7
  28. package/dist/components/Flex/Flex.d.ts +4 -1
  29. package/dist/components/Flow/Flow.d.ts +4 -1
  30. package/dist/components/Flow/index.d.ts +1 -1
  31. package/dist/components/FluidCols/FluidCols.d.ts +4 -1
  32. package/dist/components/Frame/Frame.d.ts +4 -1
  33. package/dist/components/Grid/Grid.d.ts +4 -1
  34. package/dist/components/HTML/HTML.d.ts +16 -13
  35. package/dist/components/HTML/index.d.ts +13 -13
  36. package/dist/components/HTML/index.js +3 -3
  37. package/dist/components/HTML/index2.js +30 -29
  38. package/dist/components/Layer/Layer.d.ts +6 -1
  39. package/dist/components/Layer/Layer.test.d.ts +1 -0
  40. package/dist/components/Layer/getProps.d.ts +5 -1
  41. package/dist/components/LinkBox/LinkBox.d.ts +4 -4
  42. package/dist/components/LinkBox/script.d.ts +3 -0
  43. package/dist/components/Lism/Lism.d.ts +28 -7
  44. package/dist/components/Lism/Lism.stories.d.ts +667 -0
  45. package/dist/components/Lism/Lism.test.d.ts +1 -0
  46. package/dist/components/Lism/index.d.ts +1 -3
  47. package/dist/components/Lism/index.js +3 -3
  48. package/dist/components/SideMain/SideMain.d.ts +4 -1
  49. package/dist/components/Stack/Stack.d.ts +4 -1
  50. package/dist/components/SwitchCols/SwitchCols.d.ts +4 -1
  51. package/dist/components/Wrapper/Wrapper.d.ts +6 -4
  52. package/dist/components/atomic/Decorator/Decorator.d.ts +2 -1
  53. package/dist/components/atomic/Decorator/getProps.d.ts +10 -12
  54. package/dist/components/atomic/Decorator/getProps.js +10 -9
  55. package/dist/components/atomic/Divider/Divider.d.ts +2 -1
  56. package/dist/components/atomic/Divider/getProps.d.ts +2 -7
  57. package/dist/components/atomic/Divider/getProps.js +8 -7
  58. package/dist/components/atomic/Icon/Icon.d.ts +4 -3
  59. package/dist/components/atomic/Icon/SVG.d.ts +8 -9
  60. package/dist/components/atomic/Icon/getProps.d.ts +21 -12
  61. package/dist/components/atomic/Icon/getProps.js +31 -25
  62. package/dist/components/atomic/Icon/index.js +9 -8
  63. package/dist/components/atomic/Icon/presets.d.ts +2 -2
  64. package/dist/components/atomic/Media/Media.d.ts +2 -1
  65. package/dist/components/atomic/Media/getProps.d.ts +9 -1
  66. package/dist/components/atomic/Media/getProps.js +5 -6
  67. package/dist/components/atomic/Media/index.js +3 -3
  68. package/dist/components/atomic/Spacer/Spacer.d.ts +2 -1
  69. package/dist/components/atomic/Spacer/getProps.d.ts +2 -7
  70. package/dist/components/atomic/Spacer/getProps.js +8 -2
  71. package/dist/components/getFilterProps.d.ts +10 -1
  72. package/dist/components/getFilterProps.js +15 -5
  73. package/dist/components/getFilterProps.test.d.ts +1 -0
  74. package/dist/components/index.js +46 -50
  75. package/dist/components/setMaybeTransformStyles.d.ts +12 -1
  76. package/dist/components/setMaybeTransformStyles.js +4 -4
  77. package/dist/components/setMaybeTransformStyles.test.d.ts +1 -0
  78. package/dist/config/default-config.d.ts +854 -0
  79. package/dist/config/defaults/props.d.ts +812 -0
  80. package/dist/config/defaults/props.js +4 -4
  81. package/dist/config/defaults/states.d.ts +30 -0
  82. package/dist/config/defaults/states.js +12 -11
  83. package/dist/config/defaults/tokens.d.ts +28 -0
  84. package/dist/config/helper/getSvgUrl.d.ts +5 -0
  85. package/dist/config/helper/minifyHtml.d.ts +5 -0
  86. package/dist/config/helper.d.ts +21 -0
  87. package/dist/config/helper.js +14 -18
  88. package/dist/config/index.d.ts +1707 -0
  89. package/dist/config/index.js +15 -11
  90. package/dist/css/base/set.css +1 -1
  91. package/dist/css/base.css +1 -1
  92. package/dist/css/main.css +1 -1
  93. package/dist/css/main_no_layer.css +1 -1
  94. package/dist/css/modules/layout.css +1 -1
  95. package/dist/css/modules/state.css +1 -1
  96. package/dist/css/props.css +1 -1
  97. package/dist/css/reset.css +1 -1
  98. package/dist/css/utility.css +1 -1
  99. package/dist/lib/LismPropsData.test.d.ts +1 -0
  100. package/dist/lib/getBpData.d.ts +9 -1
  101. package/dist/lib/getBpData.js +16 -10
  102. package/dist/lib/getBpData.test.d.ts +1 -0
  103. package/dist/lib/getLayoutProps.d.ts +22 -1
  104. package/dist/lib/getLayoutProps.js +20 -20
  105. package/dist/lib/getLayoutProps.test.d.ts +1 -0
  106. package/dist/lib/getLismProps.d.ts +77 -2
  107. package/dist/lib/getLismProps.js +127 -111
  108. package/dist/lib/getLismProps.test.d.ts +1 -0
  109. package/dist/lib/getMaybeCssVar.d.ts +5 -3
  110. package/dist/lib/getMaybeCssVar.js +15 -15
  111. package/dist/lib/getMaybeCssVar.test.d.ts +1 -0
  112. package/dist/lib/getMaybeTokenValue.d.ts +10 -1
  113. package/dist/lib/getMaybeTokenValue.js +21 -21
  114. package/dist/lib/getMaybeTokenValue.test.d.ts +1 -0
  115. package/dist/lib/getUtilKey.d.ts +7 -1
  116. package/dist/lib/getUtilKey.js +6 -6
  117. package/dist/lib/getUtilKey.test.d.ts +1 -0
  118. package/dist/lib/helper/atts.d.ts +6 -3
  119. package/dist/lib/helper/atts.test.d.ts +1 -0
  120. package/dist/lib/helper/filterEmptyObj.d.ts +20 -1
  121. package/dist/lib/helper/filterEmptyObj.js +6 -5
  122. package/dist/lib/helper/filterEmptyObj.test.d.ts +1 -0
  123. package/dist/lib/helper/hasSomeKeys.d.ts +1 -1
  124. package/dist/lib/helper/isNumStr.d.ts +4 -1
  125. package/dist/lib/helper/isNumStr.test.d.ts +1 -0
  126. package/dist/lib/helper/objMap.d.ts +8 -1
  127. package/dist/lib/helper/objMap.test.d.ts +1 -0
  128. package/dist/lib/helper/splitWithComma.d.ts +1 -1
  129. package/dist/lib/helper/splitWithComma.test.d.ts +1 -0
  130. package/dist/lib/isPresetValue.d.ts +3 -1
  131. package/dist/lib/isPresetValue.js +10 -3
  132. package/dist/lib/isPresetValue.test.d.ts +1 -0
  133. package/dist/lib/isTokenValue.d.ts +1 -1
  134. package/dist/lib/isTokenValue.js +24 -7
  135. package/dist/lib/isTokenValue.test.d.ts +1 -0
  136. package/dist/lib/types/LayoutProps.d.ts +50 -0
  137. package/dist/lib/types/PropValueTypes.d.ts +83 -0
  138. package/dist/lib/types/PropValueTypes.spec-d.d.ts +1 -0
  139. package/dist/lib/types/ResponsiveProps.d.ts +50 -0
  140. package/dist/lib/types/ResponsiveProps.spec-d.d.ts +1 -0
  141. package/dist/lib/types/StateProps.d.ts +27 -0
  142. package/dist/lib/types/StateProps.spec-d.d.ts +1 -0
  143. package/dist/lib/types/utils.d.ts +79 -0
  144. package/dist/lib/types/utils.spec-d.d.ts +1 -0
  145. package/dist/lib/types.d.ts +2 -0
  146. package/package.json +39 -20
  147. package/packages/astro/Lism/index.js +0 -2
  148. package/packages/astro/index.js +0 -2
  149. package/src/scss/_auto_output.scss +2 -1
  150. package/src/scss/_prop-config.scss +19 -0
  151. package/src/scss/_with_layer.scss +7 -11
  152. package/src/scss/base/{_base.scss → _html.scss} +2 -3
  153. package/src/scss/base/index.scss +6 -6
  154. package/src/scss/base/set/_bp.scss +2 -2
  155. package/src/scss/base/set/_cqUnit.scss +31 -0
  156. package/src/scss/{modules/state → base/set}/_gutter.scss +1 -1
  157. package/src/scss/base/set/_hov.scss +4 -4
  158. package/src/scss/base/set/_innerRs.scss +1 -1
  159. package/src/scss/base/set/_mask.scss +1 -1
  160. package/src/scss/base/set/_plain.scss +3 -1
  161. package/src/scss/base/set/_transition.scss +1 -1
  162. package/src/scss/base/set/index.scss +2 -2
  163. package/src/scss/base/{set → tokens}/_shadow.scss +2 -2
  164. package/src/scss/base/{_typography.scss → tokens/_typography.scss} +2 -8
  165. package/src/scss/modules/layout/_flex.scss +4 -0
  166. package/src/scss/modules/layout/_flow.scss +1 -1
  167. package/src/scss/modules/layout/_grid.scss +4 -0
  168. package/src/scss/modules/state/_container.scss +2 -2
  169. package/src/scss/modules/state/_wrapper.scss +2 -2
  170. package/src/scss/modules/state/index.scss +0 -1
  171. package/src/scss/props/_size.scss +1 -1
  172. package/src/scss/reset.scss +10 -3
  173. package/src/scss/utility/_cbox.scss +1 -1
  174. package/src/scss/utility/_clipText.scss +4 -0
  175. package/src/scss/utility/_hidden.scss +3 -3
  176. package/src/scss/utility/_itemDivider.scss +1 -1
  177. package/src/scss/utility/_linkExpand.scss +1 -1
  178. package/src/scss/{base/set → utility}/_snap.scss +1 -1
  179. package/src/scss/utility/_trimHL.scss +5 -4
  180. package/src/scss/utility/index.scss +2 -0
  181. package/config/default-config.js +0 -9
  182. package/config/helper.js +0 -67
  183. package/dist/components/Lism/Link.d.ts +0 -1
  184. package/dist/components/Lism/Link.js +0 -8
  185. package/dist/components/Lism/Text.d.ts +0 -1
  186. package/dist/components/Lism/Text.js +0 -8
  187. package/dist/components/Lism/__Lism_with_forwardRef.d.ts +0 -5
  188. package/dist/components/Test/Test.d.ts +0 -9
  189. package/dist/components/Test/TestItem.d.ts +0 -2
  190. package/dist/components/Test/TestRoot.d.ts +0 -4
  191. package/dist/components/Test/index.d.ts +0 -7
  192. package/dist/components/__Core/Core.d.ts +0 -11
  193. package/dist/components/__Core/index.d.ts +0 -1
  194. package/packages/astro/Lism/Link.astro +0 -10
  195. package/packages/astro/Lism/Text.astro +0 -10
  196. package/packages/astro/Test/Test.astro +0 -14
  197. package/packages/astro/Test/TestItem.astro +0 -14
  198. package/packages/astro/Test/index.js +0 -4
  199. /package/src/scss/base/{_property.scss → tokens/_property.scss} +0 -0
  200. /package/src/scss/base/{_tokens.scss → tokens/_tokens.scss} +0 -0
@@ -0,0 +1,31 @@
1
+ /* ------------------------------------------------------------
2
+ cqUnit: コンテナクエリ単位の再セット
3
+ ------------------------------------------------------------ */
4
+ .set--cqUnit {
5
+ --REM: var(--REM--cq);
6
+ font-size: var(--REM--cq);
7
+
8
+ --fz--base: var(--REM);
9
+
10
+ // ハーフレディング単位
11
+ --hl-unit: calc(var(--REM) * 0.125); /* ≒ 2px */
12
+
13
+ // --- ハーフレディング ---
14
+ --hl--xs: var(--hl-unit);
15
+ --hl--s: calc(var(--hl-unit) * 2);
16
+ --hl--base: calc(var(--hl-unit) * 3);
17
+ --hl--l: calc(var(--hl-unit) * 4);
18
+
19
+ // --- スペーシング ---
20
+ --s-unit: calc(var(--REM) * 0.5); /* ≒ 8px */
21
+ --s5: calc(0.5 * var(--s-unit));
22
+ --s10: var(--s-unit);
23
+ --s15: calc(1.5 * var(--s-unit));
24
+ --s20: calc(2 * var(--s-unit));
25
+ --s30: calc(3 * var(--s-unit));
26
+ --s40: calc(5 * var(--s-unit));
27
+ --s50: calc(8 * var(--s-unit));
28
+ --s60: calc(13 * var(--s-unit));
29
+ --s70: calc(21 * var(--s-unit));
30
+ --s80: calc(34 * var(--s-unit));
31
+ }
@@ -1,3 +1,3 @@
1
- .has--gutter {
1
+ .set--gutter {
2
2
  padding-inline: var(--gutter-size);
3
3
  }
@@ -1,16 +1,16 @@
1
1
  @media (any-hover: hover) {
2
- .set-hov:hover {
2
+ .set--hov:hover {
3
3
  --_notHov: ;
4
4
  }
5
- .set-hov:not(:is(:hover, :focus-within)) {
5
+ .set--hov:not(:is(:hover, :focus-within)) {
6
6
  --_isHov: ;
7
7
  }
8
8
  }
9
9
  @media (any-hover: none) {
10
- .set-hov {
10
+ .set--hov {
11
11
  --_isHov: ;
12
12
  }
13
13
  }
14
- .set-hov:is(:focus-visible, :focus-within) {
14
+ .set--hov:is(:focus-visible, :focus-within) {
15
15
  --_notHov: ;
16
16
  }
@@ -1,3 +1,3 @@
1
- .set-innerRs {
1
+ .set--innerRs {
2
2
  --bdrs--inner: calc(var(--bdrs, 0px) - var(--p, 0px));
3
3
  }
@@ -1,4 +1,4 @@
1
- // .set-mask {
1
+ // .set--mask {
2
2
  // --maskPos: 50%;
3
3
  // --maskSize: contain;
4
4
  // --maskRepeat: no-repeat;
@@ -1,7 +1,7 @@
1
1
  // ボタンやリンク、モーダルスタイルをリセットするためのユーティリティクラス
2
2
  // Memo: font:inherit は書いていない。→ .-font:inherit がある + フォーム系には reset.css で記述済み + line-height に影響が出るため。
3
3
 
4
- .set-plain {
4
+ .set--plain {
5
5
  width: auto;
6
6
  height: auto;
7
7
  min-width: 0;
@@ -9,6 +9,8 @@
9
9
  max-width: none;
10
10
  max-height: none;
11
11
  color: inherit;
12
+ font: inherit;
13
+ line-height: calc(1em + var(--hl) * 2); /* 全称セレクタ と同じ値 */
12
14
  background: none;
13
15
  padding: 0;
14
16
  margin: 0;
@@ -1,6 +1,6 @@
1
1
  @use '../../_mixin' as mixin;
2
2
 
3
- .set-transition {
3
+ .set--transition {
4
4
  transition: var(--hov-duration, 0.25s) var(--hov-ease, linear) var(--hov-delay, 0s);
5
5
  transition-property: var(--hov-prop, all);
6
6
  }
@@ -1,8 +1,8 @@
1
- @forward './shadow';
1
+ @forward './cqUnit';
2
2
  @forward './bp';
3
3
  @forward './hov';
4
4
  @forward './transition';
5
- @forward './snap';
6
5
  @forward './mask';
7
6
  @forward './innerRs';
8
7
  @forward './plain';
8
+ @forward './gutter';
@@ -1,9 +1,9 @@
1
1
  /* ------------------------------------------------------------
2
2
  shadow
3
- Memo: :root だけで変数をセットしてしまうと--shc がその時点で固定されるので、再セットできる set-shadow クラスを用意。
3
+ Memo: :root だけで変数をセットしてしまうと--shc がその時点で固定されるので、再セットできる set--shadow クラスを用意。
4
4
  ------------------------------------------------------------ */
5
5
  :root,
6
- .set-shadow {
6
+ .set--shadow {
7
7
  --sh--5: var(--sh-inset) var(--shsz--5) var(--shc);
8
8
  --sh--10: var(--sh-inset) var(--shsz--10) var(--shc);
9
9
  --sh--20: var(--sh-inset) var(--shsz--20) var(--shc);
@@ -1,4 +1,4 @@
1
- @use '../_setting' as setting;
1
+ @use '../../_setting' as setting;
2
2
  @use 'sass:math';
3
3
 
4
4
  // フォントサイズ計算用の関数
@@ -70,8 +70,7 @@
70
70
  Spacing
71
71
  フィボナッチ数列 0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,
72
72
  ------------------------------------------------------------ */
73
- :root,
74
- .set-cqUnit {
73
+ :root {
75
74
  --fz--base: var(--REM);
76
75
 
77
76
  // ハーフレディング単位
@@ -108,8 +107,3 @@
108
107
  --s70: calc(21 * var(--s-unit));
109
108
  --s80: calc(34 * var(--s-unit));
110
109
  }
111
-
112
- .set-cqUnit {
113
- --REM: var(--REM--cq);
114
- font-size: var(--REM--cq);
115
- }
@@ -1,3 +1,7 @@
1
1
  .l--flex {
2
2
  display: flex;
3
+
4
+ > * {
5
+ min-width: 0;
6
+ }
3
7
  }
@@ -1,5 +1,5 @@
1
1
  .l--flow {
2
- // コンテンツ間の余白バリエーションを定義(--s は set-cqUnit で再セットされるので、:rootではなく .l--flowで定義する)
2
+ // コンテンツ間の余白バリエーションを定義(--s は set--cqUnit で再セットされるので、:rootではなく .l--flowで定義する)
3
3
  --flow--base: var(--s30);
4
4
  --flow--s: var(--s20);
5
5
 
@@ -5,4 +5,8 @@
5
5
  display: grid;
6
6
  grid-template: var(--gtr) / var(--gtc);
7
7
  grid-template-areas: var(--gta);
8
+
9
+ > * {
10
+ min-width: 0;
11
+ }
8
12
  }
@@ -6,7 +6,7 @@
6
6
  .is--container > * {
7
7
  --sz--container: 100cqi;
8
8
  }
9
- // has--gutterがある場合はその分を加算
10
- .is--container.has--gutter > * {
9
+ // set--gutterがある場合はその分を加算
10
+ .is--container.set--gutter > * {
11
11
  --sz--container: calc(100cqi + var(--gutter-size) * 2);
12
12
  }
@@ -8,10 +8,10 @@
8
8
  }
9
9
 
10
10
  // Memo: それぞれの直下要素( > * ) に対してスタイルをセットした方がネスト時の影響をなくせるが、wrapper のネストが多様されることは少ないので親側の変数管理のみで実装。
11
- .-content\:s {
11
+ .-contentSize\:s {
12
12
  --contentSize: var(--sz--s);
13
13
  }
14
14
 
15
- .-content\:l {
15
+ .-contentSize\:l {
16
16
  --contentSize: var(--sz--l);
17
17
  }
@@ -1,5 +1,4 @@
1
1
  // state
2
- @forward './gutter';
3
2
  @forward './container';
4
3
  @forward './wrapper';
5
4
  @forward './linkbox';
@@ -1,7 +1,7 @@
1
1
  .-max-sz\:full {
2
2
  max-inline-size: 100%;
3
3
 
4
- :where(.has--gutter) > & {
4
+ :where(.set--gutter) > & {
5
5
  max-inline-size: calc(100% + var(--gutter-size) * 2);
6
6
  margin-inline: calc(var(--gutter-size) * -1);
7
7
  }
@@ -14,7 +14,7 @@
14
14
  ------------------------------------------------------------ */
15
15
 
16
16
  /* @layer で 優先度を下げる */
17
- @layer lism-reset {
17
+ @layer reset {
18
18
  /* ------------------------------------------------------------
19
19
  Universal
20
20
  ------------------------------------------------------------ */
@@ -54,7 +54,7 @@
54
54
 
55
55
  /* モーダルが開いている時はコンテンツをスクロールさせない */
56
56
  &:has(:modal[open]) {
57
- overflow: hidden;
57
+ overflow: clip; /* sticky 要素がくずれないように clip */
58
58
  }
59
59
  }
60
60
 
@@ -145,7 +145,6 @@
145
145
  /* ------------------------------------------------------------
146
146
  cursor 初期セット
147
147
  ------------------------------------------------------------ */
148
-
149
148
  label[for],
150
149
  select,
151
150
  summary,
@@ -171,4 +170,12 @@
171
170
  :disabled {
172
171
  cursor: not-allowed;
173
172
  }
173
+
174
+ /* ------------------------------------------------------------
175
+ その他
176
+ ------------------------------------------------------------ */
177
+ [hidden='until-found'] {
178
+ /* 意図せず他の要素の上にかぶってしまうのを防ぐ (until-found は stacking context を生成する) */
179
+ z-index: -1;
180
+ }
174
181
  }
@@ -2,7 +2,7 @@
2
2
  Note: c,bgc,bdc Prop Class より優先度を下げること。
3
3
  Memo: bgcの mix は transparent にする。半透明だと背景があると可読性が落ちる + chatのように同じ背景色の装飾を重ねても大丈夫なように。
4
4
  */
5
- .u-cbox {
5
+ .u--cbox {
6
6
  --c: color-mix(in srgb, var(--text), var(--keycolor) var(--cbox-cPct, 32%));
7
7
  --bgc: color-mix(in srgb, var(--base), var(--keycolor) var(--cbox-bgPct, 4%));
8
8
  --bdc: color-mix(in srgb, transparent, var(--keycolor) var(--cbox-bdPct, 64%));
@@ -0,0 +1,4 @@
1
+ .u--clipText {
2
+ background-clip: text !important;
3
+ color: transparent !important;
4
+ }
@@ -1,14 +1,14 @@
1
1
  // For screen reader text
2
2
 
3
- // .u-hidden--focusable:not(:focus),
4
- .u-hidden.u-hidden {
3
+ // .u--srOnly--focusable:not(:focus),
4
+ .u--srOnly.u--srOnly {
5
5
  position: absolute;
6
6
  width: 1px;
7
7
  height: 1px;
8
8
  padding: 0;
9
9
  margin: -1px;
10
10
  overflow: hidden;
11
- clip: rect(0, 0, 0, 0);
11
+ clip-path: inset(50%);
12
12
  white-space: nowrap;
13
13
  border: 0;
14
14
  }
@@ -1,4 +1,4 @@
1
- .u-collapseGrid {
1
+ .u--collapseGrid {
2
2
  --bdw: 1px;
3
3
  --bdc: var(--divider);
4
4
  gap: var(--bdw);
@@ -1,4 +1,4 @@
1
- .u-expandedLink {
1
+ .u--expandedLink {
2
2
  position: static;
3
3
  text-decoration: none;
4
4
  color: inherit;
@@ -1,4 +1,4 @@
1
- .set-snap {
1
+ .u--snap {
2
2
  scroll-snap-type: var(--snapType, both mandatory);
3
3
 
4
4
  & > * {
@@ -1,12 +1,13 @@
1
- // そのうち text-box-trim が使える
1
+ // Memo: そのうち text-box-trim が使える
2
2
 
3
- .u-trim {
3
+ .u--trim {
4
4
  // 詰まりすぎにならないようにほんの少しだけ余裕を持たせる
5
5
  // margin-block: calc(0.5px + var(--HL) * -1);
6
6
  margin-block: calc(var(--hl) * -1);
7
7
  }
8
8
 
9
- .u-trimItems {
9
+ // 子要素の一括トリミング
10
+ .u--trimChildren {
10
11
  > * {
11
12
  --my: calc(var(--hl) * -1);
12
13
  margin-block: var(--my);
@@ -21,7 +22,7 @@
21
22
  }
22
23
  }
23
24
 
24
- // .u-trimBox {
25
+ // .u--trimBox {
25
26
  // :where(&) > * {
26
27
  // --trimHL: calc(0.5px + var(--HL) * -1);
27
28
  // }
@@ -3,3 +3,5 @@
3
3
  @forward './itemDivider';
4
4
  @forward './linkExpand';
5
5
  @forward './hidden';
6
+ @forward './snap';
7
+ @forward './clipText';
@@ -1,9 +0,0 @@
1
- import TOKENS from './defaults/tokens.js';
2
- import PROPS from './defaults/props.js';
3
- import STATES from './defaults/states.js';
4
-
5
- export default {
6
- tokens: TOKENS,
7
- props: PROPS,
8
- states: STATES,
9
- };
package/config/helper.js DELETED
@@ -1,67 +0,0 @@
1
- function isObj(value) {
2
- return value && typeof value === 'object' && !Array.isArray(value);
3
- }
4
-
5
- /**
6
- * 深いマージを行う関数
7
- * @param {Object} origin - マージ先となる元オブジェクト
8
- * @param {Object} source - マージするソース(このデータに更新される)
9
- * @returns {Object} マージされたオブジェクト
10
- */
11
- export function objDeepMerge(origin, source) {
12
- // originとsourceがオブジェクトかどうかをチェック
13
- if (!origin || typeof origin !== 'object' || Array.isArray(origin)) {
14
- return source;
15
- }
16
- if (!source || typeof source !== 'object' || Array.isArray(source)) {
17
- return origin;
18
- }
19
-
20
- const result = { ...origin };
21
-
22
- for (const key in source) {
23
- if (Object.hasOwn(source, key)) {
24
- const originValue = result[key];
25
- const sourceValue = source[key];
26
-
27
- if (!originValue) {
28
- // origin側に存在しない新たなキーの場合はそのまま追加する
29
- result[key] = sourceValue;
30
- } else if (isObj(sourceValue) && isObj(originValue)) {
31
- // どちらもオブジェクトの場合は再帰的にマージ
32
- result[key] = objDeepMerge(originValue, sourceValue);
33
- } else {
34
- // どちらかのデータがobjectではない場合、そのまま上書き
35
- result[key] = sourceValue;
36
- }
37
- }
38
- }
39
-
40
- return result;
41
- }
42
-
43
- /**
44
- * オブジェクト内の配列を再帰的にSetに変換する関数
45
- * @param {any} obj - 変換対象のオブジェクト
46
- * @returns {any} 変換されたオブジェクト
47
- */
48
- export function arrayConvertToSet(obj) {
49
- // 配列の場合はSetに変換
50
- if (Array.isArray(obj)) {
51
- return new Set(obj);
52
- }
53
-
54
- // オブジェクトの場合は再帰的に処理
55
- if (isObj(obj)) {
56
- const result = {};
57
- for (const key in obj) {
58
- if (Object.hasOwn(obj, key)) {
59
- result[key] = arrayConvertToSet(obj[key]);
60
- }
61
- }
62
- return result;
63
- }
64
-
65
- // その他の値はそのまま返す
66
- return obj;
67
- }
@@ -1 +0,0 @@
1
- export default function Link(props: any): import("react").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import o from "./index.js";
3
- function a(r) {
4
- return /* @__PURE__ */ t(o, { tag: "a", ...r });
5
- }
6
- export {
7
- a as default
8
- };
@@ -1 +0,0 @@
1
- export default function Text(props: any): import("react").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import o from "./index.js";
3
- function f(t) {
4
- return /* @__PURE__ */ r(o, { tag: "p", ...t });
5
- }
6
- export {
7
- f as default
8
- };
@@ -1,5 +0,0 @@
1
- export default Lism;
2
- /**
3
- * Lism Propsを処理できるだけのコンポーネント
4
- */
5
- declare const Lism: import('react').ForwardRefExoticComponent<import('react').RefAttributes<any>>;
@@ -1,9 +0,0 @@
1
- declare namespace _default {
2
- export { Test as Root };
3
- export { Item };
4
- }
5
- export default _default;
6
- declare function Test({ ...props }: {
7
- [x: string]: any;
8
- }): import("react").JSX.Element;
9
- declare function Item(props: any): import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- export default Item;
2
- declare function Item(props: any): import("react").JSX.Element;
@@ -1,4 +0,0 @@
1
- export default TestRoot;
2
- declare function TestRoot({ ...props }: {
3
- [x: string]: any;
4
- }): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { default as TestRoot } from './TestRoot';
2
- import { default as TestItem } from './TestItem';
3
- declare namespace _default {
4
- export { TestRoot as Root };
5
- export { TestItem as Item };
6
- }
7
- export default _default;
@@ -1,11 +0,0 @@
1
- /**
2
- * Lism Propsを処理できるだけのコンポーネント
3
- */
4
- export default function Core({ children, as, tag, layout, exProps, ...props }: {
5
- [x: string]: any;
6
- children: any;
7
- as: any;
8
- tag: any;
9
- layout: any;
10
- exProps: any;
11
- }): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export { default as Core } from './Core';
@@ -1,10 +0,0 @@
1
- ---
2
- import type { LismProps } from '../../types';
3
- import Lism from './Lism.astro';
4
-
5
- interface Props extends LismProps {}
6
- ---
7
-
8
- <Lism tag='a' {...Astro.props || {}}>
9
- <slot />
10
- </Lism>
@@ -1,10 +0,0 @@
1
- ---
2
- import type { LismProps } from '../../types';
3
- import Lism from './Lism.astro';
4
-
5
- interface Props extends LismProps {}
6
- ---
7
-
8
- <Lism tag='p' {...Astro.props || {}}>
9
- <slot />
10
- </Lism>
@@ -1,14 +0,0 @@
1
- ---
2
- import type { LismProps } from '../../types';
3
- import { Lism } from '../Lism';
4
-
5
- // Propsの定義
6
- interface Props extends LismProps {
7
- duration?: string | number;
8
- }
9
- const props = Astro.props || {};
10
- ---
11
-
12
- <Lism data-lism='test' bd p='15' {...props}>
13
- <slot />
14
- </Lism>
@@ -1,14 +0,0 @@
1
- ---
2
- import type { LismProps } from '../../types';
3
- import { Lism } from '../Lism';
4
-
5
- // Propsの定義
6
- interface Props extends LismProps {
7
- duration?: string | number;
8
- }
9
- const props = Astro.props || {};
10
- ---
11
-
12
- <Lism data-lism='test-item' bd bds='dashed' {...props}>
13
- <slot />
14
- </Lism>
@@ -1,4 +0,0 @@
1
- import { default as Root } from './Test.astro';
2
- import { default as Item } from './TestItem.astro';
3
-
4
- export default { Root, Item };