@wellingtonhlc/shared-ui 0.25.4 → 0.25.7

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 CHANGED
@@ -205,6 +205,40 @@ para declarar o formato esperado pelo campo:
205
205
 
206
206
  `enableTime` permanece suportado como alias legado para `mode="dateTime"`.
207
207
 
208
+ ## FieldGroup
209
+
210
+ `FieldGroup` renderiza um grupo visual de campos com legenda. A borda vem ativa por
211
+ padrao; use `bordered={false}` quando o consumidor precisar manter a semantica de
212
+ grupo sem adicionar contorno visual.
213
+
214
+ ```tsx
215
+ import { FieldGroup, TextField } from '@wellingtonhlc/shared-ui';
216
+
217
+ <FieldGroup title="Endereco" bordered={false}>
218
+ <TextField label="CEP" />
219
+ <TextField label="Cidade" />
220
+ </FieldGroup>;
221
+ ```
222
+
223
+ ## RadioGroup
224
+
225
+ `RadioGroup` segue a mesma escala de altura dos campos base (`xs`, `sm`, `md`,
226
+ `lg`) para alinhar visualmente com `TextField`, `SelectField` e demais controles
227
+ na mesma linha de formulario.
228
+
229
+ O padrao `boxed` renderiza um `fieldset` com legenda, fazendo a borda contornar
230
+ o grupo a partir da label. Use `variant="plain"` quando precisar do grupo sem
231
+ borda.
232
+
233
+ ```tsx
234
+ import { RadioGroup } from '@wellingtonhlc/shared-ui';
235
+
236
+ <RadioGroup label="Tipo Pessoa" value={1} onChange={setType}>
237
+ <RadioGroup.Item value={1} label="Fisica" />
238
+ <RadioGroup.Item value={2} label="Juridica" />
239
+ </RadioGroup>;
240
+ ```
241
+
208
242
  ## AppShell.Topbar.Button
209
243
 
210
244
  Use `AppShell.Topbar.Button` para acoes de icone na barra superior, como notificacoes,
@@ -1 +1 @@
1
- {"version":3,"file":"CopyableField.d.ts","sourceRoot":"","sources":["../../src/components/CopyableField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,wFAiExB,CAAC"}
1
+ {"version":3,"file":"CopyableField.d.ts","sourceRoot":"","sources":["../../src/components/CopyableField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,wFAuGxB,CAAC"}
@@ -1,17 +1,38 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
+ import { ClipboardCheckIcon, ClipboardIcon } from 'lucide-react';
4
5
  import { toast } from 'sonner';
5
6
  import { cn } from '../utils/cn';
6
7
  export const CopyableField = React.forwardRef(function CopyableField({ asChild = false, children, className, errorMessage = 'Nao foi possivel copiar o valor.', onClick, onKeyDown, successMessage = 'Valor copiado.', title = 'Clique para copiar', value, ...props }, ref) {
7
8
  const Component = asChild ? Slot : 'span';
8
9
  const copyValue = value === null || value === undefined ? '' : String(value);
9
10
  const canCopy = copyValue.trim().length > 0;
11
+ const [copied, setCopied] = React.useState(false);
12
+ const feedbackTimerRef = React.useRef(null);
13
+ React.useEffect(() => {
14
+ return () => {
15
+ if (feedbackTimerRef.current) {
16
+ clearTimeout(feedbackTimerRef.current);
17
+ }
18
+ };
19
+ }, []);
20
+ function showCopiedFeedback() {
21
+ setCopied(true);
22
+ if (feedbackTimerRef.current) {
23
+ clearTimeout(feedbackTimerRef.current);
24
+ }
25
+ feedbackTimerRef.current = setTimeout(() => {
26
+ setCopied(false);
27
+ feedbackTimerRef.current = null;
28
+ }, 1200);
29
+ }
10
30
  async function copy() {
11
31
  if (!canCopy)
12
32
  return;
13
33
  try {
14
34
  await navigator.clipboard.writeText(copyValue);
35
+ showCopiedFeedback();
15
36
  toast.success(successMessage);
16
37
  }
17
38
  catch {
@@ -33,6 +54,7 @@ export const CopyableField = React.forwardRef(function CopyableField({ asChild =
33
54
  void copy();
34
55
  }
35
56
  }
36
- return (_jsx(Component, { ref: ref, role: canCopy ? 'button' : undefined, tabIndex: canCopy ? 0 : -1, title: canCopy ? title : undefined, "aria-disabled": !canCopy, className: cn(canCopy &&
37
- 'hover:border-brand/60 hover:bg-brand/10 focus-visible:border-brand/60 focus-visible:ring-brand/40 cursor-pointer rounded-md border border-transparent transition-colors focus-visible:ring-2 focus-visible:outline-none', className), onClick: handleClick, onKeyDown: handleKeyDown, ...props, children: children }));
57
+ return (_jsxs(Component, { ref: ref, role: canCopy ? 'button' : undefined, tabIndex: canCopy ? 0 : -1, title: canCopy ? title : undefined, "aria-disabled": !canCopy, "aria-label": canCopy && copied ? 'Copiado' : undefined, "data-copied": copied ? 'true' : undefined, className: cn(canCopy &&
58
+ 'group/copyable relative cursor-pointer rounded-md border border-transparent focus-visible:outline-none', className), onClick: handleClick, onKeyDown: handleKeyDown, ...props, children: [children, canCopy && !asChild ? (_jsx("span", { "aria-hidden": "true", className: cn('border-app-border bg-[color-mix(in_srgb,var(--foreground-muted)_3%,var(--background-secondary))] text-foreground-muted pointer-events-none absolute top-1/2 right-0 inline-flex size-6 translate-x-[calc(100%+0.25rem)] -translate-y-1/2 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,color,border-color,background-color] duration-150 group-hover/copyable:opacity-100 group-focus-visible/copyable:opacity-100', copied &&
59
+ 'bg-[color-mix(in_srgb,var(--brand)_9%,var(--background-secondary))] text-brand opacity-100'), children: copied ? _jsx(ClipboardCheckIcon, { className: "size-3.5" }) : _jsx(ClipboardIcon, { className: "size-3.5" }) })) : null] }));
38
60
  });
@@ -12,7 +12,7 @@ export const FieldControl = ({ label, id, wrapperClassName, labelClassName = '',
12
12
  const roundedClass = roundedFull ? 'fc-rounded-full' : '';
13
13
  const isHorizontal = labelPosition === 'left' || labelPosition === 'right';
14
14
  const labelSizeClassMap = {
15
- xs: 'text-[10px] mb-0.5',
15
+ xs: 'text-[10px]',
16
16
  sm: 'text-xs',
17
17
  md: 'text-sm',
18
18
  lg: 'text-base',
@@ -3,8 +3,9 @@ export interface FieldGroupProps {
3
3
  title: string;
4
4
  children: ReactNode;
5
5
  className?: string;
6
+ bordered?: boolean;
6
7
  titleAlign?: 'left' | 'center' | 'right';
7
8
  }
8
- export declare function FieldGroup({ children, className, title, titleAlign }: FieldGroupProps): import("react").JSX.Element;
9
+ export declare function FieldGroup({ bordered, children, className, title, titleAlign }: FieldGroupProps): import("react").JSX.Element;
9
10
  export declare const FormSection: typeof FieldGroup;
10
11
  //# sourceMappingURL=FieldGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC1C;AAQD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAmB,EAAE,EAAE,eAAe,+BAS9F;AAED,eAAO,MAAM,WAAW,mBAAa,CAAC"}
1
+ {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC1C;AAQD,wBAAgB,UAAU,CAAC,EAAE,QAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAmB,EAAE,EAAE,eAAe,+BAS/G;AAED,eAAO,MAAM,WAAW,mBAAa,CAAC"}
@@ -5,7 +5,7 @@ const titleAlignClass = {
5
5
  center: 'mx-auto',
6
6
  right: 'ml-auto',
7
7
  };
8
- export function FieldGroup({ children, className, title, titleAlign = 'left' }) {
9
- return (_jsxs("fieldset", { className: cn('border-app-border rounded-xl border px-4 pb-4 pt-2', className), children: [_jsx("legend", { className: cn('text-foreground-muted px-2 text-xs font-medium', titleAlignClass[titleAlign]), children: title }), children] }));
8
+ export function FieldGroup({ bordered = true, children, className, title, titleAlign = 'left' }) {
9
+ return (_jsxs("fieldset", { className: cn('rounded-xl px-4 pb-4 pt-2', bordered && 'border-app-border border', className), children: [_jsx("legend", { className: cn('text-foreground-muted px-2 text-xs font-medium', titleAlignClass[titleAlign]), children: title }), children] }));
10
10
  }
11
11
  export const FormSection = FieldGroup;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type FieldValues } from 'react-hook-form';
3
- import type { FormControlSize } from './form-control-helpers';
3
+ import { type FormControlSize } from './form-control-helpers';
4
4
  export interface RadioGroupProps<TFieldValues extends FieldValues = FieldValues> {
5
5
  value?: string | number | null;
6
6
  onChange?: (value: string | number) => void;
@@ -12,6 +12,7 @@ export interface RadioGroupProps<TFieldValues extends FieldValues = FieldValues>
12
12
  disabled?: boolean;
13
13
  size?: FormControlSize;
14
14
  direction?: 'row' | 'column';
15
+ variant?: 'plain' | 'boxed';
15
16
  children?: React.ReactNode;
16
17
  control?: unknown;
17
18
  rules?: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/components/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAe9D,MAAM,WAAW,eAAe,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,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C;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2JD,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,mBAAmB,qBA6BrF;AAaD,iBAAS,cAAc,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,EAAE,eAAe,CAAC,YAAY,CAAC,qBAM3G;AAED,eAAO,MAAM,UAAU;;CAA0C,CAAC"}
@@ -3,6 +3,8 @@ import React from 'react';
3
3
  import { useController, } from 'react-hook-form';
4
4
  import { cn } from '../utils/cn';
5
5
  import { FieldControl } from './FieldControl';
6
+ import { FieldValidationError } from './FieldValidationError';
7
+ import { fieldWrapper } from './form-control-helpers';
6
8
  const RadioGroupContext = React.createContext({
7
9
  size: 'sm',
8
10
  onChange: () => { },
@@ -13,15 +15,48 @@ const sizeStyles = {
13
15
  md: { outer: 'h-5 w-5', dot: 'h-2.5 w-2.5', text: 'text-sm' },
14
16
  lg: { outer: 'h-6 w-6', dot: 'h-3 w-3', text: 'text-base' },
15
17
  };
16
- function RadioGroupBase({ children, direction = 'row', disabled = false, errorMessage, inputDisabled, inputName, inputOnBlur, inputValue, label, labelClassName = '', name, onChange, onValueChange, size = 'sm', value, wrapperClassName, }) {
18
+ const groupHeightStyles = {
19
+ xs: 'h-7',
20
+ sm: 'h-9',
21
+ md: 'h-12',
22
+ lg: 'h-14',
23
+ };
24
+ const groupMinHeightStyles = {
25
+ xs: 'min-h-7',
26
+ sm: 'min-h-9',
27
+ md: 'min-h-12',
28
+ lg: 'min-h-14',
29
+ };
30
+ const groupPaddingStyles = {
31
+ xs: 'px-2',
32
+ sm: 'px-3',
33
+ md: 'px-4',
34
+ lg: 'px-6',
35
+ };
36
+ const boxedFieldsetHeightStyles = {
37
+ xs: 'min-h-12',
38
+ sm: 'min-h-14',
39
+ md: 'min-h-[4.25rem]',
40
+ lg: 'min-h-[4.75rem]',
41
+ };
42
+ function RadioGroupBase({ children, direction = 'row', disabled = false, errorMessage, inputDisabled, inputName, inputOnBlur, inputValue, label, labelClassName = '', name, onChange, onValueChange, size = 'sm', value, variant = 'boxed', wrapperClassName, }) {
43
+ const generatedId = React.useId().replace(/:/g, '');
17
44
  const resolvedValue = inputValue ?? value;
18
45
  const resolvedName = inputName ?? name;
19
46
  const resolvedDisabled = inputDisabled ?? disabled;
47
+ const legendId = `rg-${generatedId}-legend`;
48
+ const errorId = `rg-${generatedId}-error`;
49
+ const describedBy = errorMessage ? errorId : undefined;
20
50
  function handleChange(nextValue) {
21
51
  onValueChange?.(nextValue);
22
52
  onChange?.(nextValue);
23
53
  }
24
- return (_jsx(RadioGroupContext.Provider, { value: { name: resolvedName, value: resolvedValue, disabled: resolvedDisabled, size, onChange: handleChange }, children: _jsx(FieldControl, { label: label, wrapperClassName: wrapperClassName, labelClassName: labelClassName, errorMessage: errorMessage, size: size, disabled: resolvedDisabled, children: () => (_jsx("div", { role: "radiogroup", "aria-label": label, onBlur: inputOnBlur, className: cn('flex gap-3', direction === 'column' ? 'flex-col' : 'flex-row flex-wrap'), children: children })) }) }));
54
+ const groupClassName = cn('flex gap-3', direction === 'column' ? groupMinHeightStyles[size] : groupHeightStyles[size], direction === 'column' ? 'flex-col items-start justify-center' : 'flex-row flex-wrap items-center');
55
+ const boxedGroupClassName = cn(groupClassName, direction === 'row' && 'justify-around', groupPaddingStyles[size]);
56
+ if (variant === 'plain') {
57
+ return (_jsx(RadioGroupContext.Provider, { value: { name: resolvedName, value: resolvedValue, disabled: resolvedDisabled, size, onChange: handleChange }, children: _jsx(FieldControl, { label: label, wrapperClassName: wrapperClassName, labelClassName: labelClassName, errorMessage: errorMessage, size: size, disabled: resolvedDisabled, children: () => (_jsx("div", { role: "radiogroup", "aria-label": label, "aria-describedby": describedBy, onBlur: inputOnBlur, className: groupClassName, children: children })) }) }));
58
+ }
59
+ return (_jsx(RadioGroupContext.Provider, { value: { name: resolvedName, value: resolvedValue, disabled: resolvedDisabled, size, onChange: handleChange }, children: _jsxs("div", { className: cn(fieldWrapper, wrapperClassName), "data-disabled": resolvedDisabled || undefined, "data-invalid": !!errorMessage || undefined, children: [_jsxs("fieldset", { className: cn('border-app-border flex h-full flex-1 flex-col justify-center rounded-xl border px-3 pb-2 pt-0 transition-[background-color,border-color,box-shadow,color] duration-200', boxedFieldsetHeightStyles[size], resolvedDisabled && 'cursor-not-allowed opacity-60', errorMessage && 'border-red-500 dark:border-red-400'), children: [label ? (_jsx("legend", { id: legendId, className: cn('text-foreground-muted px-2 text-xs font-medium transition-colors', resolvedDisabled && 'cursor-not-allowed opacity-70', errorMessage && 'text-red-600 dark:text-red-400', labelClassName), children: label })) : null, _jsx("div", { role: "radiogroup", "aria-label": label ? undefined : resolvedName, "aria-labelledby": label ? legendId : undefined, "aria-describedby": describedBy, onBlur: inputOnBlur, className: boxedGroupClassName, children: children })] }), _jsx(FieldValidationError, { id: errorId, message: errorMessage })] }) }));
25
60
  }
26
61
  function Item({ className, disabled: itemDisabled, label, value }) {
27
62
  const { value: groupValue, disabled: groupDisabled, size, onChange } = React.useContext(RadioGroupContext);
@@ -1 +1 @@
1
- {"version":3,"file":"TabsUnderlined.d.ts","sourceRoot":"","sources":["../../src/components/TabsUnderlined.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAO9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CA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aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,cAAsB,EACtB,KAAK,GACN,EAAE,mBAAmB,+BA4DrB"}
@@ -3,6 +3,9 @@ import { useMemo, useState } from 'react';
3
3
  import * as Tabs from '@radix-ui/react-tabs';
4
4
  import { cn } from '../utils/cn';
5
5
  const DEFAULT_TAB_MIN_WIDTH = '8.75rem';
6
+ const TAB_BAR_BACKGROUND = 'bg-[color-mix(in_srgb,var(--foreground-muted)_5%,var(--background-secondary))]';
7
+ const TAB_INACTIVE_BACKGROUND = 'bg-[color-mix(in_srgb,var(--foreground-muted)_5%,var(--background-secondary))]';
8
+ const TAB_INACTIVE_HOVER_BACKGROUND = 'hover:bg-[color-mix(in_srgb,var(--foreground-muted)_8%,var(--background-secondary))]';
6
9
  export function TabsUnderlined({ className, contentClassName, defaultValue, items, listClassName, onValueChange, tabMaxWidth, tabMinWidth, tabWidth, triggerClassName, truncateLabels = false, value, }) {
7
10
  const visibleItems = useMemo(() => items.filter((item) => item.visible ?? true), [items]);
8
11
  const initialValue = defaultValue && visibleItems.some((item) => item.id === defaultValue)
@@ -14,7 +17,7 @@ export function TabsUnderlined({ className, contentClassName, defaultValue, item
14
17
  setInternalValue(nextValue);
15
18
  onValueChange?.(nextValue);
16
19
  }
17
- return (_jsx("div", { className: cn('border-app-border bg-surface flex h-full min-w-0 flex-col overflow-hidden rounded-xl border', className), children: _jsxs(Tabs.Root, { value: resolvedValue, onValueChange: handleValueChange, className: "flex min-w-0 flex-1 flex-col", children: [_jsx(Tabs.List, { className: cn('border-app-border flex min-w-0 overflow-x-auto overflow-y-hidden border-b bg-[color-mix(in_srgb,var(--foreground-muted)_5%,var(--surface))] text-sm', listClassName), children: visibleItems.map((item) => (_jsx(TabTrigger, { value: item.id, className: triggerClassName, maxWidth: tabMaxWidth, minWidth: tabMinWidth, width: tabWidth, truncate: truncateLabels, children: item.label }, item.id))) }), visibleItems.map((item) => (_jsx(Tabs.Content, { value: item.id, className: cn('flex h-full min-w-0 flex-1 flex-col overflow-hidden', contentClassName), children: item.children }, item.id)))] }) }));
20
+ return (_jsx("div", { className: cn('border-app-border bg-background-secondary flex h-full min-w-0 flex-col overflow-hidden rounded-xl border', className), children: _jsxs(Tabs.Root, { value: resolvedValue, onValueChange: handleValueChange, className: "flex min-w-0 flex-1 flex-col", children: [_jsx(Tabs.List, { className: cn('border-app-border flex min-w-0 overflow-x-auto overflow-y-hidden border-b text-sm', TAB_BAR_BACKGROUND, listClassName), children: visibleItems.map((item) => (_jsx(TabTrigger, { value: item.id, className: triggerClassName, maxWidth: tabMaxWidth, minWidth: tabMinWidth, width: tabWidth, truncate: truncateLabels, children: item.label }, item.id))) }), visibleItems.map((item) => (_jsx(Tabs.Content, { value: item.id, className: cn('flex h-full min-w-0 flex-1 flex-col overflow-hidden', contentClassName), children: item.children }, item.id)))] }) }));
18
21
  }
19
22
  function TabTrigger({ children, className, value, maxWidth, minWidth, width, truncate, }) {
20
23
  const style = {
@@ -22,5 +25,5 @@ function TabTrigger({ children, className, value, maxWidth, minWidth, width, tru
22
25
  minWidth: minWidth ?? DEFAULT_TAB_MIN_WIDTH,
23
26
  width,
24
27
  };
25
- return (_jsx(Tabs.Trigger, { value: value, style: style, className: cn('text-foreground-muted hover:text-foreground focus-visible:ring-brand/50 data-[state=active]:border-app-border data-[state=active]:border-b-surface data-[state=active]:bg-surface data-[state=active]:text-foreground -mb-px inline-flex shrink-0 cursor-pointer items-center justify-center border border-t-0 border-transparent bg-[color-mix(in_srgb,var(--foreground-muted)_7%,var(--surface))] px-4 py-2 text-sm font-medium transition-colors first:border-l-0 hover:bg-[color-mix(in_srgb,var(--foreground-muted)_10%,var(--surface))] focus:outline-none focus-visible:ring-2', className), children: _jsx("span", { className: cn('min-w-0', truncate && 'overflow-hidden text-ellipsis whitespace-nowrap'), children: children }) }));
28
+ return (_jsx(Tabs.Trigger, { value: value, style: style, className: cn('text-foreground-muted hover:text-foreground focus-visible:ring-brand/50 data-[state=active]:border-app-border data-[state=active]:border-b-background-secondary data-[state=active]:bg-background-secondary data-[state=active]:text-foreground -mb-px inline-flex shrink-0 cursor-pointer items-center justify-center border border-t-0 border-transparent px-4 py-2 text-sm font-medium transition-colors first:border-l-0 focus:outline-none focus-visible:ring-2', TAB_INACTIVE_BACKGROUND, TAB_INACTIVE_HOVER_BACKGROUND, className), children: _jsx("span", { className: cn('min-w-0', truncate && 'overflow-hidden text-ellipsis whitespace-nowrap'), children: children }) }));
26
29
  }
@@ -1,5 +1,5 @@
1
1
  export declare const fieldWrapper = "flex w-full flex-col space-y-1";
2
- export declare const labelBase = "mb-1 text-md font-medium";
2
+ export declare const labelBase = "text-md font-medium";
3
3
  export type FormControlVariant = 'default' | 'filled' | 'ghost' | 'neutral';
4
4
  interface ControlClassOptions {
5
5
  errorMessage?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"form-control-helpers.d.ts","sourceRoot":"","sources":["../../src/components/form-control-helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,mCAAmC,CAAC;AAE7D,eAAO,MAAM,SAAS,6BAA6B,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAAG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MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;AAClG,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { cn } from '../utils/cn';
2
2
  export const fieldWrapper = 'flex w-full flex-col space-y-1';
3
- export const labelBase = 'mb-1 text-md font-medium';
3
+ export const labelBase = 'text-md font-medium';
4
4
  const controlShared = cn('text-foreground placeholder:text-foreground-muted w-full rounded-md px-3 py-2 font-medium border', 'transition-[background-color,border-color,box-shadow,color] duration-200', 'disabled:cursor-not-allowed disabled:opacity-60');
5
5
  const controlDefault = cn(controlShared, 'bg-surface border-app-border', 'enabled:hover:border-brand', 'focus:outline-none focus:bg-surface focus:border-brand focus:ring-2 focus:ring-inset focus:ring-brand/35', 'disabled:bg-input-bg disabled:border-app-border');
6
6
  const controlFilled = cn(controlShared, 'bg-input-bg border-app-border', 'enabled:hover:border-brand enabled:hover:bg-[color-mix(in_srgb,var(--input-bg)_75%,var(--surface))]', 'focus:outline-none focus:bg-surface focus:border-brand focus:ring-2 focus:ring-inset focus:ring-brand/35', 'disabled:bg-input-bg disabled:border-app-border');
package/dist/styles.css CHANGED
@@ -956,6 +956,9 @@ h2.react-datepicker__current-month {
956
956
  .order-3 {
957
957
  order: 3;
958
958
  }
959
+ .col-span-4 {
960
+ grid-column: span 4 / span 4;
961
+ }
959
962
  .col-span-12 {
960
963
  grid-column: span 12 / span 12;
961
964
  }
@@ -1019,9 +1022,6 @@ h2.react-datepicker__current-month {
1019
1022
  .mb-0 {
1020
1023
  margin-bottom: calc(var(--spacing) * 0);
1021
1024
  }
1022
- .mb-0\.5 {
1023
- margin-bottom: calc(var(--spacing) * 0.5);
1024
- }
1025
1025
  .mb-1 {
1026
1026
  margin-bottom: calc(var(--spacing) * 1);
1027
1027
  }
@@ -1102,6 +1102,10 @@ h2.react-datepicker__current-month {
1102
1102
  width: calc(var(--spacing) * 5);
1103
1103
  height: calc(var(--spacing) * 5);
1104
1104
  }
1105
+ .size-6 {
1106
+ width: calc(var(--spacing) * 6);
1107
+ height: calc(var(--spacing) * 6);
1108
+ }
1105
1109
  .size-7 {
1106
1110
  width: calc(var(--spacing) * 7);
1107
1111
  height: calc(var(--spacing) * 7);
@@ -1285,6 +1289,12 @@ h2.react-datepicker__current-month {
1285
1289
  .min-h-\[2rem\] {
1286
1290
  min-height: 2rem;
1287
1291
  }
1292
+ .min-h-\[4\.25rem\] {
1293
+ min-height: 4.25rem;
1294
+ }
1295
+ .min-h-\[4\.75rem\] {
1296
+ min-height: 4.75rem;
1297
+ }
1288
1298
  .min-h-\[10rem\] {
1289
1299
  min-height: 10rem;
1290
1300
  }
@@ -1549,6 +1559,10 @@ h2.react-datepicker__current-month {
1549
1559
  --tw-translate-x: calc(var(--spacing) * 0);
1550
1560
  translate: var(--tw-translate-x) var(--tw-translate-y);
1551
1561
  }
1562
+ .translate-x-\[calc\(100\%\+0\.25rem\)\] {
1563
+ --tw-translate-x: calc(100% + 0.25rem);
1564
+ translate: var(--tw-translate-x) var(--tw-translate-y);
1565
+ }
1552
1566
  .-translate-y-1\/2 {
1553
1567
  --tw-translate-y: calc(calc(1/2 * 100%) * -1);
1554
1568
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -1583,6 +1597,9 @@ h2.react-datepicker__current-month {
1583
1597
  .grid-cols-2 {
1584
1598
  grid-template-columns: repeat(2, minmax(0, 1fr));
1585
1599
  }
1600
+ .grid-cols-12 {
1601
+ grid-template-columns: repeat(12, minmax(0, 1fr));
1602
+ }
1586
1603
  .grid-cols-\[8rem_minmax\(0\,1fr\)\] {
1587
1604
  grid-template-columns: 8rem minmax(0,1fr);
1588
1605
  }
@@ -1634,6 +1651,9 @@ h2.react-datepicker__current-month {
1634
1651
  .items-stretch {
1635
1652
  align-items: stretch;
1636
1653
  }
1654
+ .justify-around {
1655
+ justify-content: space-around;
1656
+ }
1637
1657
  .justify-between {
1638
1658
  justify-content: space-between;
1639
1659
  }
@@ -1897,6 +1917,12 @@ h2.react-datepicker__current-month {
1897
1917
  background-color: color-mix(in srgb,var(--brand) 5%,var(--surface));
1898
1918
  }
1899
1919
  }
1920
+ .bg-\[color-mix\(in_srgb\,var\(--brand\)_9\%\,var\(--background-secondary\)\)\] {
1921
+ background-color: var(--brand);
1922
+ @supports (color: color-mix(in lab, red, red)) {
1923
+ background-color: color-mix(in srgb,var(--brand) 9%,var(--background-secondary));
1924
+ }
1925
+ }
1900
1926
  .bg-\[color-mix\(in_srgb\,var\(--brand\)_10\%\,var\(--surface\)\)\] {
1901
1927
  background-color: var(--brand);
1902
1928
  @supports (color: color-mix(in lab, red, red)) {
@@ -1921,16 +1947,22 @@ h2.react-datepicker__current-month {
1921
1947
  background-color: color-mix(in srgb,var(--destructive) 12%,var(--surface));
1922
1948
  }
1923
1949
  }
1924
- .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_5\%\,var\(--surface\)\)\] {
1950
+ .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_3\%\,var\(--background-secondary\)\)\] {
1925
1951
  background-color: var(--foreground-muted);
1926
1952
  @supports (color: color-mix(in lab, red, red)) {
1927
- background-color: color-mix(in srgb,var(--foreground-muted) 5%,var(--surface));
1953
+ background-color: color-mix(in srgb,var(--foreground-muted) 3%,var(--background-secondary));
1928
1954
  }
1929
1955
  }
1930
- .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_7\%\,var\(--surface\)\)\] {
1956
+ .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_5\%\,var\(--background-secondary\)\)\] {
1931
1957
  background-color: var(--foreground-muted);
1932
1958
  @supports (color: color-mix(in lab, red, red)) {
1933
- background-color: color-mix(in srgb,var(--foreground-muted) 7%,var(--surface));
1959
+ background-color: color-mix(in srgb,var(--foreground-muted) 5%,var(--background-secondary));
1960
+ }
1961
+ }
1962
+ .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_5\%\,var\(--surface\)\)\] {
1963
+ background-color: var(--foreground-muted);
1964
+ @supports (color: color-mix(in lab, red, red)) {
1965
+ background-color: color-mix(in srgb,var(--foreground-muted) 5%,var(--surface));
1934
1966
  }
1935
1967
  }
1936
1968
  .bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_8\%\,var\(--surface\)\)\] {
@@ -2161,6 +2193,9 @@ h2.react-datepicker__current-month {
2161
2193
  .py-10 {
2162
2194
  padding-block: calc(var(--spacing) * 10);
2163
2195
  }
2196
+ .pt-0 {
2197
+ padding-top: calc(var(--spacing) * 0);
2198
+ }
2164
2199
  .pt-2 {
2165
2200
  padding-top: calc(var(--spacing) * 2);
2166
2201
  }
@@ -2739,6 +2774,11 @@ h2.react-datepicker__current-month {
2739
2774
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2740
2775
  transition-duration: var(--tw-duration, var(--default-transition-duration));
2741
2776
  }
2777
+ .transition-\[opacity\,color\,border-color\,background-color\] {
2778
+ transition-property: opacity,color,border-color,background-color;
2779
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2780
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
2781
+ }
2742
2782
  .transition-\[opacity\,transform\,visibility\] {
2743
2783
  transition-property: opacity,transform,visibility;
2744
2784
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -2808,6 +2848,18 @@ h2.react-datepicker__current-month {
2808
2848
  }
2809
2849
  }
2810
2850
  }
2851
+ .group-hover\/copyable\:opacity-100 {
2852
+ &:is(:where(.group\/copyable):hover *) {
2853
+ @media (hover: hover) {
2854
+ opacity: 100%;
2855
+ }
2856
+ }
2857
+ }
2858
+ .group-focus-visible\/copyable\:opacity-100 {
2859
+ &:is(:where(.group\/copyable):focus-visible *) {
2860
+ opacity: 100%;
2861
+ }
2862
+ }
2811
2863
  .placeholder\:text-foreground-muted {
2812
2864
  &::placeholder {
2813
2865
  color: var(--color-foreground-muted);
@@ -2899,16 +2951,6 @@ h2.react-datepicker__current-month {
2899
2951
  }
2900
2952
  }
2901
2953
  }
2902
- .hover\:border-brand\/60 {
2903
- &:hover {
2904
- @media (hover: hover) {
2905
- border-color: var(--color-brand);
2906
- @supports (color: color-mix(in lab, red, red)) {
2907
- border-color: color-mix(in oklab, var(--color-brand) 60%, transparent);
2908
- }
2909
- }
2910
- }
2911
- }
2912
2954
  .hover\:border-transparent {
2913
2955
  &:hover {
2914
2956
  @media (hover: hover) {
@@ -3040,12 +3082,12 @@ h2.react-datepicker__current-month {
3040
3082
  }
3041
3083
  }
3042
3084
  }
3043
- .hover\:bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_10\%\,var\(--surface\)\)\] {
3085
+ .hover\:bg-\[color-mix\(in_srgb\,var\(--foreground-muted\)_8\%\,var\(--background-secondary\)\)\] {
3044
3086
  &:hover {
3045
3087
  @media (hover: hover) {
3046
3088
  background-color: var(--foreground-muted);
3047
3089
  @supports (color: color-mix(in lab, red, red)) {
3048
- background-color: color-mix(in srgb,var(--foreground-muted) 10%,var(--surface));
3090
+ background-color: color-mix(in srgb,var(--foreground-muted) 8%,var(--background-secondary));
3049
3091
  }
3050
3092
  }
3051
3093
  }
@@ -3135,16 +3177,6 @@ h2.react-datepicker__current-month {
3135
3177
  }
3136
3178
  }
3137
3179
  }
3138
- .hover\:bg-brand\/10 {
3139
- &:hover {
3140
- @media (hover: hover) {
3141
- background-color: var(--color-brand);
3142
- @supports (color: color-mix(in lab, red, red)) {
3143
- background-color: color-mix(in oklab, var(--color-brand) 10%, transparent);
3144
- }
3145
- }
3146
- }
3147
- }
3148
3180
  .hover\:bg-destructive {
3149
3181
  &:hover {
3150
3182
  @media (hover: hover) {
@@ -3344,14 +3376,6 @@ h2.react-datepicker__current-month {
3344
3376
  --tw-ring-inset: inset;
3345
3377
  }
3346
3378
  }
3347
- .focus-visible\:border-brand\/60 {
3348
- &:focus-visible {
3349
- border-color: var(--color-brand);
3350
- @supports (color: color-mix(in lab, red, red)) {
3351
- border-color: color-mix(in oklab, var(--color-brand) 60%, transparent);
3352
- }
3353
- }
3354
- }
3355
3379
  .focus-visible\:ring-2 {
3356
3380
  &:focus-visible {
3357
3381
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -3382,14 +3406,6 @@ h2.react-datepicker__current-month {
3382
3406
  }
3383
3407
  }
3384
3408
  }
3385
- .focus-visible\:ring-brand\/40 {
3386
- &:focus-visible {
3387
- --tw-ring-color: var(--color-brand);
3388
- @supports (color: color-mix(in lab, red, red)) {
3389
- --tw-ring-color: color-mix(in oklab, var(--color-brand) 40%, transparent);
3390
- }
3391
- }
3392
- }
3393
3409
  .focus-visible\:ring-brand\/50 {
3394
3410
  &:focus-visible {
3395
3411
  --tw-ring-color: var(--color-brand);
@@ -3587,14 +3603,14 @@ h2.react-datepicker__current-month {
3587
3603
  border-color: var(--color-app-border);
3588
3604
  }
3589
3605
  }
3590
- .data-\[state\=active\]\:border-b-surface {
3606
+ .data-\[state\=active\]\:border-b-background-secondary {
3591
3607
  &[data-state="active"] {
3592
- border-bottom-color: var(--color-surface);
3608
+ border-bottom-color: var(--color-background-secondary);
3593
3609
  }
3594
3610
  }
3595
- .data-\[state\=active\]\:bg-surface {
3611
+ .data-\[state\=active\]\:bg-background-secondary {
3596
3612
  &[data-state="active"] {
3597
- background-color: var(--color-surface);
3613
+ background-color: var(--color-background-secondary);
3598
3614
  }
3599
3615
  }
3600
3616
  .data-\[state\=active\]\:text-foreground {
@@ -3838,6 +3854,11 @@ h2.react-datepicker__current-month {
3838
3854
  }
3839
3855
  }
3840
3856
  }
3857
+ .dark\:border-red-400 {
3858
+ @media (prefers-color-scheme: dark) {
3859
+ border-color: var(--color-red-400);
3860
+ }
3861
+ }
3841
3862
  .dark\:\!bg-\[rgb\(var\(--color-brand\)\/0\.13\)\] {
3842
3863
  @media (prefers-color-scheme: dark) {
3843
3864
  background-color: rgb(var(--color-brand)/0.13) !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wellingtonhlc/shared-ui",
3
- "version": "0.25.4",
3
+ "version": "0.25.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",