@gsk_poc/untitled-ui-base 0.1.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.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/components/application/app-navigation/base-components/featured-cards.demo.tsx +86 -0
- package/components/application/app-navigation/base-components/featured-cards.story.tsx +49 -0
- package/components/application/app-navigation/header-navigation.demo.tsx +59 -0
- package/components/application/app-navigation/header-navigation.story.tsx +23 -0
- package/components/application/app-navigation/sidebar-navigation.demo.tsx +409 -0
- package/components/application/app-navigation/sidebar-navigation.story.tsx +47 -0
- package/components/application/carousel/carousel.demo.tsx +107 -0
- package/components/application/carousel/carousel.story.tsx +21 -0
- package/components/application/charts/activity-gauges.demo.tsx +251 -0
- package/components/application/charts/activity-gauges.story.tsx +27 -0
- package/components/application/charts/bar-charts.demo.tsx +506 -0
- package/components/application/charts/bar-charts.story.tsx +36 -0
- package/components/application/charts/line-charts.demo.tsx +604 -0
- package/components/application/charts/line-charts.story.tsx +43 -0
- package/components/application/charts/pie-charts.demo.tsx +193 -0
- package/components/application/charts/pie-charts.story.tsx +30 -0
- package/components/application/charts/progress-circles.demo.tsx +110 -0
- package/components/application/charts/progress-circles.story.tsx +33 -0
- package/components/application/charts/radar-charts.demo.tsx +203 -0
- package/components/application/charts/radar-charts.story.tsx +18 -0
- package/components/application/date-picker/date-picker.demo.tsx +217 -0
- package/components/application/date-picker/date-picker.story.tsx +44 -0
- package/components/application/file-upload/file-upload.demo.tsx +292 -0
- package/components/application/file-upload/file-upload.story.tsx +70 -0
- package/components/application/loading-indicator/loading-indicator.demo.tsx +73 -0
- package/components/application/loading-indicator/loading-indicator.story.tsx +22 -0
- package/components/application/pagination/pagination.demo.tsx +104 -0
- package/components/application/pagination/pagination.story.tsx +54 -0
- package/components/application/table/table.demo.tsx +1038 -0
- package/components/application/table/table.story.tsx +119 -0
- package/components/application/tabs/tabs.demo.tsx +322 -0
- package/components/application/tabs/tabs.story.tsx +43 -0
- package/components/base/avatar/avatar.demo.tsx +865 -0
- package/components/base/avatar/avatar.story.tsx +27 -0
- package/components/base/badges/badge-groups.demo.tsx +357 -0
- package/components/base/badges/badge-groups.story.tsx +25 -0
- package/components/base/badges/badges.demo.tsx +497 -0
- package/components/base/badges/badges.story.tsx +83 -0
- package/components/base/button-group/button-group.demo.tsx +131 -0
- package/components/base/button-group/button-group.story.tsx +16 -0
- package/components/base/buttons/app-store-buttons.demo.tsx +129 -0
- package/components/base/buttons/app-store-buttons.story.tsx +13 -0
- package/components/base/buttons/buttons.demo.tsx +1022 -0
- package/components/base/buttons/buttons.story.tsx +42 -0
- package/components/base/buttons/social-buttons.demo.tsx +432 -0
- package/components/base/buttons/social-buttons.story.tsx +20 -0
- package/components/base/checkbox/checkbox.demo.tsx +62 -0
- package/components/base/checkbox/checkbox.story.tsx +18 -0
- package/components/base/dropdown/dropdown.demo.tsx +137 -0
- package/components/base/dropdown/dropdown.story.tsx +22 -0
- package/components/base/input/inputs.demo.tsx +758 -0
- package/components/base/input/inputs.story.tsx +52 -0
- package/components/base/pin-input/pin-input.demo.tsx +126 -0
- package/components/base/pin-input/pin-input.story.tsx +22 -0
- package/components/base/progress-indicators/progress-indicators.demo.tsx +54 -0
- package/components/base/progress-indicators/progress-indicators.story.tsx +57 -0
- package/components/base/radio-buttons/radio-buttons.demo.tsx +77 -0
- package/components/base/radio-buttons/radio-buttons.story.tsx +19 -0
- package/components/base/select/select.demo.tsx +936 -0
- package/components/base/select/select.story.tsx +43 -0
- package/components/base/slider/slider.demo.tsx +19 -0
- package/components/base/slider/slider.story.tsx +26 -0
- package/components/base/tags/tags.demo.tsx +341 -0
- package/components/base/tags/tags.story.tsx +28 -0
- package/components/base/textarea/textarea.demo.tsx +25 -0
- package/components/base/textarea/textarea.story.tsx +15 -0
- package/components/base/toggle/toggle.demo.tsx +76 -0
- package/components/base/toggle/toggle.story.tsx +23 -0
- package/components/base/tooltip/tooltip.demo.tsx +125 -0
- package/components/base/tooltip/tooltip.story.tsx +21 -0
- package/components/foundations/featured-icon/featured-icon.demo.tsx +160 -0
- package/components/foundations/featured-icon/featured-icon.story.tsx +25 -0
- package/components/shared-assets/credit-card/credit-card.demo.tsx +106 -0
- package/components/shared-assets/credit-card/credit-card.story.tsx +41 -0
- package/dist/index.d.mts +1417 -0
- package/dist/index.d.ts +1417 -0
- package/dist/index.js +10435 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10345 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +126 -0
- package/styles/globals.css +65 -0
- package/styles/theme.css +430 -0
- package/styles/tokens-mapped.css +233 -0
- package/styles/tokens.css +807 -0
- package/styles/typography.css +430 -0
- package/tokens/design-tokens.dtcg.json +3515 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Archive, ArrowLeft, ArrowRight, Edit03, Placeholder, Plus, Trash01 } from "@untitledui/icons";
|
|
5
|
+
import type { Key } from "react-aria";
|
|
6
|
+
import { ButtonGroup, ButtonGroupItem } from "@/components/base/button-group/button-group";
|
|
7
|
+
import { Dot } from "@/components/foundations/dot-icon";
|
|
8
|
+
|
|
9
|
+
export const Default = () => (
|
|
10
|
+
<ButtonGroup selectedKeys={[]}>
|
|
11
|
+
<ButtonGroupItem id="archive">Archive</ButtonGroupItem>
|
|
12
|
+
<ButtonGroupItem id="edit">Edit</ButtonGroupItem>
|
|
13
|
+
<ButtonGroupItem id="delete">Delete</ButtonGroupItem>
|
|
14
|
+
</ButtonGroup>
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const LeadingIcon = () => (
|
|
18
|
+
<ButtonGroup selectedKeys={[]}>
|
|
19
|
+
<ButtonGroupItem id="archive" iconLeading={Archive}>
|
|
20
|
+
Archive
|
|
21
|
+
</ButtonGroupItem>
|
|
22
|
+
<ButtonGroupItem id="edit" iconLeading={Edit03}>
|
|
23
|
+
Edit
|
|
24
|
+
</ButtonGroupItem>
|
|
25
|
+
<ButtonGroupItem id="delete" iconLeading={Trash01}>
|
|
26
|
+
Delete
|
|
27
|
+
</ButtonGroupItem>
|
|
28
|
+
</ButtonGroup>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export const ButtonGroupDot = () => (
|
|
32
|
+
<ButtonGroup selectedKeys={["archive"]}>
|
|
33
|
+
<ButtonGroupItem id="archive" iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}>
|
|
34
|
+
Text
|
|
35
|
+
</ButtonGroupItem>
|
|
36
|
+
<ButtonGroupItem id="edit" iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}>
|
|
37
|
+
Text
|
|
38
|
+
</ButtonGroupItem>
|
|
39
|
+
<ButtonGroupItem id="delete" isDisabled iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}>
|
|
40
|
+
Text
|
|
41
|
+
</ButtonGroupItem>
|
|
42
|
+
</ButtonGroup>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export const DisabledIndividualButton = () => (
|
|
46
|
+
<ButtonGroup selectedKeys={[]}>
|
|
47
|
+
<ButtonGroupItem id="archive">Archive</ButtonGroupItem>
|
|
48
|
+
<ButtonGroupItem id="edit">Edit</ButtonGroupItem>
|
|
49
|
+
<ButtonGroupItem isDisabled id="delete">
|
|
50
|
+
Delete
|
|
51
|
+
</ButtonGroupItem>
|
|
52
|
+
</ButtonGroup>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
export const DisabledAll = () => (
|
|
56
|
+
<ButtonGroup isDisabled>
|
|
57
|
+
<ButtonGroupItem id="archive">Archive</ButtonGroupItem>
|
|
58
|
+
<ButtonGroupItem id="edit">Edit</ButtonGroupItem>
|
|
59
|
+
<ButtonGroupItem id="delete">Delete</ButtonGroupItem>
|
|
60
|
+
</ButtonGroup>
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export const SelectedItem = () => {
|
|
64
|
+
const [selectedKeys, setSelectedKeys] = useState<Set<Key>>(new Set(["today"]));
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<ButtonGroup selectedKeys={selectedKeys} onSelectionChange={setSelectedKeys}>
|
|
68
|
+
<ButtonGroupItem id="today">Today</ButtonGroupItem>
|
|
69
|
+
<ButtonGroupItem id="tomorrow">Tomorrow</ButtonGroupItem>
|
|
70
|
+
<ButtonGroupItem id="thisweek">This week</ButtonGroupItem>
|
|
71
|
+
</ButtonGroup>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const MultipleSelectedItems = () => {
|
|
76
|
+
const [selectedKeys, setSelectedKeys] = useState<Set<Key>>(new Set(["today"]));
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<ButtonGroup selectionMode="multiple" selectedKeys={selectedKeys} onSelectionChange={setSelectedKeys}>
|
|
80
|
+
<ButtonGroupItem id="today">Today</ButtonGroupItem>
|
|
81
|
+
<ButtonGroupItem id="tomorrow">Tomorrow</ButtonGroupItem>
|
|
82
|
+
<ButtonGroupItem id="thisweek">This week</ButtonGroupItem>
|
|
83
|
+
</ButtonGroup>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const All = () => (
|
|
88
|
+
<div className="flex flex-col gap-4">
|
|
89
|
+
<ButtonGroup selectedKeys={["archive"]}>
|
|
90
|
+
<ButtonGroupItem id="archive">Archive</ButtonGroupItem>
|
|
91
|
+
<ButtonGroupItem id="edit">Edit</ButtonGroupItem>
|
|
92
|
+
<ButtonGroupItem id="delete" isDisabled>
|
|
93
|
+
Delete
|
|
94
|
+
</ButtonGroupItem>
|
|
95
|
+
</ButtonGroup>
|
|
96
|
+
|
|
97
|
+
<ButtonGroup selectedKeys={["archive"]}>
|
|
98
|
+
<ButtonGroupItem id="archive" iconLeading={Placeholder}>
|
|
99
|
+
Archive
|
|
100
|
+
</ButtonGroupItem>
|
|
101
|
+
<ButtonGroupItem id="edit" iconLeading={Placeholder}>
|
|
102
|
+
Edit
|
|
103
|
+
</ButtonGroupItem>
|
|
104
|
+
<ButtonGroupItem id="delete" isDisabled iconLeading={Placeholder}>
|
|
105
|
+
Delete
|
|
106
|
+
</ButtonGroupItem>
|
|
107
|
+
</ButtonGroup>
|
|
108
|
+
|
|
109
|
+
<ButtonGroup selectedKeys={["archive"]}>
|
|
110
|
+
<ButtonGroupItem id="archive" iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}>
|
|
111
|
+
Archive
|
|
112
|
+
</ButtonGroupItem>
|
|
113
|
+
<ButtonGroupItem id="edit" iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}>
|
|
114
|
+
Edit
|
|
115
|
+
</ButtonGroupItem>
|
|
116
|
+
<ButtonGroupItem
|
|
117
|
+
id="delete"
|
|
118
|
+
isDisabled
|
|
119
|
+
iconLeading={<Dot className="mx-0.75 size-2 text-fg-success-secondary in-disabled:text-fg-disabled_subtle" />}
|
|
120
|
+
>
|
|
121
|
+
Delete
|
|
122
|
+
</ButtonGroupItem>
|
|
123
|
+
</ButtonGroup>
|
|
124
|
+
|
|
125
|
+
<ButtonGroup selectedKeys={["archive"]}>
|
|
126
|
+
<ButtonGroupItem id="archive" iconLeading={ArrowLeft} aria-label="Previous" />
|
|
127
|
+
<ButtonGroupItem id="edit" iconLeading={Plus} aria-label="Add" />
|
|
128
|
+
<ButtonGroupItem id="delete" isDisabled iconLeading={ArrowRight} aria-label="Next" />
|
|
129
|
+
</ButtonGroup>
|
|
130
|
+
</div>
|
|
131
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import * as ButtonGroup from "@/components/base/button-group/button-group.demo";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Base components/Button groups",
|
|
6
|
+
decorators: [
|
|
7
|
+
(Story: FC) => (
|
|
8
|
+
<div className="flex min-h-screen w-full bg-primary p-4">
|
|
9
|
+
<Story />
|
|
10
|
+
</div>
|
|
11
|
+
),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const ButtonGroups = () => <ButtonGroup.All />;
|
|
16
|
+
ButtonGroups.storyName = "Button groups";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { AppGalleryButton, AppStoreButton, GalaxyStoreButton, GooglePlayButton } from "@/components/base/buttons/app-store-buttons";
|
|
4
|
+
import {
|
|
5
|
+
AppGalleryButton as AppGalleryButtonOutline,
|
|
6
|
+
AppStoreButton as AppStoreButtonOutline,
|
|
7
|
+
GalaxyStoreButton as GalaxyStoreButtonOutline,
|
|
8
|
+
GooglePlayButton as GooglePlayButtonOutline,
|
|
9
|
+
} from "@/components/base/buttons/app-store-buttons-outline";
|
|
10
|
+
|
|
11
|
+
export const AppStoreButtonDefaultDemo = () => {
|
|
12
|
+
return (
|
|
13
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
14
|
+
<GooglePlayButton size="md" />
|
|
15
|
+
<AppStoreButton size="md" />
|
|
16
|
+
<GalaxyStoreButton size="md" />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const AppStoreButtonGooglePlayDemo = () => {
|
|
22
|
+
return (
|
|
23
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
24
|
+
<GooglePlayButton size="md" />
|
|
25
|
+
<GooglePlayButton size="lg" />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const AppStoreButtonAppStoreDemo = () => {
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
33
|
+
<AppStoreButton size="md" />
|
|
34
|
+
<AppStoreButton size="lg" />
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const AppStoreButtonGalaxyStoreDemo = () => {
|
|
40
|
+
return (
|
|
41
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
42
|
+
<GalaxyStoreButton size="md" />
|
|
43
|
+
<GalaxyStoreButton size="lg" />
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const AppStoreButtonAppGalleryDemo = () => {
|
|
49
|
+
return (
|
|
50
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
51
|
+
<AppGalleryButton size="md" />
|
|
52
|
+
<AppGalleryButton size="lg" />
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const AppStoreButtonGooglePlayOutlineDemo = () => {
|
|
58
|
+
return (
|
|
59
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
60
|
+
<GooglePlayButtonOutline size="md" />
|
|
61
|
+
<GooglePlayButtonOutline size="lg" />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const AppStoreButtonAppStoreOutlineDemo = () => {
|
|
67
|
+
return (
|
|
68
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
69
|
+
<AppStoreButtonOutline size="md" />
|
|
70
|
+
<AppStoreButtonOutline size="lg" />
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const AppStoreButtonGalaxyStoreOutlineDemo = () => {
|
|
76
|
+
return (
|
|
77
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
78
|
+
<GalaxyStoreButtonOutline size="md" />
|
|
79
|
+
<GalaxyStoreButtonOutline size="lg" />
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const AppStoreButtonAppGalleryOutlineDemo = () => {
|
|
85
|
+
return (
|
|
86
|
+
<div className="flex flex-col items-start gap-3 md:flex-row">
|
|
87
|
+
<AppGalleryButtonOutline size="md" />
|
|
88
|
+
<AppGalleryButtonOutline size="lg" />
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const Md = () => {
|
|
94
|
+
return (
|
|
95
|
+
<div className="flex flex-col gap-4">
|
|
96
|
+
<div className="flex items-start gap-8">
|
|
97
|
+
<GooglePlayButton size="md" />
|
|
98
|
+
<AppStoreButton size="md" />
|
|
99
|
+
<GalaxyStoreButton size="md" />
|
|
100
|
+
<AppGalleryButton size="md" />
|
|
101
|
+
</div>
|
|
102
|
+
<div className="flex items-start gap-8">
|
|
103
|
+
<GooglePlayButtonOutline size="md" />
|
|
104
|
+
<AppStoreButtonOutline size="md" />
|
|
105
|
+
<GalaxyStoreButtonOutline size="md" />
|
|
106
|
+
<AppGalleryButtonOutline size="md" />
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const Lg = () => {
|
|
113
|
+
return (
|
|
114
|
+
<div className="flex flex-col gap-4">
|
|
115
|
+
<div className="flex items-start gap-8">
|
|
116
|
+
<GooglePlayButton size="lg" />
|
|
117
|
+
<AppStoreButton size="lg" />
|
|
118
|
+
<GalaxyStoreButton size="lg" />
|
|
119
|
+
<AppGalleryButton size="lg" />
|
|
120
|
+
</div>
|
|
121
|
+
<div className="flex items-start gap-8">
|
|
122
|
+
<GooglePlayButtonOutline size="lg" />
|
|
123
|
+
<AppStoreButtonOutline size="lg" />
|
|
124
|
+
<GalaxyStoreButtonOutline size="lg" />
|
|
125
|
+
<AppGalleryButtonOutline size="lg" />
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Buttons from "@/components/base/buttons/app-store-buttons.demo";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Base components/Buttons/Mobile app store buttons",
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const MobileAppStoreButtons = () => (
|
|
8
|
+
<div className="flex min-h-screen w-full flex-col gap-16 bg-primary p-8">
|
|
9
|
+
<Buttons.Md />
|
|
10
|
+
<Buttons.Lg />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
MobileAppStoreButtons.storyName = "Mobile app store buttons";
|