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,386 +0,0 @@
1
- import s from "./tokens.js";
2
- const e = ["0", "5", "10", "20", "30", "40", "50", "60", "70", "80"], t = { auto: "a" }, r = {
3
- center: "c",
4
- start: "s",
5
- end: "e",
6
- "flex-start": "fs",
7
- "flex-end": "fe"
8
- }, o = {
9
- center: "c",
10
- start: "s",
11
- end: "e",
12
- stretch: "str"
13
- }, l = { "0%": "0", "50%": "50%", "100%": "100%" }, c = {
14
- // size
15
- w: { utils: { "fit-content": "fit" }, presets: ["100%"], converter: "size" },
16
- h: {
17
- utils: { "fit-content": "fit" },
18
- presets: ["100%", "100lvh", "100svh"],
19
- converter: "size"
20
- },
21
- maxW: { presets: ["100%"], converter: "size" },
22
- maxH: { presets: ["100%"], converter: "size" },
23
- minW: { presets: ["100%"], converter: "size" },
24
- minH: { presets: ["100%", "100lvh", "100svh"], converter: "size" },
25
- // is: inline-size, bs: block-size, maxI, maxB, minIsz, minBsz
26
- c: {
27
- presets: [
28
- "inherit",
29
- "base",
30
- "text",
31
- "text-2",
32
- // 'keycolor',
33
- "mix",
34
- "main",
35
- "accent"
36
- // 'black',
37
- // 'white',
38
- ],
39
- converter: "color"
40
- },
41
- bgc: {
42
- presets: [
43
- "inherit",
44
- "main",
45
- "accent",
46
- "base",
47
- "base-2",
48
- "base-3",
49
- "text",
50
- // 'keycolor',
51
- "mix"
52
- // 'black',
53
- // 'white',
54
- ],
55
- converter: "color"
56
- },
57
- keycolor: { style: "--keycolor", converter: "color" },
58
- bd: {
59
- style: "border",
60
- utils: {
61
- none: "n",
62
- left: "l",
63
- right: "r",
64
- top: "t",
65
- bottom: "b",
66
- inline: "x",
67
- block: "y",
68
- "inline-start": "is",
69
- "inline-end": "ie",
70
- "block-start": "bs",
71
- "block-end": "be"
72
- }
73
- },
74
- bdw: { isVar: 1 },
75
- // --bdw のみ
76
- bds: {
77
- isVar: 1,
78
- utils: {
79
- dashed: "ds",
80
- dotted: "dt",
81
- double: "db"
82
- }
83
- },
84
- // --bds のみ
85
- bdc: {
86
- isVar: 1,
87
- utils: { transparent: "t" },
88
- presets: [
89
- "inherit",
90
- "main",
91
- "accent",
92
- "mix",
93
- "divider",
94
- // 'keycolor',
95
- "mix"
96
- ],
97
- converter: "color"
98
- },
99
- // boxcolor: { _presets: TOKENS.palette, style: '--keycolor', converter: 'color' },
100
- bg: { utils: { none: "n" } },
101
- // mask: { map: 1 },
102
- // Typography
103
- f: { style: "font", presets: ["inherit"] },
104
- fz: { presets: s.fz, converter: "fz" },
105
- lh: { presets: ["1", ...s.lh], style: "lineHeight" },
106
- fw: {
107
- style: "fontWeight",
108
- presets: [...s.fw, "100", "200", "300", "400", "500", "600", "700", "800", "900"]
109
- },
110
- ff: { style: "fontFamily", presets: ["base", "accent", "mono"], converter: 1 },
111
- fs: { style: "fontStyle", utils: { italic: "i" } },
112
- lts: { style: "letterSpacing", presets: s.lts },
113
- ta: { style: "textAlign", utils: { center: "c", left: "l", right: "r" } },
114
- td: { style: "textDecoration", utils: { underline: "u", none: "n" } },
115
- whs: { style: "whiteSpace", utils: { nowrap: "nw" } },
116
- // tsh: { style: 'textShadow' },
117
- // ovw: { style: 'overflowWrap', utils: { anywhere: 'any' } },
118
- // others
119
- bdrs: { presets: ["0", ...s.bdrs], converter: "bdrs" },
120
- bxsh: { presets: ["0", ...s.bxsh], converter: "bxsh" },
121
- // transition
122
- trs: { style: "transition" },
123
- // trsdu: { style: '--trsdu' },
124
- // trsp: { style: '--trsp' },
125
- // trspt: {
126
- // style: '--trspt',
127
- // // utils: { 'ease-in': 'in', 'ease-out': 'out', 'ease-in-out': 'in-out', linear: 'linear' },
128
- // },
129
- //display
130
- d: {
131
- utils: {
132
- none: "n",
133
- block: "b",
134
- flex: "f",
135
- grid: "g",
136
- inline: "i",
137
- "inline-flex": "if",
138
- "inline-grid": "ig",
139
- "inline-block": "ib"
140
- }
141
- },
142
- op: {
143
- style: "opacity",
144
- presets: [...s.op, "0"],
145
- converter: 1
146
- },
147
- // op
148
- v: { style: "visibility", utils: { hidden: "h", visible: "v" } },
149
- ov: { style: "overflow", utils: { scroll: "s", hidden: "h", auto: "a", clip: "c" } },
150
- ovx: { style: "overflowX", utils: { scroll: "s", hidden: "h", auto: "a", clip: "c" } },
151
- ovy: { style: "overflowY", utils: { scroll: "s", hidden: "h", auto: "a", clip: "c" } },
152
- // overflow-clip-margin → safariで使えない
153
- ar: {
154
- // style:'aspectRatio',
155
- presets: [
156
- // '21/9',
157
- "16/9",
158
- // '4/3',
159
- "3/2",
160
- // '2/1',
161
- "1/1",
162
- "ogp"
163
- // 'gold',
164
- // 'silver',
165
- // 'bronze',
166
- // 'cinema',
167
- ]
168
- },
169
- pos: {
170
- style: "position",
171
- utils: {
172
- relative: "r",
173
- absolute: "a",
174
- static: "s",
175
- fixed: "f",
176
- sticky: "sticky"
177
- }
178
- },
179
- z: { style: "zIndex", presets: ["-1", "0", "1", "2", "99"] },
180
- i: { style: "inset", utils: { "0%": "0" }, converter: "space" },
181
- t: { style: "top", utils: l, converter: "space" },
182
- l: { style: "left", utils: l, converter: "space" },
183
- r: { style: "right", utils: l, converter: "space" },
184
- b: { style: "bottom", utils: l, converter: "space" },
185
- // isolation
186
- // flip: {},
187
- // Spacing
188
- p: {
189
- presets: e,
190
- //[...SPACE_PRESETS, ...TOKENS.p],
191
- converter: "space",
192
- // {x, y, t, b, l, r, is, bs } でも指定可能にする
193
- objProcessor: (i) => ({ prop: `p${i}`, context: null })
194
- },
195
- px: { presets: e, converter: "space" },
196
- py: { presets: e, converter: "space" },
197
- pl: { presets: [], converter: "space" },
198
- pr: { presets: [], converter: "space" },
199
- pt: { presets: [], converter: "space" },
200
- pb: { presets: [], converter: "space" },
201
- // inline,block
202
- pis: { presets: e, converter: "space" },
203
- pbs: { presets: e, converter: "space" },
204
- // pie: { converter: 'space' },
205
- // pbe: { converter: 'space' },
206
- // pinln, pblck
207
- // pse: paddingOption,
208
- // pbe: paddingOption,
209
- m: {
210
- utils: t,
211
- presets: e,
212
- converter: "space",
213
- // {x, y, t, b, l, r, is, bs } でも指定可能にする
214
- objProcessor: (i) => ({ prop: `m${i}`, context: null })
215
- },
216
- mx: { utils: t, converter: "space" },
217
- my: { utils: t, converter: "space" },
218
- ml: { utils: t, converter: "space" },
219
- mr: { utils: t, converter: "space" },
220
- mt: { utils: t, converter: "space" },
221
- mb: { utils: t, converter: "space" },
222
- mis: { presets: e, utils: t, converter: "space" },
223
- mbs: { presets: e, utils: t, converter: "space" },
224
- // mib: { converter: 'space' },
225
- // mbe: { converter: 'space' },
226
- // me: marginOption,
227
- // mbe: marginOption,
228
- g: {
229
- presets: ["inherit", ...e],
230
- converter: "space"
231
- },
232
- gx: { converter: "space" },
233
- // colg
234
- gy: { converter: "space" },
235
- // rowg
236
- cols: { isVar: 1 },
237
- rows: { isVar: 1 },
238
- pi: { style: "placeItems" },
239
- pc: { style: "placeContent" },
240
- ai: { style: "alignItems", utils: { ...r, stretch: "str" } },
241
- ac: { style: "alignContent", utils: { ...r, "space-between": "sb" } },
242
- ji: { style: "justifyItems", utils: { ...r, stretch: "str" } },
243
- jc: { style: "justifyContent", utils: { ...r, "space-between": "sb" } },
244
- aslf: { style: "alignSelf", utilKey: "aslf", utils: o },
245
- jslf: { style: "justifySelf", utilKey: "jslf", utils: o },
246
- pslf: { style: "placeSelf", utilKey: "pslf", utils: o },
247
- ord: { style: "order", utilKey: "ord", presets: ["0", "-1", "1"] },
248
- // flex-item
249
- fx: { style: "flex", utils: { "1 1 0": "1" } },
250
- fxg: { name: "fxg", presets: ["0", "1"] },
251
- fxsh: { name: "fxsh", presets: ["0", "1"] },
252
- fxb: { name: "fxb" }
253
- // transform系
254
- // mask: { map: 1 },
255
- // flex: { map: 1 },
256
- // grid: { map: 1 },
257
- // flexItem: { map: 1 },
258
- // gridItem: { map: 1 },
259
- // css: { map: 1 },
260
- }, a = {
261
- grid: {
262
- gd: {},
263
- gt: { style: "gridTemplate" },
264
- gtc: { presets: ["subgrid"] },
265
- gtr: { presets: ["subgrid"] },
266
- gta: {},
267
- gaf: {
268
- utils: { row: "r", column: "c" },
269
- _style: "gridAutoFlow"
270
- },
271
- gac: { _style: "gridAutoColumns" },
272
- gar: { _style: "gridAutoRows" }
273
- // autoFlow, autoRows, autoCols
274
- },
275
- gridItem: {
276
- // item
277
- ga: { utils: { "1/1": "1", "1 / 1": "1" } },
278
- // grid-area
279
- gc: { presets: ["1/-1"], utils: { "1 / -1": "1/-1" } },
280
- // grid-column
281
- gr: { presets: ["1/-1"], utils: { "1 / -1": "1/-1" } },
282
- // grid-row
283
- gcs: { style: "gridColumnStart" },
284
- gce: { style: "gridColumnEnd" },
285
- grs: { style: "gridRowStart" },
286
- gre: { style: "gridRowEnd" }
287
- // ...itemProps,
288
- },
289
- flex: {
290
- fxf: { style: "flex-flow" },
291
- // nowrap → Emmet は n だが、nw にしている. (whs と揃えている)
292
- fxw: { utils: { wrap: "w", nowrap: "n" } },
293
- fxd: { utils: { column: "c", row: "r", "column-reverse": "cr", "row-reverse": "rr" } }
294
- },
295
- // fx: {
296
- // g,sh,b
297
- // }
298
- // flexItem: {
299
- // fx: { style: 'flex', utils: { '1 1 0': '1' } },
300
- // fxg: { name: 'fxg', presets: ['0', '1'] },
301
- // fxsh: { name: 'fxsh', presets: ['0', '1'] },
302
- // fxb: { name: 'fxb' },
303
- // },
304
- // transform: {
305
- // // transform
306
- // transformOrigin: { style: 1, utilKey: 'trfo', utils: 'origin' },
307
- // translate: { style: 1, utils: 1, utilKey: 'trnslt' },
308
- // rotate: { style: 1, utils: 1 },
309
- // scale: { style: 1 },
310
- // },
311
- bg_: {
312
- bgi: {},
313
- bgr: { style: "backgroundRepeat", utils: { n: "no-repeat" } },
314
- bgp: { style: "backgroundPosition", utils: { center: "c" } },
315
- bgsz: { style: "backgroundSize", utils: { cover: "cv", contain: "ct" } },
316
- bga: { style: "backgroundAttachment" },
317
- bgo: { style: "backgroundOrigin" },
318
- bcp: { style: "backgroundClip" },
319
- bbm: { style: "backgroundBlendMode" }
320
- },
321
- bdrs_: {
322
- bdtlrs: { style: "borderTopLeftRadius", converter: "bdrs" },
323
- bdtrrs: { style: "borderTopRightRadius", converter: "bdrs" },
324
- bdblrs: { style: "borderBottomLeftRadius", converter: "bdrs" },
325
- bdbrrs: { style: "borderBottomRightRadius", converter: "bdrs" },
326
- bdssrs: { style: "borderStartStartRadius", converter: "bdrs" },
327
- bdsers: { style: "borderStartEndRadius", converter: "bdrs" },
328
- bdesrs: { style: "borderEndStartRadius", converter: "bdrs" },
329
- bdeers: { style: "borderEndEndRadius", converter: "bdrs" }
330
- },
331
- i_: {
332
- iis: { style: "insetInlineStart", converter: "space" },
333
- iie: { style: "insetInlineEnd", converter: "space" },
334
- ibs: { style: "insetBlockStart", converter: "space" },
335
- ibe: { style: "insetBlockEnd", converter: "space" }
336
- },
337
- // mask: {},
338
- css: {
339
- isz: { style: "inline-size", converter: "size" },
340
- bsz: { style: "block-size", converter: "size" },
341
- maxIsz: { style: "maxInlineSize", converter: "size" },
342
- maxBsz: { style: "maxBlockSize", converter: "size" },
343
- minIsz: { style: "minInlineSize", converter: "size" },
344
- minBsz: { style: "minBlockSize", converter: "size" },
345
- trf: { style: "transform" },
346
- trfo: { style: "transformOrigin" },
347
- trnslt: {
348
- style: "translate",
349
- utils: {
350
- "-50% -50%": "-50XY",
351
- "-50%": "-50X",
352
- "-50% 0": "-50X",
353
- "0 -50%": "-50Y"
354
- }
355
- },
356
- rotate: {
357
- style: "rotate",
358
- utils: { "45deg": "45", "-45deg": "-45", "90deg": "90", "-90deg": "-90" }
359
- },
360
- scale: {
361
- style: "scale",
362
- utils: {
363
- "-1 1": "-X",
364
- "1 -1": "-Y",
365
- "-1 -1": "-XY"
366
- }
367
- },
368
- fltr: { style: "filter" },
369
- // fltr?
370
- bdfltr: { style: "backdropFilter" },
371
- // bdfltr?
372
- fl: { style: "float", utils: { left: "l", right: "r" } },
373
- cl: { style: "clear", utils: { left: "l", right: "r", both: "b" } },
374
- obf: { style: "objectFit", utils: { cover: "cv", contain: "cn" } },
375
- obp: { style: "objectPosition" }
376
- // Memo: その他、コアの処理このcssに入り得るものは以下の通り.(将来的に何か処理を追加するかもしれないもの)
377
- // clipPath: { style: 1 }, // cpp ?
378
- // objectFit: { style: 1, utilKey: 'obf', utils: { cover: 'cv', contain: 'cn' } },
379
- // objectPosition: { style: 1 },
380
- }
381
- // hov: { c, bgc, bdc, bxsh },
382
- };
383
- export {
384
- a as CONTEXT_PROPS,
385
- c as default
386
- };
@@ -1,43 +0,0 @@
1
- const l = {
2
- // p: ['box', 'box:s', 'box:l'],
3
- fz: [
4
- "root",
5
- "base",
6
- "5xl",
7
- "4xl",
8
- "3xl",
9
- "2xl",
10
- "xl",
11
- "l",
12
- "m",
13
- "s",
14
- "xs",
15
- "2xs"
16
- // 'fluid',
17
- // 'fluid:s',
18
- // 'fluid:l',
19
- ],
20
- // lh: ['10', '20', '30', '40', '50', '60', '70', '80', '90'],
21
- lh: ["base", "2xs", "xs", "s", "l", "xl", "2xl"],
22
- lts: ["base", "2xs", "xs", "s", "l", "xl", "2xl"],
23
- //['-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6', '7'],
24
- ff: ["base", "accent", "mono"],
25
- // fw: ['thin', 'light', 'normal', 'medium', 'bold', 'heavy'],
26
- fw: ["light", "normal", "bold"],
27
- op: ["low", "mid", "high"],
28
- bdrs: ["5", "10", "20", "30", "40", "50", "60", "70", "80", "99"],
29
- bxsh: ["5", "10", "20", "30", "40", "50", "60"],
30
- // size:['container', 'container:s', 'container:l'],
31
- contentSize: ["min", "xs", "s", "m", "l", "xl"],
32
- // --size-xxx トークン
33
- flow: ["xs", "s", "m", "l", "xl"],
34
- // getFlowDataで使う
35
- size: [],
36
- // --変数化できるキーワード
37
- color: ["base", "base-2", "base-3", "text", "text-2", "text-3", "divider", "link", "divider-2", "main", "accent", "accent-2", "accent-3"],
38
- palette: ["red", "blue", "green", "yellow", "purple", "orange", "pink", "gray", "white", "black", "keycolor"]
39
- // filter: ['blur', 'blur:s', 'blur:l', 'darken', 'lighten'],
40
- };
41
- export {
42
- l as default
43
- };
package/dist/config.js DELETED
@@ -1,9 +0,0 @@
1
- import { default as r } from "./config/tokens.js";
2
- import { CONTEXT_PROPS as P, default as a } from "./config/prop_list.js";
3
- const o = ["sm", "md", "lg", "xl"];
4
- export {
5
- o as BREAK_POINTS,
6
- P as CONTEXT_PROPS,
7
- a as PROPS,
8
- r as TOKENS
9
- };
@@ -1,6 +0,0 @@
1
- function n(e, r) {
2
- return e == null || typeof e != "object" ? "" : e != null && e[r] ? e[r] : Object.values(e).includes(r) ? r : "";
3
- }
4
- export {
5
- n as default
6
- };
@@ -1,11 +0,0 @@
1
- ---
2
- import type { LismProps } from '../types';
3
- import Flex from './Flex.astro';
4
-
5
- interface Props extends LismProps {}
6
- const props = Astro.props || {};
7
- ---
8
-
9
- <Flex variant='cluster' {...props}>
10
- <slot />
11
- </Flex>
@@ -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
-
8
- let { layout, ...props } = Astro.props;
9
- const LismComponent = layout || Lism;
10
- ---
11
-
12
- <LismComponent {...props}>
13
- <slot />
14
- </LismComponent>
@@ -1,24 +0,0 @@
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 hasSlot = Astro.slots.has('default');
11
- ---
12
-
13
- <Lism data-modal-close={modalId} {...defaultProps.closeBtn} {...props}>
14
- {
15
- hasSlot ? (
16
- <slot />
17
- ) : (
18
- <>
19
- <Icon icon={icon || 'x'} />
20
- <span class='u--hidden'>{srText || 'Close'}</span>
21
- </>
22
- )
23
- }
24
- </Lism>
@@ -1,14 +0,0 @@
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 { layout, ...props } = Astro.props || {};
9
- const Layout = layout || Lism;
10
- ---
11
-
12
- <Layout {...defaultProps.footer} {...props}>
13
- <slot />
14
- </Layout>
@@ -1,14 +0,0 @@
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 { layout, ...props } = Astro.props || {};
9
- const Layout = layout || Lism;
10
- ---
11
-
12
- <Layout {...defaultProps.header} {...props}>
13
- <slot />
14
- </Layout>
@@ -1,30 +0,0 @@
1
- // dialog,
2
- .d--modal {
3
- --maxIsz: 100%; // container直下にきても影響しないように
4
- --mbs: 0; // flow直下にきても影響しないように
5
- --offset: 0 0; // アニメーション用
6
- --backdrop: rgb(0 0 0 / 0.6);
7
- // --trsdu: 0.5s;
8
- transition-duration: var(--modal--trsdu, 0.5s);
9
-
10
- &::backdrop {
11
- transition: opacity var(--modal--trsdu, 0.5s);
12
- background: var(--backdrop);
13
- }
14
- }
15
-
16
- .d--modal_body {
17
- overscroll-behavior: contain;
18
- }
19
-
20
- .d--modal:not([data-is-open]) {
21
- translate: var(--offset);
22
- }
23
- .d--modal:not([data-is-open]),
24
- .d--modal:not([data-is-open])::backdrop {
25
- opacity: 0;
26
- }
27
-
28
- // .d--modal-drawer:not([data-is-open]) {
29
- // translate: var(--offset);
30
- // }
@@ -1,13 +0,0 @@
1
- .l--columns {
2
- --cols: 2; // 初期値
3
- display: grid;
4
- grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
5
- }
6
-
7
- .l--columns-liquid {
8
- --autoType: auto-fill; // auto-fill or auto-fit : 親の幅に対してアイテムが少ない時に、引き伸ばすか、伸ばさないか。
9
- --colSize: var(--size-min);
10
-
11
- display: grid;
12
- grid-template-columns: repeat(var(--autoType), minmax(min(var(--colSize), 100%), 1fr));
13
- }
@@ -1,3 +0,0 @@
1
- .l--divider {
2
- --bdc: var(--c-divider);
3
- }
@@ -1,9 +0,0 @@
1
- .l--grid {
2
- display: grid;
3
- }
4
-
5
- .l--grid-repeat {
6
- --rows: 1;
7
- --cols: 1;
8
- grid-template: repeat(var(--rows), 1fr) / repeat(var(--cols), 1fr);
9
- }
@@ -1,15 +0,0 @@
1
- // .-lis\:n{list-style: none;}
2
- // .-bxz\:cb{box-sizing: content-box;}
3
- // .-bxz\:bb{box-sizing: border-box;}
4
-
5
- // あとでかんがえる
6
- // .-tov\:ell{text-overflow: ellipsis;}
7
-
8
- // .-iis\:0{inset-inline-start: 0;}
9
- // .-iis\:100\%{inset-inline-start:100%;}
10
- // .-iie\:0{inset-inline-end: 0;}
11
- // .-iie\:100\%{inset-inline-end:100%;}
12
- // .-ibs\:0{inset-block-start: 0;}
13
- // .-ibs\:100{inset-block-start:100%;}
14
- // .-ibe\:0{inset-block-end: 0;}
15
- // .-ibe\:100{inset-block-end:100%;}
@@ -1,7 +0,0 @@
1
- // Memo: 仕様変更時、c='(.*):(.+)%' で使用箇所検索
2
- // .-c\:mix {
3
- // }
4
- // .-bgc\:mix {
5
- // }
6
- // .-bdc\:mix {
7
- // }
@@ -1,20 +0,0 @@
1
- @use '../_mixin' as mixin;
2
-
3
- // 変数初期セット(親子関係で影響しないように)
4
- @include mixin.maybe_where('.-trs', 'base') {
5
- --trsdu: var(--trsdu-base);
6
- --trsp: all;
7
- --trstf: ease;
8
- }
9
-
10
- .-trs {
11
- transition: var(--trsdu) var(--trstf) #{mixin.$maybe_important};
12
- transition-property: var(--trsp) #{mixin.$maybe_important};
13
- // transition-duration: var(--trsdu);
14
- // transition-timing-function: var(--trstf);
15
- }
16
-
17
- // .-trstf\:in {--trstf: ease-in;}
18
- // .-trstf\:out {--trstf: ease-out;}
19
- // .-trstf\:in-out {--trstf: ease-in-out;}
20
- // .-trstf\:linear {--trstf: linear;}
@@ -1,34 +0,0 @@
1
- // コンテナ定義 + 併用クラスで内部のコンテンツ幅を制御する。
2
- .is--container {
3
- container-type: inline-size;
4
- margin-inline: auto;
5
- inline-size: 100%; // gridやflex内での挙動を考慮。(container-type:inline-sizeだと横幅つぶれる)
6
- // --wideSize: 100%;
7
-
8
- // .is--overwide のサイズを is--container ごとにセット。
9
- --overwideSize: 100cqi;
10
- :where(.has--gutter) > & {
11
- --overwideSize: calc(100cqi + var(--gutter) * 2);
12
- }
13
-
14
- // 子要素の制御
15
- > * {
16
- --maxIsz: var(--contentSize, 100%);
17
- max-inline-size: min(100%, var(--maxIsz, 100%));
18
- margin-inline: auto;
19
- }
20
- }
21
-
22
- // Memo: それぞれの直下要素( > * ) に対してスタイルをセットした方が、ネスト時の影響をなくせるが、constrainedのネストが多様されることは少ないので親側の変数管理のみで実装。
23
- .-container\:s {
24
- --contentSize: var(--size-s);
25
- --wideSize: var(--size-m);
26
- }
27
- .-container\:m {
28
- --contentSize: var(--size-m);
29
- --wideSize: var(--size-l);
30
- }
31
- .-container\:l {
32
- --contentSize: var(--size-l);
33
- --wideSize: var(--size-xl);
34
- }