@rovula/ui 0.0.18 → 0.0.19
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/cjs/bundle.css +363 -100
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Calendar/Calendar.d.ts +1 -0
- package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +573 -121
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +2 -2
- package/dist/components/Calendar/Calendar.js +4 -13
- package/dist/components/Calendar/Calendar.stories.js +4 -2
- package/dist/components/DatePicker/DatePicker.js +1 -2
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/TextInput/TextInput.stories.js +1 -1
- package/dist/components/TextInput/TextInput.styles.js +1 -1
- package/dist/esm/bundle.css +363 -100
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Calendar/Calendar.d.ts +1 -0
- package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +573 -121
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/src/theme/global.css +67 -121
- package/dist/theme/global.css +8 -4
- package/dist/theme/presets/colors.js +2 -2
- package/package.json +2 -2
- package/src/components/Calendar/Calendar.stories.tsx +4 -0
- package/src/components/Calendar/Calendar.tsx +23 -40
- package/src/components/DatePicker/DatePicker.tsx +7 -7
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/TextInput/TextInput.stories.tsx +1 -1
- package/src/components/TextInput/TextInput.styles.ts +1 -1
- package/src/theme/global.css +8 -4
- package/src/theme/presets/colors.js +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import {
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Modifiers } from "react-day-picker";
|
|
3
3
|
type DatePickerProps = {
|
|
4
4
|
date: Date | undefined;
|
|
5
|
-
onSelect:
|
|
5
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: Modifiers, e: React.MouseEvent | React.KeyboardEvent) => void | undefined;
|
|
6
6
|
};
|
|
7
7
|
declare const DatePicker: FC<DatePickerProps>;
|
|
8
8
|
export default DatePicker;
|
|
@@ -3,7 +3,7 @@ declare const meta: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
component: React.FC<{
|
|
5
5
|
date: Date | undefined;
|
|
6
|
-
onSelect: import("react-day-picker").
|
|
6
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: import("react-day-picker").Modifiers, e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void | undefined;
|
|
7
7
|
}>;
|
|
8
8
|
tags: string[];
|
|
9
9
|
parameters: {
|
|
@@ -11,7 +11,7 @@ declare const meta: {
|
|
|
11
11
|
};
|
|
12
12
|
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
13
13
|
date: Date | undefined;
|
|
14
|
-
onSelect: import("react-day-picker").
|
|
14
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: import("react-day-picker").Modifiers, e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void | undefined;
|
|
15
15
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
16
16
|
};
|
|
17
17
|
export default meta;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as class_variance_authority_dist_types from 'class-variance-authority/d
|
|
|
5
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { DayPicker,
|
|
8
|
+
import { DayPicker, Modifiers } from 'react-day-picker';
|
|
9
9
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
10
10
|
import { ColumnDef, SortingState } from '@tanstack/react-table';
|
|
11
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -257,7 +257,7 @@ declare namespace Calendar {
|
|
|
257
257
|
|
|
258
258
|
type DatePickerProps = {
|
|
259
259
|
date: Date | undefined;
|
|
260
|
-
onSelect:
|
|
260
|
+
onSelect: (selected: Date | undefined, triggerDate: Date, modifiers: Modifiers, e: React__default.MouseEvent | React__default.KeyboardEvent) => void | undefined;
|
|
261
261
|
};
|
|
262
262
|
declare const DatePicker: FC<DatePickerProps>;
|
|
263
263
|
|
|
@@ -692,6 +692,9 @@ video {
|
|
|
692
692
|
--text-grey-medium: 117 121 128;
|
|
693
693
|
--text-grey-light: 164 169 178;
|
|
694
694
|
--text-white: 255 255 255;
|
|
695
|
+
/* Other */
|
|
696
|
+
--other-bg: var(--white);
|
|
697
|
+
--other-bg-2: var(--white);
|
|
695
698
|
/* Other/Popup */
|
|
696
699
|
--popup-background: 249 251 255;
|
|
697
700
|
/* Other/Popup Curtain */
|
|
@@ -706,16 +709,16 @@ video {
|
|
|
706
709
|
--navbar-gap: 16px;
|
|
707
710
|
/* TODO for shadcn, wait for refactor */
|
|
708
711
|
/* --background: 0 0% 100%; */
|
|
709
|
-
--background:
|
|
710
|
-
--foreground:
|
|
712
|
+
--background: var(--brand-background);
|
|
713
|
+
--foreground: var(--text-white:);
|
|
711
714
|
--muted: 210 40% 96.1%;
|
|
712
715
|
--muted-foreground: 215.4 16.3% 46.9%;
|
|
713
716
|
--popover: 0 0% 100%;
|
|
714
717
|
--popover-foreground: 222.2 47.4% 11.2%;
|
|
715
718
|
--border: 214.3 31.8% 91.4%;
|
|
716
719
|
--input: 214.3 31.8% 91.4%;
|
|
717
|
-
--card:
|
|
718
|
-
--card-foreground:
|
|
720
|
+
--card: var(--white);
|
|
721
|
+
--card-foreground: var(--primary);
|
|
719
722
|
--primary: var(--primary-default);
|
|
720
723
|
--secondary: var(--secondary-default);
|
|
721
724
|
--accent: 210 40% 96.1%;
|
|
@@ -731,8 +734,10 @@ video {
|
|
|
731
734
|
}
|
|
732
735
|
|
|
733
736
|
body {
|
|
734
|
-
|
|
735
|
-
color:
|
|
737
|
+
--tw-bg-opacity: 1;
|
|
738
|
+
background-color: rgb(var(--background) / var(--tw-bg-opacity));
|
|
739
|
+
--tw-text-opacity: 1;
|
|
740
|
+
color: rgb(var(--foreground) / var(--tw-text-opacity));
|
|
736
741
|
}
|
|
737
742
|
|
|
738
743
|
*, ::before, ::after {
|
|
@@ -873,10 +878,6 @@ body {
|
|
|
873
878
|
pointer-events: none;
|
|
874
879
|
}
|
|
875
880
|
|
|
876
|
-
.invisible {
|
|
877
|
-
visibility: hidden;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
881
|
.static {
|
|
881
882
|
position: static;
|
|
882
883
|
}
|
|
@@ -914,10 +915,6 @@ body {
|
|
|
914
915
|
top: -0.375rem;
|
|
915
916
|
}
|
|
916
917
|
|
|
917
|
-
.left-1 {
|
|
918
|
-
left: 0.25rem;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
918
|
.left-3 {
|
|
922
919
|
left: 0.75rem;
|
|
923
920
|
}
|
|
@@ -934,10 +931,6 @@ body {
|
|
|
934
931
|
right: 0px;
|
|
935
932
|
}
|
|
936
933
|
|
|
937
|
-
.right-1 {
|
|
938
|
-
right: 0.25rem;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
934
|
.right-4 {
|
|
942
935
|
right: 1rem;
|
|
943
936
|
}
|
|
@@ -1084,6 +1077,11 @@ body {
|
|
|
1084
1077
|
height: 1.75rem;
|
|
1085
1078
|
}
|
|
1086
1079
|
|
|
1080
|
+
.size-9 {
|
|
1081
|
+
width: 2.25rem;
|
|
1082
|
+
height: 2.25rem;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1087
1085
|
.size-\[14px\] {
|
|
1088
1086
|
width: 14px;
|
|
1089
1087
|
height: 14px;
|
|
@@ -1116,10 +1114,6 @@ body {
|
|
|
1116
1114
|
height: 1rem;
|
|
1117
1115
|
}
|
|
1118
1116
|
|
|
1119
|
-
.h-9 {
|
|
1120
|
-
height: 2.25rem;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
1117
|
.h-\[18px\] {
|
|
1124
1118
|
height: 18px;
|
|
1125
1119
|
}
|
|
@@ -1193,18 +1187,10 @@ body {
|
|
|
1193
1187
|
width: 1rem;
|
|
1194
1188
|
}
|
|
1195
1189
|
|
|
1196
|
-
.w-72 {
|
|
1197
|
-
width: 18rem;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
1190
|
.w-8 {
|
|
1201
1191
|
width: 2rem;
|
|
1202
1192
|
}
|
|
1203
1193
|
|
|
1204
|
-
.w-9 {
|
|
1205
|
-
width: 2.25rem;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
1194
|
.w-\[100px\] {
|
|
1209
1195
|
width: 100px;
|
|
1210
1196
|
}
|
|
@@ -1269,6 +1255,10 @@ body {
|
|
|
1269
1255
|
width: 100%;
|
|
1270
1256
|
}
|
|
1271
1257
|
|
|
1258
|
+
.min-w-72 {
|
|
1259
|
+
min-width: 18rem;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1272
1262
|
.max-w-3xl {
|
|
1273
1263
|
max-width: 48rem;
|
|
1274
1264
|
}
|
|
@@ -1420,24 +1410,12 @@ body {
|
|
|
1420
1410
|
margin-left: calc(-0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1421
1411
|
}
|
|
1422
1412
|
|
|
1423
|
-
.space-x-1 > :not([hidden]) ~ :not([hidden]) {
|
|
1424
|
-
--tw-space-x-reverse: 0;
|
|
1425
|
-
margin-right: calc(0.25rem * var(--tw-space-x-reverse));
|
|
1426
|
-
margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
1413
|
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
|
1430
1414
|
--tw-space-x-reverse: 0;
|
|
1431
1415
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
1432
1416
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
1433
1417
|
}
|
|
1434
1418
|
|
|
1435
|
-
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
|
|
1436
|
-
--tw-space-y-reverse: 0;
|
|
1437
|
-
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
|
|
1438
|
-
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
1419
|
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
|
|
1442
1420
|
--tw-space-y-reverse: 0;
|
|
1443
1421
|
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
@@ -1571,6 +1549,14 @@ body {
|
|
|
1571
1549
|
border-style: solid;
|
|
1572
1550
|
}
|
|
1573
1551
|
|
|
1552
|
+
.border-none {
|
|
1553
|
+
border-style: none;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.border-\[rgb\(var\(--card\)\)\] {
|
|
1557
|
+
border-color: rgb(var(--card));
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1574
1560
|
.border-error {
|
|
1575
1561
|
--tw-border-opacity: 1;
|
|
1576
1562
|
border-color: rgb(var(--error-100) / var(--tw-border-opacity));
|
|
@@ -1661,12 +1647,21 @@ body {
|
|
|
1661
1647
|
border-left-color: rgb(var(--input-default-stroke-color) / var(--tw-border-opacity));
|
|
1662
1648
|
}
|
|
1663
1649
|
|
|
1650
|
+
.bg-\[rgb\(var\(--card\)\)\] {
|
|
1651
|
+
background-color: rgb(var(--card));
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1664
1654
|
.bg-\[rgb\(var\(--navbar-bg-color\)\)\] {
|
|
1665
1655
|
background-color: rgb(var(--navbar-bg-color));
|
|
1666
1656
|
}
|
|
1667
1657
|
|
|
1658
|
+
.bg-\[rgb\(var\(--other-bg-2\)\)\] {
|
|
1659
|
+
background-color: rgb(var(--other-bg-2));
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1668
1662
|
.bg-background {
|
|
1669
|
-
|
|
1663
|
+
--tw-bg-opacity: 1;
|
|
1664
|
+
background-color: rgb(var(--background) / var(--tw-bg-opacity));
|
|
1670
1665
|
}
|
|
1671
1666
|
|
|
1672
1667
|
.bg-black {
|
|
@@ -1801,6 +1796,10 @@ body {
|
|
|
1801
1796
|
fill: rgb(var(--input-disabled-text-color) / 1);
|
|
1802
1797
|
}
|
|
1803
1798
|
|
|
1799
|
+
.fill-primary {
|
|
1800
|
+
fill: rgb(var(--primary-default) / 1);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1804
1803
|
.fill-red-500 {
|
|
1805
1804
|
fill: #ef4444;
|
|
1806
1805
|
}
|
|
@@ -1955,10 +1954,6 @@ body {
|
|
|
1955
1954
|
padding-inline-end: 72px;
|
|
1956
1955
|
}
|
|
1957
1956
|
|
|
1958
|
-
.pt-1 {
|
|
1959
|
-
padding-top: 0.25rem;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
1957
|
.text-left {
|
|
1963
1958
|
text-align: left;
|
|
1964
1959
|
}
|
|
@@ -1979,10 +1974,6 @@ body {
|
|
|
1979
1974
|
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
1980
1975
|
}
|
|
1981
1976
|
|
|
1982
|
-
.text-\[0\.8rem\] {
|
|
1983
|
-
font-size: 0.8rem;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
1977
|
.text-base {
|
|
1987
1978
|
font-size: 1rem;
|
|
1988
1979
|
line-height: 1.5rem;
|
|
@@ -2132,10 +2123,6 @@ body {
|
|
|
2132
2123
|
font-weight: 500;
|
|
2133
2124
|
}
|
|
2134
2125
|
|
|
2135
|
-
.font-normal {
|
|
2136
|
-
font-weight: 400;
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
2126
|
.capitalize {
|
|
2140
2127
|
text-transform: capitalize;
|
|
2141
2128
|
}
|
|
@@ -2152,6 +2139,10 @@ body {
|
|
|
2152
2139
|
letter-spacing: -0.025em;
|
|
2153
2140
|
}
|
|
2154
2141
|
|
|
2142
|
+
.text-\[rgb\(var\(--card-foreground\)\)\] {
|
|
2143
|
+
color: rgb(var(--card-foreground));
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2155
2146
|
.text-\[rgb\(var\(--navbar-text-color\)\)\] {
|
|
2156
2147
|
color: rgb(var(--navbar-text-color));
|
|
2157
2148
|
}
|
|
@@ -2180,6 +2171,11 @@ body {
|
|
|
2180
2171
|
color: rgb(243 244 246 / var(--tw-text-opacity));
|
|
2181
2172
|
}
|
|
2182
2173
|
|
|
2174
|
+
.text-gray-400 {
|
|
2175
|
+
--tw-text-opacity: 1;
|
|
2176
|
+
color: rgb(156 163 175 / var(--tw-text-opacity));
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2183
2179
|
.text-grey2-500\/\[\.32\] {
|
|
2184
2180
|
color: rgb(var(--grey2-500) / .32);
|
|
2185
2181
|
}
|
|
@@ -2311,8 +2307,8 @@ body {
|
|
|
2311
2307
|
text-underline-offset: 4px;
|
|
2312
2308
|
}
|
|
2313
2309
|
|
|
2314
|
-
.
|
|
2315
|
-
|
|
2310
|
+
.caret-primary {
|
|
2311
|
+
caret-color: rgb(var(--primary-default) / 1);
|
|
2316
2312
|
}
|
|
2317
2313
|
|
|
2318
2314
|
.opacity-70 {
|
|
@@ -2372,7 +2368,7 @@ body {
|
|
|
2372
2368
|
}
|
|
2373
2369
|
|
|
2374
2370
|
.ring-offset-background {
|
|
2375
|
-
--tw-ring-offset-color:
|
|
2371
|
+
--tw-ring-offset-color: rgb(var(--background) / 1);
|
|
2376
2372
|
}
|
|
2377
2373
|
|
|
2378
2374
|
.blur {
|
|
@@ -2574,14 +2570,6 @@ body {
|
|
|
2574
2570
|
color: transparent;
|
|
2575
2571
|
}
|
|
2576
2572
|
|
|
2577
|
-
.focus-within\:relative:focus-within {
|
|
2578
|
-
position: relative;
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
.focus-within\:z-20:focus-within {
|
|
2582
|
-
z-index: 20;
|
|
2583
|
-
}
|
|
2584
|
-
|
|
2585
2573
|
.hover\:border-error-120:hover {
|
|
2586
2574
|
--tw-border-opacity: 1;
|
|
2587
2575
|
border-color: rgb(var(--error-120) / var(--tw-border-opacity));
|
|
@@ -2625,11 +2613,6 @@ body {
|
|
|
2625
2613
|
background-color: rgb(var(--main-transparent-secondary) / 0.8);
|
|
2626
2614
|
}
|
|
2627
2615
|
|
|
2628
|
-
.hover\:bg-primary:hover {
|
|
2629
|
-
--tw-bg-opacity: 1;
|
|
2630
|
-
background-color: rgb(var(--primary-default) / var(--tw-bg-opacity));
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
2616
|
.hover\:bg-primary-100:hover {
|
|
2634
2617
|
--tw-bg-opacity: 1;
|
|
2635
2618
|
background-color: rgb(var(--primary-100) / var(--tw-bg-opacity));
|
|
@@ -2690,11 +2673,6 @@ body {
|
|
|
2690
2673
|
color: rgb(var(--primary-default) / var(--tw-text-opacity));
|
|
2691
2674
|
}
|
|
2692
2675
|
|
|
2693
|
-
.hover\:text-primary-foreground:hover {
|
|
2694
|
-
--tw-text-opacity: 1;
|
|
2695
|
-
color: rgb(var(--primary-foreground) / var(--tw-text-opacity));
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
2676
|
.hover\:text-secondary-5:hover {
|
|
2699
2677
|
--tw-text-opacity: 1;
|
|
2700
2678
|
color: rgb(var(--secondary-5) / var(--tw-text-opacity));
|
|
@@ -2718,11 +2696,6 @@ body {
|
|
|
2718
2696
|
border-color: rgb(var(--input-default-stroke-color) / var(--tw-border-opacity));
|
|
2719
2697
|
}
|
|
2720
2698
|
|
|
2721
|
-
.focus\:bg-primary:focus {
|
|
2722
|
-
--tw-bg-opacity: 1;
|
|
2723
|
-
background-color: rgb(var(--primary-default) / var(--tw-bg-opacity));
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
2699
|
.focus\:pe-10:focus {
|
|
2727
2700
|
padding-inline-end: 2.5rem;
|
|
2728
2701
|
}
|
|
@@ -2735,11 +2708,6 @@ body {
|
|
|
2735
2708
|
padding-inline-end: 2rem;
|
|
2736
2709
|
}
|
|
2737
2710
|
|
|
2738
|
-
.focus\:text-primary-foreground:focus {
|
|
2739
|
-
--tw-text-opacity: 1;
|
|
2740
|
-
color: rgb(var(--primary-foreground) / var(--tw-text-opacity));
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
2711
|
.focus\:outline-none:focus {
|
|
2744
2712
|
outline: 2px solid transparent;
|
|
2745
2713
|
outline-offset: 2px;
|
|
@@ -2973,14 +2941,6 @@ body {
|
|
|
2973
2941
|
opacity: 0.5;
|
|
2974
2942
|
}
|
|
2975
2943
|
|
|
2976
|
-
.aria-selected\:opacity-100[aria-selected="true"] {
|
|
2977
|
-
opacity: 1;
|
|
2978
|
-
}
|
|
2979
|
-
|
|
2980
|
-
.aria-selected\:opacity-30[aria-selected="true"] {
|
|
2981
|
-
opacity: 0.3;
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
2944
|
.data-\[state\=checked\]\:border-primary[data-state=checked] {
|
|
2985
2945
|
--tw-border-opacity: 1;
|
|
2986
2946
|
border-color: rgb(var(--primary-default) / var(--tw-border-opacity));
|
|
@@ -3024,18 +2984,6 @@ body {
|
|
|
3024
2984
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
3025
2985
|
}
|
|
3026
2986
|
|
|
3027
|
-
.sm\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
3028
|
-
--tw-space-x-reverse: 0;
|
|
3029
|
-
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
|
3030
|
-
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
.sm\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
|
|
3034
|
-
--tw-space-y-reverse: 0;
|
|
3035
|
-
margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
|
|
3036
|
-
margin-bottom: calc(0px * var(--tw-space-y-reverse));
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
2987
|
.sm\:rounded-\[var\(--popup-rounded\)\] {
|
|
3040
2988
|
border-radius: var(--popup-rounded);
|
|
3041
2989
|
}
|
|
@@ -3045,21 +2993,6 @@ body {
|
|
|
3045
2993
|
}
|
|
3046
2994
|
}
|
|
3047
2995
|
|
|
3048
|
-
.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child {
|
|
3049
|
-
border-top-left-radius: calc(var(--radius) - 2px);
|
|
3050
|
-
border-bottom-left-radius: calc(var(--radius) - 2px);
|
|
3051
|
-
}
|
|
3052
|
-
|
|
3053
|
-
.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child {
|
|
3054
|
-
border-top-right-radius: calc(var(--radius) - 2px);
|
|
3055
|
-
border-bottom-right-radius: calc(var(--radius) - 2px);
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end) {
|
|
3059
|
-
border-top-right-radius: calc(var(--radius) - 2px);
|
|
3060
|
-
border-bottom-right-radius: calc(var(--radius) - 2px);
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
2996
|
.\[\&\:has\(\[role\=checkbox\]\)\]\:w-4:has([role=checkbox]) {
|
|
3064
2997
|
width: 1rem;
|
|
3065
2998
|
}
|
|
@@ -3072,6 +3005,19 @@ body {
|
|
|
3072
3005
|
border-bottom-width: 0px;
|
|
3073
3006
|
}
|
|
3074
3007
|
|
|
3008
|
+
.\[\&_button\]\:\!border button {
|
|
3009
|
+
border-width: 1px !important;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
.\[\&_button\]\:\!border-solid button {
|
|
3013
|
+
border-style: solid !important;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
.\[\&_button\]\:\!border-primary button {
|
|
3017
|
+
--tw-border-opacity: 1 !important;
|
|
3018
|
+
border-color: rgb(var(--primary-default) / var(--tw-border-opacity)) !important;
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3075
3021
|
.\[\&_tr\:last-child\]\:border-0 tr:last-child {
|
|
3076
3022
|
border-width: 0px;
|
|
3077
3023
|
}
|
package/dist/theme/global.css
CHANGED
|
@@ -176,6 +176,10 @@
|
|
|
176
176
|
--text-grey-light: 164 169 178;
|
|
177
177
|
--text-white: 255 255 255;
|
|
178
178
|
|
|
179
|
+
/* Other */
|
|
180
|
+
--other-bg: var(--white);
|
|
181
|
+
--other-bg-2: var(--white);
|
|
182
|
+
|
|
179
183
|
/* Other/Popup */
|
|
180
184
|
--popup-background: 249 251 255;
|
|
181
185
|
/* Other/Popup Curtain */
|
|
@@ -192,8 +196,8 @@
|
|
|
192
196
|
|
|
193
197
|
/* TODO for shadcn, wait for refactor */
|
|
194
198
|
/* --background: 0 0% 100%; */
|
|
195
|
-
--background:
|
|
196
|
-
--foreground:
|
|
199
|
+
--background: var(--brand-background);
|
|
200
|
+
--foreground: var(--text-white:);
|
|
197
201
|
|
|
198
202
|
--muted: 210 40% 96.1%;
|
|
199
203
|
--muted-foreground: 215.4 16.3% 46.9%;
|
|
@@ -204,8 +208,8 @@
|
|
|
204
208
|
--border: 214.3 31.8% 91.4%;
|
|
205
209
|
--input: 214.3 31.8% 91.4%;
|
|
206
210
|
|
|
207
|
-
--card:
|
|
208
|
-
--card-foreground:
|
|
211
|
+
--card: var(--white);
|
|
212
|
+
--card-foreground: var(--primary);
|
|
209
213
|
|
|
210
214
|
--primary: var(--primary-default);
|
|
211
215
|
|
|
@@ -7,8 +7,8 @@ module.exports = {
|
|
|
7
7
|
colors: {
|
|
8
8
|
border: "hsl(var(--border))",
|
|
9
9
|
ring: "hsl(var(--ring))",
|
|
10
|
-
background: "
|
|
11
|
-
foreground: "
|
|
10
|
+
background: "rgb(var(--background) / <alpha-value>)",
|
|
11
|
+
foreground: "rgb(var(--foreground) / <alpha-value>)",
|
|
12
12
|
// Palette colors
|
|
13
13
|
themes: {
|
|
14
14
|
50: "rgb(var(--themes-50) / <alpha-value>)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rovula/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"main": "dist/cjs/bundle.js",
|
|
5
5
|
"module": "dist/esm/bundle.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"clsx": "^2.1.1",
|
|
85
85
|
"date-fns": "^3.6.0",
|
|
86
86
|
"react": "^17.0.0 || ^18.0.0",
|
|
87
|
-
"react-day-picker": "^
|
|
87
|
+
"react-day-picker": "^9.0.7",
|
|
88
88
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
89
89
|
"tailwind-merge": "^2.3.0",
|
|
90
90
|
"tailwindcss-animate": "^1.0.7",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
3
|
import Calendar from "./Calendar";
|
|
4
|
+
import ThemeToggle from "../ThemeToggle";
|
|
5
|
+
import Button from "../Button/Button";
|
|
4
6
|
|
|
5
7
|
// import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
6
8
|
|
|
@@ -33,6 +35,8 @@ export const Default = {
|
|
|
33
35
|
|
|
34
36
|
return (
|
|
35
37
|
<div className="flex flex-row gap-4 w-full">
|
|
38
|
+
<ThemeToggle />
|
|
39
|
+
<Button>Text</Button>
|
|
36
40
|
<Calendar
|
|
37
41
|
mode="single"
|
|
38
42
|
selected={date}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { DayPicker } from "react-day-picker";
|
|
4
|
+
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
6
5
|
|
|
6
|
+
import "react-day-picker/dist/style.css";
|
|
7
7
|
import { cn } from "@/utils/cn";
|
|
8
|
-
import { buttonVariants } from "../Button/Button.styles";
|
|
9
8
|
|
|
10
9
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
11
10
|
|
|
@@ -15,49 +14,33 @@ function Calendar({
|
|
|
15
14
|
showOutsideDays = true,
|
|
16
15
|
...props
|
|
17
16
|
}: CalendarProps) {
|
|
17
|
+
const defaultClassNames = getDefaultClassNames();
|
|
18
|
+
|
|
18
19
|
return (
|
|
19
20
|
<DayPicker
|
|
20
21
|
showOutsideDays={showOutsideDays}
|
|
21
|
-
|
|
22
|
+
captionLayout="dropdown-years"
|
|
23
|
+
{...props}
|
|
24
|
+
className={cn(
|
|
25
|
+
"bg-[rgb(var(--card))] text-[rgb(var(--card-foreground))] border-[rgb(var(--card))]",
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
22
28
|
classNames={{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
head_cell:
|
|
37
|
-
"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
38
|
-
row: "flex w-full mt-2",
|
|
39
|
-
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
40
|
-
day: cn(
|
|
41
|
-
buttonVariants({ variant: "flat" }),
|
|
42
|
-
"size-7 p-0 font-normal aria-selected:opacity-100"
|
|
43
|
-
),
|
|
44
|
-
day_range_end: "day-range-end",
|
|
45
|
-
day_selected:
|
|
46
|
-
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
47
|
-
day_today: "bg-accent text-accent-foreground",
|
|
48
|
-
day_outside:
|
|
49
|
-
"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
50
|
-
day_disabled: "text-muted-foreground opacity-50",
|
|
51
|
-
day_range_middle:
|
|
52
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
53
|
-
day_hidden: "invisible",
|
|
29
|
+
...defaultClassNames,
|
|
30
|
+
day_button: cn(defaultClassNames.day_button, "size-9 "),
|
|
31
|
+
day: "typography-subtitile1 ",
|
|
32
|
+
today:
|
|
33
|
+
"text-bold rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",
|
|
34
|
+
selected: "bg-primary text-primary-foreground rounded-full ",
|
|
35
|
+
weekdays: "text-gray-400",
|
|
36
|
+
month_caption: cn(defaultClassNames.month_caption, "h-[54px]"),
|
|
37
|
+
outside: "text-gray-400",
|
|
38
|
+
nav: cn(defaultClassNames.nav, "gap-6"),
|
|
39
|
+
chevron: "fill-primary",
|
|
40
|
+
root: cn(defaultClassNames.root, "px-6 py-4 "),
|
|
41
|
+
caption_label: cn(defaultClassNames.caption_label, "gap-2"),
|
|
54
42
|
...classNames,
|
|
55
43
|
}}
|
|
56
|
-
components={{
|
|
57
|
-
IconLeft: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
|
|
58
|
-
IconRight: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
|
|
59
|
-
}}
|
|
60
|
-
{...props}
|
|
61
44
|
/>
|
|
62
45
|
);
|
|
63
46
|
}
|
|
@@ -4,20 +4,21 @@ import React, { FC, useState } from "react";
|
|
|
4
4
|
import { CalendarIcon } from "@heroicons/react/16/solid";
|
|
5
5
|
|
|
6
6
|
import { Calendar } from "../Calendar";
|
|
7
|
-
import Button from "../Button/Button";
|
|
8
|
-
import { cn } from "@/utils/cn";
|
|
9
7
|
import { Popover, PopoverContent, PopoverTrigger } from "../Popover/Popover";
|
|
10
|
-
import {
|
|
8
|
+
import { Modifiers } from "react-day-picker";
|
|
11
9
|
import { TextInput } from "../TextInput/TextInput";
|
|
12
10
|
import { format } from "date-fns/format";
|
|
13
11
|
|
|
14
12
|
type DatePickerProps = {
|
|
15
13
|
date: Date | undefined;
|
|
16
|
-
onSelect:
|
|
14
|
+
onSelect: (
|
|
15
|
+
selected: Date | undefined,
|
|
16
|
+
triggerDate: Date,
|
|
17
|
+
modifiers: Modifiers,
|
|
18
|
+
e: React.MouseEvent | React.KeyboardEvent
|
|
19
|
+
) => void | undefined;
|
|
17
20
|
};
|
|
18
21
|
|
|
19
|
-
CalendarIcon;
|
|
20
|
-
|
|
21
22
|
const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
|
|
22
23
|
const [isOpen, setIsOpen] = useState(false);
|
|
23
24
|
|
|
@@ -46,7 +47,6 @@ const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
|
|
|
46
47
|
onSelect?.(...value);
|
|
47
48
|
setIsOpen(false);
|
|
48
49
|
}}
|
|
49
|
-
initialFocus
|
|
50
50
|
/>
|
|
51
51
|
</PopoverContent>
|
|
52
52
|
</Popover>
|
|
@@ -19,7 +19,7 @@ const PopoverContent = React.forwardRef<
|
|
|
19
19
|
align={align}
|
|
20
20
|
sideOffset={sideOffset}
|
|
21
21
|
className={cn(
|
|
22
|
-
"z-50 w-72 rounded-md border bg-popup-background p-
|
|
22
|
+
"z-50 min-w-72 rounded-md border bg-popup-background border-none overflow-hidden p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|