@ciromaciel/dashboard-kit 1.1.0 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciromaciel/dashboard-kit",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "The components every dashboard shares: table, empty state, loading state, destructive confirm, danger zone and wordmark.",
@@ -106,10 +106,16 @@ export function SidebarShell({
106
106
  >
107
107
  {header}
108
108
 
109
+ {/*
110
+ A busca tem a geometria de um item da coluna: mesma borda
111
+ esquerda, ícone de 18 na mesma coluna (12px da borda), texto onde
112
+ começa o rótulo de um item (42px) e a altura de um item (43px), a
113
+ mesma do criar logo abaixo. Recuada e mais baixa, ela fazia três bordas
114
+ esquerdas numa coluna só.
115
+ */}
109
116
  {mostrarBusca && (
110
117
  <Box
111
- px={12}
112
- pb={8}
118
+ pb={6}
113
119
  w="100%"
114
120
  >
115
121
  <TextInput
@@ -118,9 +124,10 @@ export function SidebarShell({
118
124
  onKeyDown={e => e.key === 'Escape' && onTermChange?.('')}
119
125
  placeholder={searchPlaceholder}
120
126
  aria-label={searchPlaceholder}
127
+ leftSectionWidth={42}
121
128
  leftSection={
122
129
  <IconSearch
123
- size={14}
130
+ size={18}
124
131
  stroke={1.5}
125
132
  />
126
133
  }
@@ -140,7 +147,7 @@ export function SidebarShell({
140
147
  </ActionIcon>
141
148
  ) : null
142
149
  }
143
- styles={{ input: { fontSize: 12, background: 'var(--mantine-color-gray-1)' } }}
150
+ styles={{ input: { height: 43, minHeight: 43, fontSize: 13, background: 'var(--mantine-color-gray-1)' } }}
144
151
  />
145
152
  </Box>
146
153
  )}
@@ -162,14 +169,29 @@ export function SidebarShell({
162
169
  planos. Escondê-lo deixaria o limite invisível, e a pessoa
163
170
  procuraria o botão em vez de descobrir que precisa de
164
171
  upgrade.
172
+
173
+ O CONTORNO É O QUE O SEPARA DA NAVEGAÇÃO. Na coluna, sem
174
+ moldura é um lugar para ir, preenchido de preto é onde você
175
+ está, e com contorno é algo que você cria. Preto sólido
176
+ diria "você está aqui"; cor gastaria a única exceção do
177
+ sistema, o vermelho de perda. A borda é a mesma linha fina
178
+ dos contadores ao lado dos itens, desenhada por dentro (sombra
179
+ inset) para o item manter a altura dos outros.
165
180
  */}
166
181
  {onCreate && (
167
- <NavItem
168
- icon={createIcon}
169
- label={createAllowed ? createLabel : createBlockedLabel}
170
- muted={!createAllowed}
171
- onClick={createAllowed ? onCreate : onCreateBlocked}
172
- />
182
+ <Box
183
+ w="100%"
184
+ mb={4}
185
+ data-create
186
+ style={{ boxShadow: 'inset 0 0 0 1px var(--mantine-color-gray-3)' }}
187
+ >
188
+ <NavItem
189
+ icon={createIcon}
190
+ label={<span style={{ fontWeight: 700 }}>{createAllowed ? createLabel : createBlockedLabel}</span>}
191
+ muted={!createAllowed}
192
+ onClick={createAllowed ? onCreate : onCreateBlocked}
193
+ />
194
+ </Box>
173
195
  )}
174
196
 
175
197
  {groupLabel && <GroupLabel>{groupLabel}</GroupLabel>}