h2o-library 1.0.0 → 1.2.0
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 +28 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/components/src/accordion.d.ts +4 -1
- package/dist/components/src/button.d.ts +1 -1
- package/dist/components/src/calendar.d.ts +12 -0
- package/dist/components/src/expandable.d.ts +1 -1
- package/dist/components/src/icon.d.ts +1 -1
- package/dist/components/src/logo.d.ts +5 -0
- package/dist/components/src/pagination.d.ts +14 -0
- package/dist/components/src/popover.d.ts +7 -5
- package/dist/components/src/radio.d.ts +1 -1
- package/dist/components/src/side-panel.d.ts +1 -1
- package/dist/components/src/table.d.ts +27 -0
- package/dist/components/src/toast.d.ts +20 -0
- package/dist/components/src/toggle.d.ts +2 -1
- package/dist/css/index.css +1 -1
- package/dist/css/src/accordion.css +14 -8
- package/dist/css/src/button.css +35 -1
- package/dist/css/src/calendar.css +197 -7
- package/dist/css/src/content-switch.css +1 -0
- package/dist/css/src/dropdown.css +4 -4
- package/dist/css/src/index.css +7 -7
- package/dist/css/src/input.css +15 -6
- package/dist/css/src/modal.css +2 -2
- package/dist/css/src/multi-select.css +1 -1
- package/dist/css/src/pagination.css +80 -0
- package/dist/css/src/popover.css +4 -1
- package/dist/css/src/side-panel.css +3 -4
- package/dist/css/src/table.css +103 -0
- package/dist/css/src/tabs.css +1 -1
- package/dist/css/src/textarea.css +20 -5
- package/dist/css/src/toast.css +97 -0
- package/dist/css/src/toggle.css +23 -4
- package/dist/css/src/tooltip.css +5 -5
- package/dist/esm/components/index.d.ts +5 -1
- package/dist/esm/components/src/accordion.d.ts +4 -1
- package/dist/esm/components/src/button.d.ts +1 -1
- package/dist/esm/components/src/calendar.d.ts +12 -0
- package/dist/esm/components/src/expandable.d.ts +1 -1
- package/dist/esm/components/src/icon.d.ts +1 -1
- package/dist/esm/components/src/logo.d.ts +5 -0
- package/dist/esm/components/src/pagination.d.ts +14 -0
- package/dist/esm/components/src/popover.d.ts +7 -5
- package/dist/esm/components/src/radio.d.ts +1 -1
- package/dist/esm/components/src/side-panel.d.ts +1 -1
- package/dist/esm/components/src/table.d.ts +27 -0
- package/dist/esm/components/src/toast.d.ts +20 -0
- package/dist/esm/components/src/toggle.d.ts +2 -1
- package/dist/esm/css/index.css +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +8 -5
- package/dist/components/src/date-picker.d.ts +0 -13
- package/dist/esm/components/src/date-picker.d.ts +0 -13
package/README.md
CHANGED
|
@@ -6,4 +6,32 @@ A set of components for H2O App development.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install h2o-library
|
|
9
|
+
|
|
10
|
+
# or
|
|
11
|
+
|
|
12
|
+
yarn add h2o-library
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
import css files into your project
|
|
18
|
+
|
|
19
|
+
trough css file
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
@import "h2o-library/dist/styles/index.css";
|
|
9
23
|
```
|
|
24
|
+
|
|
25
|
+
trough js/ts file
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import "h2o-library/dist/styles/index.css";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
and use components like so
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Button } from "h2o-library";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
refer to the [docs](https://h2o-library-documentation.vercel.app/) for more information
|
|
@@ -13,9 +13,13 @@ export * from "./src/side-panel";
|
|
|
13
13
|
export * from "./src/modal";
|
|
14
14
|
export * from "./src/tag";
|
|
15
15
|
export * from "./src/accordion";
|
|
16
|
-
export * from "./src/date-picker";
|
|
17
16
|
export * from "./src/multi-select";
|
|
18
17
|
export * from "./src/radio-group";
|
|
19
18
|
export * from "./src/tabs";
|
|
20
19
|
export * from "./src/status";
|
|
21
20
|
export * from "./src/popover";
|
|
21
|
+
export * from "./src/pagination";
|
|
22
|
+
export * from "./src/table";
|
|
23
|
+
export * from "./src/toast";
|
|
24
|
+
export * from "./src/logo";
|
|
25
|
+
export * from "./src/calendar";
|
|
@@ -4,6 +4,9 @@ export interface AccordionProps {
|
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
setIsOpen: (isOpen: boolean) => void;
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
description?: string;
|
|
7
8
|
className?: string;
|
|
9
|
+
titleClassName?: string;
|
|
10
|
+
descriptionClassName?: string;
|
|
8
11
|
}
|
|
9
|
-
export declare const Accordion: ({ title, isOpen, setIsOpen, children, className, }: AccordionProps) => React.JSX.Element;
|
|
12
|
+
export declare const Accordion: ({ title, isOpen, setIsOpen, children, description, className, titleClassName, descriptionClassName, }: AccordionProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconType, TooltipPosition } from "../../types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
4
|
+
variant?: "primary" | "secondary" | "ghost" | "danger" | "warning" | "success";
|
|
5
5
|
size?: "sm" | "md" | "lg";
|
|
6
6
|
label?: string;
|
|
7
7
|
icon?: IconType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type CalendarMode = "single" | "range";
|
|
3
|
+
interface CalendarProps {
|
|
4
|
+
mode?: CalendarMode;
|
|
5
|
+
value?: Date | [Date | null, Date | null];
|
|
6
|
+
onChange?: (value: Date | [Date | null, Date | null]) => void;
|
|
7
|
+
minDate?: Date;
|
|
8
|
+
maxDate?: Date;
|
|
9
|
+
forceWeek?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Calendar: ({ mode, value, onChange, minDate, maxDate, forceWeek, }: CalendarProps) => JSX.Element | null;
|
|
12
|
+
export { Calendar };
|
|
@@ -5,4 +5,4 @@ export interface ExpandableSearchProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
value?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const ExpandableSearch: React.
|
|
8
|
+
export declare const ExpandableSearch: ({ onSearch, placeholder, className, value, }: ExpandableSearchProps) => React.JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
tooltipPosition?: TooltipPosition;
|
|
8
8
|
}
|
|
9
|
-
export declare const Icon:
|
|
9
|
+
export declare const Icon: ({ icon, size, tooltip, tooltipPosition, ...props }: IconProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
currentPage: number;
|
|
4
|
+
totalPages: number;
|
|
5
|
+
perPage: number;
|
|
6
|
+
perPageOptions?: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[];
|
|
10
|
+
onPageChange: (page: number) => void;
|
|
11
|
+
onPerPageChange: (perPage: string) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Pagination: React.FC<PaginationProps>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
interface PopOverProps {
|
|
3
3
|
isOpen: boolean;
|
|
4
4
|
setIsOpen: (isOpen: boolean) => void;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
alignment?: "left" | "right";
|
|
7
|
+
className?: string;
|
|
6
8
|
}
|
|
7
|
-
export declare const PopOver: ({ children, isOpen, setIsOpen }: PopOverProps) => React.JSX.Element;
|
|
9
|
+
export declare const PopOver: ({ children, isOpen, setIsOpen, alignment, className, }: PopOverProps) => React.JSX.Element;
|
|
8
10
|
export declare const PopOverTrigger: ({ children }: {
|
|
9
11
|
children: React.ReactNode;
|
|
10
12
|
}) => React.JSX.Element;
|
|
11
|
-
export declare const PopOverContent: ({ children }: {
|
|
12
|
-
children:
|
|
13
|
-
}) =>
|
|
13
|
+
export declare const PopOverContent: ({ children, }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}) => JSX.Element | null;
|
|
14
16
|
export {};
|
|
@@ -7,4 +7,4 @@ export interface SidePanelProps {
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const SidePanel: ({ isOpen, onClose, title, description, children, className, }: SidePanelProps) =>
|
|
10
|
+
export declare const SidePanel: ({ isOpen, onClose, title, description, children, className, }: SidePanelProps) => JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type SortDirection = "asc" | "desc" | null;
|
|
3
|
+
export interface TableColumn<T> {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
render?: (value: any, row: T) => React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TableProps<T extends Record<string, any>> {
|
|
10
|
+
columns: TableColumn<T>[];
|
|
11
|
+
data: T[];
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
sortKey?: string;
|
|
15
|
+
sortDirection?: SortDirection;
|
|
16
|
+
onSort?: (key: string, direction: SortDirection) => void;
|
|
17
|
+
currentPage?: number;
|
|
18
|
+
totalPages?: number;
|
|
19
|
+
perPage?: number;
|
|
20
|
+
perPageOptions?: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}[];
|
|
24
|
+
onPageChange?: (page: number) => void;
|
|
25
|
+
onPerPageChange?: (perPage: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, isLoading, className, sortKey, sortDirection, onSort, currentPage, totalPages, perPage, perPageOptions, onPageChange, onPerPageChange, }: TableProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ToastVariant = "info" | "error" | "warning" | "success";
|
|
3
|
+
interface ToastAction {
|
|
4
|
+
label: string;
|
|
5
|
+
action: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface ToastProps {
|
|
8
|
+
id: string;
|
|
9
|
+
variant: ToastVariant;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
primaryAction?: ToastAction;
|
|
13
|
+
secondaryAction?: ToastAction;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const ToastProvider: React.FC<{
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const useToast: () => (props: Omit<ToastProps, "id" | "onClose">) => void;
|
|
20
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
3
3
|
label?: string;
|
|
4
|
+
description?: string;
|
|
4
5
|
className?: string;
|
|
5
6
|
isCard?: boolean;
|
|
6
7
|
isDraggable?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const Toggle:
|
|
9
|
+
export declare const Toggle: ({ label, description, className, isCard, isDraggable, ...props }: ToggleProps) => JSX.Element;
|
package/dist/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--
|
|
1
|
+
:root{--primary-disabled:225 100% 88%;--primary-muted:221 100% 95%;--primary:225 91% 59%;--primary-200:225 100% 43%;--primary-300:225 91% 40%;--primary-400:225 91% 18%;--success-bg:143 26% 86%;--success:130 35% 46%;--success-200:130 76% 26%;--success-300:130 100% 18%;--warning-bg:45 100% 84%;--warning:45 100% 61%;--warning-200:45 100% 45%;--warning-300:45 100% 32%;--destructive-bg:357 100% 92%;--destructive:0 83% 60%;--destructive-200:0 100% 42%;--destructive-300:0 100% 29%;--muted-25:0 0 98%;--muted-50:0 0 96%;--muted:0 0 80%;--muted-200:0 0 67%;--radius-sm:0.25rem;--radius-md:0.375rem;--radius-lg:0.5rem;--radius-full:9999px}@import "./src/accordion.css";@import "./src/button.css";@import "./src/calendar.css";@import "./src/checkbox.css";@import "./src/content-switch.css";@import "./src/dropdown.css";@import "./src/input.css";@import "./src/modal.css";@import "./src/multi-select.css";@import "./src/popover.css";@import "./src/radio.css";@import "./src/search.css";@import "./src/side-panel.css";@import "./src/status.css";@import "./src/tabs.css";@import "./src/tag.css";@import "./src/textarea.css";@import "./src/toggle.css";@import "./src/tooltip.css";@import "./src/pagination.css";@import "./src/table.css";@import "./src/toast.css";
|
|
@@ -6,14 +6,24 @@
|
|
|
6
6
|
.accordion-trigger {
|
|
7
7
|
width: 100%;
|
|
8
8
|
display: flex;
|
|
9
|
-
|
|
10
|
-
align-items:
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: 0.6rem;
|
|
11
12
|
background: none;
|
|
12
13
|
border: none;
|
|
13
14
|
cursor: pointer;
|
|
14
|
-
color: hsl(var(--foreground));
|
|
15
15
|
transition: all 0.2s;
|
|
16
|
-
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.accordion-title-container {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.accordion-description {
|
|
26
|
+
color: hsl(var(--muted-200));
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
.accordion-icon {
|
|
@@ -39,7 +49,3 @@
|
|
|
39
49
|
transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
40
50
|
margin-top: 0.5rem;
|
|
41
51
|
}
|
|
42
|
-
|
|
43
|
-
.accordion-content-inner {
|
|
44
|
-
background-color: hsl(var(--background));
|
|
45
|
-
}
|
package/dist/css/src/button.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.button--secondary {
|
|
38
|
-
background-color:
|
|
38
|
+
background-color: hsl(var(--background));
|
|
39
39
|
border: 1px solid hsl(var(--muted));
|
|
40
40
|
color: hsl(var(--primary));
|
|
41
41
|
}
|
|
@@ -90,6 +90,40 @@
|
|
|
90
90
|
opacity: 0.5;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
.button--warning {
|
|
94
|
+
background-color: hsl(var(--warning));
|
|
95
|
+
color: white;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.button--warning:hover:not(:disabled) {
|
|
99
|
+
background-color: hsl(var(--warning-200));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.button--warning:active:not(:disabled) {
|
|
103
|
+
background-color: hsl(var(--warning-300));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.button--warning:disabled {
|
|
107
|
+
opacity: 0.5;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.button--success {
|
|
111
|
+
background-color: hsl(var(--success));
|
|
112
|
+
color: white;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.button--success:hover:not(:disabled) {
|
|
116
|
+
background-color: hsl(var(--success-200));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.button--success:active:not(:disabled) {
|
|
120
|
+
background-color: hsl(var(--success-300));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.button--success:disabled {
|
|
124
|
+
opacity: 0.5;
|
|
125
|
+
}
|
|
126
|
+
|
|
93
127
|
/* Sizes */
|
|
94
128
|
.button--sm {
|
|
95
129
|
font-size: 0.875rem;
|
|
@@ -1,16 +1,206 @@
|
|
|
1
|
-
.calendar-
|
|
1
|
+
.calendar-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-width: 24rem;
|
|
4
|
+
background-color: hsl(var(--background));
|
|
5
|
+
border-radius: 0.5rem;
|
|
6
|
+
box-shadow: var(--primary-shadow);
|
|
7
|
+
border: 1px solid hsl(var(--primary-muted));
|
|
8
|
+
padding: 0 1rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.calendar-header {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
padding: 1rem 0.5rem;
|
|
16
|
+
text-transform: capitalize;
|
|
17
|
+
border-bottom: 1px solid hsl(var(--muted) / 50%);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.calendar-title {
|
|
21
|
+
font-size: 1rem;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.calendar-nav-button {
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
padding: 0.2rem;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
border-radius: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.calendar-nav-button:hover {
|
|
37
|
+
background-color: hsl(var(--muted-50));
|
|
2
38
|
color: hsl(var(--primary));
|
|
39
|
+
transition: all 0.2s ease-in-out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.calendar-grid {
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-columns: repeat(7, 1fr);
|
|
45
|
+
padding: 0.5rem;
|
|
46
|
+
grid-row-gap: 0.5rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.calendar-weekday {
|
|
50
|
+
text-align: center;
|
|
51
|
+
font-size: 0.7rem;
|
|
3
52
|
font-weight: 500;
|
|
53
|
+
padding: 0.35rem; /* increasing here will increase the width of the calendar */
|
|
54
|
+
text-transform: uppercase;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.calendar-day {
|
|
58
|
+
aspect-ratio: 1;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
border: none;
|
|
64
|
+
background: none;
|
|
65
|
+
font-size: 0.75rem;
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.calendar-day:disabled {
|
|
70
|
+
color: hsl(var(--muted));
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.calendar-day.outside-month {
|
|
75
|
+
color: hsl(var(--muted-200));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.calendar-day:not(:disabled):not(.selected):not(.in-range):hover {
|
|
79
|
+
background-color: hsl(var(--primary));
|
|
80
|
+
color: white;
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
transition: background-color 0.2s ease-in-out;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.calendar-day.selected {
|
|
86
|
+
background-color: hsl(var(--primary));
|
|
87
|
+
color: white;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
&:hover {
|
|
90
|
+
background-color: hsl(var(--primary-200));
|
|
91
|
+
}
|
|
4
92
|
}
|
|
5
93
|
|
|
6
|
-
.calendar-day-
|
|
7
|
-
|
|
94
|
+
.calendar-day.in-range:not(.range-start):not(.range-end) {
|
|
95
|
+
background-color: hsl(var(--primary-muted));
|
|
96
|
+
border-radius: 0;
|
|
97
|
+
&:hover {
|
|
98
|
+
color: hsl(var(--primary));
|
|
99
|
+
transition: color 0.2s ease-in-out;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.calendar-day.range-start {
|
|
104
|
+
background-color: hsl(var(--primary));
|
|
105
|
+
color: white;
|
|
106
|
+
border-radius: 50%;
|
|
107
|
+
position: relative;
|
|
108
|
+
&:hover {
|
|
109
|
+
&::before {
|
|
110
|
+
background-color: hsl(var(--primary-200));
|
|
111
|
+
transition: background-color 0.2s ease-in-out;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
&::before {
|
|
115
|
+
content: attr(data-number);
|
|
116
|
+
position: absolute;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
width: 100%;
|
|
123
|
+
background-color: hsl(var(--primary));
|
|
124
|
+
z-index: 10;
|
|
125
|
+
border-radius: 50%;
|
|
126
|
+
}
|
|
127
|
+
&::after {
|
|
128
|
+
content: "";
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 0;
|
|
131
|
+
bottom: 0;
|
|
132
|
+
width: 100%;
|
|
133
|
+
background-color: hsl(var(--primary-muted));
|
|
134
|
+
border-radius: 50% 0 0 50%;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.calendar-day.range-end {
|
|
139
|
+
background-color: hsl(var(--primary));
|
|
140
|
+
color: white;
|
|
141
|
+
border-radius: 50%;
|
|
142
|
+
position: relative;
|
|
143
|
+
&:hover {
|
|
144
|
+
&::before {
|
|
145
|
+
background-color: hsl(var(--primary-200));
|
|
146
|
+
transition: background-color 0.2s ease-in-out;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
&::before {
|
|
150
|
+
content: attr(data-number);
|
|
151
|
+
position: absolute;
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
top: 0;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
width: 100%;
|
|
158
|
+
background-color: hsl(var(--primary));
|
|
159
|
+
z-index: 10;
|
|
160
|
+
border-radius: 50%;
|
|
161
|
+
}
|
|
162
|
+
&::after {
|
|
163
|
+
content: "";
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0;
|
|
166
|
+
bottom: 0;
|
|
167
|
+
width: 100%;
|
|
168
|
+
border-radius: 0 50% 50% 0;
|
|
169
|
+
background-color: hsl(var(--primary-muted));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.calendar-day.in-range.week-start:not(.range-start):not(.range-end) {
|
|
174
|
+
border-radius: 50% 0 0 50% !important;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.calendar-day.in-range.week-end:not(.range-start):not(.range-end) {
|
|
178
|
+
border-radius: 0 50% 50% 0 !important;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.calendar-day.range-start:not(.range-end)::after {
|
|
182
|
+
right: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.calendar-day.range-end:not(.range-start)::after {
|
|
186
|
+
left: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.calendar-day.today:not(.selected):not(.range-start):not(.range-end) {
|
|
190
|
+
font-weight: bold;
|
|
191
|
+
color: hsl(var(--primary));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.today-indicator {
|
|
195
|
+
z-index: 50;
|
|
8
196
|
position: absolute;
|
|
197
|
+
bottom: 4px;
|
|
9
198
|
width: 4px;
|
|
10
199
|
height: 4px;
|
|
11
|
-
bottom: 4px;
|
|
12
|
-
left: 50%;
|
|
13
|
-
transform: translateX(-50%);
|
|
14
|
-
background-color: hsl(var(--primary));
|
|
15
200
|
border-radius: 50%;
|
|
201
|
+
background-color: white;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.calendar-day.today:not(.selected):not(.range-start):not(.range-end) .today-indicator {
|
|
205
|
+
background-color: hsl(var(--primary));
|
|
16
206
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
.dropdown-clear {
|
|
21
21
|
font-size: 0.875rem;
|
|
22
|
-
color: hsl(var(--muted-
|
|
22
|
+
color: hsl(var(--muted-200));
|
|
23
23
|
background: none;
|
|
24
24
|
border: none;
|
|
25
25
|
cursor: pointer;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
width: 100%;
|
|
37
37
|
border-radius: 0.375rem;
|
|
38
38
|
border: 1.5px solid hsl(var(--muted));
|
|
39
|
+
background: hsl(var(--background));
|
|
39
40
|
transition: border-color 0.2s, background-color 0.2s;
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
|
|
52
53
|
.dropdown-wrapper.dropdown-error {
|
|
53
54
|
border-color: hsl(var(--destructive));
|
|
54
|
-
background-color: hsl(var(--destructive) / 0.
|
|
55
|
+
background-color: hsl(var(--destructive-bg) / 0.3);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.dropdown-wrapper.dropdown-error:hover,
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
display: flex;
|
|
70
71
|
align-items: center;
|
|
71
72
|
justify-content: space-between;
|
|
72
|
-
background: transparent;
|
|
73
73
|
border: none;
|
|
74
74
|
outline: none;
|
|
75
75
|
color: hsl(var(--foreground));
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
|
|
201
201
|
.dropdown-note {
|
|
202
202
|
font-size: 0.875rem;
|
|
203
|
-
color: hsl(var(--muted-
|
|
203
|
+
color: hsl(var(--muted-200));
|
|
204
204
|
transition: color 0.2s;
|
|
205
205
|
}
|
|
206
206
|
|
package/dist/css/src/index.css
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--background: 0 0% 100%;
|
|
3
|
-
--foreground: 160 10% 10%;
|
|
4
|
-
|
|
5
2
|
--primary-disabled: 225 100% 88%;
|
|
6
3
|
--primary-muted: 221 100% 95%;
|
|
7
4
|
--primary: 225 91% 59%;
|
|
@@ -14,10 +11,10 @@
|
|
|
14
11
|
--success-200: 130 76% 26%;
|
|
15
12
|
--success-300: 130 100% 18%;
|
|
16
13
|
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
14
|
+
--warning-bg: 45 100% 84%;
|
|
15
|
+
--warning: 45 100% 61%;
|
|
16
|
+
--warning-200: 45 100% 45%;
|
|
17
|
+
--warning-300: 45 100% 32%;
|
|
21
18
|
|
|
22
19
|
--destructive-bg: 357 100% 92%;
|
|
23
20
|
--destructive: 0 83% 60%;
|
|
@@ -54,3 +51,6 @@
|
|
|
54
51
|
@import "./src/textarea.css";
|
|
55
52
|
@import "./src/toggle.css";
|
|
56
53
|
@import "./src/tooltip.css";
|
|
54
|
+
@import "./src/pagination.css";
|
|
55
|
+
@import "./src/table.css";
|
|
56
|
+
@import "./src/toast.css";
|
package/dist/css/src/input.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
.input-clear {
|
|
24
24
|
font-size: 0.875rem;
|
|
25
|
-
color: hsl(var(--muted
|
|
25
|
+
color: hsl(var(--muted));
|
|
26
26
|
background: none;
|
|
27
27
|
border: none;
|
|
28
28
|
cursor: pointer;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.input-clear:hover {
|
|
33
|
-
color: hsl(var(--
|
|
33
|
+
color: hsl(var(--muted-200));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.input-wrapper {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
width: 100%;
|
|
41
41
|
border-radius: var(--radius-md);
|
|
42
42
|
border: 1.5px solid hsl(var(--muted));
|
|
43
|
+
background: hsl(var(--background));
|
|
43
44
|
transition: border-color 0.2s, background-color 0.2s;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
|
|
54
55
|
.input-wrapper.input-error {
|
|
55
56
|
border-color: hsl(var(--destructive));
|
|
56
|
-
background-color: hsl(var(--destructive) / 0.
|
|
57
|
+
background-color: hsl(var(--destructive-bg) / 0.3);
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.input-wrapper.input-error:hover,
|
|
@@ -69,11 +70,11 @@
|
|
|
69
70
|
.input {
|
|
70
71
|
width: 100%;
|
|
71
72
|
height: 100%;
|
|
72
|
-
background: transparent;
|
|
73
73
|
border: none;
|
|
74
74
|
outline: none;
|
|
75
75
|
color: hsl(var(--foreground));
|
|
76
76
|
padding: 0 0.8rem;
|
|
77
|
+
background: none;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
.input::placeholder {
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
display: flex;
|
|
110
111
|
align-items: center;
|
|
111
112
|
height: 100%;
|
|
112
|
-
color: hsl(var(--muted-
|
|
113
|
+
color: hsl(var(--muted-200));
|
|
113
114
|
transition: color 0.2s;
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
/* Note and error message */
|
|
174
175
|
.input-note {
|
|
175
176
|
font-size: 0.875rem;
|
|
176
|
-
color: hsl(var(--muted-
|
|
177
|
+
color: hsl(var(--muted-200));
|
|
177
178
|
transition: color 0.2s;
|
|
178
179
|
}
|
|
179
180
|
|
|
@@ -190,3 +191,11 @@
|
|
|
190
191
|
font-size: 0.875rem;
|
|
191
192
|
color: hsl(var(--destructive));
|
|
192
193
|
}
|
|
194
|
+
|
|
195
|
+
.input-info-icon {
|
|
196
|
+
color: hsl(var(--muted-200));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.input-info-icon:hover {
|
|
200
|
+
color: hsl(var(--primary));
|
|
201
|
+
}
|