@candidhealth/react-vitals 1.0.0-alpha.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/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # Core Components
2
+
3
+ Our core components are a set of system-level UI components which can be used to build delightful user interfaces.
4
+
5
+ In addition to core components we also maintain a set of Candid-specific components in `src/components`
6
+
7
+ ## Storybook
8
+
9
+ Storybook is a UI component explorer which we use for developing core components in isolation.
10
+
11
+ Most of our core components can be viewed in storybook.
12
+
13
+ You can run Storybook with `pnpm run storybook`.
14
+
15
+ ## Component Library
16
+
17
+ Our storybook instance is also hosted online!
18
+
19
+ Visit https://www.chromatic.com/library?appId=646772265e2d5a5aee87e28b to see a library of the reusable components
20
+ we've built for use within the app.
21
+
22
+ To see components in an actual Storybook environment, click the "View Storybook"
23
+ button at the top right of the library page.
24
+
25
+ Connect using Github if this is your first time accessing the component library.
package/base.css ADDED
@@ -0,0 +1,105 @@
1
+ /*
2
+ Base form reset styles for @candidhealth/react-vitals.
3
+
4
+ These styles replicate the subset of @tailwindcss/forms that our components
5
+ rely on, so consumers don't need to install that plugin separately.
6
+ */
7
+ @layer base {
8
+ *,
9
+ ::after,
10
+ ::before,
11
+ ::backdrop,
12
+ ::file-selector-button {
13
+ border-color: var(--color-gray-200, currentColor);
14
+ }
15
+
16
+ [type="text"],
17
+ [type="email"],
18
+ [type="url"],
19
+ [type="password"],
20
+ [type="number"],
21
+ [type="date"],
22
+ [type="search"],
23
+ [type="tel"],
24
+ textarea {
25
+ appearance: none;
26
+ background-color: #fff;
27
+ border-width: 1px;
28
+ border-radius: 0;
29
+ padding: 0.5rem 0.75rem;
30
+ font-size: 0.875rem;
31
+ line-height: 1.25rem;
32
+ }
33
+
34
+ [type="text"]:focus,
35
+ [type="email"]:focus,
36
+ [type="url"]:focus,
37
+ [type="password"]:focus,
38
+ [type="number"]:focus,
39
+ [type="date"]:focus,
40
+ [type="search"]:focus,
41
+ [type="tel"]:focus,
42
+ textarea:focus {
43
+ outline: 2px solid transparent;
44
+ outline-offset: 2px;
45
+ border-color: var(--color-indigo-400, #818cf8);
46
+ --tw-ring-color: var(--color-indigo-200, #c7d2fe);
47
+ }
48
+
49
+ [type="checkbox"],
50
+ [type="radio"] {
51
+ appearance: none;
52
+ padding: 0;
53
+ print-color-adjust: exact;
54
+ display: inline-block;
55
+ vertical-align: middle;
56
+ background-origin: border-box;
57
+ user-select: none;
58
+ flex-shrink: 0;
59
+ height: 1rem;
60
+ width: 1rem;
61
+ color: var(--color-indigo-600, #4f46e5);
62
+ background-color: #fff;
63
+ border-width: 1px;
64
+ --tw-shadow: 0 0 #0000;
65
+ }
66
+
67
+ [type="checkbox"] {
68
+ border-radius: 0.25rem;
69
+ }
70
+
71
+ [type="radio"] {
72
+ border-radius: 9999px;
73
+ }
74
+
75
+ [type="checkbox"]:checked,
76
+ [type="radio"]:checked {
77
+ border-color: transparent;
78
+ background-color: currentColor;
79
+ background-size: 100% 100%;
80
+ background-position: center;
81
+ background-repeat: no-repeat;
82
+ }
83
+
84
+ [type="checkbox"]:checked {
85
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
86
+ }
87
+
88
+ [type="radio"]:checked {
89
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
90
+ }
91
+
92
+ [type="checkbox"]:indeterminate {
93
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
94
+ border-color: transparent;
95
+ background-color: currentColor;
96
+ background-size: 100% 100%;
97
+ background-position: center;
98
+ background-repeat: no-repeat;
99
+ }
100
+
101
+ button,
102
+ [role="button"] {
103
+ cursor: pointer;
104
+ }
105
+ }
package/dist/index.css ADDED
@@ -0,0 +1,88 @@
1
+ /* src/core/date-picker/DatePicker.css */
2
+ @reference "../theme.css";
3
+ .react-datepicker-popper {
4
+ @apply z-40 rounded-lg bg-white text-sm shadow-lg;
5
+ }
6
+ .react-datepicker-left {
7
+ @apply absolute! top-11! right-auto! left-0! transform-none!;
8
+ }
9
+ .react-datepicker-right {
10
+ @apply absolute! top-11! right-0! left-auto! transform-none!;
11
+ }
12
+ .react-datepicker__portal {
13
+ @apply absolute top-12 right-0 z-10 w-72 transform-none rounded-sm border-2 border-gray-200 bg-white px-3 py-2 text-sm shadow;
14
+ }
15
+ .react-datepicker__month-container {
16
+ @apply flex h-[320px] w-72 flex-col p-3;
17
+ }
18
+ .react-datepicker__month {
19
+ @apply flex flex-col;
20
+ }
21
+ .react-datepicker__current-month {
22
+ @apply ml-2.5 text-lg font-semibold text-gray-800;
23
+ }
24
+ .react-datepicker__week {
25
+ @apply flex justify-around;
26
+ }
27
+ .react-datepicker__day-names {
28
+ @apply flex justify-around text-center text-xs font-medium text-gray-400;
29
+ }
30
+ .react-datepicker__day-name {
31
+ @apply flex h-8 w-8 items-center justify-center rounded-full py-1;
32
+ }
33
+ .react-datepicker__navigation {
34
+ @apply absolute top-2;
35
+ }
36
+ .react-datepicker__navigation--previous {
37
+ @apply right-12 flex h-8 w-8 items-center justify-center rounded-sm transition hover:bg-gray-200;
38
+ }
39
+ .react-datepicker__navigation--next {
40
+ @apply right-4 flex h-8 w-8 items-center justify-center rounded-sm transition hover:bg-gray-200;
41
+ }
42
+ .react-datepicker__day {
43
+ @apply mb-1 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm py-1 text-sm leading-loose text-gray-700 transition;
44
+ }
45
+ .react-datepicker__day--disabled {
46
+ @apply cursor-not-allowed opacity-40 hover:bg-transparent;
47
+ }
48
+ .react-datepicker__day--outside-month {
49
+ @apply text-gray-300;
50
+ }
51
+ .react-datepicker__day--in-range {
52
+ @apply bg-gray-200;
53
+ }
54
+ .react-datepicker__day--in-selecting-range {
55
+ @apply bg-indigo-200;
56
+ }
57
+ .react-datepicker__day--selecting-range-start {
58
+ @apply border-2 border-indigo-600 bg-white;
59
+ }
60
+ .react-datepicker__day--selecting-range-end {
61
+ @apply border-2 border-indigo-600 bg-white;
62
+ }
63
+ .react-datepicker__day--selected {
64
+ @apply bg-indigo-600 text-white;
65
+ }
66
+ .react-datepicker__day--range-start {
67
+ @apply bg-indigo-600 text-white hover:bg-white hover:text-gray-700;
68
+ }
69
+ .react-datepicker__day--range-end {
70
+ @apply bg-indigo-600 text-white hover:bg-white hover:text-gray-700;
71
+ }
72
+ .react-datepicker__aria-live,
73
+ .react-datepicker__triangle {
74
+ @apply hidden;
75
+ }
76
+ .react-datepicker__day--today {
77
+ @apply bg-indigo-200;
78
+ }
79
+ .react-datepicker__day--highlighted {
80
+ @apply bg-indigo-200;
81
+ }
82
+
83
+ /* src/core/phone-number/styles.css */
84
+ :root {
85
+ --react-international-phone-height: 2.375rem;
86
+ --react-international-phone-border-radius: 0.375rem;
87
+ }
88
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../date-picker/DatePicker.css","../phone-number/styles.css"],"sourcesContent":["@reference \"../theme.css\";\n\n.react-datepicker-popper {\n\t@apply z-40 rounded-lg bg-white text-sm shadow-lg;\n}\n\n.react-datepicker-left {\n\t@apply absolute! top-11! right-auto! left-0! transform-none!;\n}\n\n.react-datepicker-right {\n\t@apply absolute! top-11! right-0! left-auto! transform-none!;\n}\n\n.react-datepicker__portal {\n\t@apply absolute top-12 right-0 z-10 w-72 transform-none rounded-sm border-2 border-gray-200 bg-white px-3 py-2 text-sm shadow;\n}\n\n.react-datepicker__month-container {\n\t@apply flex h-[320px] w-72 flex-col p-3;\n}\n\n.react-datepicker__month {\n\t@apply flex flex-col;\n}\n\n.react-datepicker__current-month {\n\t@apply ml-2.5 text-lg font-semibold text-gray-800;\n}\n\n.react-datepicker__week {\n\t@apply flex justify-around;\n}\n\n.react-datepicker__day-names {\n\t@apply flex justify-around text-center text-xs font-medium text-gray-400;\n}\n\n.react-datepicker__day-name {\n\t@apply flex h-8 w-8 items-center justify-center rounded-full py-1;\n}\n\n.react-datepicker__navigation {\n\t@apply absolute top-2;\n}\n\n.react-datepicker__navigation--previous {\n\t@apply right-12 flex h-8 w-8 items-center justify-center rounded-sm transition hover:bg-gray-200;\n}\n\n.react-datepicker__navigation--next {\n\t@apply right-4 flex h-8 w-8 items-center justify-center rounded-sm transition hover:bg-gray-200;\n}\n\n.react-datepicker__day {\n\t@apply mb-1 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm py-1 text-sm leading-loose text-gray-700 transition;\n}\n\n.react-datepicker__day--disabled {\n\t@apply cursor-not-allowed opacity-40 hover:bg-transparent;\n}\n\n.react-datepicker__day--outside-month {\n\t@apply text-gray-300;\n}\n\n.react-datepicker__day--in-range {\n\t@apply bg-gray-200;\n}\n\n.react-datepicker__day--in-selecting-range {\n\t@apply bg-indigo-200;\n}\n\n.react-datepicker__day--selecting-range-start {\n\t@apply border-2 border-indigo-600 bg-white;\n}\n\n.react-datepicker__day--selecting-range-end {\n\t@apply border-2 border-indigo-600 bg-white;\n}\n\n.react-datepicker__day--selected {\n\t@apply bg-indigo-600 text-white;\n}\n\n.react-datepicker__day--range-start {\n\t@apply bg-indigo-600 text-white hover:bg-white hover:text-gray-700;\n}\n\n.react-datepicker__day--range-end {\n\t@apply bg-indigo-600 text-white hover:bg-white hover:text-gray-700;\n}\n\n.react-datepicker__aria-live,\n.react-datepicker__triangle {\n\t@apply hidden;\n}\n\n.react-datepicker__day--today {\n\t@apply bg-indigo-200;\n}\n\n.react-datepicker__day--highlighted {\n\t@apply bg-indigo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