@lism-css/ui 0.9.2 → 0.10.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.
- package/README.ja.md +137 -0
- package/README.md +93 -5
- package/dist/components/Accordion/getProps.js +53 -0
- package/dist/components/Accordion/react/AccIcon.js +9 -0
- package/dist/components/Accordion/react/Accordion.d.ts +5 -6
- package/dist/components/Accordion/react/Accordion.js +45 -0
- package/dist/components/Accordion/react/index.js +6 -0
- package/dist/components/Alert/getProps.js +20 -0
- package/dist/components/Alert/presets.js +29 -0
- package/dist/components/Alert/react/Alert.js +16 -0
- package/dist/components/Avatar/react/Avatar.js +8 -0
- package/dist/components/Badge/react/Badge.js +12 -0
- package/dist/components/Button/react/Button.js +12 -0
- package/dist/components/Callout/getProps.js +22 -0
- package/dist/components/Callout/presets.js +29 -0
- package/dist/components/Callout/react/Callout.js +20 -0
- package/dist/components/Chat/getProps.js +47 -0
- package/dist/components/Chat/react/Chat.js +22 -0
- package/dist/components/Details/getProps.js +15 -0
- package/dist/components/Details/react/Details.js +28 -0
- package/dist/components/Details/react/index.js +5 -0
- package/dist/components/DummyImage/astro/index.d.ts +1 -0
- package/dist/components/DummyImage/react/DummyImage.d.ts +2 -0
- package/dist/components/DummyImage/react/DummyImage.js +8 -0
- package/dist/components/DummyImage/react/index.d.ts +1 -0
- package/dist/components/DummyText/astro/index.d.ts +1 -0
- package/dist/components/DummyText/getContent.d.ts +11 -0
- package/dist/components/DummyText/getContent.js +9 -0
- package/dist/components/DummyText/react/DummyText.d.ts +10 -0
- package/dist/components/DummyText/react/DummyText.js +10 -0
- package/dist/components/DummyText/react/index.d.ts +1 -0
- package/dist/components/DummyText/texts.d.ts +22 -0
- package/dist/components/DummyText/texts.js +39 -0
- package/dist/components/Modal/getProps.js +25 -0
- package/dist/components/Modal/react/Body.js +9 -0
- package/dist/components/Modal/react/CloseBtn.js +13 -0
- package/dist/components/Modal/react/Inner.js +9 -0
- package/dist/components/Modal/react/Modal.d.ts +1 -2
- package/dist/components/Modal/react/Modal.js +17 -0
- package/dist/components/Modal/react/OpenBtn.js +9 -0
- package/dist/components/Modal/react/index.js +9 -0
- package/dist/components/Modal/setModal.js +16 -17
- package/dist/components/NavMenu/getProps.js +40 -0
- package/dist/components/NavMenu/react/NavMenu.js +24 -0
- package/dist/components/NavMenu/react/index.js +5 -0
- package/dist/components/ShapeDivider/getProps.js +22 -0
- package/dist/components/ShapeDivider/react/ShapeDivider.js +26 -0
- package/dist/components/Tabs/getProps.js +10 -0
- package/dist/components/Tabs/react/Tab.js +9 -0
- package/dist/components/Tabs/react/TabItem.js +7 -0
- package/dist/components/Tabs/react/TabList.js +8 -0
- package/dist/components/Tabs/react/TabPanel.js +9 -0
- package/dist/components/Tabs/react/Tabs.d.ts +1 -2
- package/dist/components/Tabs/react/Tabs.js +48 -0
- package/dist/components/Tabs/react/index.js +9 -0
- package/dist/components/Tabs/setTabs.js +10 -11
- package/dist/components/astro.d.ts +2 -0
- package/dist/components/react.d.ts +2 -0
- package/dist/components/react.js +30 -0
- package/dist/lism-css/dist/components/Center/index.js +8 -0
- package/dist/lism-css/dist/components/Flex/index.js +8 -0
- package/dist/lism-css/dist/components/Flow/index.js +8 -0
- package/dist/lism-css/dist/components/Frame/index.js +8 -0
- package/dist/lism-css/dist/components/Grid/index.js +8 -0
- package/dist/lism-css/dist/components/Lism/index.js +8 -0
- package/dist/lism-css/dist/components/Stack/index.js +8 -0
- package/dist/lism-css/dist/components/atomic/Decorator/getProps.js +15 -0
- package/dist/lism-css/dist/components/atomic/Decorator/index.js +9 -0
- package/dist/lism-css/dist/components/atomic/Icon/SVG.js +22 -0
- package/dist/lism-css/dist/components/atomic/Icon/getProps.js +56 -0
- package/dist/lism-css/dist/components/atomic/Icon/index.js +12 -0
- package/dist/lism-css/dist/components/atomic/Icon/presets.js +276 -0
- package/dist/lism-css/dist/config/default-config.js +11 -0
- package/dist/lism-css/dist/config/defaults/props.js +340 -0
- package/dist/lism-css/dist/config/defaults/states.js +39 -0
- package/dist/lism-css/dist/config/defaults/tokens.js +30 -0
- package/dist/lism-css/dist/config/helper/getSvgUrl.js +4 -0
- package/dist/lism-css/dist/config/helper.js +27 -0
- package/dist/lism-css/dist/config/index.js +17 -0
- package/dist/lism-css/dist/lib/getBpData.js +19 -0
- package/dist/lism-css/dist/lib/getLayoutProps.js +30 -0
- package/dist/lism-css/dist/lib/getLismProps.js +188 -0
- package/dist/lism-css/dist/lib/getMaybeCssVar.js +42 -0
- package/dist/lism-css/dist/lib/getMaybeTokenValue.js +26 -0
- package/dist/lism-css/dist/lib/getUtilKey.js +13 -0
- package/dist/lism-css/dist/lib/helper/atts.js +11 -0
- package/dist/lism-css/dist/lib/helper/filterEmptyObj.js +10 -0
- package/dist/lism-css/dist/lib/helper/hasSomeKeys.js +6 -0
- package/dist/lism-css/dist/lib/helper/isEmptyObj.js +6 -0
- package/dist/lism-css/dist/lib/helper/isNumStr.js +6 -0
- package/dist/lism-css/dist/lib/helper/splitWithComma.js +6 -0
- package/dist/lism-css/dist/lib/isPresetValue.js +13 -0
- package/dist/lism-css/dist/lib/isTokenValue.js +27 -0
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -0
- package/package.json +9 -7
- package/src/components/Accordion/_style.css +69 -69
- package/src/components/Accordion/astro/Button.astro +2 -2
- package/src/components/Accordion/astro/Heading.astro +1 -1
- package/src/components/Accordion/astro/Item.astro +7 -7
- package/src/components/Accordion/astro/Panel.astro +3 -3
- package/src/components/Accordion/astro/Root.astro +3 -3
- package/src/components/Accordion/getProps.js +54 -54
- package/src/components/Accordion/react/AccIcon.jsx +1 -1
- package/src/components/Accordion/react/Accordion.jsx +37 -36
- package/src/components/Accordion/script.js +1 -1
- package/src/components/Accordion/setAccordion.js +93 -93
- package/src/components/Alert/astro/Alert.astro +6 -6
- package/src/components/Alert/getProps.ts +22 -22
- package/src/components/Alert/presets.ts +26 -26
- package/src/components/Alert/react/Alert.tsx +9 -9
- package/src/components/Avatar/astro/Avatar.astro +2 -2
- package/src/components/Avatar/react/Avatar.jsx +5 -5
- package/src/components/Badge/_style.css +14 -14
- package/src/components/Badge/astro/Badge.astro +4 -4
- package/src/components/Badge/react/Badge.jsx +6 -6
- package/src/components/Button/_style.css +29 -29
- package/src/components/Button/astro/Button.astro +4 -4
- package/src/components/Button/react/Button.jsx +6 -6
- package/src/components/Callout/astro/Callout.astro +13 -13
- package/src/components/Callout/getProps.ts +24 -24
- package/src/components/Callout/presets.ts +26 -26
- package/src/components/Callout/react/Callout.tsx +16 -16
- package/src/components/Chat/_style.css +49 -49
- package/src/components/Chat/astro/Chat.astro +27 -27
- package/src/components/Chat/getProps.js +40 -45
- package/src/components/Chat/react/Chat.jsx +17 -17
- package/src/components/Details/_style.css +39 -39
- package/src/components/Details/astro/Content.astro +3 -3
- package/src/components/Details/astro/Details.astro +1 -1
- package/src/components/Details/astro/Icon.astro +1 -1
- package/src/components/Details/astro/Summary.astro +2 -2
- package/src/components/Details/astro/Title.astro +1 -1
- package/src/components/Details/getProps.js +7 -7
- package/src/components/Details/react/Details.jsx +24 -24
- package/src/components/DummyImage/astro/DummyImage.astro +7 -0
- package/src/components/DummyImage/astro/index.ts +1 -0
- package/src/components/DummyImage/react/DummyImage.tsx +5 -0
- package/src/components/DummyImage/react/index.ts +1 -0
- package/src/components/DummyText/astro/DummyText.astro +9 -0
- package/src/components/DummyText/astro/index.ts +1 -0
- package/src/components/DummyText/getContent.ts +39 -0
- package/src/components/DummyText/react/DummyText.tsx +15 -0
- package/src/components/DummyText/react/index.ts +1 -0
- package/src/components/DummyText/texts.ts +39 -0
- package/src/components/Modal/_style.css +34 -34
- package/src/components/Modal/astro/Body.astro +1 -1
- package/src/components/Modal/astro/CloseBtn.astro +10 -10
- package/src/components/Modal/astro/Inner.astro +1 -1
- package/src/components/Modal/astro/Modal.astro +3 -3
- package/src/components/Modal/astro/OpenBtn.astro +1 -1
- package/src/components/Modal/getProps.js +19 -19
- package/src/components/Modal/react/Body.jsx +5 -5
- package/src/components/Modal/react/CloseBtn.jsx +13 -13
- package/src/components/Modal/react/Inner.jsx +1 -1
- package/src/components/Modal/react/Modal.jsx +12 -11
- package/src/components/Modal/react/OpenBtn.jsx +5 -5
- package/src/components/Modal/script.js +1 -1
- package/src/components/Modal/setModal.ts +92 -92
- package/src/components/NavMenu/_style.css +17 -17
- package/src/components/NavMenu/astro/Item.astro +1 -1
- package/src/components/NavMenu/astro/Link.astro +1 -1
- package/src/components/NavMenu/astro/Nest.astro +1 -1
- package/src/components/NavMenu/astro/Root.astro +1 -1
- package/src/components/NavMenu/getProps.js +28 -28
- package/src/components/NavMenu/react/NavMenu.jsx +4 -4
- package/src/components/ShapeDivider/_style.css +51 -51
- package/src/components/ShapeDivider/astro/ShapeDivider.astro +20 -20
- package/src/components/ShapeDivider/getProps.js +23 -23
- package/src/components/ShapeDivider/react/ShapeDivider.jsx +24 -24
- package/src/components/Tabs/_style.css +29 -29
- package/src/components/Tabs/astro/Tab.astro +2 -2
- package/src/components/Tabs/astro/TabItem.astro +1 -1
- package/src/components/Tabs/astro/TabList.astro +2 -2
- package/src/components/Tabs/astro/TabPanel.astro +2 -2
- package/src/components/Tabs/astro/Tabs.astro +20 -20
- package/src/components/Tabs/astro/transformTabitems.js +30 -30
- package/src/components/Tabs/getProps.js +4 -4
- package/src/components/Tabs/react/Tab.jsx +4 -12
- package/src/components/Tabs/react/TabItem.jsx +1 -1
- package/src/components/Tabs/react/TabList.jsx +2 -2
- package/src/components/Tabs/react/TabPanel.jsx +2 -2
- package/src/components/Tabs/react/Tabs.jsx +46 -47
- package/src/components/Tabs/script.js +4 -4
- package/src/components/Tabs/setTabs.js +70 -70
- package/src/components/astro.ts +2 -0
- package/src/components/react.ts +2 -0
- package/src/helper/animation.ts +10 -10
- package/src/helper/uuid.js +3 -3
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
const e = ["start", "center", "end"], r = { "flex-s": "flex-start", "flex-e": "flex-end" }, p = { s: "start", e: "end", c: "center", fs: "flex-s", fe: "flex-e" }, t = {
|
|
2
|
+
f: { prop: "font", presets: ["inherit"] },
|
|
3
|
+
fz: { prop: "fontSize", token: "fz", tokenClass: 1, bp: 1, alwaysVar: 1 },
|
|
4
|
+
fw: {
|
|
5
|
+
prop: "fontWeight",
|
|
6
|
+
token: "fw",
|
|
7
|
+
tokenClass: 1,
|
|
8
|
+
presets: ["100", "200", "300", "400", "500", "600", "700", "800", "900"]
|
|
9
|
+
},
|
|
10
|
+
ff: { prop: "fontFamily", token: "ff", tokenClass: 1 },
|
|
11
|
+
fs: { prop: "fontStyle", presets: ["italic"], shorthands: { i: "italic" } },
|
|
12
|
+
lh: {
|
|
13
|
+
prop: "lineHeight",
|
|
14
|
+
presets: ["1"],
|
|
15
|
+
token: "hl",
|
|
16
|
+
tokenClass: 2,
|
|
17
|
+
exUtility: { 1: "" }
|
|
18
|
+
},
|
|
19
|
+
hl: {
|
|
20
|
+
isVar: 1,
|
|
21
|
+
token: "hl",
|
|
22
|
+
tokenClass: 0,
|
|
23
|
+
bp: 1
|
|
24
|
+
},
|
|
25
|
+
lts: { prop: "letterSpacing", token: "lts", tokenClass: 1 },
|
|
26
|
+
ta: { prop: "textAlign", presets: ["center", "left", "right"] },
|
|
27
|
+
td: { prop: "textDecoration", utils: { none: "none" } },
|
|
28
|
+
tt: { prop: "textTransform", utils: { upper: "uppercase", lower: "lowercase" } },
|
|
29
|
+
// te: { prop: 'textEmphasis', presets: ['filled'] },
|
|
30
|
+
// tsh: { prop: 'textShadow' },
|
|
31
|
+
d: {
|
|
32
|
+
prop: "display",
|
|
33
|
+
presets: ["none", "block"],
|
|
34
|
+
utils: { "in-flex": "inline-flex" },
|
|
35
|
+
bp: 1
|
|
36
|
+
},
|
|
37
|
+
o: { prop: "opacity", presets: ["0"], token: "o", tokenClass: 1 },
|
|
38
|
+
v: { prop: "visibility", presets: ["hidden"] },
|
|
39
|
+
ov: { prop: "overflow", presets: ["hidden", "auto", "clip"] },
|
|
40
|
+
"ov-x": { prop: "overflowX", presets: ["clip", "auto", "scroll"] },
|
|
41
|
+
"ov-y": { prop: "overflowY", presets: ["clip", "auto", "scroll"] },
|
|
42
|
+
// overflow-clip-margin → safariで使えない
|
|
43
|
+
ar: {
|
|
44
|
+
prop: "aspectRatio",
|
|
45
|
+
presets: ["21/9", "16/9", "3/2", "1/1"],
|
|
46
|
+
// 4/3, 2/1
|
|
47
|
+
token: "ar",
|
|
48
|
+
tokenClass: 1,
|
|
49
|
+
bp: 1
|
|
50
|
+
},
|
|
51
|
+
// size
|
|
52
|
+
w: { prop: "width", utils: { fit: "fit-content" }, presets: ["100%"], token: "sz", bp: 1 },
|
|
53
|
+
h: { prop: "height", utils: { fit: "fit-content" }, presets: ["100%"], token: "sz", bp: 1 },
|
|
54
|
+
"min-w": { prop: "minWidth", presets: ["100%"], token: "sz", bp: 1 },
|
|
55
|
+
"max-w": { prop: "maxWidth", presets: ["100%"], token: "sz", bp: 1 },
|
|
56
|
+
"min-h": { prop: "minHeight", presets: ["100%"], token: "sz", bp: 1 },
|
|
57
|
+
"max-h": { prop: "maxHeight", presets: ["100%"], token: "sz", bp: 1 },
|
|
58
|
+
sz: { prop: "inlineSize", token: "sz" },
|
|
59
|
+
"min-sz": { prop: "minInlineSize", token: "sz" },
|
|
60
|
+
"max-sz": {
|
|
61
|
+
prop: "maxInlineSize",
|
|
62
|
+
token: "sz",
|
|
63
|
+
tokenClass: 1,
|
|
64
|
+
exUtility: {
|
|
65
|
+
min: "",
|
|
66
|
+
full: "",
|
|
67
|
+
container: ""
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
ysz: { prop: "blockSize", token: "sz" },
|
|
71
|
+
"min-ysz": { prop: "minBlockSize", token: "sz" },
|
|
72
|
+
"max-ysz": { prop: "maxBlockSize", token: "sz" },
|
|
73
|
+
// bg
|
|
74
|
+
bg: { prop: "background", bp: 1 },
|
|
75
|
+
bgi: { prop: "backgroundImage" },
|
|
76
|
+
bgr: { prop: "backgroundRepeat", presets: ["no-repeat"] },
|
|
77
|
+
bgp: { prop: "backgroundPosition", presets: ["center"] },
|
|
78
|
+
bgsz: { prop: "backgroundSize", presets: ["cover", "contain"] },
|
|
79
|
+
// bga: { prop: 'backgroundAttachment' }, // fixed
|
|
80
|
+
// bgo: { prop: 'backgroundOrigin' }, // border, padding, content
|
|
81
|
+
// bgblend: { prop: 'backgroundBlendMode' },
|
|
82
|
+
// bgclip: {
|
|
83
|
+
// prop: 'backgroundClip',
|
|
84
|
+
// presets: ['text'],
|
|
85
|
+
// },
|
|
86
|
+
bgc: {
|
|
87
|
+
prop: "backgroundColor",
|
|
88
|
+
presets: ["base", "base-2", "text", "brand", "accent", "inherit", "transparent"],
|
|
89
|
+
token: "color",
|
|
90
|
+
exUtility: { inherit: { "background-color": "inherit" } },
|
|
91
|
+
alwaysVar: 1
|
|
92
|
+
},
|
|
93
|
+
c: {
|
|
94
|
+
// Note: bg系(bgclip)より後にくるように。
|
|
95
|
+
prop: "color",
|
|
96
|
+
presets: ["base", "text", "text-2", "brand", "accent", "inherit"],
|
|
97
|
+
token: "color",
|
|
98
|
+
exUtility: {
|
|
99
|
+
inherit: { color: "inherit" }
|
|
100
|
+
// --c ではなく color で出力したい
|
|
101
|
+
// mix: {'--_c1:currentColor;--_c2:transparent;--c:color-mix(in srgb, var(--_c1) var(--_mix-c, 50%), var(--_c2))'},
|
|
102
|
+
},
|
|
103
|
+
alwaysVar: 1
|
|
104
|
+
},
|
|
105
|
+
keycolor: { isVar: 1, token: "color" },
|
|
106
|
+
bd: { prop: "border", presets: ["none"] },
|
|
107
|
+
bds: { isVar: 1, presets: ["dashed", "dotted", "double"] },
|
|
108
|
+
bdc: {
|
|
109
|
+
isVar: 1,
|
|
110
|
+
presets: ["brand", "accent", "divider", "inherit", "transparent"],
|
|
111
|
+
utils: { cc: "currentColor" },
|
|
112
|
+
token: "color"
|
|
113
|
+
},
|
|
114
|
+
bdw: { isVar: 1, bp: 1 },
|
|
115
|
+
// --bdw のみ
|
|
116
|
+
"bd-x": { prop: "borderInline" },
|
|
117
|
+
"bd-y": { prop: "borderBlock" },
|
|
118
|
+
"bd-x-s": { prop: "borderInlineStart" },
|
|
119
|
+
"bd-x-e": { prop: "borderInlineEnd" },
|
|
120
|
+
"bd-y-s": { prop: "borderBlockStart" },
|
|
121
|
+
"bd-y-e": { prop: "borderBlockEnd" },
|
|
122
|
+
"bd-t": { prop: "borderTop" },
|
|
123
|
+
"bd-b": { prop: "borderBottom" },
|
|
124
|
+
"bd-l": { prop: "borderLeft" },
|
|
125
|
+
"bd-r": { prop: "borderRight" },
|
|
126
|
+
bdrs: {
|
|
127
|
+
prop: "borderRadius",
|
|
128
|
+
presets: ["0"],
|
|
129
|
+
token: "bdrs",
|
|
130
|
+
tokenClass: 1,
|
|
131
|
+
bp: 1,
|
|
132
|
+
alwaysVar: 1,
|
|
133
|
+
overwriteBaseVar: 1
|
|
134
|
+
},
|
|
135
|
+
"bdrs-tl": { prop: "borderTopLeftRadius", token: "bdrs" },
|
|
136
|
+
"bdrs-tr": { prop: "borderTopRightRadius", token: "bdrs" },
|
|
137
|
+
"bdrs-br": { prop: "borderBottomRightRadius", token: "bdrs" },
|
|
138
|
+
"bdrs-bl": { prop: "borderBottomLeftRadius", token: "bdrs" },
|
|
139
|
+
"bdrs-ss": { prop: "borderStartStartRadius", token: "bdrs" },
|
|
140
|
+
"bdrs-se": { prop: "borderStartEndRadius", token: "bdrs" },
|
|
141
|
+
"bdrs-es": { prop: "borderEndStartRadius", token: "bdrs" },
|
|
142
|
+
"bdrs-ee": { prop: "borderEndEndRadius", token: "bdrs" },
|
|
143
|
+
bxsh: { prop: "boxShadow", utils: { 0: "none" }, token: "bxsh", tokenClass: 1, bp: 1, alwaysVar: 1 },
|
|
144
|
+
// position
|
|
145
|
+
pos: {
|
|
146
|
+
prop: "position",
|
|
147
|
+
presets: ["static", "fixed", "sticky"],
|
|
148
|
+
utils: { rel: "relative", abs: "absolute" }
|
|
149
|
+
},
|
|
150
|
+
z: { prop: "zIndex", presets: ["-1", "0", "1", "99"] },
|
|
151
|
+
t: { prop: "top", utils: { 0: "0%" }, presets: ["50%", "100%"], token: "space" },
|
|
152
|
+
l: { prop: "left", utils: { 0: "0%" }, presets: ["50%", "100%"], token: "space" },
|
|
153
|
+
r: { prop: "right", utils: { 0: "0%" }, presets: ["50%", "100%"], token: "space" },
|
|
154
|
+
b: { prop: "bottom", utils: { 0: "0%" }, presets: ["50%", "100%"], token: "space" },
|
|
155
|
+
i: { prop: "inset", utils: { 0: "0%" }, token: "space" },
|
|
156
|
+
"i-x": { prop: "insetInline", token: "space" },
|
|
157
|
+
"i-y": { prop: "insetBlock", token: "space" },
|
|
158
|
+
"i-x-s": { prop: "insetInlineStart", token: "space" },
|
|
159
|
+
"i-x-e": { prop: "insetInlineEnd", token: "space" },
|
|
160
|
+
"i-y-s": { prop: "insetBlockStart", token: "space" },
|
|
161
|
+
"i-y-e": { prop: "insetBlockEnd", token: "space" },
|
|
162
|
+
// space
|
|
163
|
+
p: {
|
|
164
|
+
prop: "padding",
|
|
165
|
+
presets: ["0"],
|
|
166
|
+
token: "space",
|
|
167
|
+
tokenClass: 1,
|
|
168
|
+
alwaysVar: 1,
|
|
169
|
+
overwriteBaseVar: 1,
|
|
170
|
+
bp: 1
|
|
171
|
+
},
|
|
172
|
+
px: { prop: "paddingInline", presets: ["0"], token: "space", tokenClass: 1, alwaysVar: 1, bp: 1 },
|
|
173
|
+
py: { prop: "paddingBlock", presets: ["0"], token: "space", tokenClass: 1, alwaysVar: 1, bp: 1 },
|
|
174
|
+
"px-s": { prop: "paddingInlineStart", token: "space", bp: 1 },
|
|
175
|
+
"px-e": { prop: "paddingInlineEnd", token: "space", bp: 1 },
|
|
176
|
+
"py-s": { prop: "paddingBlockStart", token: "space", bp: 1 },
|
|
177
|
+
"py-e": { prop: "paddingBlockEnd", token: "space", bp: 1 },
|
|
178
|
+
pl: { prop: "paddingLeft", token: "space", bp: 1 },
|
|
179
|
+
pr: { prop: "paddingRight", token: "space", bp: 1 },
|
|
180
|
+
pt: { prop: "paddingTop", token: "space", bp: 1 },
|
|
181
|
+
pb: { prop: "paddingBottom", token: "space", bp: 1 },
|
|
182
|
+
m: {
|
|
183
|
+
prop: "margin",
|
|
184
|
+
presets: ["auto", "0"],
|
|
185
|
+
token: "space",
|
|
186
|
+
tokenClass: 1,
|
|
187
|
+
alwaysVar: 1,
|
|
188
|
+
overwriteBaseVar: 1,
|
|
189
|
+
bp: 1
|
|
190
|
+
},
|
|
191
|
+
mx: { prop: "marginInline", presets: ["auto", "0"], token: "space", tokenClass: 1, alwaysVar: 1, bp: 1 },
|
|
192
|
+
my: { prop: "marginBlock", presets: ["auto", "0"], token: "space", tokenClass: 1, alwaysVar: 1, bp: 1 },
|
|
193
|
+
"mx-s": { prop: "marginInlineStart", presets: ["auto"], token: "space", bp: 1 },
|
|
194
|
+
"mx-e": { prop: "marginInlineEnd", presets: ["auto"], token: "space", bp: 1 },
|
|
195
|
+
"my-s": { prop: "marginBlockStart", token: "space", bp: 1, presets: ["auto", "0"], tokenClass: 1 },
|
|
196
|
+
"my-e": { prop: "marginBlockEnd", presets: ["auto"], token: "space", bp: 1 },
|
|
197
|
+
ml: { prop: "marginLeft", token: "space", bp: 1 },
|
|
198
|
+
mr: { prop: "marginRight", token: "space", bp: 1 },
|
|
199
|
+
mt: { prop: "marginTop", token: "space", bp: 1 },
|
|
200
|
+
mb: { prop: "marginBottom", token: "space", bp: 1 },
|
|
201
|
+
g: {
|
|
202
|
+
prop: "gap",
|
|
203
|
+
presets: ["0", "inherit"],
|
|
204
|
+
exUtility: { inherit: { gap: "inherit" } },
|
|
205
|
+
token: "space",
|
|
206
|
+
tokenClass: 1,
|
|
207
|
+
alwaysVar: 1,
|
|
208
|
+
overwriteBaseVar: 1,
|
|
209
|
+
bp: 1
|
|
210
|
+
},
|
|
211
|
+
"g-x": { prop: "columnGap", token: "space", bp: 1 },
|
|
212
|
+
"g-y": { prop: "rowGap", token: "space", bp: 1 },
|
|
213
|
+
cols: { isVar: 1, bp: 1 },
|
|
214
|
+
rows: { isVar: 1, bp: 1 },
|
|
215
|
+
// flex
|
|
216
|
+
fxf: { prop: "flexFlow" },
|
|
217
|
+
fxw: { prop: "flexWrap", presets: ["wrap"], bp: 1 },
|
|
218
|
+
fxd: { prop: "flexDirection", utils: { col: "column", "col-r": "column-reverse", "row-r": "row-reverse" }, bp: 1 },
|
|
219
|
+
fx: { prop: "flex", presets: ["1"], bp: 1 },
|
|
220
|
+
fxg: { prop: "flexGrow", presets: ["1"] },
|
|
221
|
+
fxsh: { prop: "flexShrink", presets: ["0"] },
|
|
222
|
+
fxb: { prop: "flexBasis", bp: 1 },
|
|
223
|
+
// grid
|
|
224
|
+
// gd: { prop: 'grid' },
|
|
225
|
+
gt: {
|
|
226
|
+
prop: "gridTemplate",
|
|
227
|
+
presets: ["repeat"],
|
|
228
|
+
exUtility: {
|
|
229
|
+
repeat: {
|
|
230
|
+
"grid-template": "repeat(var(--rows,1), 1fr) / repeat(var(--cols,1), 1fr)"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
bp: 1
|
|
234
|
+
},
|
|
235
|
+
gta: { prop: "gridTemplateAreas", bp: 1 },
|
|
236
|
+
gtc: {
|
|
237
|
+
prop: "gridTemplateColumns",
|
|
238
|
+
presets: ["subgrid"],
|
|
239
|
+
bp: 1
|
|
240
|
+
},
|
|
241
|
+
gtr: {
|
|
242
|
+
prop: "gridTemplateRows",
|
|
243
|
+
presets: ["subgrid"],
|
|
244
|
+
// exUtility: { repeat: { '--rows': '1', '--gtr': 'repeat(var(--rows), 1fr)' } },
|
|
245
|
+
bp: 1
|
|
246
|
+
},
|
|
247
|
+
gaf: { prop: "gridAutoFlow", utils: { row: "row", col: "column" }, bp: 1 },
|
|
248
|
+
//dense
|
|
249
|
+
gac: { prop: "gridAutoColumns" },
|
|
250
|
+
gar: { prop: "gridAutoRows" },
|
|
251
|
+
// grid item
|
|
252
|
+
ga: { prop: "gridArea", utils: { "1/1": "1 / 1" }, bp: 1 },
|
|
253
|
+
gc: { prop: "gridColumn", utils: { "1/-1": "1 / -1" }, bp: 1 },
|
|
254
|
+
gr: { prop: "gridRow", utils: { "1/-1": "1 / -1" }, bp: 1 },
|
|
255
|
+
gcs: { prop: "gridColumnStart" },
|
|
256
|
+
gce: { prop: "gridColumnEnd" },
|
|
257
|
+
grs: { prop: "gridRowStart" },
|
|
258
|
+
gre: { prop: "gridRowEnd" },
|
|
259
|
+
// places
|
|
260
|
+
// -(ai|ac|ji|jc|aslf|jslf): / -$1:
|
|
261
|
+
ai: {
|
|
262
|
+
prop: "alignItems",
|
|
263
|
+
presets: [...e, "stretch"],
|
|
264
|
+
utils: r,
|
|
265
|
+
shorthands: p,
|
|
266
|
+
bp: 1
|
|
267
|
+
},
|
|
268
|
+
ac: {
|
|
269
|
+
prop: "alignContent",
|
|
270
|
+
presets: e,
|
|
271
|
+
utils: { ...r, between: "space-between" },
|
|
272
|
+
shorthands: p,
|
|
273
|
+
bp: 1
|
|
274
|
+
},
|
|
275
|
+
ji: {
|
|
276
|
+
prop: "justifyItems",
|
|
277
|
+
presets: [...e, "stretch"],
|
|
278
|
+
utils: r,
|
|
279
|
+
shorthands: p,
|
|
280
|
+
bp: 1
|
|
281
|
+
},
|
|
282
|
+
jc: {
|
|
283
|
+
prop: "justifyContent",
|
|
284
|
+
presets: e,
|
|
285
|
+
utils: { ...r, between: "space-between" },
|
|
286
|
+
shorthands: p,
|
|
287
|
+
bp: 1
|
|
288
|
+
},
|
|
289
|
+
pi: { prop: "placeItems", presets: e },
|
|
290
|
+
pc: { prop: "placeContent", presets: e },
|
|
291
|
+
aslf: {
|
|
292
|
+
prop: "alignSelf",
|
|
293
|
+
presets: [...e, "stretch"],
|
|
294
|
+
shorthands: p
|
|
295
|
+
},
|
|
296
|
+
jslf: {
|
|
297
|
+
prop: "justifySelf",
|
|
298
|
+
presets: [...e, "stretch"],
|
|
299
|
+
shorthands: p
|
|
300
|
+
},
|
|
301
|
+
pslf: { prop: "placeSelf", presets: e },
|
|
302
|
+
order: { prop: "order", presets: ["0", "-1", "1"] },
|
|
303
|
+
// transform
|
|
304
|
+
// translate: {
|
|
305
|
+
// prop: 'translate',
|
|
306
|
+
// utils: {
|
|
307
|
+
// '-50X': '-50% 0',
|
|
308
|
+
// '-50Y': '0 -50%',
|
|
309
|
+
// '-50XY': '-50% -50%',
|
|
310
|
+
// },
|
|
311
|
+
// },
|
|
312
|
+
// rotate: {
|
|
313
|
+
// prop: 'rotate',
|
|
314
|
+
// utils: {
|
|
315
|
+
// [`45`]: '45deg',
|
|
316
|
+
// '-45': '-45deg',
|
|
317
|
+
// [`90`]: '90deg',
|
|
318
|
+
// '-90': '-90deg',
|
|
319
|
+
// // '180': '180deg',
|
|
320
|
+
// },
|
|
321
|
+
// },
|
|
322
|
+
// scale: {
|
|
323
|
+
// prop: 'scale',
|
|
324
|
+
// utils: {
|
|
325
|
+
// '-X': '-1 1',
|
|
326
|
+
// '-Y': '1 -1',
|
|
327
|
+
// '-XY': '-1 -1',
|
|
328
|
+
// },
|
|
329
|
+
// },
|
|
330
|
+
// others
|
|
331
|
+
ovwrap: { prop: "overflowWrap", utils: { any: "anywhere" } },
|
|
332
|
+
whspace: { prop: "whiteSpace", presets: ["nowrap"] },
|
|
333
|
+
// wordbreak: { prop: 'wordBreak', utils: { keep: 'keep-all', all: 'break-all' } },
|
|
334
|
+
float: { prop: "float", presets: ["left", "right"] },
|
|
335
|
+
clear: { prop: "clear", presets: ["both"] },
|
|
336
|
+
isolation: { prop: "isolation", presets: ["isolate"] }
|
|
337
|
+
};
|
|
338
|
+
export {
|
|
339
|
+
t as default
|
|
340
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import t from "../helper/getSvgUrl.js";
|
|
2
|
+
const a = {
|
|
3
|
+
isContainer: "is--container",
|
|
4
|
+
isWrapper: {
|
|
5
|
+
className: "is--wrapper",
|
|
6
|
+
preset: ["s", "l"],
|
|
7
|
+
presetClass: "-contentSize",
|
|
8
|
+
customVar: "--contentSize",
|
|
9
|
+
tokenKey: "sz"
|
|
10
|
+
},
|
|
11
|
+
isLayer: "is--layer",
|
|
12
|
+
isLinkBox: "is--linkBox",
|
|
13
|
+
isSide: "is--side",
|
|
14
|
+
isSkipFlow: "is--skipFlow",
|
|
15
|
+
isVertical: "is--vertical",
|
|
16
|
+
setGutter: "set--gutter",
|
|
17
|
+
// set class
|
|
18
|
+
setShadow: "set--shadow",
|
|
19
|
+
setHov: "set--hov",
|
|
20
|
+
setTransition: "set--transition",
|
|
21
|
+
setMask: {
|
|
22
|
+
// 'set--mask',
|
|
23
|
+
className: "set--mask",
|
|
24
|
+
setStyles: (e) => {
|
|
25
|
+
let s = e;
|
|
26
|
+
return s.startsWith("<svg") && (s = t(e, "base64")), {
|
|
27
|
+
"--maskImg": s
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setPlain: "set--plain",
|
|
32
|
+
// setRevert: 'set--revert',
|
|
33
|
+
setInnerRs: "set--innerRs",
|
|
34
|
+
setBp: "set--bp",
|
|
35
|
+
setCqUnit: "set--cqUnit"
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
a as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
fz: ["root", "base", "5xl", "4xl", "3xl", "2xl", "xl", "l", "m", "s", "xs", "2xs"],
|
|
3
|
+
lh: ["base", "xs", "s", "l"],
|
|
4
|
+
hl: ["base", "xs", "s", "l"],
|
|
5
|
+
lts: ["base", "s", "l"],
|
|
6
|
+
ff: ["base", "accent", "mono"],
|
|
7
|
+
fw: ["light", "normal", "bold"],
|
|
8
|
+
o: ["-10", "-20", "-30"],
|
|
9
|
+
bdrs: ["5", "10", "20", "30", "40", "50", "99", "inner"],
|
|
10
|
+
bxsh: ["5", "10", "20", "30", "40", "50"],
|
|
11
|
+
sz: ["xs", "s", "m", "l", "xl", "min", "full", "container"],
|
|
12
|
+
ar: ["og"],
|
|
13
|
+
space: {
|
|
14
|
+
pre: "--s",
|
|
15
|
+
values: ["5", "10", "15", "20", "30", "40", "50", "60", "70", "80"]
|
|
16
|
+
},
|
|
17
|
+
c: {
|
|
18
|
+
pre: "--",
|
|
19
|
+
values: ["base", "base-2", "text", "text-2", "divider", "link", "brand", "accent"]
|
|
20
|
+
},
|
|
21
|
+
palette: {
|
|
22
|
+
pre: "--",
|
|
23
|
+
values: ["red", "blue", "green", "yellow", "purple", "orange", "pink", "gray", "white", "black", "keycolor"]
|
|
24
|
+
},
|
|
25
|
+
writing: ["vertical"],
|
|
26
|
+
flow: ["s", "l"]
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
e as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function s(n) {
|
|
2
|
+
return n !== null && typeof n == "object" && !Array.isArray(n);
|
|
3
|
+
}
|
|
4
|
+
function i(n, e) {
|
|
5
|
+
const t = { ...n };
|
|
6
|
+
for (const o in e)
|
|
7
|
+
if (Object.hasOwn(e, o)) {
|
|
8
|
+
const r = t[o], c = e[o];
|
|
9
|
+
r && s(c) && s(r) ? t[o] = i(r, c) : t[o] = c;
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function a(n) {
|
|
14
|
+
if (Array.isArray(n))
|
|
15
|
+
return new Set(n);
|
|
16
|
+
if (s(n)) {
|
|
17
|
+
const e = {};
|
|
18
|
+
for (const t in n)
|
|
19
|
+
Object.hasOwn(n, t) && (e[t] = a(n[t]));
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
a as arrayConvertToSet,
|
|
26
|
+
i as objDeepMerge
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import r from "./default-config.js";
|
|
2
|
+
import a from "lism-css/config.js";
|
|
3
|
+
import { objDeepMerge as e, arrayConvertToSet as t } from "./helper.js";
|
|
4
|
+
let s = e(r, a);
|
|
5
|
+
typeof window < "u" && window._LISM_CSS_CONFIG_ && (s = e(s, window._LISM_CSS_CONFIG_));
|
|
6
|
+
const S = s, { tokens: o, props: _, states: l } = S, p = {
|
|
7
|
+
color: [...o.c.values, ...o.palette.values],
|
|
8
|
+
...o
|
|
9
|
+
}, c = t(structuredClone(p)), i = t(structuredClone(_)), I = l, m = ["sm", "md", "lg", "xl"], O = ["base", ...m];
|
|
10
|
+
export {
|
|
11
|
+
m as BREAK_POINTS,
|
|
12
|
+
O as BREAK_POINTS_ALL,
|
|
13
|
+
S as CONFIG,
|
|
14
|
+
i as PROPS,
|
|
15
|
+
I as STATES,
|
|
16
|
+
c as TOKENS
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import e from "./helper/filterEmptyObj.js";
|
|
2
|
+
import n from "./helper/hasSomeKeys.js";
|
|
3
|
+
import { BREAK_POINTS_ALL as o } from "../config/index.js";
|
|
4
|
+
function t(r) {
|
|
5
|
+
if (r === !0) return { base: !0 };
|
|
6
|
+
if (r !== 0 && !r) return {};
|
|
7
|
+
if (typeof r == "string" || typeof r == "number")
|
|
8
|
+
return { base: r };
|
|
9
|
+
if (Array.isArray(r)) {
|
|
10
|
+
const f = {};
|
|
11
|
+
return r.forEach((a, i) => {
|
|
12
|
+
f[`${o[i]}`] = a;
|
|
13
|
+
}), e(f);
|
|
14
|
+
}
|
|
15
|
+
return n(r, o) ? e(r) : e({ base: r });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
t as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
6
|
+
const s = {
|
|
7
|
+
...t,
|
|
8
|
+
lismClass: i(t.lismClass, `l--${l}`)
|
|
9
|
+
};
|
|
10
|
+
return l === "flow" ? e(s) : l === "grid" ? f(s) : l === "sideMain" ? u(s) : l === "fluidCols" ? m(s) : l === "switchCols" ? c(s) : s;
|
|
11
|
+
}
|
|
12
|
+
function f({ _propConfig: l = {}, ...t }) {
|
|
13
|
+
return l.gta = { isVar: 1 }, l.gtc = { isVar: 1 }, l.gtr = { isVar: 1 }, { ...t, _propConfig: l };
|
|
14
|
+
}
|
|
15
|
+
function u({ sideW: l, mainW: t, style: s, ...n }) {
|
|
16
|
+
const r = { ...s };
|
|
17
|
+
return l != null && (r["--sideW"] = o(l, "sz")), t != null && (r["--mainW"] = o(t, "sz")), { ...n, style: r };
|
|
18
|
+
}
|
|
19
|
+
function m({ autoFill: l, style: t, ...s }) {
|
|
20
|
+
return l ? { ...s, style: { ...t, "--autoMode": "auto-fill" } } : { ...s, style: t };
|
|
21
|
+
}
|
|
22
|
+
function e({ flow: l, style: t, ...s }) {
|
|
23
|
+
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 };
|
|
24
|
+
}
|
|
25
|
+
function c({ breakSize: l, style: t, ...s }) {
|
|
26
|
+
return l ? { ...s, style: { ...t, "--breakSize": o(l, "sz") } } : { ...s, style: t };
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
w as default
|
|
30
|
+
};
|