prime-ui-kit 0.7.2 → 0.7.3
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/components/drawer/Drawer.d.ts +11 -66
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/examples/cart-preview.d.ts.map +1 -1
- package/dist/components/drawer/examples/explicit-panel.d.ts +1 -1
- package/dist/components/drawer/examples/explicit-panel.d.ts.map +1 -1
- package/dist/components/drawer/examples/filters-panel.d.ts.map +1 -1
- package/dist/components/drawer/examples/mobile-nav-sheet.d.ts +1 -1
- package/dist/components/drawer/examples/mobile-nav-sheet.d.ts.map +1 -1
- package/dist/components/drawer/examples/settings-side.d.ts +1 -1
- package/dist/components/drawer/examples/settings-side.d.ts.map +1 -1
- package/dist/components/index.css +77 -82
- package/dist/components/index.css.map +3 -3
- package/dist/components/index.js +98 -158
- package/dist/components/index.js.map +3 -3
- package/dist/hooks/useScrollLock.d.ts +1 -1
- package/dist/index.css +77 -82
- package/dist/index.css.map +3 -3
- package/dist/index.js +98 -158
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/components/drawer/COMPONENT.md +93 -153
- package/src/components/drawer/examples/cart-preview.tsx +43 -38
- package/src/components/drawer/examples/explicit-panel.tsx +29 -29
- package/src/components/drawer/examples/filters-panel.tsx +45 -40
- package/src/components/drawer/examples/mobile-nav-sheet.tsx +35 -30
- package/src/components/drawer/examples/settings-side.tsx +47 -42
|
@@ -1,54 +1,59 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
1
3
|
import { Button } from "@/components/button/Button";
|
|
2
4
|
import { Drawer } from "@/components/drawer/Drawer";
|
|
3
5
|
import { Input } from "@/components/input/Input";
|
|
6
|
+
import { Icon } from "@/icons";
|
|
4
7
|
|
|
5
8
|
import styles from "./examples-scenarios.module.css";
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
|
-
* Settings on the trailing edge: form fields
|
|
11
|
+
* Settings on the trailing edge: form fields live in the scroll body, actions are fixed in footer.
|
|
9
12
|
*/
|
|
10
13
|
export default function DrawerExampleSettingsSide() {
|
|
14
|
+
const [open, setOpen] = React.useState(false);
|
|
15
|
+
|
|
11
16
|
return (
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</
|
|
49
|
-
</
|
|
50
|
-
</
|
|
51
|
-
</Drawer
|
|
52
|
-
|
|
17
|
+
<>
|
|
18
|
+
<Button.Root type="button" variant="neutral" mode="stroke" onClick={() => setOpen(true)}>
|
|
19
|
+
Workspace settings
|
|
20
|
+
</Button.Root>
|
|
21
|
+
<Drawer
|
|
22
|
+
open={open}
|
|
23
|
+
onOpenChange={setOpen}
|
|
24
|
+
title="Workspace"
|
|
25
|
+
description="Team defaults and scheduling options"
|
|
26
|
+
icon={<Icon name="nav.layoutGrid" tone="subtle" />}
|
|
27
|
+
side="right"
|
|
28
|
+
footer={
|
|
29
|
+
<div className={styles.footerActions}>
|
|
30
|
+
<Button.Root
|
|
31
|
+
type="button"
|
|
32
|
+
variant="neutral"
|
|
33
|
+
mode="stroke"
|
|
34
|
+
onClick={() => setOpen(false)}
|
|
35
|
+
>
|
|
36
|
+
Cancel
|
|
37
|
+
</Button.Root>
|
|
38
|
+
<Button.Root type="button" variant="primary" onClick={() => setOpen(false)}>
|
|
39
|
+
Save changes
|
|
40
|
+
</Button.Root>
|
|
41
|
+
</div>
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
<div className={styles.settingsStack}>
|
|
45
|
+
<Input.Root label="Workspace name">
|
|
46
|
+
<Input.Wrapper>
|
|
47
|
+
<Input.Field defaultValue="Acme Design" />
|
|
48
|
+
</Input.Wrapper>
|
|
49
|
+
</Input.Root>
|
|
50
|
+
<Input.Root label="Default timezone" hint="Used for scheduled reports.">
|
|
51
|
+
<Input.Wrapper>
|
|
52
|
+
<Input.Field defaultValue="Europe/Berlin" />
|
|
53
|
+
</Input.Wrapper>
|
|
54
|
+
</Input.Root>
|
|
55
|
+
</div>
|
|
56
|
+
</Drawer>
|
|
57
|
+
</>
|
|
53
58
|
);
|
|
54
59
|
}
|