@lism-css/ui 0.12.0 → 0.13.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 (47) hide show
  1. package/dist/components/Accordion/getProps.d.ts +4 -3
  2. package/dist/components/Accordion/getProps.js +20 -19
  3. package/dist/components/Accordion/react/Accordion.js +4 -4
  4. package/dist/components/Alert/getProps.d.ts +3 -0
  5. package/dist/components/Alert/getProps.js +9 -6
  6. package/dist/components/Callout/getProps.d.ts +2 -0
  7. package/dist/components/Callout/getProps.js +5 -3
  8. package/dist/components/Chat/getProps.d.ts +3 -0
  9. package/dist/components/Chat/getProps.js +3 -0
  10. package/dist/components/Chat/react/Chat.js +15 -15
  11. package/dist/components/Details/getProps.d.ts +3 -2
  12. package/dist/components/Details/getProps.js +10 -10
  13. package/dist/components/Modal/getProps.d.ts +3 -4
  14. package/dist/components/Modal/getProps.js +19 -19
  15. package/dist/components/Tabs/getProps.d.ts +1 -1
  16. package/dist/components/Tabs/getProps.js +8 -8
  17. package/dist/lism-css/dist/components/atomic/Decorator/index.js +2 -3
  18. package/dist/lism-css/dist/components/atomic/Icon/getProps.js +33 -34
  19. package/dist/lism-css/dist/config/default-config.js +6 -6
  20. package/dist/lism-css/dist/config/defaults/{states.js → traits.js} +4 -3
  21. package/dist/lism-css/dist/config/index.js +9 -9
  22. package/dist/lism-css/dist/lib/getAtomicProps.js +32 -0
  23. package/dist/lism-css/dist/lib/getLayoutProps.js +27 -17
  24. package/dist/lism-css/dist/lib/getLismProps.js +131 -110
  25. package/dist/lism-css/dist/lib/helper/mergeSet.js +10 -10
  26. package/dist/style.css +1 -1
  27. package/dist/ui.css +1 -1
  28. package/package.json +2 -2
  29. package/src/components/Accordion/_style.css +1 -1
  30. package/src/components/Accordion/getProps.ts +6 -5
  31. package/src/components/Alert/getProps.ts +4 -1
  32. package/src/components/Badge/_style.css +1 -1
  33. package/src/components/Button/_style.css +1 -1
  34. package/src/components/Callout/getProps.ts +3 -1
  35. package/src/components/Chat/_style.css +1 -1
  36. package/src/components/Chat/astro/Chat.astro +2 -2
  37. package/src/components/Chat/getProps.ts +3 -0
  38. package/src/components/Chat/react/Chat.tsx +2 -2
  39. package/src/components/Details/_style.css +1 -1
  40. package/src/components/Details/getProps.ts +3 -3
  41. package/src/components/Modal/_style.css +1 -1
  42. package/src/components/Modal/getProps.ts +6 -7
  43. package/src/components/NavMenu/_style.css +1 -1
  44. package/src/components/ShapeDivider/_style.css +1 -1
  45. package/src/components/Tabs/_style.css +14 -16
  46. package/src/components/Tabs/getProps.ts +2 -2
  47. package/dist/lism-css/dist/components/atomic/Decorator/getProps.js +0 -15
@@ -0,0 +1,32 @@
1
+ import u from "./getBpData.js";
2
+ import a from "./getMaybeCssVar.js";
3
+ function l(n, ...t) {
4
+ return [...n ?? [], ...t];
5
+ }
6
+ function s(n) {
7
+ const t = u(n), i = {};
8
+ return Object.entries(t).forEach(([o, r]) => {
9
+ i[o] = a(r, "space");
10
+ }), i;
11
+ }
12
+ function b(n, t) {
13
+ if (!n) return t;
14
+ const i = {
15
+ ...t,
16
+ primitiveClass: l(t.primitiveClass, `a--${n}`)
17
+ };
18
+ return n === "spacer" ? f(i) : n === "decorator" ? p(i) : i;
19
+ }
20
+ function f(n) {
21
+ const t = { ...n };
22
+ return t.w != null && (t.w = s(t.w)), t.h != null && (t.h = s(t.h)), t;
23
+ }
24
+ function p({ size: n, clipPath: t, boxSizing: i, style: o, ...r }) {
25
+ const e = { ...o };
26
+ t && (e.clipPath = t), i && (e.boxSizing = i);
27
+ const c = { ...r, style: e };
28
+ return n && (c.ar = "1/1", c.w = n), c;
29
+ }
30
+ export {
31
+ b as default
32
+ };
@@ -1,27 +1,37 @@
1
- import i from "./helper/atts.js";
2
- import a from "./isTokenValue.js";
3
- import o from "./getMaybeCssVar.js";
4
- function w(l, t) {
5
- if (!l) return t;
1
+ import r from "./isTokenValue.js";
2
+ import e from "./getMaybeCssVar.js";
3
+ function o(t, ...l) {
4
+ return [...t ?? [], ...l];
5
+ }
6
+ function p(t, l) {
7
+ if (!t) return l;
6
8
  const s = {
7
- ...t,
8
- lismClass: i(t.lismClass, `l--${l}`)
9
+ ...l,
10
+ primitiveClass: o(l.primitiveClass, `l--${t}`)
9
11
  };
10
- return l === "flow" ? e(s) : l === "sideMain" ? u(s) : l === "fluidCols" ? f(s) : l === "switchCols" ? m(s) : s;
12
+ return t === "flow" ? f(s) : t === "sideMain" ? u(s) : t === "fluidCols" ? a(s) : t === "switchCols" ? m(s) : s;
11
13
  }
12
- function u({ sideW: l, mainW: t, style: s, ...r }) {
14
+ function u({ sideW: t, mainW: l, style: s, ...i }) {
13
15
  const n = { ...s };
14
- return l != null && (n["--sideW"] = o(l, "sz")), t != null && (n["--mainW"] = o(t, "sz")), { ...r, style: n };
16
+ return t != null && (n["--sideW"] = e(t, "sz")), l != null && (n["--mainW"] = e(l, "sz")), { ...i, style: n };
15
17
  }
16
- function f({ autoFill: l, style: t, ...s }) {
17
- return l ? { ...s, style: { ...t, "--autoMode": "auto-fill" } } : { ...s, style: t };
18
+ function a({ autoFill: t, style: l, ...s }) {
19
+ return t ? { ...s, style: { ...l, "--autoMode": "auto-fill" } } : { ...s, style: l };
18
20
  }
19
- function e({ flow: l, style: t, ...s }) {
20
- return a("flow", l) ? s.lismClass = i(s.lismClass, `-flow:${l}`) : l && (s.lismClass = i(s.lismClass, "-flow:"), t = { ...t, "--flow": o(l, "space") }), { ...s, style: t };
21
+ function f({ flow: t, style: l, primitiveClass: s, ...i }) {
22
+ return r("flow", t) ? {
23
+ ...i,
24
+ primitiveClass: o(s, `-flow:${t}`),
25
+ style: l
26
+ } : t ? {
27
+ ...i,
28
+ primitiveClass: o(s, "-flow:"),
29
+ style: { ...l, "--flow": e(t, "space") }
30
+ } : { ...i, primitiveClass: s, style: l };
21
31
  }
22
- function m({ breakSize: l, style: t, ...s }) {
23
- return l ? { ...s, style: { ...t, "--breakSize": o(l, "sz") } } : { ...s, style: t };
32
+ function m({ breakSize: t, style: l, ...s }) {
33
+ return t ? { ...s, style: { ...l, "--breakSize": e(t, "sz") } } : { ...s, style: l };
24
34
  }
25
35
  export {
26
- w as default
36
+ p as default
27
37
  };
@@ -1,142 +1,163 @@
1
- import { STATES as b, PROPS as S } from "../config/index.js";
2
- import j from "./getLayoutProps.js";
3
- import U from "./isPresetValue.js";
4
- import x from "./isTokenValue.js";
5
- import v from "./getUtilKey.js";
6
- import m from "./getMaybeCssVar.js";
7
- import E from "./getBpData.js";
1
+ import { TRAITS as v, PROPS as m } from "../config/index.js";
2
+ import N from "./getLayoutProps.js";
3
+ import x from "./getAtomicProps.js";
4
+ import b from "./isPresetValue.js";
5
+ import E from "./isTokenValue.js";
6
+ import P from "./getUtilKey.js";
7
+ import u from "./getMaybeCssVar.js";
8
+ import _ from "./getBpData.js";
8
9
  import z from "./helper/atts.js";
9
- import N from "./helper/isEmptyObj.js";
10
- import C from "./helper/filterEmptyObj.js";
11
- import _ from "./helper/mergeSet.js";
10
+ import w from "./helper/isEmptyObj.js";
11
+ import S from "./helper/filterEmptyObj.js";
12
+ import U from "./helper/mergeSet.js";
12
13
  import k from "./helper/splitWithComma.js";
13
- const A = (n) => {
14
- const e = S[n];
15
- return e && e?.token || "";
14
+ const A = (o) => {
15
+ const s = m[o];
16
+ return s && s?.token || "";
16
17
  };
17
- class w {
18
- // propList = {};
18
+ function T(o, s) {
19
+ if (!o) return "";
20
+ if (!s) return o;
21
+ const t = o.split(" ")[0];
22
+ return `${o} ${t}--${s}`;
23
+ }
24
+ class $ {
25
+ // 最終出力 className
19
26
  className = "";
27
+ // 出力順のためのクラスバケット: [lismClass] [primitiveClass] [uClasses]
28
+ // - lismClass : c--* 基底クラス(variant BEM 展開の対象)
29
+ // - primitiveClass : a--* / l--* / is--* の primitive クラス(getAtomicProps → getLayoutProps → analyzeTrait の順で push)
30
+ // - uClasses : set--* → u--* → -property の順で push される utility クラス
31
+ lismClass = "";
32
+ primitiveClass = [];
20
33
  uClasses = [];
21
- lismState = [];
22
34
  styles = {};
23
35
  attrs = {};
24
36
  _propConfig;
25
- constructor(e) {
26
- const { forwardedRef: t, class: s, className: r, lismClass: o, variant: i, style: l = {}, _propConfig: y = {}, ...c } = e;
27
- this.styles = { ...l }, this._propConfig = { ...y };
28
- let h = o || "";
29
- if (i && o) {
30
- const d = o.split(" "), a = d[0], u = `${a}--${i}`;
31
- h = [a, u, ...d.slice(1)].join(" ");
32
- }
33
- N(c) || (this.attrs = { ...c }, this.analyzeProps()), t && (this.attrs.ref = t), this.className = z(r || s, h, this.lismState, this.uClasses);
37
+ constructor(s) {
38
+ const {
39
+ forwardedRef: t,
40
+ class: i,
41
+ className: e,
42
+ lismClass: a,
43
+ primitiveClass: r,
44
+ variant: l,
45
+ style: d = {},
46
+ _propConfig: c = {},
47
+ ...h
48
+ } = s;
49
+ this.styles = { ...d }, this._propConfig = { ...c }, this.lismClass = T(a, l), r && r.length && (this.primitiveClass = [...r]), w(h) || (this.attrs = { ...h }, this.analyzeProps()), t && (this.attrs.ref = t), this.className = this.buildClassName(e, i);
34
50
  }
35
- analyzeState(e, t) {
36
- const { className: s, preset: r, presetClass: o, customVar: i, tokenKey: l } = e;
37
- t === !0 ? this.lismState.push(s) : r && U(r, t) ? this.lismState.push(`${s} ${o}:${String(t)}`) : t && (this.lismState.push(s), l && i && this.addStyle(i, m(t, l)));
51
+ // 最終クラス文字列の組み立て(出力順の唯一の確定地点)
52
+ // 出力順: [user/astro className] [lismClass] [primitiveClass] [uClasses]
53
+ buildClassName(s, t) {
54
+ return z(s || t || void 0, this.lismClass, this.primitiveClass, this.uClasses);
55
+ }
56
+ analyzeTrait(s, t) {
57
+ const { className: i, preset: e, presetClass: a, customVar: r, tokenKey: l } = s;
58
+ t === !0 ? this.primitiveClass.push(i) : e && b(e, t) ? this.primitiveClass.push(`${i} ${a}:${String(t)}`) : t && (this.primitiveClass.push(i), l && r && this.addStyle(r, u(t, l)));
38
59
  }
39
60
  // prop解析
40
61
  analyzeProps() {
41
- const e = this.extractProp("set"), t = this.extractProp("unset");
42
- Object.keys(this.attrs).forEach((s) => {
43
- if (Object.hasOwn(b, s)) {
44
- const r = this.extractProp(s), o = b[s];
45
- typeof o == "string" ? r && this.lismState.push(o) : this.analyzeState(o, r);
46
- } else if (Object.hasOwn(S, s)) {
47
- const r = this.attrs[s];
48
- delete this.attrs[s], this.analyzeLismProp(s, r);
49
- } else if (s === "hov") {
50
- const r = this.extractProp(s);
51
- this.setHovProps(r);
52
- } else if (s === "css") {
53
- const r = this.extractProp("css");
54
- this.addStyles(r);
62
+ const s = this.extractProp("set"), t = this.extractProp("util");
63
+ U(void 0, s).forEach((i) => this.addUtil(`set--${i}`)), U(void 0, t).forEach((i) => this.addUtil(`u--${i}`)), Object.keys(this.attrs).forEach((i) => {
64
+ if (Object.hasOwn(v, i)) {
65
+ const e = this.extractProp(i), a = v[i];
66
+ typeof a == "string" ? e && this.primitiveClass.push(a) : this.analyzeTrait(a, e);
67
+ } else if (Object.hasOwn(m, i)) {
68
+ const e = this.attrs[i];
69
+ delete this.attrs[i], this.analyzeLismProp(i, e);
70
+ } else if (i === "hov") {
71
+ const e = this.extractProp(i);
72
+ this.setHovProps(e);
73
+ } else if (i === "css") {
74
+ const e = this.extractProp("css");
75
+ this.addStyles(e);
55
76
  }
56
- }), _(void 0, e, t).forEach((s) => this.lismState.push(`set--${s}`));
77
+ });
57
78
  }
58
79
  // Lism Prop 解析
59
- analyzeLismProp(e, t) {
80
+ analyzeLismProp(s, t) {
60
81
  if (t == null) return;
61
- let s = S[e] || null;
62
- if (s === null) return;
63
- this._propConfig?.[e] && (s = Object.assign({}, s, this._propConfig[e]));
64
- const { base: r, ...o } = E(t);
65
- this.setAttrs(e, r, s), Object.keys(o).forEach((i) => {
66
- s && this.setAttrs(e, o[i], s, i);
82
+ let i = m[s] || null;
83
+ if (i === null) return;
84
+ this._propConfig?.[s] && (i = Object.assign({}, i, this._propConfig[s]));
85
+ const { base: e, ...a } = _(t);
86
+ this.setAttrs(s, e, i), Object.keys(a).forEach((r) => {
87
+ i && this.setAttrs(s, a[r], i, r);
67
88
  });
68
89
  }
69
- addUtil(e) {
70
- this.uClasses.push(e);
90
+ addUtil(s) {
91
+ this.uClasses.push(s);
71
92
  }
72
- addUtils(e) {
73
- this.uClasses.push(...e);
93
+ addUtils(s) {
94
+ this.uClasses.push(...s);
74
95
  }
75
96
  // addState(state) {
76
97
  // this.stateClasses.push(state);
77
98
  // }
78
- addStyle(e, t) {
79
- this.styles[e] = t;
99
+ addStyle(s, t) {
100
+ this.styles[s] = t;
80
101
  }
81
- addStyles(e) {
82
- this.styles = { ...this.styles, ...e };
102
+ addStyles(s) {
103
+ this.styles = { ...this.styles, ...s };
83
104
  }
84
- addAttrs(e) {
85
- this.addStyles(e.styles || {}), this.addUtils(e.utils || []);
105
+ addAttrs(s) {
106
+ this.addStyles(s.styles || {}), this.addUtils(s.utils || []);
86
107
  }
87
- extractProp(e) {
88
- const t = this.attrs[e];
89
- return this.attrs[e] === void 0 ? null : (delete this.attrs[e], t);
108
+ extractProp(s) {
109
+ const t = this.attrs[s];
110
+ return this.attrs[s] === void 0 ? null : (delete this.attrs[s], t);
90
111
  }
91
- extractProps(e) {
112
+ extractProps(s) {
92
113
  const t = {};
93
- return e.forEach((s) => {
94
- this.attrs[s] !== void 0 && (t[s] = this.attrs[s], delete this.attrs[s]);
114
+ return s.forEach((i) => {
115
+ this.attrs[i] !== void 0 && (t[i] = this.attrs[i], delete this.attrs[i]);
95
116
  }), t;
96
117
  }
97
118
  // utilクラスを追加するか、styleにセットするかの分岐処理 @base
98
119
  // 値が null, undefined, '', false の時はスキップ
99
- setAttrs(e, t, s = {}, r = "") {
120
+ setAttrs(s, t, i = {}, e = "") {
100
121
  if (t == null || t === "" || t === !1) return;
101
- let o = `--${e}`, i = `-${String(s.utilKey || e)}`;
102
- if (r && (o = `--${e}_${r}`, i += `_${r}`), typeof t == "string" && t.startsWith(":")) {
103
- this.addUtil(`${i}:${t.replace(":", "")}`);
122
+ let a = `--${s}`, r = `-${String(i.utilKey || s)}`;
123
+ if (e && (a = `--${s}_${e}`, r += `_${e}`), typeof t == "string" && t.startsWith(":")) {
124
+ this.addUtil(`${r}:${t.replace(":", "")}`);
104
125
  return;
105
126
  }
106
- if (!r) {
107
- const { presets: u, tokenClass: O, utils: g, shorthands: P } = s;
108
- if (u && U(u, t)) {
109
- const p = typeof t == "string" || typeof t == "number" ? String(t) : "";
110
- p && this.addUtil(`${i}:${p}`);
127
+ if (!e) {
128
+ const { presets: y, tokenClass: j, utils: C, shorthands: g } = i;
129
+ if (y && b(y, t)) {
130
+ const f = typeof t == "string" || typeof t == "number" ? String(t) : "";
131
+ f && this.addUtil(`${r}:${f}`);
111
132
  return;
112
133
  }
113
- if (O && s.token && x(s.token, t)) {
114
- const p = typeof t == "string" || typeof t == "number" ? String(t) : "";
115
- p && this.addUtil(`${i}:${p}`);
134
+ if (j && i.token && E(i.token, t)) {
135
+ const f = typeof t == "string" || typeof t == "number" ? String(t) : "";
136
+ f && this.addUtil(`${r}:${f}`);
116
137
  return;
117
138
  }
118
- let f = "";
119
- if (g && typeof t == "string" && (f = v(g, t)), !f && P && typeof t == "string" && (f = v(P, t, !0)), f) {
120
- this.addUtil(`${i}:${f}`);
139
+ let p = "";
140
+ if (C && typeof t == "string" && (p = P(C, t)), !p && g && typeof t == "string" && (p = P(g, t, !0)), p) {
141
+ this.addUtil(`${r}:${p}`);
121
142
  return;
122
143
  }
123
144
  }
124
145
  if (t === !0 || t === "-") {
125
- this.addUtil(i);
146
+ this.addUtil(r);
126
147
  return;
127
148
  }
128
- const { prop: l, isVar: y, alwaysVar: c, token: h, bp: d } = s;
129
- let a;
130
- if (h && (typeof t == "string" || typeof t == "number") ? a = m(t, h) : typeof t == "string" || typeof t == "number" ? a = t : a = JSON.stringify(t), !r) {
131
- if (y) {
132
- this.addStyle(`--${e}`, a);
149
+ const { prop: l, isVar: d, alwaysVar: c, token: h, bp: O } = i;
150
+ let n;
151
+ if (h && (typeof t == "string" || typeof t == "number") ? n = u(t, h) : typeof t == "string" || typeof t == "number" ? n = t : n = JSON.stringify(t), !e) {
152
+ if (d) {
153
+ this.addStyle(`--${s}`, n);
133
154
  return;
134
- } else if (!d && !c) {
135
- this.addStyle(l, a);
155
+ } else if (!O && !c) {
156
+ this.addStyle(l, n);
136
157
  return;
137
158
  }
138
159
  }
139
- this.addUtil(i), this.addStyle(o, a);
160
+ this.addUtil(r), this.addStyle(a, n);
140
161
  }
141
162
  // setPassProps(passVars) {
142
163
  // let dataList = [];
@@ -151,40 +172,40 @@ class w {
151
172
  // this.addStyle(`--pass_${propName}`, value);
152
173
  // });
153
174
  // }
154
- setHovProps(e) {
155
- e && (e === "-" || e === !0 ? this.addUtil("-hov") : typeof e == "string" ? k(e).forEach((t) => {
175
+ setHovProps(s) {
176
+ s && (s === "-" || s === !0 ? this.addUtil("-hov") : typeof s == "string" ? k(s).forEach((t) => {
156
177
  this.addUtil(`-hov:${t}`);
157
- }) : typeof e == "object" && Object.keys(e).forEach((t) => {
158
- const s = e[t];
159
- if (!(s == null || s === "" || s === !1)) {
160
- if (s === "-" || s === !0)
178
+ }) : typeof s == "object" && Object.keys(s).forEach((t) => {
179
+ const i = s[t];
180
+ if (!(i == null || i === "" || i === !1)) {
181
+ if (i === "-" || i === !0)
161
182
  this.addUtil(`-hov:${t}`);
162
183
  else if (t === "class")
163
- k(s).forEach((r) => {
164
- this.addUtil(`-hov:${r}`);
184
+ k(i).forEach((e) => {
185
+ this.addUtil(`-hov:${e}`);
165
186
  });
166
- else if (typeof s == "string" || typeof s == "number") {
167
- const r = m(s, A(t));
168
- this.addUtil(`-hov:${t}`), this.addStyle(`--hov-${t}`, r);
187
+ else if (typeof i == "string" || typeof i == "number") {
188
+ const e = u(i, A(t));
189
+ this.addUtil(`-hov:${t}`), this.addStyle(`--hov-${t}`, e);
169
190
  }
170
191
  }
171
192
  }));
172
193
  }
173
194
  }
174
- function B(n) {
175
- if (Object.keys(n).length === 0)
195
+ function G(o) {
196
+ if (Object.keys(o).length === 0)
176
197
  return {};
177
- const { layout: e, ...t } = n, s = new w(j(e, t));
198
+ const { atomic: s, layout: t, ...i } = o, e = x(s, i), a = N(t, e), r = new $(a);
178
199
  return {
179
- ...C({
180
- className: s.className,
181
- style: C(s.styles)
200
+ ...S({
201
+ className: r.className,
202
+ style: S(r.styles)
182
203
  }),
183
- ...s.attrs
204
+ ...r.attrs
184
205
  // data-* などHTMLの標準属性はそのまま渡す
185
206
  };
186
207
  }
187
208
  export {
188
- w as LismPropsData,
189
- B as default
209
+ $ as LismPropsData,
210
+ G as default
190
211
  };
@@ -1,14 +1,14 @@
1
- function t(n) {
2
- return n ? Array.isArray(n) ? n.flatMap((r) => t(r)) : typeof n == "string" ? n.split(/[,\s]+/).map((r) => r.trim()).filter(Boolean) : [] : [];
1
+ function e(r) {
2
+ return r ? Array.isArray(r) ? r.flatMap((n) => e(n)) : typeof r != "string" ? [] : r.split(/[,\s]+/).map((n) => n.trim()).filter(Boolean) : [];
3
3
  }
4
- function o(n, r, s) {
5
- const e = [.../* @__PURE__ */ new Set([...t(n), ...t(r)])];
6
- if (e.length === 0) return [];
7
- const i = t(s);
8
- if (i.length === 0) return e;
9
- const a = new Set(i);
10
- return e.filter((f) => !a.has(f));
4
+ function a(r, n) {
5
+ const i = [...e(r), ...e(n)];
6
+ if (i.length === 0) return [];
7
+ const s = [], o = /* @__PURE__ */ new Set();
8
+ for (const t of i)
9
+ t.startsWith("-") ? o.add(t.slice(1)) : s.includes(t) || s.push(t);
10
+ return s.filter((t) => !o.has(t));
11
11
  }
12
12
  export {
13
- o as default
13
+ a as default
14
14
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @layer lism-modules{.c--accordion{--duration:var(--acc-duration,0.25s)}.c--accordion_item{--_panel-h:0px;--_icon-transform:rotate(0deg)}.c--accordion_item[data-opened]{--_icon-transform:rotate(90deg);--_panel-h:auto}.c--accordion_panel{height:var(--_panel-h);transition:height var(--duration)}[hidden]>.c--accordion_content{position:absolute}.c--accordion_icon{display:grid;height:1em;width:1em;&:after,&:before{background-color:currentColor;content:"";display:block;grid-area:1/1}&:before{height:100%;transform:var(--_icon-transform);transition:transform var(--duration);width:.1em}&:after{height:.1em;width:100%}}.c--accordion_button:focus-visible{outline:2px solid currentColor;outline-color:revert;outline-offset:-3px}@media (prefers-reduced-motion:reduce){.c--accordion_item{--duration:0s}}@media (scripting:none){.c--accordion_panel{content-visibility:visible!important;height:auto!important}.c--accordion_content{position:static!important}}}@layer lism-modules{.c--badge{--c:var(--base);--bgc:var(--text);--bdc:transparent;background-color:var(--bgc);border:1px solid var(--bdc);color:var(--c)}.c--badge--outline{--c:var(--text);--bgc:transparent;--bdc:currentColor}.c--button{--c:var(--base);--bgc:var(--text);--bdc:var(--bgc);background-color:var(--bgc);border:1px solid var(--bdc);color:var(--c);gap:var(--s10);place-content:center;place-items:center;text-decoration:none}.c--button--outline{--c:var(--text);--bgc:transparent;--bdc:var(--c)}}@layer lism-modules{:where(.c--button)>.a--icon{scale:1.05}.c--button:where(.l--grid){grid-template-columns:minmax(1em,auto) 1fr minmax(1em,auto);justify-items:center}.c--button:where(.l--grid)>:not(.a--icon){grid-column:2}}@layer lism-modules{.c--chat{--cbox-bgPct:8%;grid-template-areas:"avatar name" "avatar body";grid-template-columns:auto 1fr;grid-template-rows:minmax(1.5rem,auto) auto;--_avator-size:clamp(48px,32px + 5cqw,64px);--_deco-size:calc(min(var(--_avator-size), 80px)/4 + 0.25rem);--_deco-mask:none;--_deco-t:0;--_deco-scale:1;--_deco-inset-x:0;gap:0 calc(var(--_deco-size) + 1px)}.c--chat_avatar{grid-area:avatar;width:var(--_avator-size)}.c--chat_name{grid-area:name}.c--chat_body{grid-area:body}.c--chat_content{max-width:var(--sz--s)}.c--chat_deco{height:var(--_deco-size);top:var(--_deco-t);inset-inline:var(--_deco-inset-x);-webkit-mask:var(--_deco-mask) center/contain no-repeat;mask:var(--_deco-mask) center/contain no-repeat;scale:var(--_deco-scale);width:var(--_deco-size)}.c--chat--speak{--_deco-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path d="M8,8L8,8C7.4,4.8,5.4,2,2.6,0.4L2,0h6V8z"/></svg>')}[data-chat-dir=start]{--_deco-inset-x:auto calc(100% - 1px)}[data-chat-dir=end]{--_deco-scale:-1 1;--_deco-inset-x:calc(100% - 1px) auto;grid-template-areas:"name avatar" "body avatar";grid-template-columns:1fr auto}}.c--chat--speak[data-chat-dir=start]>div>.c--chat_content{border-start-start-radius:0}.c--chat--speak[data-chat-dir=end]>div>.c--chat_content{border-start-end-radius:0}@layer lism-modules{.c--navMenu{--link-td:none;--hl:var(--hl--s);--_item-p:var(--s20);--focus-offset:-1px}.c--navMenu_nest{--_item-p:inherit}.c--navMenu_link{padding:var(--_item-p)}.c--navMenu_item,.c--navMenu_nest{--bdc:inherit}.c--shapeDivider{--level:0;--_inner-offset:0px;--_inner-stretch:1;--_flipX:1;--_flipY:1;height:clamp(5px * var(--level),1cqw * var(--level),12px * var(--level));overflow:visible}}@layer lism-modules{.c--shapeDivider:where([data-flip^=X]){--_flipX:-1}.c--shapeDivider:where([data-flip$=Y]){--_flipY:-1}.c--shapeDivider_inner{--offsetY:0.5px;--offsetX:-0.5px;height:100%;scale:calc(var(--_flipX)*var(--_inner-stretch)) var(--_flipY);translate:calc(var(--offsetX) + var(--_inner-offset)) calc(var(--offsetY)*var(--_flipY));width:calc(100% + 1px)}.c--shapeDivider_svg{display:block}:where([data-has-animation=true]) .c--shapeDivider_svg{animation:lism--slideShape 12s linear infinite alternate;transform-origin:100% 0}}@keyframes lism--slideShape{0%{transform:scaleX(4)}to{transform:scaleX(4) translateX(75%)}}
1
+ @layer lism-component{.c--accordion{--duration:var(--acc-duration,0.25s)}.c--accordion_item{--_panel-h:0px;--_icon-transform:rotate(0deg)}.c--accordion_item[data-opened]{--_icon-transform:rotate(90deg);--_panel-h:auto}.c--accordion_panel{height:var(--_panel-h);transition:height var(--duration)}[hidden]>.c--accordion_content{position:absolute}.c--accordion_icon{display:grid;height:1em;width:1em;&:after,&:before{background-color:currentColor;content:"";display:block;grid-area:1/1}&:before{height:100%;transform:var(--_icon-transform);transition:transform var(--duration);width:.1em}&:after{height:.1em;width:100%}}.c--accordion_button:focus-visible{outline:2px solid currentColor;outline-color:revert;outline-offset:-3px}@media (prefers-reduced-motion:reduce){.c--accordion_item{--duration:0s}}@media (scripting:none){.c--accordion_panel{content-visibility:visible!important;height:auto!important}.c--accordion_content{position:static!important}}}@layer lism-component{.c--badge{--c:var(--base);--bgc:var(--text);--bdc:transparent;background-color:var(--bgc);border:1px solid var(--bdc);color:var(--c)}.c--badge--outline{--c:var(--text);--bgc:transparent;--bdc:currentColor}.c--button{--c:var(--base);--bgc:var(--text);--bdc:var(--bgc);background-color:var(--bgc);border:1px solid var(--bdc);color:var(--c);gap:var(--s10);place-content:center;place-items:center;text-decoration:none}.c--button--outline{--c:var(--text);--bgc:transparent;--bdc:var(--c)}}@layer lism-component{:where(.c--button)>.a--icon{scale:1.05}.c--button:where(.l--grid){grid-template-columns:minmax(1em,auto) 1fr minmax(1em,auto);justify-items:center}.c--button:where(.l--grid)>:not(.a--icon){grid-column:2}}@layer lism-component{.c--chat{--cbox-bgPct:8%;grid-template-areas:"avatar name" "avatar body";grid-template-columns:auto 1fr;grid-template-rows:minmax(1.5rem,auto) auto;--_avator-size:clamp(48px,32px + 5cqw,64px);--_deco-size:calc(min(var(--_avator-size), 80px)/4 + 0.25rem);--_deco-mask:none;--_deco-t:0;--_deco-scale:1;--_deco-inset-x:0;gap:0 calc(var(--_deco-size) + 1px)}.c--chat_avatar{grid-area:avatar;width:var(--_avator-size)}.c--chat_name{grid-area:name}.c--chat_body{grid-area:body}.c--chat_content{max-width:var(--sz--s)}.c--chat_deco{height:var(--_deco-size);top:var(--_deco-t);inset-inline:var(--_deco-inset-x);-webkit-mask:var(--_deco-mask) center/contain no-repeat;mask:var(--_deco-mask) center/contain no-repeat;scale:var(--_deco-scale);width:var(--_deco-size)}.c--chat--speak{--_deco-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path d="M8,8L8,8C7.4,4.8,5.4,2,2.6,0.4L2,0h6V8z"/></svg>')}[data-chat-dir=start]{--_deco-inset-x:auto calc(100% - 1px)}[data-chat-dir=end]{--_deco-scale:-1 1;--_deco-inset-x:calc(100% - 1px) auto;grid-template-areas:"name avatar" "body avatar";grid-template-columns:1fr auto}}.c--chat--speak[data-chat-dir=start]>div>.c--chat_content{border-start-start-radius:0}.c--chat--speak[data-chat-dir=end]>div>.c--chat_content{border-start-end-radius:0}@layer lism-component{.c--navMenu{--link-td:none;--hl:var(--hl--s);--_item-p:var(--s20);--focus-offset:-1px}.c--navMenu_nest{--_item-p:inherit}.c--navMenu_link{padding:var(--_item-p)}.c--navMenu_item,.c--navMenu_nest{--bdc:inherit}.c--shapeDivider{--level:0;--_inner-offset:0px;--_inner-stretch:1;--_flipX:1;--_flipY:1;height:clamp(5px * var(--level),1cqw * var(--level),12px * var(--level));overflow:visible}}@layer lism-component{.c--shapeDivider:where([data-flip^=X]){--_flipX:-1}.c--shapeDivider:where([data-flip$=Y]){--_flipY:-1}.c--shapeDivider_inner{--offsetY:0.5px;--offsetX:-0.5px;height:100%;scale:calc(var(--_flipX)*var(--_inner-stretch)) var(--_flipY);translate:calc(var(--offsetX) + var(--_inner-offset)) calc(var(--offsetY)*var(--_flipY));width:calc(100% + 1px)}.c--shapeDivider_svg{display:block}:where([data-has-animation=true]) .c--shapeDivider_svg{animation:lism--slideShape 12s linear infinite alternate;transform-origin:100% 0}}@keyframes lism--slideShape{0%{transform:scaleX(4)}to{transform:scaleX(4) translateX(75%)}}
package/dist/ui.css CHANGED
@@ -1 +1 @@
1
- @layer lism-modules{.c--accordion{--duration: var(--acc-duration, .25s)}.c--accordion_item{--_panel-h: 0px;--_icon-transform: rotate(0deg)}.c--accordion_item[data-opened]{--_icon-transform: rotate(90deg);--_panel-h: auto}.c--accordion_panel{height:var(--_panel-h);transition:height var(--duration)}[hidden]>.c--accordion_content{position:absolute}.c--accordion_icon{display:grid;width:1em;height:1em}.c--accordion_icon:before,.c--accordion_icon:after{content:"";display:block;grid-area:1 / 1;background-color:currentColor}.c--accordion_icon:before{width:.1em;height:100%;transition:transform var(--duration);transform:var(--_icon-transform)}.c--accordion_icon:after{height:.1em;width:100%}.c--accordion_button:focus-visible{outline:solid 2px currentColor;outline-color:revert;outline-offset:-3px}@media(prefers-reduced-motion:reduce){.c--accordion_item{--duration: 0s}}@media(scripting:none){.c--accordion_panel{height:auto!important;content-visibility:visible!important}.c--accordion_content{position:static!important}}}@layer lism-modules{.c--details{--duration: var(--acc-duration, .25s);--_icon-scale: 1.1;--_icon-transform: rotate(0deg);--_content-gtr: 0fr}.c--details[open]{--_icon-transform: scaleY(-1);--_content-gtr: 1fr}.c--details_summary::-webkit-details-marker{display:none}.c--details_icon{--svg: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="1em" height="1em" fill="currentColor"><path d="M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"></path></svg>');display:inline-grid;background-color:currentColor;-webkit-mask:var(--svg) no-repeat center center / contain;mask:var(--svg) no-repeat center center / contain;scale:var(--_icon-scale);transition:transform var(--duration);transform:var(--_icon-transform)}.c--details::details-content{display:grid;grid-template-rows:var(--_content-gtr);transition-duration:var(--duration);transition-property:content-visibility,grid-template;transition-behavior:allow-discrete}.c--details_body{overflow:hidden}}@layer lism-modules{.c--modal{--flow: 0;--duration: var(--modal-duration, .4s);width:100%;height:100%;max-width:100%;max-height:100%;overflow:unset;background:var(--backdrop-bg, rgb(0 0 0 / .6));transition-duration:var(--duration);transition-property:opacity}.c--modal::backdrop{background:none}.c--modal[open]{display:flex;flex-direction:column;justify-content:center}.c--modal_inner{--offset: 0 0;background-color:var(--base);transition:translate var(--duration);max-height:100%}.c--modal:not([data-is-open]){opacity:0}.c--modal:not([data-is-open])>.c--modal_inner{translate:var(--offset)}}@layer lism-modules{.c--navMenu{--link-td: none;--hl: var(--hl--s);--_item-p: var(--s20);--focus-offset: -1px}.c--navMenu_nest{--_item-p: inherit}.c--navMenu_link{padding:var(--_item-p)}.c--navMenu_nest,.c--navMenu_item{--bdc: inherit}}@layer lism-modules{.c--tabs{display:grid;grid:"list" "panel" / 100%}.c--tabs_list{grid-area:list;display:flex;overflow-x:auto}.c--tabs_tab[aria-selected=true]{--_notSelected: }.c--tabs_tab[aria-selected=false]{--_isSelected: }:where(.c--tabs_tab){color:var(--_notSelected, var(--text-2))}.c--tabs_panel{grid-area:panel;width:100%}.c--tabs_panel:where([aria-hidden=true]){display:none}}@layer lism-modules{.c--badge{--c: var(--base);--bgc: var(--text);--bdc: transparent;color:var(--c);background-color:var(--bgc);border:solid 1px var(--bdc)}.c--badge--outline{--c: var(--text);--bgc: transparent;--bdc: currentColor}}@layer lism-modules{.c--button{--c: var(--base);--bgc: var(--text);--bdc: var(--bgc);color:var(--c);background-color:var(--bgc);border:solid 1px var(--bdc);gap:var(--s10);text-decoration:none;place-content:center;place-items:center}.c--button--outline{--c: var(--text);--bgc: transparent;--bdc: var(--c)}:where(.c--button)>.a--icon{scale:1.05}.c--button:where(.l--grid){grid-template-columns:minmax(1em,auto) 1fr minmax(1em,auto);justify-items:center}.c--button:where(.l--grid)>:not(.a--icon){grid-column:2}}@layer lism-modules{.c--chat{--cbox-bgPct: 8%;grid-template-areas:"avatar name" "avatar body";grid-template-columns:auto 1fr;grid-template-rows:minmax(1.5rem,auto) auto;--_avator-size: clamp(48px, 32px + 5cqw, 64px);--_deco-size: calc(min(var(--_avator-size), 80px)/4 + .25rem) ;--_deco-mask: none;--_deco-t: 0;--_deco-scale: 1;--_deco-inset-x: 0;gap:0 calc(var(--_deco-size) + 1px)}.c--chat_avatar{grid-area:avatar;width:var(--_avator-size)}.c--chat_name{grid-area:name}.c--chat_body{grid-area:body}.c--chat_content{max-width:var(--sz--s)}.c--chat_deco{top:var(--_deco-t);inset-inline:var(--_deco-inset-x);width:var(--_deco-size);height:var(--_deco-size);scale:var(--_deco-scale);-webkit-mask:var(--_deco-mask) center / contain no-repeat;mask:var(--_deco-mask) center / contain no-repeat}.c--chat--speak{--_deco-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path d="M8,8L8,8C7.4,4.8,5.4,2,2.6,0.4L2,0h6V8z"/></svg>')}[data-chat-dir=start]{--_deco-inset-x: auto calc(100% - 1px) }[data-chat-dir=end]{--_deco-scale: -1 1;--_deco-inset-x: calc(100% - 1px) auto;grid-template-areas:"name avatar" "body avatar";grid-template-columns:1fr auto}}.c--chat--speak[data-chat-dir=start]>div>.c--chat_content{border-start-start-radius:0}.c--chat--speak[data-chat-dir=end]>div>.c--chat_content{border-start-end-radius:0}@layer lism-modules{.c--shapeDivider{--level: 0;--_inner-offset: 0px;--_inner-stretch: 1;--_flipX: 1;--_flipY: 1;height:clamp(calc(5px * var(--level)),calc(1cqw * var(--level)),calc(12px * var(--level)));overflow:visible}.c--shapeDivider:where([data-flip^=X]){--_flipX: -1}.c--shapeDivider:where([data-flip$=Y]){--_flipY: -1}.c--shapeDivider_inner{--offsetY: .5px;--offsetX: -.5px;height:100%;width:calc(100% + 1px);scale:calc(var(--_flipX) * var(--_inner-stretch)) var(--_flipY);translate:calc(var(--offsetX) + var(--_inner-offset)) calc(var(--offsetY) * var(--_flipY))}.c--shapeDivider_svg{display:block}:where([data-has-animation=true]) .c--shapeDivider_svg{transform-origin:100% 0;animation:lism--slideShape 12s infinite alternate linear}}@keyframes lism--slideShape{0%{transform:scaleX(4)}to{transform:scaleX(4) translate(75%)}}
1
+ @layer lism-component{.c--accordion{--duration: var(--acc-duration, .25s)}.c--accordion_item{--_panel-h: 0px;--_icon-transform: rotate(0deg)}.c--accordion_item[data-opened]{--_icon-transform: rotate(90deg);--_panel-h: auto}.c--accordion_panel{height:var(--_panel-h);transition:height var(--duration)}[hidden]>.c--accordion_content{position:absolute}.c--accordion_icon{display:grid;width:1em;height:1em}.c--accordion_icon:before,.c--accordion_icon:after{content:"";display:block;grid-area:1 / 1;background-color:currentColor}.c--accordion_icon:before{width:.1em;height:100%;transition:transform var(--duration);transform:var(--_icon-transform)}.c--accordion_icon:after{height:.1em;width:100%}.c--accordion_button:focus-visible{outline:solid 2px currentColor;outline-color:revert;outline-offset:-3px}@media(prefers-reduced-motion:reduce){.c--accordion_item{--duration: 0s}}@media(scripting:none){.c--accordion_panel{height:auto!important;content-visibility:visible!important}.c--accordion_content{position:static!important}}}@layer lism-component{.c--details{--duration: var(--acc-duration, .25s);--_icon-scale: 1.1;--_icon-transform: rotate(0deg);--_content-gtr: 0fr}.c--details[open]{--_icon-transform: scaleY(-1);--_content-gtr: 1fr}.c--details_summary::-webkit-details-marker{display:none}.c--details_icon{--svg: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="1em" height="1em" fill="currentColor"><path d="M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"></path></svg>');display:inline-grid;background-color:currentColor;-webkit-mask:var(--svg) no-repeat center center / contain;mask:var(--svg) no-repeat center center / contain;scale:var(--_icon-scale);transition:transform var(--duration);transform:var(--_icon-transform)}.c--details::details-content{display:grid;grid-template-rows:var(--_content-gtr);transition-duration:var(--duration);transition-property:content-visibility,grid-template;transition-behavior:allow-discrete}.c--details_body{overflow:hidden}}@layer lism-component{.c--modal{--flow: 0;--duration: var(--modal-duration, .4s);width:100%;height:100%;max-width:100%;max-height:100%;overflow:unset;background:var(--backdrop-bg, rgb(0 0 0 / .6));transition-duration:var(--duration);transition-property:opacity}.c--modal::backdrop{background:none}.c--modal[open]{display:flex;flex-direction:column;justify-content:center}.c--modal_inner{--offset: 0 0;background-color:var(--base);transition:translate var(--duration);max-height:100%}.c--modal:not([data-is-open]){opacity:0}.c--modal:not([data-is-open])>.c--modal_inner{translate:var(--offset)}}@layer lism-component{.c--navMenu{--link-td: none;--hl: var(--hl--s);--_item-p: var(--s20);--focus-offset: -1px}.c--navMenu_nest{--_item-p: inherit}.c--navMenu_link{padding:var(--_item-p)}.c--navMenu_nest,.c--navMenu_item{--bdc: inherit}}@layer lism-component{.c--tabs{display:grid;grid:"list" "panel" / 100%;gap:var(--s20)}.c--tabs_list{grid-area:list;display:flex;overflow-x:auto}.c--tabs_tab{color:var(--_notSelected, var(--text-2));background-color:var(--_isSelected, var(--base-2));padding:.25em .75em}.c--tabs_tab[aria-selected=true]{--_notSelected: }.c--tabs_tab[aria-selected=false]{--_isSelected: }.c--tabs_panel{grid-area:panel;width:100%}.c--tabs_panel:where([aria-hidden=true]){display:none}}@layer lism-component{.c--badge{--c: var(--base);--bgc: var(--text);--bdc: transparent;color:var(--c);background-color:var(--bgc);border:solid 1px var(--bdc)}.c--badge--outline{--c: var(--text);--bgc: transparent;--bdc: currentColor}}@layer lism-component{.c--button{--c: var(--base);--bgc: var(--text);--bdc: var(--bgc);color:var(--c);background-color:var(--bgc);border:solid 1px var(--bdc);gap:var(--s10);text-decoration:none;place-content:center;place-items:center}.c--button--outline{--c: var(--text);--bgc: transparent;--bdc: var(--c)}:where(.c--button)>.a--icon{scale:1.05}.c--button:where(.l--grid){grid-template-columns:minmax(1em,auto) 1fr minmax(1em,auto);justify-items:center}.c--button:where(.l--grid)>:not(.a--icon){grid-column:2}}@layer lism-component{.c--chat{--cbox-bgPct: 8%;grid-template-areas:"avatar name" "avatar body";grid-template-columns:auto 1fr;grid-template-rows:minmax(1.5rem,auto) auto;--_avator-size: clamp(48px, 32px + 5cqw, 64px);--_deco-size: calc(min(var(--_avator-size), 80px)/4 + .25rem) ;--_deco-mask: none;--_deco-t: 0;--_deco-scale: 1;--_deco-inset-x: 0;gap:0 calc(var(--_deco-size) + 1px)}.c--chat_avatar{grid-area:avatar;width:var(--_avator-size)}.c--chat_name{grid-area:name}.c--chat_body{grid-area:body}.c--chat_content{max-width:var(--sz--s)}.c--chat_deco{top:var(--_deco-t);inset-inline:var(--_deco-inset-x);width:var(--_deco-size);height:var(--_deco-size);scale:var(--_deco-scale);-webkit-mask:var(--_deco-mask) center / contain no-repeat;mask:var(--_deco-mask) center / contain no-repeat}.c--chat--speak{--_deco-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><path d="M8,8L8,8C7.4,4.8,5.4,2,2.6,0.4L2,0h6V8z"/></svg>')}[data-chat-dir=start]{--_deco-inset-x: auto calc(100% - 1px) }[data-chat-dir=end]{--_deco-scale: -1 1;--_deco-inset-x: calc(100% - 1px) auto;grid-template-areas:"name avatar" "body avatar";grid-template-columns:1fr auto}}.c--chat--speak[data-chat-dir=start]>div>.c--chat_content{border-start-start-radius:0}.c--chat--speak[data-chat-dir=end]>div>.c--chat_content{border-start-end-radius:0}@layer lism-component{.c--shapeDivider{--level: 0;--_inner-offset: 0px;--_inner-stretch: 1;--_flipX: 1;--_flipY: 1;height:clamp(calc(5px * var(--level)),calc(1cqw * var(--level)),calc(12px * var(--level)));overflow:visible}.c--shapeDivider:where([data-flip^=X]){--_flipX: -1}.c--shapeDivider:where([data-flip$=Y]){--_flipY: -1}.c--shapeDivider_inner{--offsetY: .5px;--offsetX: -.5px;height:100%;width:calc(100% + 1px);scale:calc(var(--_flipX) * var(--_inner-stretch)) var(--_flipY);translate:calc(var(--offsetX) + var(--_inner-offset)) calc(var(--offsetY) * var(--_flipY))}.c--shapeDivider_svg{display:block}:where([data-has-animation=true]) .c--shapeDivider_svg{transform-origin:100% 0;animation:lism--slideShape 12s infinite alternate linear}}@keyframes lism--slideShape{0%{transform:scaleX(4)}to{transform:scaleX(4) translate(75%)}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lism-css/ui",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "UI components for React and Astro, powered by Lism CSS.",
5
5
  "author": {
6
6
  "name": "ddryo",
@@ -38,7 +38,7 @@
38
38
  "url": "https://github.com/lism-css/lism-css/issues"
39
39
  },
40
40
  "dependencies": {
41
- "lism-css": "0.12.0"
41
+ "lism-css": "0.13.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@storybook/react-vite": "^10.3.3",
@@ -1,4 +1,4 @@
1
- @layer lism-modules {
1
+ @layer lism-component {
2
2
  .c--accordion {
3
3
  --duration: var(--acc-duration, 0.25s);
4
4
  }
@@ -38,11 +38,11 @@ export function getItemProps({ lismClass, ...props }: AccordionItemProps) {
38
38
  return props;
39
39
  }
40
40
 
41
- export function getHeadingProps({ as = 'div', role, lismClass, set, unset, ...props }: AccordionHeadingProps) {
41
+ export function getHeadingProps({ as = 'div', role, lismClass, set, ...props }: AccordionHeadingProps) {
42
42
  const returnProps = {
43
43
  lismClass: atts(lismClass, 'c--accordion_heading'),
44
44
  as,
45
- set: mergeSet('plain', set, unset),
45
+ set: mergeSet('plain', set),
46
46
  ...props,
47
47
  };
48
48
 
@@ -52,12 +52,12 @@ export function getHeadingProps({ as = 'div', role, lismClass, set, unset, ...pr
52
52
  return returnProps;
53
53
  }
54
54
 
55
- export function getButtonProps({ set, unset, ...props }: Record<string, unknown>) {
55
+ export function getButtonProps({ set, ...props }: Record<string, unknown>) {
56
56
  return {
57
57
  lismClass: 'c--accordion_button',
58
58
  as: 'button',
59
59
  layout: 'flex',
60
- set: mergeSet('plain', set, unset),
60
+ set: mergeSet('plain', set),
61
61
  g: '10',
62
62
  w: '100%',
63
63
  ai: 'center',
@@ -82,7 +82,8 @@ export function getPanelProps({ lismClass, _contextID, accID = '__LISM_ACC_ID__'
82
82
 
83
83
  export const defaultProps = {
84
84
  icon: {
85
- lismClass: 'c--accordion_icon a--icon',
85
+ lismClass: 'c--accordion_icon',
86
+ atomic: 'icon',
86
87
  as: 'span',
87
88
  pi: 'center',
88
89
  fxsh: '0',
@@ -20,13 +20,16 @@ export default function getAlertProps({ type = 'alert', keycolor, layout = 'flex
20
20
  icon: _icon,
21
21
  layout,
22
22
  flow,
23
- lismClass: 'c--alert u--cbox',
23
+ lismClass: 'c--alert',
24
+ util: 'cbox',
25
+ set: 'shadow',
24
26
  keycolor: _color,
25
27
  ai: 'center',
26
28
  p: '15',
27
29
  g: '15',
28
30
  bd: true,
29
31
  bdrs: '10',
32
+ bxsh: '10',
30
33
  ...props,
31
34
  };
32
35
  }
@@ -1,4 +1,4 @@
1
- @layer lism-modules {
1
+ @layer lism-component {
2
2
  .c--badge {
3
3
  --c: var(--base);
4
4
  --bgc: var(--text);
@@ -1,4 +1,4 @@
1
- @layer lism-modules {
1
+ @layer lism-component {
2
2
  .c--button {
3
3
  --c: var(--base);
4
4
  --bgc: var(--text);
@@ -19,7 +19,9 @@ export default function getCalloutProps({ type = 'note', keycolor, icon, title,
19
19
  icon: _icon,
20
20
  title,
21
21
  flow,
22
- lismClass: 'c--callout u--cbox set--shadow',
22
+ lismClass: 'c--callout',
23
+ util: 'cbox',
24
+ set: 'shadow',
23
25
  keycolor: _keycolor,
24
26
  p: '20',
25
27
  g: '10',
@@ -1,4 +1,4 @@
1
- @layer lism-modules {
1
+ @layer lism-component {
2
2
  .c--chat {
3
3
  --cbox-bgPct: 8%;
4
4
  grid-template-areas: 'avatar name' 'avatar body';
@@ -33,8 +33,8 @@ const { 'data-chat-dir': direction, ...chatProps } = getChatProps(inputProps);
33
33
  }
34
34
  {name && <Lism {...defaultProps.name}>{name}</Lism>}
35
35
  <Lism {...defaultProps.body}>
36
- <Decorator {...defaultProps.deco} class="u--cbox is--skipFlow" />
37
- <Flow {...defaultProps.content} class="u--cbox" flow={flow} jslf={direction}>
36
+ <Decorator {...defaultProps.deco} />
37
+ <Flow {...defaultProps.content} flow={flow} jslf={direction}>
38
38
  <slot />
39
39
  </Flow>
40
40
  </Lism>
@@ -26,10 +26,13 @@ export const defaultProps = {
26
26
  },
27
27
  deco: {
28
28
  lismClass: 'c--chat_deco',
29
+ util: 'cbox',
30
+ isSkipFlow: true,
29
31
  pos: 'absolute',
30
32
  },
31
33
  content: {
32
34
  lismClass: 'c--chat_content',
35
+ util: 'cbox',
33
36
  bdrs: '30',
34
37
  p: '20',
35
38
  lh: 's',