@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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/components/application/app-navigation/base-components/featured-cards.demo.tsx +86 -0
  4. package/components/application/app-navigation/base-components/featured-cards.story.tsx +49 -0
  5. package/components/application/app-navigation/header-navigation.demo.tsx +59 -0
  6. package/components/application/app-navigation/header-navigation.story.tsx +23 -0
  7. package/components/application/app-navigation/sidebar-navigation.demo.tsx +409 -0
  8. package/components/application/app-navigation/sidebar-navigation.story.tsx +47 -0
  9. package/components/application/carousel/carousel.demo.tsx +107 -0
  10. package/components/application/carousel/carousel.story.tsx +21 -0
  11. package/components/application/charts/activity-gauges.demo.tsx +251 -0
  12. package/components/application/charts/activity-gauges.story.tsx +27 -0
  13. package/components/application/charts/bar-charts.demo.tsx +506 -0
  14. package/components/application/charts/bar-charts.story.tsx +36 -0
  15. package/components/application/charts/line-charts.demo.tsx +604 -0
  16. package/components/application/charts/line-charts.story.tsx +43 -0
  17. package/components/application/charts/pie-charts.demo.tsx +193 -0
  18. package/components/application/charts/pie-charts.story.tsx +30 -0
  19. package/components/application/charts/progress-circles.demo.tsx +110 -0
  20. package/components/application/charts/progress-circles.story.tsx +33 -0
  21. package/components/application/charts/radar-charts.demo.tsx +203 -0
  22. package/components/application/charts/radar-charts.story.tsx +18 -0
  23. package/components/application/date-picker/date-picker.demo.tsx +217 -0
  24. package/components/application/date-picker/date-picker.story.tsx +44 -0
  25. package/components/application/file-upload/file-upload.demo.tsx +292 -0
  26. package/components/application/file-upload/file-upload.story.tsx +70 -0
  27. package/components/application/loading-indicator/loading-indicator.demo.tsx +73 -0
  28. package/components/application/loading-indicator/loading-indicator.story.tsx +22 -0
  29. package/components/application/pagination/pagination.demo.tsx +104 -0
  30. package/components/application/pagination/pagination.story.tsx +54 -0
  31. package/components/application/table/table.demo.tsx +1038 -0
  32. package/components/application/table/table.story.tsx +119 -0
  33. package/components/application/tabs/tabs.demo.tsx +322 -0
  34. package/components/application/tabs/tabs.story.tsx +43 -0
  35. package/components/base/avatar/avatar.demo.tsx +865 -0
  36. package/components/base/avatar/avatar.story.tsx +27 -0
  37. package/components/base/badges/badge-groups.demo.tsx +357 -0
  38. package/components/base/badges/badge-groups.story.tsx +25 -0
  39. package/components/base/badges/badges.demo.tsx +497 -0
  40. package/components/base/badges/badges.story.tsx +83 -0
  41. package/components/base/button-group/button-group.demo.tsx +131 -0
  42. package/components/base/button-group/button-group.story.tsx +16 -0
  43. package/components/base/buttons/app-store-buttons.demo.tsx +129 -0
  44. package/components/base/buttons/app-store-buttons.story.tsx +13 -0
  45. package/components/base/buttons/buttons.demo.tsx +1022 -0
  46. package/components/base/buttons/buttons.story.tsx +42 -0
  47. package/components/base/buttons/social-buttons.demo.tsx +432 -0
  48. package/components/base/buttons/social-buttons.story.tsx +20 -0
  49. package/components/base/checkbox/checkbox.demo.tsx +62 -0
  50. package/components/base/checkbox/checkbox.story.tsx +18 -0
  51. package/components/base/dropdown/dropdown.demo.tsx +137 -0
  52. package/components/base/dropdown/dropdown.story.tsx +22 -0
  53. package/components/base/input/inputs.demo.tsx +758 -0
  54. package/components/base/input/inputs.story.tsx +52 -0
  55. package/components/base/pin-input/pin-input.demo.tsx +126 -0
  56. package/components/base/pin-input/pin-input.story.tsx +22 -0
  57. package/components/base/progress-indicators/progress-indicators.demo.tsx +54 -0
  58. package/components/base/progress-indicators/progress-indicators.story.tsx +57 -0
  59. package/components/base/radio-buttons/radio-buttons.demo.tsx +77 -0
  60. package/components/base/radio-buttons/radio-buttons.story.tsx +19 -0
  61. package/components/base/select/select.demo.tsx +936 -0
  62. package/components/base/select/select.story.tsx +43 -0
  63. package/components/base/slider/slider.demo.tsx +19 -0
  64. package/components/base/slider/slider.story.tsx +26 -0
  65. package/components/base/tags/tags.demo.tsx +341 -0
  66. package/components/base/tags/tags.story.tsx +28 -0
  67. package/components/base/textarea/textarea.demo.tsx +25 -0
  68. package/components/base/textarea/textarea.story.tsx +15 -0
  69. package/components/base/toggle/toggle.demo.tsx +76 -0
  70. package/components/base/toggle/toggle.story.tsx +23 -0
  71. package/components/base/tooltip/tooltip.demo.tsx +125 -0
  72. package/components/base/tooltip/tooltip.story.tsx +21 -0
  73. package/components/foundations/featured-icon/featured-icon.demo.tsx +160 -0
  74. package/components/foundations/featured-icon/featured-icon.story.tsx +25 -0
  75. package/components/shared-assets/credit-card/credit-card.demo.tsx +106 -0
  76. package/components/shared-assets/credit-card/credit-card.story.tsx +41 -0
  77. package/dist/index.d.mts +1417 -0
  78. package/dist/index.d.ts +1417 -0
  79. package/dist/index.js +10435 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/index.mjs +10345 -0
  82. package/dist/index.mjs.map +1 -0
  83. package/package.json +126 -0
  84. package/styles/globals.css +65 -0
  85. package/styles/theme.css +430 -0
  86. package/styles/tokens-mapped.css +233 -0
  87. package/styles/tokens.css +807 -0
  88. package/styles/typography.css +430 -0
  89. package/tokens/design-tokens.dtcg.json +3515 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Untitled UI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ [![Untitled UI React](https://www.untitledui.com/react/untitled-ui-react-open-graph.jpg)](https://www.untitledui.com/react)
2
+
3
+ # Untitled UI React
4
+
5
+ [Untitled UI React](https://www.untitledui.com/react) is the world’s largest collection of open-source React components built with Tailwind CSS and React Aria. Everything you need to design and develop modern, beautiful interfaces—fast. Just copy, paste, and build.
6
+
7
+ Built with React 19.1, Tailwind CSS v4.1, TypeScript 5.8, and React Aria, Untitled UI React components deliver modern performance, type safety, and maintainability.
8
+
9
+ [Learn more](https://www.untitledui.com/react) • [Documentation](https://www.untitledui.com/react/docs/introduction) • [Figma](https://www.untitledui.com/figma) • [FAQs](https://www.untitledui.com/faqs)
10
+
11
+ ## Documentation
12
+
13
+ Check out our documentation here → [untitledui.com/react/docs](https://www.untitledui.com/react/docs/introduction)
14
+
15
+ ## Installation
16
+
17
+ Check out our installation guide here → [untitledui.com/react/docs/installation](https://www.untitledui.com/react/docs/installation)
18
+
19
+ ## Resources
20
+
21
+ Untitled UI React is built on top of [Untitled UI Figma](https://www.untitledui.com/figma), the world's largest and most popular Figma UI kit and design system. Explore more:
22
+
23
+ **[Untitled UI Figma:](https://www.untitledui.com/figma)** The world's largest Figma UI kit and design system.
24
+ <br/>
25
+ **[Untitled UI Icons:](https://www.untitledui.com/icons)** A clean, consistent, and neutral icon library crafted specifically for modern UI design.
26
+ <br/>
27
+ **[Untitled UI file icons:](https://www.untitledui.com/resources/file-icons)** Free file format icons, designed specifically for modern web and UI design.
28
+ <br/>
29
+ **[Untitled UI flag icons:](https://www.untitledui.com/resources/flag-icons)** Free country flag icons, designed specifically for modern web and UI design.
30
+ <br/>
31
+ **[Untitled UI avatars:](https://www.untitledui.com/resources/avatars)** Free placeholder user avatars and profile pictures to use in your projects.
32
+ <br/>
33
+ **[Untitled UI logos:](https://www.untitledui.com/resources/logos)** Free fictional company logos to use in your projects.
34
+
35
+ ## License
36
+
37
+ Untitled UI React open-source components are licensed under the MIT license, which means you can use them for free in unlimited commercial projects.
38
+
39
+ > [!NOTE]
40
+ > This license applies only to the components included in this open-source repository. [Untitled UI React PRO](https://www.untitledui.com/react) includes hundreds more advanced UI components and page examples and is subject to a separate [license agreement](https://www.untitledui.com/license).
41
+
42
+ [Untitled UI license agreement →](https://www.untitledui.com/license)
43
+
44
+ [Frequently asked questions →](https://www.untitledui.com/faqs)
@@ -0,0 +1,86 @@
1
+ "use client";
2
+
3
+ import type { ReactNode } from "react";
4
+ import { Button } from "@/components/base/buttons/button";
5
+ import { CloseButton } from "@/components/base/buttons/close-button";
6
+ import { ProgressBarCircle } from "@/components/base/progress-indicators/progress-circles";
7
+ import { ProgressBar } from "@/components/base/progress-indicators/progress-indicators";
8
+ import { cx } from "@/utils/cx";
9
+
10
+ interface FeaturedCardCommonProps {
11
+ title: string;
12
+ description: ReactNode;
13
+ confirmLabel: string;
14
+ className?: string;
15
+ onDismiss: () => void;
16
+ onConfirm: () => void;
17
+ }
18
+
19
+ export const FeaturedCardProgressBar = ({
20
+ title,
21
+ description,
22
+ confirmLabel,
23
+ progress,
24
+ className,
25
+ onDismiss,
26
+ onConfirm,
27
+ }: FeaturedCardCommonProps & {
28
+ progress: number;
29
+ }) => {
30
+ return (
31
+ <div className={cx("relative flex flex-col rounded-xl bg-secondary p-4", className)}>
32
+ <p className="text-sm font-semibold text-primary">{title}</p>
33
+ <p className="mt-1 text-sm text-tertiary">{description}</p>
34
+ <div className="absolute top-2 right-2">
35
+ <CloseButton onClick={onDismiss} size="sm" />
36
+ </div>
37
+ <div className="mt-4 flex">
38
+ <ProgressBar value={progress} />
39
+ </div>
40
+ <div className="mt-4 flex gap-3">
41
+ <Button onClick={onDismiss} color="link-gray" size="sm">
42
+ Dismiss
43
+ </Button>
44
+ <Button onClick={onConfirm} color="link-color" size="sm">
45
+ {confirmLabel}
46
+ </Button>
47
+ </div>
48
+ </div>
49
+ );
50
+ };
51
+
52
+ export const FeaturedCardProgressCircle = ({
53
+ title,
54
+ description,
55
+ confirmLabel,
56
+ progress,
57
+ className,
58
+ onDismiss,
59
+ onConfirm,
60
+ }: FeaturedCardCommonProps & {
61
+ progress: number;
62
+ }) => {
63
+ return (
64
+ <div className={cx("relative flex flex-col rounded-xl bg-secondary p-4", className)}>
65
+ <div className="w-16">
66
+ <ProgressBarCircle value={progress} size="xxs" />
67
+ </div>
68
+
69
+ <div className="absolute top-2 right-2">
70
+ <CloseButton onClick={onDismiss} size="sm" />
71
+ </div>
72
+ <div className="mt-3">
73
+ <p className="text-sm font-semibold text-primary">{title}</p>
74
+ <p className="mt-1 text-sm text-tertiary">{description}</p>
75
+ </div>
76
+ <div className="mt-4 flex gap-3">
77
+ <Button onClick={onDismiss} color="link-gray" size="sm">
78
+ Dismiss
79
+ </Button>
80
+ <Button onClick={onConfirm} color="link-color" size="sm">
81
+ {confirmLabel}
82
+ </Button>
83
+ </div>
84
+ </div>
85
+ );
86
+ };
@@ -0,0 +1,49 @@
1
+ "use client";
2
+
3
+ import { withOverlayAware } from "@/components/internal/decorators";
4
+ import * as FeatureCard from "./featured-cards.demo";
5
+
6
+ export default {
7
+ title: "Application/Application navigation/Base components",
8
+ decorators: [
9
+ withOverlayAware((Story: any) => (
10
+ <div className="min-h-screen w-full bg-primary p-8">
11
+ <div className="w-68">
12
+ <Story />
13
+ </div>
14
+ </div>
15
+ )),
16
+ ],
17
+ };
18
+
19
+ export const FeaturedCardProgressBar = () => (
20
+ <FeatureCard.FeaturedCardProgressBar
21
+ title="Used space"
22
+ description="Your team has used 80% of your available space. Need more?"
23
+ confirmLabel="Upgrade plan"
24
+ onConfirm={() => {}}
25
+ onDismiss={() => {}}
26
+ progress={85}
27
+ />
28
+ );
29
+ FeaturedCardProgressBar.parameters = {
30
+ design: {
31
+ desktop: "1157-99074",
32
+ },
33
+ };
34
+
35
+ export const FeaturedCardProgressCircle = () => (
36
+ <FeatureCard.FeaturedCardProgressCircle
37
+ title="Used space"
38
+ description="Your team has used 80% of your available space. Need more?"
39
+ confirmLabel="Upgrade plan"
40
+ onConfirm={() => {}}
41
+ onDismiss={() => {}}
42
+ progress={80}
43
+ />
44
+ );
45
+ FeaturedCardProgressCircle.parameters = {
46
+ design: {
47
+ desktop: "1157-99042",
48
+ },
49
+ };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+
3
+ import { Zap } from "@untitledui/icons";
4
+ import { HeaderNavigationBase } from "@/components/application/app-navigation/header-navigation";
5
+ import { Button } from "@/components/base/buttons/button";
6
+
7
+ export const HeaderNavigationSimpleDemo = () => (
8
+ <HeaderNavigationBase
9
+ items={[
10
+ { label: "Home", href: "/" },
11
+ {
12
+ label: "Dashboard",
13
+ href: "/dashboard",
14
+ items: [
15
+ { label: "Overview", href: "#", current: true },
16
+ { label: "Notifications", href: "#" },
17
+ { label: "Analytics", href: "#" },
18
+ { label: "Saved reports", href: "#" },
19
+ { label: "Scheduled reports", href: "#" },
20
+ { label: "User reports", href: "#" },
21
+ ],
22
+ },
23
+ { label: "Projects", href: "/projects" },
24
+ { label: "Tasks", href: "/tasks" },
25
+ { label: "Reporting", href: "/reporting" },
26
+ { label: "Users", href: "/users" },
27
+ ]}
28
+ />
29
+ );
30
+
31
+ export const HeaderNavigationDualTierDemo = () => (
32
+ <HeaderNavigationBase
33
+ items={[
34
+ { label: "Home", href: "/" },
35
+ {
36
+ label: "Dashboard",
37
+ href: "/dashboard",
38
+ current: true,
39
+ items: [
40
+ { label: "Overview", href: "#", current: true },
41
+ { label: "Notifications", href: "#" },
42
+ { label: "Analytics", href: "#" },
43
+ { label: "Saved reports", href: "#" },
44
+ { label: "Scheduled reports", href: "#" },
45
+ { label: "User reports", href: "#" },
46
+ ],
47
+ },
48
+ { label: "Projects", href: "/projects" },
49
+ { label: "Tasks", href: "/tasks" },
50
+ { label: "Reporting", href: "/reporting" },
51
+ { label: "Users", href: "/users" },
52
+ ]}
53
+ trailingContent={
54
+ <Button iconLeading={Zap} color="secondary" size="sm">
55
+ Upgrade now
56
+ </Button>
57
+ }
58
+ />
59
+ );
@@ -0,0 +1,23 @@
1
+ import { withOverlayAware } from "@/components/internal/decorators";
2
+ import * as Demos from "./header-navigation.demo";
3
+
4
+ export default {
5
+ title: "Application/Application navigation",
6
+ decorators: [withOverlayAware((Story, context) => <div className="min-h-screen w-full bg-primary">{Story(context, context)}</div>)],
7
+ };
8
+
9
+ export const HeaderNavigationSimpleDemo = () => <Demos.HeaderNavigationSimpleDemo />;
10
+ HeaderNavigationSimpleDemo.storyName = "Header navigation simple";
11
+ HeaderNavigationSimpleDemo.parameters = {
12
+ design: {
13
+ desktop: "1208-104342",
14
+ },
15
+ };
16
+
17
+ export const HeaderNavigationDualTierDemo = () => <Demos.HeaderNavigationDualTierDemo />;
18
+ HeaderNavigationDualTierDemo.storyName = "Header navigation dual-tier";
19
+ HeaderNavigationDualTierDemo.parameters = {
20
+ design: {
21
+ desktop: "1208-101427",
22
+ },
23
+ };