@humu-tech/ui 0.1.21 → 0.1.23
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/LICENSE +21 -0
- package/README.md +67 -55
- package/dist/DateInput-ASNJQV43.css +105 -0
- package/dist/DateRangeInput-PC5F3TTS.css +143 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +207 -149
- package/dist/index.mjs +208 -149
- package/package.json +55 -28
- package/dist/DateInput-Y73Z32X6.css +0 -80
- package/dist/DateRangeInput-GFYTBAQ7.css +0 -144
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Inovanti Bank
|
|
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
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
# @humu-tech/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@humu-tech/ui)
|
|
4
|
+
[](https://inovanti-bank.github.io/humu-ui/)
|
|
5
|
+
[](https://www.npmjs.com/package/@humu-tech/ui)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Design System V2 da Humu.** 51 primitives · 32 patterns · tema claro/escuro · React 18 · preset Tailwind · TypeScript.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Extraído dos apps de crédito (admin + portal do cliente) para ser consumido por todos os projetos da empresa.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
📖 **[Catálogo interativo no Storybook](https://inovanti-bank.github.io/humu-ui/)** — 83 componentes, 396 stories, e a aba **Docs** de cada um com a tabela de props gerada a partir dos tipos.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- **47 primitives** — Button, Input, Dialog, Combobox, DateInput, Switch, Tabs, Tooltip, Badge, Avatar, etc.
|
|
13
|
-
- **32 patterns** — DataTable, EmptyState, FilterBarV2, KpiCard, AppShell, Sidebar, DashboardBlock, charts, etc.
|
|
14
|
-
- **`cn`** — `tailwind-merge` estendido com os grupos de classe v2.
|
|
15
|
-
- **Preset Tailwind** (`@humu-tech/ui/tailwind-preset`) — o `theme.extend` com os utilitários v2.
|
|
16
|
-
- **Tema claro/escuro** — hook `useDsV2Theme` + componente `ThemeToggle`, via atributo `data-theme` na raiz do documento.
|
|
17
|
-
- **Pronto para Next.js** — os bundles emitem `"use client"` (compatível com App Router/RSC; inerte em Vite).
|
|
18
|
-
- **Framework-agnóstico** — navegação desacoplada via prop `linkComponent` (sem `react-router`/`next/link` embutido).
|
|
13
|
+
> **Nome do pacote:** publica como `@humu-tech/ui` e coexiste com o legado `@inovanti/react@3`. O rebrand do escopo para `@humu/*` fica para quando o registry `@humu` estiver provisionado.
|
|
19
14
|
|
|
20
15
|
## Instalação
|
|
21
16
|
|
|
22
|
-
O pacote é publicado no registry privado **AWS CodeArtifact** (`inovanti/bankeiro`), o mesmo do `@inovanti/*`. Com o `~/.npmrc` já apontando o escopo `@inovanti` para lá:
|
|
23
|
-
|
|
24
17
|
```bash
|
|
25
18
|
npm install @humu-tech/ui
|
|
26
19
|
```
|
|
27
20
|
|
|
21
|
+
Pacote **público no npm** — não precisa de registry privado nem de token.
|
|
22
|
+
|
|
28
23
|
`react` e `react-dom` (^18) são **peerDependencies**.
|
|
29
24
|
|
|
30
25
|
## Setup
|
|
@@ -34,7 +29,7 @@ npm install @humu-tech/ui
|
|
|
34
29
|
Importe o CSS de tokens uma vez na raiz do app:
|
|
35
30
|
|
|
36
31
|
```ts
|
|
37
|
-
// Vite
|
|
32
|
+
// Vite: src/main.tsx
|
|
38
33
|
import '@humu-tech/ui/tokens.css'
|
|
39
34
|
```
|
|
40
35
|
|
|
@@ -45,9 +40,9 @@ import '@humu-tech/ui/tokens.css'
|
|
|
45
40
|
|
|
46
41
|
### 2. Tailwind
|
|
47
42
|
|
|
48
|
-
O preset traz os utilitários v2 (`bg-v2-action-primary`, `text-v2-fg-default`, `rounded-v2-md`, …).
|
|
43
|
+
O preset traz os utilitários v2 (`bg-v2-action-primary`, `text-v2-fg-default`, `rounded-v2-md`, …).
|
|
49
44
|
|
|
50
|
-
**
|
|
45
|
+
> ⚠️ **O `content` precisa incluir o `dist` da lib.** Os componentes trazem as classes deles no bundle; sem essa linha, o Tailwind não gera essas classes e os estilos somem em silêncio — sem erro de build.
|
|
51
46
|
|
|
52
47
|
```ts
|
|
53
48
|
// tailwind.config.ts
|
|
@@ -60,7 +55,10 @@ export default {
|
|
|
60
55
|
}
|
|
61
56
|
```
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
<details>
|
|
59
|
+
<summary><strong>Se o app já usa <code>@inovanti/react/tailwind.config</code> como preset</strong></summary>
|
|
60
|
+
|
|
61
|
+
Não empilhe dois presets — o do `@inovanti/react` perde as próprias cores quando combinado com qualquer outro. Puxe os tokens por `theme.extend`:
|
|
64
62
|
|
|
65
63
|
```ts
|
|
66
64
|
export default {
|
|
@@ -77,6 +75,8 @@ export default {
|
|
|
77
75
|
}
|
|
78
76
|
```
|
|
79
77
|
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
80
|
## Uso
|
|
81
81
|
|
|
82
82
|
```tsx
|
|
@@ -94,7 +94,7 @@ export function Example() {
|
|
|
94
94
|
|
|
95
95
|
### Navegação desacoplada
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
Os componentes de navegação (`AppShell`, `Sidebar`, `Breadcrumb`, `KpiHero`) não embutem roteador: recebem `linkComponent` e `currentPath` por prop.
|
|
98
98
|
|
|
99
99
|
```tsx
|
|
100
100
|
import { AppShell, type DsLinkComponent } from '@humu-tech/ui'
|
|
@@ -104,44 +104,20 @@ const RouterLink: DsLinkComponent = ({ to, className, children }) => (
|
|
|
104
104
|
<Link to={to} className={className}>{children}</Link>
|
|
105
105
|
)
|
|
106
106
|
|
|
107
|
-
<AppShell
|
|
107
|
+
<AppShell
|
|
108
|
+
linkComponent={RouterLink}
|
|
109
|
+
currentPath={useLocation().pathname}
|
|
110
|
+
sidebarGroups={groups}
|
|
111
|
+
>
|
|
108
112
|
{children}
|
|
109
113
|
</AppShell>
|
|
110
114
|
```
|
|
111
115
|
|
|
112
116
|
Sem `linkComponent`, o default renderiza um `<a href>`.
|
|
113
117
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
Todos exportados diretamente de `@humu-tech/ui` (`import { X } from '@humu-tech/ui'`).
|
|
117
|
-
|
|
118
|
-
### Primitives (47)
|
|
119
|
-
|
|
120
|
-
| Grupo | Componentes |
|
|
121
|
-
| --- | --- |
|
|
122
|
-
| **Formulário / inputs** | Button, Checkbox, CepInput, ColorPicker, Combobox, DateInput, DateRangeInput, DocumentInput, FileUpload, ImageUpload, Input, Label, MaskedInput, MoneyInput, MultiCombobox, OtpInput, PasswordInput, PercentInput, PhoneInput, RadioGroup, Switch, TextArea |
|
|
123
|
-
| **Overlays / menus** | ConfirmDialog, ContextMenu, Dialog, Drawer, Dropdown, Popover, Tooltip |
|
|
124
|
-
| **Exibição de dados** | Avatar, Badge, Card, CopyButton, Skeleton, Sparkline, SparklineBadge, Text, Heading |
|
|
125
|
-
| **Navegação / layout** | Breadcrumb, Separator, Stepper, Tabs |
|
|
126
|
-
| **Feedback** | FormAlert, HelpHint, Spinner, Toast(er) |
|
|
127
|
-
| **Tema** | ThemeToggle |
|
|
128
|
-
|
|
129
|
-
### Patterns (32)
|
|
130
|
-
|
|
131
|
-
| Grupo | Componentes |
|
|
132
|
-
| --- | --- |
|
|
133
|
-
| **Formulário / inputs** | FormSection, FormWithAside, WizardShell |
|
|
134
|
-
| **Exibição de dados** | DataField, DataTable, DataTablePagination, EmptyState, LegalDocumentRenderer, PanelCard, ReadOnlyDataView, SectionCard, SortableColumnHeader, TutorialCard |
|
|
135
|
-
| **Navegação / layout** | AppShell, ErrorPageLayout, NavigatorTile, PublicPageLayout, Sidebar, Topbar |
|
|
136
|
-
| **Gráficos** | ChartTimeSeries, DonutChart, HorizontalBarChart, KpiCard, KpiHero, LineChart, StackedBarChart |
|
|
137
|
-
| **Feedback / diversos** | CommandPalette, DashboardBlock, DSAccordion, FilterBarV2, NotificationCenter, WorkflowDesigner |
|
|
138
|
-
|
|
139
|
-
## Tema claro/escuro
|
|
140
|
-
|
|
141
|
-
O DS ativa o tema escuro via `:root[data-theme="dark"]` (equivalente `.dark`) nos tokens CSS. A biblioteca fornece as duas peças necessárias para o app consumidor:
|
|
118
|
+
### Tema claro/escuro
|
|
142
119
|
|
|
143
|
-
|
|
144
|
-
- **`useDsV2Theme()`** — hook somente-leitura que observa o atributo `data-theme` da raiz (via `MutationObserver`) e retorna `'light' | 'dark'` (tipo `DsV2Theme`) — útil para adaptar lógica de app (ex.: cor de um gráfico de terceiros) ao tema atual sem duplicar a fonte da verdade.
|
|
120
|
+
O estado do tema vive no DOM (`data-theme` na raiz), então **não existe `ThemeProvider`** — qualquer parte da árvore, inclusive CSS puro, reage sozinha.
|
|
145
121
|
|
|
146
122
|
```tsx
|
|
147
123
|
import { ThemeToggle, useDsV2Theme } from '@humu-tech/ui'
|
|
@@ -157,12 +133,48 @@ function Topbar() {
|
|
|
157
133
|
}
|
|
158
134
|
```
|
|
159
135
|
|
|
160
|
-
|
|
136
|
+
- **`ThemeToggle`** — cicla `light → dark → system`, persiste em `localStorage` (`storageKey`, default `"ds-v2-theme-preference"`), escuta `prefers-color-scheme` quando a preferência é `system`, e escreve `data-theme` em `document.documentElement`.
|
|
137
|
+
- **`useDsV2Theme()`** — hook somente-leitura que observa esse atributo (`MutationObserver`) e devolve `'light' | 'dark'`. Útil para adaptar o que não é do DS, como a cor de um gráfico de terceiros.
|
|
138
|
+
|
|
139
|
+
## O que o pacote entrega
|
|
140
|
+
|
|
141
|
+
| Entrada | O quê |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `@humu-tech/ui` | 51 primitives + 32 patterns + `cn` + hooks |
|
|
144
|
+
| `@humu-tech/ui/tokens.css` | CSS custom properties em oklch, com variantes claro/escuro |
|
|
145
|
+
| `@humu-tech/ui/tailwind-preset` | `theme.extend` com os utilitários v2 |
|
|
146
|
+
|
|
147
|
+
Mais: **`cn`** (`tailwind-merge` estendido com os grupos de classe v2), bundles com `"use client"` (compatível com App Router/RSC, inerte em Vite) e tipos TypeScript inclusos.
|
|
148
|
+
|
|
149
|
+
## Catálogo
|
|
150
|
+
|
|
151
|
+
Tudo é exportado da raiz: `import { X } from '@humu-tech/ui'`.
|
|
152
|
+
|
|
153
|
+
### Primitives (51)
|
|
154
|
+
|
|
155
|
+
| Grupo | Componentes |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| **Formulário** | `Button` `Checkbox` `CepInput` `ColorPicker` `Combobox` `DateInput` `DateRangeInput` `DocumentInput` `FileUpload` `ImageUpload` `Input` `Label` `MaskedInput` `MoneyInput` `MultiCombobox` `OtpInput` `PasswordInput` `PercentInput` `PhoneInput` `RadioGroup` `Switch` `TextArea` |
|
|
158
|
+
| **Overlays / menus** | `ConfirmDialog` `ContextMenu` `Dialog` `Drawer` `Dropdown` `Popover` `Tooltip` |
|
|
159
|
+
| **Exibição de dados** | `Avatar` `Badge` `Box` `Card` `CopyButton` `FilePreview` `FileThumbnail` `Heading` `Skeleton` `Sparkline` `SparklineBadge` `Text` |
|
|
160
|
+
| **Navegação / layout** | `Breadcrumb` `Separator` `Stepper` `Tabs` |
|
|
161
|
+
| **Feedback** | `FormAlert` `FullScreenLoading` `HelpHint` `Spinner` `Toast` |
|
|
162
|
+
| **Tema** | `ThemeToggle` |
|
|
163
|
+
|
|
164
|
+
### Patterns (32)
|
|
165
|
+
|
|
166
|
+
| Grupo | Componentes |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| **Formulário** | `FormSection` `FormWithAside` `WizardShell` |
|
|
169
|
+
| **Exibição de dados** | `DataField` `DataTable` `DataTablePagination` `EmptyState` `LegalDocumentRenderer` `PanelCard` `ReadOnlyDataView` `SectionCard` `SortableColumnHeader` `TutorialCard` |
|
|
170
|
+
| **Navegação / layout** | `AppShell` `ErrorPageLayout` `NavigatorTile` `PublicPageLayout` `Sidebar` `Topbar` |
|
|
171
|
+
| **Gráficos** | `ChartTimeSeries` `DonutChart` `HorizontalBarChart` `KpiCard` `KpiHero` `LineChart` `StackedBarChart` |
|
|
172
|
+
| **Diversos** | `CommandPalette` `DashboardBlock` `DSAccordion` `FilterBarV2` `NotificationCenter` `WorkflowDesigner` |
|
|
161
173
|
|
|
162
|
-
##
|
|
174
|
+
## Changelog
|
|
163
175
|
|
|
164
|
-
|
|
176
|
+
Versionado com [changesets](https://github.com/changesets/changesets). O histórico completo está no [`CHANGELOG.md`](https://github.com/Inovanti-Bank/humu-ui/blob/main/packages/react/CHANGELOG.md) do repositório.
|
|
165
177
|
|
|
166
|
-
##
|
|
178
|
+
## Repositório
|
|
167
179
|
|
|
168
|
-
|
|
180
|
+
[github.com/Inovanti-Bank/humu-ui](https://github.com/Inovanti-Bank/humu-ui) — monorepo com o DS, o Storybook e as configs compartilhadas.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
.rdp-root.rdp-v2 {
|
|
2
|
+
--rdp-day-width: 36px;
|
|
3
|
+
--rdp-day-height: 36px;
|
|
4
|
+
--rdp-day_button-width: 36px;
|
|
5
|
+
--rdp-day_button-height: 36px;
|
|
6
|
+
--rdp-nav-height: 2rem;
|
|
7
|
+
--rdp-nav_button-width: 2rem;
|
|
8
|
+
--rdp-nav_button-height: 2rem;
|
|
9
|
+
--rdp-accent-color: var(--v2-action-primary);
|
|
10
|
+
--rdp-accent-background-color: var(--v2-action-primary);
|
|
11
|
+
--rdp-today-color: var(--v2-action-primary);
|
|
12
|
+
--rdp-selected-border: 2px solid var(--v2-action-primary);
|
|
13
|
+
--rdp-outside-opacity: 0.5;
|
|
14
|
+
--rdp-disabled-opacity: 0.4;
|
|
15
|
+
--rdp-weekday-text-transform: uppercase;
|
|
16
|
+
--rdp-weekday-opacity: 1;
|
|
17
|
+
margin: 0;
|
|
18
|
+
color: var(--v2-fg-default);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rdp-v2 .rdp-day_button {
|
|
22
|
+
border-radius: var(--radius-md);
|
|
23
|
+
color: var(--v2-fg-default);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.rdp-v2 .rdp-day:not(.rdp-selected) .rdp-day_button:hover:not([disabled]) {
|
|
27
|
+
background-color: var(--v2-bg-raised);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.rdp-v2 .rdp-selected {
|
|
31
|
+
font-size: inherit;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.rdp-v2 .rdp-day_button:focus-visible {
|
|
35
|
+
outline: 2px solid var(--v2-focus-ring);
|
|
36
|
+
outline-offset: 1px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.rdp-v2 .rdp-today .rdp-day_button {
|
|
40
|
+
color: var(--v2-action-primary);
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.rdp-v2 .rdp-outside .rdp-day_button {
|
|
45
|
+
color: var(--v2-fg-subtle);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.rdp-v2 .rdp-weekday {
|
|
49
|
+
color: var(--v2-fg-muted);
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rdp-v2 .rdp-caption_label {
|
|
54
|
+
color: var(--v2-fg-default);
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.rdp-v2 .rdp-button_previous,
|
|
59
|
+
.rdp-v2 .rdp-button_next {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
border: 1px solid var(--v2-border-default);
|
|
64
|
+
border-radius: 9999px;
|
|
65
|
+
background-color: transparent;
|
|
66
|
+
color: var(--v2-fg-default);
|
|
67
|
+
transition: background-color 120ms ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.rdp-v2 .rdp-button_previous:not([aria-disabled='true']):hover,
|
|
71
|
+
.rdp-v2 .rdp-button_next:not([aria-disabled='true']):hover {
|
|
72
|
+
background-color: var(--v2-bg-raised);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.rdp-v2 .rdp-button_previous:focus-visible,
|
|
76
|
+
.rdp-v2 .rdp-button_next:focus-visible {
|
|
77
|
+
outline: 2px solid var(--v2-focus-ring);
|
|
78
|
+
outline-offset: 1px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.rdp-v2 .rdp-button_previous[aria-disabled='true'],
|
|
82
|
+
.rdp-v2 .rdp-button_next[aria-disabled='true'] {
|
|
83
|
+
opacity: 0.4;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.rdp-v2 .rdp-chevron {
|
|
87
|
+
width: 1rem;
|
|
88
|
+
height: 1rem;
|
|
89
|
+
fill: currentColor;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.rdp-v2-single .rdp-day_button {
|
|
93
|
+
border-radius: 9999px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.rdp-v2-single .rdp-today:not(.rdp-selected) .rdp-day_button {
|
|
97
|
+
box-shadow: inset 0 0 0 1.5px var(--v2-action-primary);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.rdp-v2-single .rdp-selected .rdp-day_button {
|
|
101
|
+
background-color: var(--v2-action-primary);
|
|
102
|
+
color: var(--v2-action-on-primary);
|
|
103
|
+
border: none;
|
|
104
|
+
font-weight: 600;
|
|
105
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
.rdp-root.rdp-v2-range {
|
|
2
|
+
--rdp-accent-background-color: color-mix(
|
|
3
|
+
in oklch,
|
|
4
|
+
var(--v2-action-primary) 18%,
|
|
5
|
+
transparent
|
|
6
|
+
);
|
|
7
|
+
--rdp-day-width: 36px;
|
|
8
|
+
--rdp-day-height: 36px;
|
|
9
|
+
--rdp-day_button-width: 36px;
|
|
10
|
+
--rdp-day_button-height: 36px;
|
|
11
|
+
--rdp-nav-height: 2rem;
|
|
12
|
+
--rdp-nav_button-width: 2rem;
|
|
13
|
+
--rdp-nav_button-height: 2rem;
|
|
14
|
+
--rdp-months-gap: 1.5rem;
|
|
15
|
+
--rdp-accent-color: var(--v2-action-primary);
|
|
16
|
+
--rdp-today-color: var(--v2-action-primary);
|
|
17
|
+
--rdp-selected-border: 2px solid var(--v2-action-primary);
|
|
18
|
+
--rdp-outside-opacity: 0.5;
|
|
19
|
+
--rdp-disabled-opacity: 0.4;
|
|
20
|
+
--rdp-weekday-text-transform: uppercase;
|
|
21
|
+
--rdp-weekday-opacity: 1;
|
|
22
|
+
margin: 0;
|
|
23
|
+
color: var(--v2-fg-default);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.rdp-v2-range .rdp-weekday {
|
|
27
|
+
color: var(--v2-fg-muted);
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.rdp-v2-range .rdp-caption_label {
|
|
32
|
+
color: var(--v2-fg-default);
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.rdp-v2-range .rdp-day_button {
|
|
37
|
+
border-radius: var(--radius-md, 8px);
|
|
38
|
+
color: var(--v2-fg-default);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rdp-v2-range
|
|
42
|
+
.rdp-day:not(.rdp-selected):not(.rdp-range_middle)
|
|
43
|
+
.rdp-day_button:hover:not([disabled]) {
|
|
44
|
+
background-color: color-mix(
|
|
45
|
+
in oklch,
|
|
46
|
+
var(--v2-action-primary) 22%,
|
|
47
|
+
transparent
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rdp-v2-range .rdp-day_button:focus-visible {
|
|
52
|
+
outline: 2px solid var(--v2-focus-ring);
|
|
53
|
+
outline-offset: 1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.rdp-v2-range .rdp-today .rdp-day_button {
|
|
57
|
+
color: var(--v2-action-primary);
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.rdp-v2-range
|
|
62
|
+
.rdp-today:not(.rdp-selected):not(.rdp-range_middle)
|
|
63
|
+
.rdp-day_button {
|
|
64
|
+
box-shadow: inset 0 0 0 1.5px var(--v2-action-primary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.rdp-v2-range .rdp-outside .rdp-day_button {
|
|
68
|
+
color: var(--v2-fg-subtle);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.rdp-v2-range .rdp-range_start .rdp-day_button,
|
|
72
|
+
.rdp-v2-range .rdp-range_end .rdp-day_button,
|
|
73
|
+
.rdp-v2-range .rdp-selected:not(.rdp-range_middle) .rdp-day_button {
|
|
74
|
+
background-color: var(--v2-action-primary);
|
|
75
|
+
color: var(--v2-action-on-primary);
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
border: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.rdp-v2-range .rdp-range_middle {
|
|
81
|
+
font-weight: 400;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.rdp-v2-range .rdp-range_middle .rdp-day_button {
|
|
85
|
+
color: var(--v2-fg-default);
|
|
86
|
+
border-radius: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.rdp-v2-range .rdp-range_middle .rdp-day_button:hover:not([disabled]) {
|
|
90
|
+
background-color: color-mix(
|
|
91
|
+
in oklch,
|
|
92
|
+
var(--v2-action-primary) 32%,
|
|
93
|
+
transparent
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.rdp-v2-range .rdp-range_start:not(.rdp-range_end) .rdp-day_button {
|
|
98
|
+
border-top-right-radius: 0;
|
|
99
|
+
border-bottom-right-radius: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.rdp-v2-range .rdp-range_end:not(.rdp-range_start) .rdp-day_button {
|
|
103
|
+
border-top-left-radius: 0;
|
|
104
|
+
border-bottom-left-radius: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.rdp-v2-range .rdp-button_previous,
|
|
108
|
+
.rdp-v2-range .rdp-button_next {
|
|
109
|
+
display: inline-flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
border: 1px solid var(--v2-border-default);
|
|
113
|
+
border-radius: 9999px;
|
|
114
|
+
background-color: var(--v2-bg-panel);
|
|
115
|
+
color: var(--v2-fg-default);
|
|
116
|
+
transition: background-color 120ms ease;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.rdp-v2-range .rdp-button_previous:not([aria-disabled='true']):hover,
|
|
120
|
+
.rdp-v2-range .rdp-button_next:not([aria-disabled='true']):hover {
|
|
121
|
+
background-color: var(--v2-bg-raised);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.rdp-v2-range .rdp-button_previous:focus-visible,
|
|
125
|
+
.rdp-v2-range .rdp-button_next:focus-visible {
|
|
126
|
+
outline: 2px solid var(--v2-focus-ring);
|
|
127
|
+
outline-offset: 1px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.rdp-v2-range .rdp-button_previous[aria-disabled='true'],
|
|
131
|
+
.rdp-v2-range .rdp-button_next[aria-disabled='true'] {
|
|
132
|
+
opacity: 0.4;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.rdp-v2-range .rdp-chevron {
|
|
136
|
+
width: 1rem;
|
|
137
|
+
height: 1rem;
|
|
138
|
+
fill: currentColor;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.rdp-v2-range .rdp-selected {
|
|
142
|
+
font-size: inherit;
|
|
143
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import * as class_variance_authority from 'class-variance-authority';
|
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
8
|
import { ptBR } from 'date-fns/locale';
|
|
9
|
-
import {
|
|
9
|
+
import { PropsBase } from 'react-day-picker';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
@@ -250,7 +250,7 @@ type DateInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'default
|
|
|
250
250
|
placeholder?: string;
|
|
251
251
|
fromDate?: Date;
|
|
252
252
|
toDate?: Date;
|
|
253
|
-
disabledDates?:
|
|
253
|
+
disabledDates?: PropsBase['disabled'];
|
|
254
254
|
leftIcon?: ReactNode;
|
|
255
255
|
formatPattern?: string;
|
|
256
256
|
locale?: typeof ptBR;
|
|
@@ -267,7 +267,7 @@ declare const DateInput: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
267
267
|
placeholder?: string;
|
|
268
268
|
fromDate?: Date;
|
|
269
269
|
toDate?: Date;
|
|
270
|
-
disabledDates?:
|
|
270
|
+
disabledDates?: PropsBase["disabled"];
|
|
271
271
|
leftIcon?: ReactNode;
|
|
272
272
|
formatPattern?: string;
|
|
273
273
|
locale?: typeof ptBR;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as class_variance_authority from 'class-variance-authority';
|
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
8
|
import { ptBR } from 'date-fns/locale';
|
|
9
|
-
import {
|
|
9
|
+
import { PropsBase } from 'react-day-picker';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
@@ -250,7 +250,7 @@ type DateInputProps = Omit<ComponentPropsWithoutRef<'input'>, 'value' | 'default
|
|
|
250
250
|
placeholder?: string;
|
|
251
251
|
fromDate?: Date;
|
|
252
252
|
toDate?: Date;
|
|
253
|
-
disabledDates?:
|
|
253
|
+
disabledDates?: PropsBase['disabled'];
|
|
254
254
|
leftIcon?: ReactNode;
|
|
255
255
|
formatPattern?: string;
|
|
256
256
|
locale?: typeof ptBR;
|
|
@@ -267,7 +267,7 @@ declare const DateInput: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
267
267
|
placeholder?: string;
|
|
268
268
|
fromDate?: Date;
|
|
269
269
|
toDate?: Date;
|
|
270
|
-
disabledDates?:
|
|
270
|
+
disabledDates?: PropsBase["disabled"];
|
|
271
271
|
leftIcon?: ReactNode;
|
|
272
272
|
formatPattern?: string;
|
|
273
273
|
locale?: typeof ptBR;
|