@a-type/ui 6.0.30 → 6.0.32
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/dist/arbor/arbor.js +7 -5
- package/dist/arbor/arbor.js.map +1 -1
- package/dist/colors.stories.js +2 -2
- package/dist/colors.stories.js.map +1 -1
- package/dist/components/box/Box.d.ts +59 -4
- package/dist/components/box/Box.js +5 -4
- package/dist/components/box/Box.js.map +1 -1
- package/dist/components/box/Box.module.css +11 -9
- package/dist/components/box/Box.stories.d.ts +1 -0
- package/dist/components/box/Box.stories.js +6 -0
- package/dist/components/box/Box.stories.js.map +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/chip/Chip.d.ts +1 -1
- package/dist/components/chip/Chip.js +2 -3
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip/Chip.module.css +2 -2
- package/dist/components/chip/Chip.stories.js +1 -1
- package/dist/components/chip/Chip.stories.js.map +1 -1
- package/dist/components/emojiPicker/EmojiPicker.js +1 -1
- package/dist/components/emojiPicker/EmojiPicker.js.map +1 -1
- package/dist/components/icon/Icon.module.css +1 -1
- package/dist/components/navBar/NavBar.module.css +6 -0
- package/dist/components/peek/Peek.stories.js +1 -1
- package/dist/components/peek/Peek.stories.js.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.js +1 -1
- package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/typography/typography.module.css +1 -1
- package/dist/css/arbor.css +139 -139
- package/dist/themes.stories.js +4 -4
- package/dist/themes.stories.js.map +1 -1
- package/package.json +3 -3
- package/src/arbor/arbor.ts +12 -10
- package/src/colors.stories.tsx +3 -3
- package/src/components/box/Box.module.css +11 -9
- package/src/components/box/Box.stories.tsx +16 -0
- package/src/components/box/Box.tsx +71 -15
- package/src/components/button/Button.tsx +1 -1
- package/src/components/chip/Chip.module.css +2 -2
- package/src/components/chip/Chip.stories.tsx +3 -1
- package/src/components/chip/Chip.tsx +3 -3
- package/src/components/emojiPicker/EmojiPicker.tsx +1 -1
- package/src/components/icon/Icon.module.css +1 -1
- package/src/components/navBar/NavBar.module.css +6 -0
- package/src/components/peek/Peek.stories.tsx +1 -1
- package/src/components/tooltip/Tooltip.stories.tsx +1 -1
- package/src/components/typography/typography.module.css +1 -1
- package/src/themes.stories.tsx +11 -11
package/dist/themes.stories.js
CHANGED
|
@@ -23,14 +23,14 @@ export default meta;
|
|
|
23
23
|
export function DemoUI({ className, style, }) {
|
|
24
24
|
const nextWeek = new Date();
|
|
25
25
|
nextWeek.setDate(nextWeek.getDate() + 7);
|
|
26
|
-
return (_jsxs(PageRoot, { "data-testid": "demo", className: className, style: style, children: [_jsx(PageContent, { children: _jsxs("div", { className: cls.grid, children: [_jsxs(Box, { gap: true, wrap: true, p: true, children: [_jsx(Button, { emphasis: "primary", children: "Primary" }), _jsx(Button, { className: "@mode-accent", emphasis: "primary", children: "Accent" }), _jsx(Button, { children: "Default" }), _jsx(Button, { className: "@mode-inverted", children: "Contrast" }), _jsx(Button, { className: "@mode-attention", emphasis: "primary", children: "Destructive" }), _jsx(Button, { emphasis: "ghost", children: "Ghost" }), _jsx(Button, { className: "@mode-accent", emphasis: "ghost", children: "Ghost Accent" }), _jsx(Button, { size: "small", className: "@mode-attention", emphasis: "primary", children: "Destructive Small" }), _jsx(Button, { size: "small", className: "@mode-attention", emphasis: "ghost", children: "Ghost Destructive Small" })] }), _jsxs(Box, { gap: true, wrap: true, p: true, items: "start", children: [_jsx(Input, { placeholder: "Placeholder" }), _jsx(TextArea, { placeholder: "Placeholder" }), _jsxs(Box, {
|
|
26
|
+
return (_jsxs(PageRoot, { "data-testid": "demo", className: className, style: style, children: [_jsx(PageContent, { children: _jsxs("div", { className: cls.grid, children: [_jsxs(Box, { gap: true, wrap: true, p: true, children: [_jsx(Button, { emphasis: "primary", children: "Primary" }), _jsx(Button, { className: "@mode-accent", emphasis: "primary", children: "Accent" }), _jsx(Button, { children: "Default" }), _jsx(Button, { className: "@mode-inverted", children: "Contrast" }), _jsx(Button, { className: "@mode-attention", emphasis: "primary", children: "Destructive" }), _jsx(Button, { emphasis: "ghost", children: "Ghost" }), _jsx(Button, { className: "@mode-accent", emphasis: "ghost", children: "Ghost Accent" }), _jsx(Button, { size: "small", className: "@mode-attention", emphasis: "primary", children: "Destructive Small" }), _jsx(Button, { size: "small", className: "@mode-attention", emphasis: "ghost", children: "Ghost Destructive Small" })] }), _jsxs(Box, { gap: true, wrap: true, p: true, items: "start", children: [_jsx(Input, { placeholder: "Placeholder" }), _jsx(TextArea, { placeholder: "Placeholder" }), _jsxs(Box, { gap: true, items: "center", children: [_jsx(Checkbox, { defaultChecked: true }), _jsx("span", { children: "Checkbox" })] }), _jsxs(ToggleGroup, { defaultValue: ['1'], children: [_jsx(ToggleGroup.Item, { value: "1", children: "Toggle 1" }), _jsx(ToggleGroup.Item, { value: "2", children: "Toggle 2" })] })] }), _jsxs(Box, { layout: "start safe-center", col: true, gap: true, p: true, style: { maxHeight: 200 }, overflow: "auto-y", children: [_jsx(Heading, { emphasis: "primary", children: "Heading 1" }), _jsx(Heading, { emphasis: "secondary", children: "Heading 2" }), _jsx(Heading, { emphasis: "ambient", children: "Heading 3" }), _jsx(P, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx(TextSkeleton, { maxLength: 30 }), _jsx(TextSkeleton, { maxLength: 10 })] }), _jsxs(Box, { col: true, gap: true, children: [_jsxs(Card, { children: [_jsxs(Card.Main, { onClick: () => { }, children: [_jsx(Card.Title, { children: "Card Title" }), _jsx(Card.Content, { children: "Card Content" }), _jsx(Card.Content, { unstyled: true, children: _jsxs(Chip, { children: [_jsx(Icon, { name: "clock" }), " 2 hrs"] }) })] }), _jsx(Card.Footer, { children: _jsxs(Card.Actions, { children: [_jsx(Button, { size: "small", children: "Action 1" }), _jsx(Button, { size: "small", emphasis: "ghost", children: _jsx(Icon, { name: "placeholder" }) })] }) })] }), _jsxs(Card, { children: [_jsxs(Card.Main, { compact: true, onClick: () => { }, children: [_jsx(Card.Title, { children: "Card Title" }), _jsx(Card.Content, { children: "Card Content" }), _jsx(Card.Content, { unstyled: true, children: _jsxs(Chip, { children: [_jsx(Icon, { name: "clock" }), " 2 hrs"] }) })] }), _jsx(Card.Footer, { children: _jsxs(Card.Actions, { children: [_jsx(Button, { size: "small", children: "Action 1" }), _jsx(Button, { size: "small", emphasis: "ghost", children: _jsx(Icon, { name: "placeholder" }) })] }) })] })] }), _jsxs(Tabs, { defaultValue: "tab1", children: [_jsxs(Tabs.List, { children: [_jsx(Tabs.Trigger, { value: "tab1", children: "Tab 1" }), _jsx(Tabs.Trigger, { value: "tab2", children: "Tab 2" })] }), _jsx(Tabs.Content, { value: "tab1", children: "Tab 1 Content" }), _jsx(Tabs.Content, { value: "tab2", children: "Tab 2 Content" })] }), _jsxs(ActionBar, { children: [_jsxs(ActionButton, { children: [_jsx(Icon, { name: "placeholder" }), "Hello"] }), _jsxs(ActionButton, { color: "primary", children: [_jsx(Icon, { name: "placeholder" }), "World"] }), _jsx(ActionButton, { children: _jsx(Icon, { name: "placeholder" }) })] }), _jsxs(AvatarList, { count: 3, children: [_jsx(AvatarList.Item, { index: 0, name: "John Doe" }), _jsx(AvatarList.Item, { index: 1, name: "Jane Doe" }), _jsx(AvatarList.Item, { index: 2, name: "John Smith" })] }), _jsxs(ContextMenu, { children: [_jsx(ContextMenu.Trigger, { render: _jsx(Tooltip, { content: "Hello World" }), children: _jsx(Button, { children: "Hover or right click" }) }), _jsxs(ContextMenu.Content, { children: [_jsx(ContextMenu.Item, { children: "Item 1" }), _jsx(ContextMenu.Item, { children: "Item 2" }), _jsx(ContextMenu.Item, { children: "Item 3" })] })] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenu.Trigger, { render: _jsx(Button, {}), style: { margin: 'auto' }, children: "Dropdown" }), _jsxs(DropdownMenu.Content, { children: [_jsx(DropdownMenu.Item, { children: "Item 1" }), _jsx(DropdownMenu.Item, { children: "Item 2" }), _jsx(DropdownMenu.Item, { children: "Item 3" }), _jsx(DropdownMenu.Item, { disabled: true, children: "Disabled Item" }), _jsx(DropdownMenu.Separator, {}), _jsx(DropdownMenu.Item, { children: "Item 4" }), _jsx(DropdownMenu.Item, { children: "Item 5" }), _jsx(DropdownMenu.Item, { children: "Item 6" }), _jsxs(DropdownMenu.Item, { children: ["With icon", _jsx(DropdownMenu.ItemRightSlot, { children: _jsx(Icon, { name: "flag" }) })] })] })] }), _jsxs(Select, { value: "1", itemToStringLabel: (i) => `Item ${i}`, children: [_jsx(Select.Trigger, {}), _jsxs(Select.Content, { children: [_jsx(Select.Item, { value: "1", children: "Item 1" }), _jsx(Select.Item, { value: "2", children: "Item 2" }), _jsx(Select.Item, { value: "3", children: "Item 3" }), _jsx(Select.Item, { value: "4", children: "Item 4" }), _jsx(Select.Item, { value: "5", children: "Item 5" }), _jsx(Select.Item, { value: "6", children: "Item 6" }), _jsx(Select.Item, { value: "7", children: "Item 7" }), _jsx(Select.Item, { value: "8", children: "Item 8" }), _jsx(Select.Item, { value: "9", children: "Item 9" }), _jsx(Select.Item, { value: "10", children: "Item 10" })] })] }), _jsxs(Dialog, { children: [_jsx(Dialog.Trigger, { render: _jsx(Button, {}), children: "Click" }), _jsxs(Dialog.Content, { children: [_jsx(Dialog.Title, { children: "Hello there" }), _jsx(Dialog.Description, { children: "Im a dialog" }), _jsxs(Dialog.Actions, { children: [_jsx(Dialog.Close, { children: "Close" }), _jsx(Button, { color: "primary", children: "Action" })] })] })] }), _jsx(DateRangePicker, { style: { gridColumn: 'span 2' }, value: {
|
|
27
27
|
start: new Date(),
|
|
28
28
|
end: nextWeek,
|
|
29
|
-
}, onChange: () => { } }), _jsx(Progress, { value: 50, style: { margin: 'auto' } }), _jsx(Slider, { defaultValue: 50, min: 0, max: 100 }), _jsxs(Box, { surface: "primary", p: true, gap: true,
|
|
29
|
+
}, onChange: () => { } }), _jsx(Progress, { value: 50, style: { margin: 'auto' } }), _jsx(Slider, { defaultValue: 50, min: 0, max: 100 }), _jsxs(Box, { surface: "primary", p: true, gap: true, col: true, children: [_jsx(Heading, { emphasis: "primary", children: "Primary surface" }), _jsx(Heading, { emphasis: "secondary", children: "Primary surface" }), _jsx(Heading, { emphasis: "ambient", children: "Primary surface" }), _jsx("div", { children: "Primary surface" }), _jsx(Button, { emphasis: "ghost", children: "Ghost" })] }), _jsxs(Box, { surface: "primary", color: "accent", p: true, col: true, style: { maxHeight: 200 }, overflow: "auto-y", children: [_jsx(Heading, { emphasis: "primary", children: "Accent surface" }), _jsx(P, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx(P, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx(P, { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx(TextSkeleton, { maxLength: 30 }), _jsx(TextSkeleton, { maxLength: 10 }), "Accent surface"] }), _jsx(Box, { surface: "secondary", p: true, col: true, children: "Secondary surface" }), _jsx(Box, { surface: "ambient", p: true, col: true, children: "Ambient surface" }), _jsxs(Box, { surface: true, color: "attention", p: true, col: true, children: [_jsx(H2, { children: "Attention surface" }), _jsx(H3, { children: "Attention surface" }), "Attention surface", _jsx(Button, { emphasis: "ghost", children: "Ghost" })] }), _jsx(Box, { children: _jsx(Note, { children: "Note note" }) }), _jsx(Box, { justify: "start", items: "start", children: _jsxs(HorizontalList, { openDirection: "down", children: [_jsx(Button, { size: "small", children: "One" }), _jsx(Button, { size: "small", children: "Two" }), _jsx(Button, { size: "small", children: "Three" }), _jsx(Button, { size: "small", children: "Four" }), _jsx(Button, { size: "small", children: "Five" }), _jsx(Button, { size: "small", children: "Six" }), _jsx(Button, { size: "small", children: "Seven" }), _jsx(Button, { size: "small", children: "Eight" }), _jsx(Button, { size: "small", children: "Nine" }), _jsx(Button, { size: "small", children: "Ten" }), _jsx(Button, { size: "small", children: "Eleven" })] }) }), _jsx(ImageUploader, { style: { height: 200 }, value: null, onChange: () => { } })] }) }), _jsx(PageNav, { children: _jsxs(NavBarRoot, { children: [_jsxs(NavBarItem, { children: [_jsx(NavBarItemIconWrapper, { children: _jsx(NavBarItemIcon, { name: "cart" }) }), _jsx(NavBarItemText, { children: "Item 1 long" })] }), _jsxs(NavBarItem, { active: true, children: [_jsx(NavBarItemIconWrapper, { children: _jsx(NavBarItemIcon, { name: "book" }) }), _jsx(NavBarItemText, { children: "Item 2" }), _jsx(NavBarItemPip, {})] }), _jsxs(NavBarItem, { color: "neutral", children: [_jsx(NavBarItemIconWrapper, { children: _jsx(NavBarItemIcon, { render: _jsx(Icon, { name: "book" }) }) }), _jsx(NavBarItemText, { children: "Neutral" })] }), _jsxs(NavBarItem, { color: "neutral", active: true, children: [_jsx(NavBarItemIconWrapper, { children: _jsx(NavBarItemIcon, { render: _jsx(Icon, { name: "book" }) }) }), _jsx(NavBarItemText, { children: "Neutral" }), _jsx(NavBarItemPip, {})] })] }) })] }));
|
|
30
30
|
}
|
|
31
31
|
export const Nesting = {
|
|
32
32
|
render() {
|
|
33
|
-
return (_jsxs(Box, {
|
|
33
|
+
return (_jsxs(Box, { col: true, p: true, gap: true, children: [_jsx(Box, { gap: true, surface: "primary", children: _jsx(Button, { color: "primary", children: "Root theme" }) }), _jsx(DemoUI, { className: "@mode-eggplant override-dark", style: { flex: 1 } })] }));
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
export const Custom = {
|
|
@@ -45,7 +45,7 @@ export const Custom = {
|
|
|
45
45
|
[$userColorSaturation]: Math.random(),
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
-
return (_jsxs(Box, {
|
|
48
|
+
return (_jsxs(Box, { col: true, full: true, gap: true, items: "stretch", style: theme, children: [_jsx(Button, { onClick: reroll, children: "Reroll" }), _jsx(DemoUI, { className: "@mode-user" })] }));
|
|
49
49
|
},
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=themes.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.stories.js","sourceRoot":"","sources":["../src/themes.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EACN,UAAU,EACV,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,eAAe,EACf,MAAM,EACN,YAAY,EACZ,EAAE,EACF,EAAE,EACF,OAAO,EACP,cAAc,EACd,aAAa,EACb,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,UAAU,EACV,IAAI,EACJ,CAAC,EACD,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,WAAW,EACX,OAAO,GACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACX,QAAQ,EAAE,EAAE,QAAQ,EAAE,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AAG,CAAC;gBAChD,CAAC,oBAAoB,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE;aACrC,CAAC,CAAC;QACJ,CAAC,CAAC;QACF,OAAO,CACN,MAAC,GAAG,IAAC,GAAG,QAAC,IAAI,QAAC,GAAG,QAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,KAAY,aACpD,KAAC,MAAM,IAAC,OAAO,EAAE,MAAM,uBAAiB,EACxC,KAAC,MAAM,IAAC,SAAS,EAAC,YAAY,GAAG,IAC5B,CACN,CAAC;IACH,CAAC;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a-type/ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/a-type/ui"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@a-type/utils": "^1.1.9",
|
|
41
|
-
"@arbor-css/core": "^0.0.
|
|
42
|
-
"@arbor-css/postcss": "^0.0.
|
|
41
|
+
"@arbor-css/core": "^0.0.135",
|
|
42
|
+
"@arbor-css/postcss": "^0.0.135",
|
|
43
43
|
"@base-ui/react": "^1.4.1",
|
|
44
44
|
"@use-gesture/react": "^10.3.1",
|
|
45
45
|
"browser-image-resizer": "^2.4.1",
|
package/src/arbor/arbor.ts
CHANGED
|
@@ -266,17 +266,19 @@ export function presetAtype<
|
|
|
266
266
|
}),
|
|
267
267
|
hover: create('hover', {
|
|
268
268
|
definition: (css) => css`
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
'--
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
269
|
+
@media (hover: hover) and (pointer: fine) {
|
|
270
|
+
&:hover {
|
|
271
|
+
${base.mixins.bgHeavier.apply({ '--step': 1 })}
|
|
272
|
+
${base.mixins.ring.apply({
|
|
273
|
+
'--ring': base.functions.ring.compute({
|
|
274
|
+
'--color': $.mixins.bg.ref,
|
|
275
|
+
'--size': '4px',
|
|
276
|
+
}),
|
|
277
|
+
})}
|
|
277
278
|
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
&[data-emphasis="primary"] {
|
|
280
|
+
${base.mixins.bgLighter.apply({ '--step': 1 })}
|
|
281
|
+
}
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
`,
|
package/src/colors.stories.tsx
CHANGED
|
@@ -60,10 +60,10 @@ export const Default: Story = {
|
|
|
60
60
|
<Box col>
|
|
61
61
|
<input type="color" className="sticky top-0 z-1" />
|
|
62
62
|
<Box full>
|
|
63
|
-
<Box
|
|
63
|
+
<Box col grow p surface="ambient">
|
|
64
64
|
{ranges}
|
|
65
65
|
</Box>
|
|
66
|
-
<Box
|
|
66
|
+
<Box col className="@mode-dark" surface="ambient" grow p>
|
|
67
67
|
{ranges}
|
|
68
68
|
</Box>
|
|
69
69
|
</Box>
|
|
@@ -120,7 +120,7 @@ export const Modifiers: Story = {
|
|
|
120
120
|
: {};
|
|
121
121
|
return (
|
|
122
122
|
<Box col>
|
|
123
|
-
<ModifierRange className="@mode-
|
|
123
|
+
<ModifierRange className="@mode-neutral" />
|
|
124
124
|
<ModifierRange className="@mode-lemon" />
|
|
125
125
|
<ModifierRange className="@mode-leek" />
|
|
126
126
|
<ModifierRange className="@mode-tomato" />
|
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
position: relative;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
&[data-direction='col'] {
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
}
|
|
12
|
-
&[data-direction='row-reverse'] {
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
&[data-reverse] {
|
|
13
8
|
flex-direction: row-reverse;
|
|
14
9
|
}
|
|
15
|
-
&[data-
|
|
16
|
-
flex-direction: column
|
|
10
|
+
&[data-col] {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
&[data-reverse] {
|
|
13
|
+
flex-direction: column-reverse;
|
|
14
|
+
}
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
&[data-wrap='wrap'],
|
|
@@ -197,12 +195,16 @@
|
|
|
197
195
|
@apply --mx-bg-faded(80%);
|
|
198
196
|
@apply --mx-borderColor-faded(80%);
|
|
199
197
|
}
|
|
198
|
+
&[data-dim='true'] {
|
|
199
|
+
@apply --mx-fg-lighter(2.5);
|
|
200
|
+
}
|
|
200
201
|
|
|
201
202
|
&[data-grow='true'] {
|
|
202
203
|
flex-grow: 1;
|
|
203
204
|
}
|
|
204
205
|
&[data-shrink='true'] {
|
|
205
206
|
flex-shrink: 1;
|
|
207
|
+
min-width: 0;
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
@apply --mx-shadow;
|
|
@@ -5,6 +5,7 @@ import { Progress } from '../progress/Progress.js';
|
|
|
5
5
|
import { Slider } from '../slider/Slider.js';
|
|
6
6
|
import { Switch } from '../switch/Switch.js';
|
|
7
7
|
import { ToggleGroup } from '../toggleGroup/toggleGroup.js';
|
|
8
|
+
import { Text } from '../typography/typography.js';
|
|
8
9
|
import { Box } from './Box.js';
|
|
9
10
|
|
|
10
11
|
const meta = {
|
|
@@ -152,3 +153,18 @@ export const Surfaces: Story = {
|
|
|
152
153
|
);
|
|
153
154
|
},
|
|
154
155
|
};
|
|
156
|
+
|
|
157
|
+
export const DimComparison: Story = {
|
|
158
|
+
render(args) {
|
|
159
|
+
return (
|
|
160
|
+
<Box gap>
|
|
161
|
+
<Box surface="ambient" dim>
|
|
162
|
+
Dimmed box
|
|
163
|
+
</Box>
|
|
164
|
+
<Box surface="ambient">
|
|
165
|
+
<Text dim>Dimmed text</Text>
|
|
166
|
+
</Box>
|
|
167
|
+
</Box>
|
|
168
|
+
);
|
|
169
|
+
},
|
|
170
|
+
};
|
|
@@ -21,27 +21,84 @@ type ShadowValue = `${MaybeMinus}${ShadowSize}${MaybeUp}`;
|
|
|
21
21
|
|
|
22
22
|
export interface BoxProps extends Omit<SlotDivProps, 'wrap'> {
|
|
23
23
|
className?: string;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Apply flex-direction: column - default is row
|
|
26
|
+
*/
|
|
26
27
|
col?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Reverse flex direction
|
|
30
|
+
*/
|
|
31
|
+
reverse?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Adjust align-items
|
|
34
|
+
*/
|
|
27
35
|
items?: BoxAlignment;
|
|
36
|
+
/**
|
|
37
|
+
* Adjust justify-content
|
|
38
|
+
*/
|
|
28
39
|
justify?: BoxJustification;
|
|
29
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Apply both align-items and justify-content together
|
|
42
|
+
*/
|
|
43
|
+
layout?:
|
|
44
|
+
| `${BoxAlignment} ${BoxJustification}`
|
|
45
|
+
| `${BoxAlignment & BoxJustification}`;
|
|
46
|
+
/**
|
|
47
|
+
* Adjust gap
|
|
48
|
+
*/
|
|
30
49
|
gap?: BoxSpacingSize | boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Add flex-wrap
|
|
52
|
+
*/
|
|
31
53
|
wrap?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Adjust padding
|
|
56
|
+
*/
|
|
32
57
|
p?: BoxSpacingSize | boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Apply surface intents
|
|
60
|
+
*/
|
|
33
61
|
surface?: boolean | 'ambient' | 'secondary' | 'primary';
|
|
62
|
+
/**
|
|
63
|
+
* Add a default border
|
|
64
|
+
*/
|
|
34
65
|
border?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Add 100% w/h
|
|
68
|
+
*/
|
|
35
69
|
full?: boolean | 'width' | 'height';
|
|
70
|
+
/**
|
|
71
|
+
* Control overflow / scroll
|
|
72
|
+
*/
|
|
36
73
|
overflow?: 'hidden' | 'clip' | 'auto' | 'auto-x' | 'auto-y';
|
|
74
|
+
/**
|
|
75
|
+
* Apply flex-grow
|
|
76
|
+
*/
|
|
37
77
|
grow?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Apply flex-shrink and min-width
|
|
80
|
+
*/
|
|
81
|
+
shrink?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Add shadow
|
|
84
|
+
*/
|
|
38
85
|
elevated?: ShadowValue;
|
|
39
86
|
/** @deprecated - use round */
|
|
40
87
|
rounded?: 'xs' | 'sm' | 'md' | 'lg' | boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Adust border radius
|
|
90
|
+
*/
|
|
41
91
|
round?: 'xs' | 'sm' | 'md' | 'lg' | boolean;
|
|
42
92
|
ref?: Ref<HTMLDivElement>;
|
|
43
93
|
container?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Adds transparency
|
|
96
|
+
*/
|
|
44
97
|
glass?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Applies a gray foreground color
|
|
100
|
+
*/
|
|
101
|
+
dim?: boolean;
|
|
45
102
|
self?: 'auto' | 'start' | 'end' | 'center' | 'stretch';
|
|
46
103
|
}
|
|
47
104
|
|
|
@@ -49,13 +106,12 @@ export function Box({
|
|
|
49
106
|
className,
|
|
50
107
|
items: itemsSolo,
|
|
51
108
|
justify: justifySolo,
|
|
52
|
-
layout
|
|
109
|
+
layout,
|
|
53
110
|
gap,
|
|
54
111
|
wrap,
|
|
55
112
|
p,
|
|
56
113
|
col,
|
|
57
|
-
|
|
58
|
-
direction = d,
|
|
114
|
+
reverse,
|
|
59
115
|
style,
|
|
60
116
|
container,
|
|
61
117
|
surface,
|
|
@@ -64,16 +120,18 @@ export function Box({
|
|
|
64
120
|
full,
|
|
65
121
|
overflow,
|
|
66
122
|
grow,
|
|
123
|
+
shrink,
|
|
67
124
|
elevated,
|
|
68
125
|
rounded = surface ? true : undefined,
|
|
69
126
|
round = rounded,
|
|
70
127
|
glass,
|
|
128
|
+
dim,
|
|
71
129
|
self,
|
|
72
130
|
ref,
|
|
73
131
|
...rest
|
|
74
132
|
}: BoxProps) {
|
|
75
|
-
const items = itemsSolo ??
|
|
76
|
-
const justify = justifySolo ??
|
|
133
|
+
const items = itemsSolo ?? layout?.split(' ')[0];
|
|
134
|
+
const justify = justifySolo ?? layout?.split(' ')[1] ?? layout;
|
|
77
135
|
const [inset, elevation, up] = parseElevated(elevated);
|
|
78
136
|
|
|
79
137
|
const main = (
|
|
@@ -81,13 +139,9 @@ export function Box({
|
|
|
81
139
|
ref={ref}
|
|
82
140
|
{...rest}
|
|
83
141
|
style={style}
|
|
84
|
-
className={clsx(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
cls.root,
|
|
88
|
-
className,
|
|
89
|
-
)}
|
|
90
|
-
data-direction={direction}
|
|
142
|
+
className={clsx(color && `@mode-${color}`, cls.root, className)}
|
|
143
|
+
data-col={col ? '' : undefined}
|
|
144
|
+
data-reverse={reverse ? '' : undefined}
|
|
91
145
|
data-gap={gap}
|
|
92
146
|
data-items={items}
|
|
93
147
|
data-justify={justify}
|
|
@@ -99,12 +153,14 @@ export function Box({
|
|
|
99
153
|
data-full={full}
|
|
100
154
|
data-overflow={overflow}
|
|
101
155
|
data-grow={grow}
|
|
156
|
+
data-shrink={shrink}
|
|
102
157
|
data-elevated={elevation}
|
|
103
158
|
data-shadow-up={up}
|
|
104
159
|
data-shadow-inset={inset}
|
|
105
160
|
data-container={container}
|
|
106
161
|
data-glass={glass}
|
|
107
162
|
data-self={self}
|
|
163
|
+
data-dim={dim}
|
|
108
164
|
/>
|
|
109
165
|
);
|
|
110
166
|
|
|
@@ -76,7 +76,6 @@ export function ButtonRoot({
|
|
|
76
76
|
const buttonProps = {
|
|
77
77
|
ref: finalRef,
|
|
78
78
|
...iconOnlyTools.props,
|
|
79
|
-
...props,
|
|
80
79
|
disabled: disabled || isLoading,
|
|
81
80
|
'data-input-border-flush': true,
|
|
82
81
|
'data-disabled': visuallyDisabled,
|
|
@@ -96,6 +95,7 @@ export function ButtonRoot({
|
|
|
96
95
|
color ? `@mode-${color}` : '',
|
|
97
96
|
className,
|
|
98
97
|
),
|
|
98
|
+
...props,
|
|
99
99
|
};
|
|
100
100
|
// set state when toggleable
|
|
101
101
|
if (toggled !== undefined) {
|
|
@@ -48,7 +48,9 @@ export const AsButton: Story = {
|
|
|
48
48
|
render(args) {
|
|
49
49
|
return (
|
|
50
50
|
<Box gap items="center">
|
|
51
|
-
<
|
|
51
|
+
<Chip render={<Button />} emphasis="primary">
|
|
52
|
+
Clickable Chip
|
|
53
|
+
</Chip>
|
|
52
54
|
<Chip {...args}>Non-clickable Chip</Chip>
|
|
53
55
|
</Box>
|
|
54
56
|
);
|
|
@@ -8,13 +8,13 @@ export interface ChipProps extends SlotDivProps {
|
|
|
8
8
|
emphasis?: 'default' | 'primary' | 'ambient';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function Chip({ className, ...rest }: ChipProps) {
|
|
11
|
+
export function Chip({ className, emphasis, ...rest }: ChipProps) {
|
|
12
12
|
return (
|
|
13
13
|
<SlotDiv
|
|
14
|
-
className={classNames(
|
|
14
|
+
className={classNames(cls.root, className)}
|
|
15
15
|
role={rest.onClick ? 'button' : undefined}
|
|
16
|
-
data-emphasis={rest.emphasis ?? 'default'}
|
|
17
16
|
{...rest}
|
|
17
|
+
data-emphasis={emphasis ?? 'default'}
|
|
18
18
|
/>
|
|
19
19
|
);
|
|
20
20
|
}
|
|
@@ -110,7 +110,7 @@ export const EmojiPickerSkinToneSelector = ({
|
|
|
110
110
|
const [skinTone, setSkinTone] = useEmojiSkinTone();
|
|
111
111
|
|
|
112
112
|
return (
|
|
113
|
-
<Box
|
|
113
|
+
<Box gap className={className} {...props}>
|
|
114
114
|
{options.map((option) => (
|
|
115
115
|
<Button
|
|
116
116
|
key={option.skinTone}
|
package/src/themes.stories.tsx
CHANGED
|
@@ -94,7 +94,7 @@ export function DemoUI({
|
|
|
94
94
|
<Box gap wrap p items="start">
|
|
95
95
|
<Input placeholder="Placeholder" />
|
|
96
96
|
<TextArea placeholder="Placeholder" />
|
|
97
|
-
<Box
|
|
97
|
+
<Box gap items="center">
|
|
98
98
|
<Checkbox defaultChecked />
|
|
99
99
|
<span>Checkbox</span>
|
|
100
100
|
</Box>
|
|
@@ -105,7 +105,7 @@ export function DemoUI({
|
|
|
105
105
|
</Box>
|
|
106
106
|
<Box
|
|
107
107
|
layout="start safe-center"
|
|
108
|
-
|
|
108
|
+
col
|
|
109
109
|
gap
|
|
110
110
|
p
|
|
111
111
|
style={{ maxHeight: 200 }}
|
|
@@ -121,7 +121,7 @@ export function DemoUI({
|
|
|
121
121
|
<TextSkeleton maxLength={30} />
|
|
122
122
|
<TextSkeleton maxLength={10} />
|
|
123
123
|
</Box>
|
|
124
|
-
<Box
|
|
124
|
+
<Box col gap>
|
|
125
125
|
<Card>
|
|
126
126
|
<Card.Main onClick={() => {}}>
|
|
127
127
|
<Card.Title>Card Title</Card.Title>
|
|
@@ -257,7 +257,7 @@ export function DemoUI({
|
|
|
257
257
|
/>
|
|
258
258
|
<Progress value={50} style={{ margin: 'auto' }} />
|
|
259
259
|
<Slider defaultValue={50} min={0} max={100} />
|
|
260
|
-
<Box surface="primary" p gap
|
|
260
|
+
<Box surface="primary" p gap col>
|
|
261
261
|
<Heading emphasis="primary">Primary surface</Heading>
|
|
262
262
|
<Heading emphasis="secondary">Primary surface</Heading>
|
|
263
263
|
<Heading emphasis="ambient">Primary surface</Heading>
|
|
@@ -268,7 +268,7 @@ export function DemoUI({
|
|
|
268
268
|
surface="primary"
|
|
269
269
|
color="accent"
|
|
270
270
|
p
|
|
271
|
-
|
|
271
|
+
col
|
|
272
272
|
style={{ maxHeight: 200 }}
|
|
273
273
|
overflow="auto-y"
|
|
274
274
|
>
|
|
@@ -289,13 +289,13 @@ export function DemoUI({
|
|
|
289
289
|
<TextSkeleton maxLength={10} />
|
|
290
290
|
Accent surface
|
|
291
291
|
</Box>
|
|
292
|
-
<Box surface="secondary" p
|
|
292
|
+
<Box surface="secondary" p col>
|
|
293
293
|
Secondary surface
|
|
294
294
|
</Box>
|
|
295
|
-
<Box surface="ambient" p
|
|
295
|
+
<Box surface="ambient" p col>
|
|
296
296
|
Ambient surface
|
|
297
297
|
</Box>
|
|
298
|
-
<Box surface color="attention" p
|
|
298
|
+
<Box surface color="attention" p col>
|
|
299
299
|
<H2>Attention surface</H2>
|
|
300
300
|
<H3>Attention surface</H3>
|
|
301
301
|
Attention surface
|
|
@@ -363,8 +363,8 @@ export function DemoUI({
|
|
|
363
363
|
export const Nesting: Story = {
|
|
364
364
|
render() {
|
|
365
365
|
return (
|
|
366
|
-
<Box
|
|
367
|
-
<Box
|
|
366
|
+
<Box col p gap>
|
|
367
|
+
<Box gap surface="primary">
|
|
368
368
|
<Button color="primary">Root theme</Button>
|
|
369
369
|
</Box>
|
|
370
370
|
<DemoUI className="@mode-eggplant override-dark" style={{ flex: 1 }} />
|
|
@@ -386,7 +386,7 @@ export const Custom: Story = {
|
|
|
386
386
|
});
|
|
387
387
|
};
|
|
388
388
|
return (
|
|
389
|
-
<Box
|
|
389
|
+
<Box col full gap items="stretch" style={theme as any}>
|
|
390
390
|
<Button onClick={reroll}>Reroll</Button>
|
|
391
391
|
<DemoUI className="@mode-user" />
|
|
392
392
|
</Box>
|