@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
@@ -0,0 +1,73 @@
1
+ import { LoadingIndicator } from "@/components/application/loading-indicator/loading-indicator";
2
+
3
+ export const DefaultDemo = () => {
4
+ return (
5
+ <div className="flex flex-col items-start gap-8 md:flex-row md:gap-16">
6
+ <LoadingIndicator type="line-simple" size="md" label="Loading..." />
7
+ <LoadingIndicator type="line-spinner" size="md" label="Loading..." />
8
+ <LoadingIndicator type="dot-circle" size="md" label="Loading..." />
9
+ </div>
10
+ );
11
+ };
12
+
13
+ export const LineSimpleDemo = () => {
14
+ return <LoadingIndicator type="line-simple" size="md" />;
15
+ };
16
+
17
+ export const LineSimpleWithLabelDemo = () => {
18
+ return <LoadingIndicator type="line-simple" size="md" label="Loading..." />;
19
+ };
20
+
21
+ export const LineSpinnerDemo = () => {
22
+ return <LoadingIndicator type="line-spinner" size="md" />;
23
+ };
24
+
25
+ export const LineSpinnerWithLabelDemo = () => {
26
+ return <LoadingIndicator type="line-spinner" size="md" label="Loading..." />;
27
+ };
28
+
29
+ export const DotCircleDemo = () => {
30
+ return <LoadingIndicator type="dot-circle" size="md" />;
31
+ };
32
+
33
+ export const DotCircleWithLabelDemo = () => {
34
+ return <LoadingIndicator type="dot-circle" size="md" label="Loading..." />;
35
+ };
36
+
37
+ export const SizesDemo = () => {
38
+ return (
39
+ <div className="flex flex-col items-start gap-8 md:flex-row">
40
+ <LoadingIndicator type="line-simple" size="sm" label="Loading..." />
41
+ <LoadingIndicator type="line-simple" size="md" label="Loading..." />
42
+ <LoadingIndicator type="line-simple" size="lg" label="Loading..." />
43
+ <LoadingIndicator type="line-simple" size="xl" label="Loading..." />
44
+ </div>
45
+ );
46
+ };
47
+
48
+ export const LoadingIndicatorLineSimple = () => (
49
+ <div className="flex flex-col items-start gap-8 md:flex-row">
50
+ <LoadingIndicator type="line-simple" size="sm" label="Loading..." />
51
+ <LoadingIndicator type="line-simple" size="md" label="Loading..." />
52
+ <LoadingIndicator type="line-simple" size="lg" label="Loading..." />
53
+ <LoadingIndicator type="line-simple" size="xl" label="Loading..." />
54
+ </div>
55
+ );
56
+
57
+ export const LoadingIndicatorLineSpinner = () => (
58
+ <div className="flex flex-col items-start gap-8 md:flex-row">
59
+ <LoadingIndicator type="line-spinner" size="sm" label="Loading..." />
60
+ <LoadingIndicator type="line-spinner" size="md" label="Loading..." />
61
+ <LoadingIndicator type="line-spinner" size="lg" label="Loading..." />
62
+ <LoadingIndicator type="line-spinner" size="xl" label="Loading..." />
63
+ </div>
64
+ );
65
+
66
+ export const LoadingIndicatorDotCircle = () => (
67
+ <div className="flex flex-col items-start gap-8 md:flex-row">
68
+ <LoadingIndicator type="dot-circle" size="sm" label="Loading..." />
69
+ <LoadingIndicator type="dot-circle" size="md" label="Loading..." />
70
+ <LoadingIndicator type="dot-circle" size="lg" label="Loading..." />
71
+ <LoadingIndicator type="dot-circle" size="xl" label="Loading..." />
72
+ </div>
73
+ );
@@ -0,0 +1,22 @@
1
+ import type { FC } from "react";
2
+ import * as Demos from "./loading-indicator.demo";
3
+
4
+ export default {
5
+ title: "Application/Loading indicators",
6
+ decorators: [
7
+ (Story: FC) => (
8
+ <div className="flex min-h-screen items-center justify-center bg-primary p-8">
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ };
14
+
15
+ export const LoadingIndicatorLineSimple = () => <Demos.LoadingIndicatorLineSimple />;
16
+ LoadingIndicatorLineSimple.storyName = "Loading indicator line simple";
17
+
18
+ export const LoadingIndicatorLineSpinner = () => <Demos.LoadingIndicatorLineSpinner />;
19
+ LoadingIndicatorLineSpinner.storyName = "Loading indicator line spinner";
20
+
21
+ export const LoadingIndicatorDotCircle = () => <Demos.LoadingIndicatorDotCircle />;
22
+ LoadingIndicatorDotCircle.storyName = "Loading indicator dot circle";
@@ -0,0 +1,104 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import * as Paginations from "@/components/application/pagination/pagination";
5
+ import { PaginationDot as PaginationDotComponent } from "@/components/application/pagination/pagination-dot";
6
+ import { PaginationLine as PaginationLineComponent } from "@/components/application/pagination/pagination-line";
7
+
8
+ export const PaginationPageDefault = () => {
9
+ const [currentPage, setCurrentPage] = useState(1);
10
+
11
+ return <Paginations.PaginationPageDefault page={currentPage} onPageChange={setCurrentPage} />;
12
+ };
13
+
14
+ export const PaginationPageMinimalCenter = () => {
15
+ const [currentPage, setCurrentPage] = useState(1);
16
+
17
+ return <Paginations.PaginationPageMinimalCenter page={currentPage} onPageChange={setCurrentPage} />;
18
+ };
19
+
20
+ export const PaginationCardDefault = () => {
21
+ const [currentPage, setCurrentPage] = useState(1);
22
+
23
+ return <Paginations.PaginationCardDefault page={currentPage} onPageChange={setCurrentPage} />;
24
+ };
25
+
26
+ export const PaginationCardMinimalRightAligned = () => {
27
+ const [currentPage, setCurrentPage] = useState(1);
28
+
29
+ return <Paginations.PaginationCardMinimal align="right" page={currentPage} onPageChange={setCurrentPage} />;
30
+ };
31
+
32
+ export const PaginationCardMinimalCenterAligned = () => {
33
+ const [currentPage, setCurrentPage] = useState(1);
34
+
35
+ return <Paginations.PaginationCardMinimal align="center" page={currentPage} onPageChange={setCurrentPage} />;
36
+ };
37
+
38
+ export const PaginationCardMinimalLeftAligned = () => {
39
+ const [currentPage, setCurrentPage] = useState(1);
40
+
41
+ return <Paginations.PaginationCardMinimal align="left" page={currentPage} onPageChange={setCurrentPage} />;
42
+ };
43
+
44
+ export const PaginationButtonGroupRightAligned = () => {
45
+ const [currentPage, setCurrentPage] = useState(1);
46
+
47
+ return <Paginations.PaginationButtonGroup align="right" page={currentPage} onPageChange={setCurrentPage} />;
48
+ };
49
+
50
+ export const PaginationButtonGroupCenterAligned = () => {
51
+ const [currentPage, setCurrentPage] = useState(1);
52
+
53
+ return <Paginations.PaginationButtonGroup align="center" page={currentPage} onPageChange={setCurrentPage} />;
54
+ };
55
+
56
+ export const PaginationButtonGroupLeftAligned = () => {
57
+ const [currentPage, setCurrentPage] = useState(1);
58
+
59
+ return <Paginations.PaginationButtonGroup align="left" page={currentPage} onPageChange={setCurrentPage} />;
60
+ };
61
+
62
+ export const PaginationDotMd = () => {
63
+ const [currentPage, setCurrentPage] = useState(1);
64
+
65
+ return (
66
+ <div className="flex flex-col gap-8">
67
+ <PaginationDotComponent total={3} size="md" page={currentPage} onPageChange={setCurrentPage} />
68
+ <PaginationDotComponent total={3} size="lg" page={currentPage} onPageChange={setCurrentPage} />
69
+ </div>
70
+ );
71
+ };
72
+
73
+ export const PaginationDotLg = () => {
74
+ const [currentPage, setCurrentPage] = useState(1);
75
+
76
+ return (
77
+ <div className="flex flex-col gap-8">
78
+ <PaginationDotComponent total={3} size="md" framed page={currentPage} onPageChange={setCurrentPage} />
79
+ <PaginationDotComponent total={3} size="lg" framed page={currentPage} onPageChange={setCurrentPage} />
80
+ </div>
81
+ );
82
+ };
83
+
84
+ export const PaginationLineMd = () => {
85
+ const [currentPage, setCurrentPage] = useState(1);
86
+
87
+ return (
88
+ <div className="flex flex-col gap-8">
89
+ <PaginationLineComponent className="w-36" total={3} size="md" page={currentPage} onPageChange={setCurrentPage} />
90
+ <PaginationLineComponent className="w-38" total={3} size="lg" page={currentPage} onPageChange={setCurrentPage} />
91
+ </div>
92
+ );
93
+ };
94
+
95
+ export const PaginationLineLg = () => {
96
+ const [currentPage, setCurrentPage] = useState(1);
97
+
98
+ return (
99
+ <div className="flex flex-col gap-8">
100
+ <PaginationLineComponent className="w-40" total={3} size="md" framed page={currentPage} onPageChange={setCurrentPage} />
101
+ <PaginationLineComponent className="w-44" total={3} size="lg" framed page={currentPage} onPageChange={setCurrentPage} />
102
+ </div>
103
+ );
104
+ };
@@ -0,0 +1,54 @@
1
+ "use client";
2
+
3
+ import type { FC } from "react";
4
+ import * as Demos from "./pagination.demo";
5
+
6
+ export default {
7
+ title: "Application/Pagination",
8
+ decorators: [
9
+ (Story: FC) => (
10
+ <div className="min-h-screen bg-secondary p-8">
11
+ <Story />
12
+ </div>
13
+ ),
14
+ ],
15
+ };
16
+
17
+ export const PaginationPageDefault = () => <Demos.PaginationPageDefault />;
18
+ PaginationPageDefault.storyName = "Pagination page default";
19
+
20
+ export const PaginationPageMinimalCenter = () => <Demos.PaginationPageMinimalCenter />;
21
+ PaginationPageMinimalCenter.storyName = "Pagination page minimal center";
22
+
23
+ export const PaginationCardDefault = () => <Demos.PaginationCardDefault />;
24
+ PaginationCardDefault.storyName = "Pagination card default";
25
+
26
+ export const PaginationCardMinimalRightAligned = () => <Demos.PaginationCardMinimalRightAligned />;
27
+ PaginationCardMinimalRightAligned.storyName = "Pagination card minimal right aligned";
28
+
29
+ export const PaginationCardMinimalCenterAligned = () => <Demos.PaginationCardMinimalCenterAligned />;
30
+ PaginationCardMinimalCenterAligned.storyName = "Pagination card minimal center aligned";
31
+
32
+ export const PaginationCardMinimalLeftAligned = () => <Demos.PaginationCardMinimalLeftAligned />;
33
+ PaginationCardMinimalLeftAligned.storyName = "Pagination card minimal left aligned";
34
+
35
+ export const PaginationButtonGroupRightAligned = () => <Demos.PaginationButtonGroupRightAligned />;
36
+ PaginationButtonGroupRightAligned.storyName = "Pagination button group right aligned";
37
+
38
+ export const PaginationButtonGroupCenterAligned = () => <Demos.PaginationButtonGroupCenterAligned />;
39
+ PaginationButtonGroupCenterAligned.storyName = "Pagination button group center aligned";
40
+
41
+ export const PaginationButtonGroupLeftAligned = () => <Demos.PaginationButtonGroupLeftAligned />;
42
+ PaginationButtonGroupLeftAligned.storyName = "Pagination button group left aligned";
43
+
44
+ export const PaginationDotMd = () => <Demos.PaginationDotMd />;
45
+ PaginationDotMd.storyName = "Pagination dot md";
46
+
47
+ export const PaginationDotLg = () => <Demos.PaginationDotLg />;
48
+ PaginationDotLg.storyName = "Pagination dot lg";
49
+
50
+ export const PaginationLineMd = () => <Demos.PaginationLineMd />;
51
+ PaginationLineMd.storyName = "Pagination line md";
52
+
53
+ export const PaginationLineLg = () => <Demos.PaginationLineLg />;
54
+ PaginationLineLg.storyName = "Pagination line lg";