@sfperusacdev/sf-ui 0.1.24 → 0.1.26

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.
@@ -169,7 +169,14 @@
169
169
  ese mismo valor para que el oscuro se vea EXACTAMENTE igual que antes: al
170
170
  quitar el import las heredaría del tema base (sark) y cambiarían de color. */
171
171
  --sf-app-shell-accent: #2e9e5b;
172
+ --sf-app-shell-topbar-bg: #0c2131;
173
+ --sf-app-shell-topbar-text: #ffffff;
172
174
  --sf-app-shell-topbar-muted: #9fb6c4;
175
+ --sf-app-shell-user-chip-bg: color-mix(in srgb, var(--sf-app-shell-topbar-bg) 86%, #f5f7f9);
176
+ --sf-app-shell-user-chip-bg-hover: color-mix(in srgb, var(--sf-app-shell-topbar-bg) 80%, #f5f7f9);
177
+ --sf-app-shell-user-chip-border: color-mix(in srgb, var(--sf-app-shell-topbar-text) 18%, transparent);
178
+ --sf-app-shell-user-chip-border-hover: color-mix(in srgb, var(--sf-app-shell-topbar-text) 28%, transparent);
179
+ --sf-app-shell-user-chip-name: var(--sf-app-shell-topbar-text);
173
180
  --sf-badge-primary-dot: #334155;
174
181
  --sf-btn-primary-shadow-hover: none;
175
182
  --sf-danger: #dc2626;
@@ -99,6 +99,8 @@
99
99
  --sf-modal-header-bg: var(--sf-primary);
100
100
  --sf-modal-header-text: var(--sf-white);
101
101
  --sf-app-shell-accent: var(--sf-accent);
102
+ --sf-app-shell-topbar-bg: #0c2131;
103
+ --sf-app-shell-topbar-text: #ffffff;
102
104
  --sf-app-shell-topbar-muted: #9fb6c4;
103
105
  --sf-modal-header-subtitle: var(--sf-app-shell-topbar-muted);
104
106
  --sf-modal-header-icon-bg: var(--sf-app-shell-accent);
@@ -158,14 +158,18 @@
158
158
  --sf-page-header-border: var(--sf-border);
159
159
  --sf-page-header-shadow: var(--sf-shadow-2);
160
160
 
161
+ /* AppShell topbar — fondo/texto fijos al togglear oscuro (no usar --sf-primary/--sf-white) */
162
+ --sf-app-shell-topbar-bg: var(--sf-primary);
163
+ --sf-app-shell-topbar-text: #ffffff;
164
+ --sf-app-shell-topbar-muted: #9fb6c4;
165
+
161
166
  /* AppShell topbar user chip */
162
- --sf-app-shell-user-chip-bg: color-mix(in srgb, var(--sf-primary) 86%, var(--sf-surface-alt));
163
- --sf-app-shell-user-chip-bg-hover: color-mix(in srgb, var(--sf-primary) 80%, var(--sf-surface-alt));
164
- --sf-app-shell-user-chip-border: color-mix(in srgb, var(--sf-white) 22%, transparent);
165
- --sf-app-shell-user-chip-border-hover: color-mix(in srgb, var(--sf-white) 34%, transparent);
167
+ --sf-app-shell-user-chip-bg: color-mix(in srgb, var(--sf-app-shell-topbar-bg) 86%, var(--sf-surface-alt));
168
+ --sf-app-shell-user-chip-bg-hover: color-mix(in srgb, var(--sf-app-shell-topbar-bg) 80%, var(--sf-surface-alt));
169
+ --sf-app-shell-user-chip-border: color-mix(in srgb, var(--sf-app-shell-topbar-text) 22%, transparent);
170
+ --sf-app-shell-user-chip-border-hover: color-mix(in srgb, var(--sf-app-shell-topbar-text) 34%, transparent);
166
171
  --sf-app-shell-user-chip-radius: 0.5rem;
167
- --sf-app-shell-topbar-muted: #9fb6c4;
168
- --sf-app-shell-user-chip-name: var(--sf-white);
172
+ --sf-app-shell-user-chip-name: var(--sf-app-shell-topbar-text);
169
173
  --sf-app-shell-user-chip-subtitle: var(--sf-app-shell-topbar-muted);
170
174
  --sf-app-shell-user-avatar-bg: var(--sf-app-shell-accent);
171
175
  --sf-app-shell-user-avatar-text: var(--sf-white);
@@ -1,26 +1,10 @@
1
- import { DefaultValues, FieldValues } from 'react-hook-form';
1
+ import { DefaultValues, FieldValues, UseFormReturn } from 'react-hook-form';
2
2
  import type * as yup from "yup";
3
3
  type UseCustomFormProps<TValues extends FieldValues> = {
4
4
  defaultValues?: DefaultValues<TValues>;
5
5
  };
6
- export declare const useCustomForm: <TSchema extends yup.ObjectSchema<FieldValues>>(schema: TSchema, props?: UseCustomFormProps<yup.Asserts<TSchema>>) => {
7
- handleSubmit: import('react-hook-form').UseFormHandleSubmit<yup.Asserts<TSchema>, yup.Asserts<TSchema>>;
8
- watch: import('react-hook-form').UseFormWatch<yup.Asserts<TSchema>>;
9
- getValues: import('react-hook-form').UseFormGetValues<yup.Asserts<TSchema>>;
10
- getFieldState: import('react-hook-form').UseFormGetFieldState<yup.Asserts<TSchema>>;
11
- setError: import('react-hook-form').UseFormSetError<yup.Asserts<TSchema>>;
12
- clearErrors: import('react-hook-form').UseFormClearErrors<yup.Asserts<TSchema>>;
13
- setValue: import('react-hook-form').UseFormSetValue<yup.Asserts<TSchema>>;
14
- setValues: import('react-hook-form').UseFormSetValues<yup.Asserts<TSchema>>;
15
- trigger: import('react-hook-form').UseFormTrigger<yup.Asserts<TSchema>>;
16
- formState: import('react-hook-form').FormState<yup.Asserts<TSchema>>;
17
- resetField: import('react-hook-form').UseFormResetField<yup.Asserts<TSchema>>;
18
- reset: import('react-hook-form').UseFormReset<yup.Asserts<TSchema>>;
19
- resetDefaultValues: import('react-hook-form').UseFormResetDefaultValues<yup.Asserts<TSchema>>;
20
- unregister: import('react-hook-form').UseFormUnregister<yup.Asserts<TSchema>>;
21
- control: import('react-hook-form').Control<yup.Asserts<TSchema>, any, yup.Asserts<TSchema>>;
22
- register: import('react-hook-form').UseFormRegister<yup.Asserts<TSchema>>;
23
- setFocus: import('react-hook-form').UseFormSetFocus<yup.Asserts<TSchema>>;
24
- subscribe: import('react-hook-form').UseFormSubscribe<yup.Asserts<TSchema>>;
6
+ type UseCustomFormReturn<TValues extends FieldValues> = UseFormReturn<TValues> & {
7
+ handleSubmit: UseFormReturn<TValues>["handleSubmit"];
25
8
  };
9
+ export declare const useCustomForm: <TSchema extends yup.ObjectSchema<FieldValues>>(schema: TSchema, props?: UseCustomFormProps<yup.Asserts<TSchema>>) => UseCustomFormReturn<yup.Asserts<TSchema>>;
26
10
  export type { UseCustomFormProps };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sfperusacdev/sf-ui",
3
- "version": "0.1.24",
4
- "description": "SF UI librería de componentes React (inputs, tablas, hooks) para aplicaciones SF Perú.",
3
+ "version": "0.1.26",
4
+ "description": "SF UI \u2014 librer\u00eda de componentes React (inputs, tablas, hooks) para aplicaciones SF Per\u00fa.",
5
5
  "type": "module",
6
6
  "main": "./dist/sf-ui.umd.cjs",
7
7
  "module": "./dist/sf-ui.js",
@@ -32,7 +32,7 @@
32
32
  "access": "public"
33
33
  },
34
34
  "scripts": {
35
- "build": "vite build && tsc -p tsconfig.lib.json && node scripts/copy-theme.mjs",
35
+ "build": "node scripts/ensure-rolldown-binding.mjs && vite build && tsc -p tsconfig.lib.json && node scripts/copy-theme.mjs",
36
36
  "prepublishOnly": "npm run build",
37
37
  "type-check": "tsc -p tsconfig.lib.json --noEmit",
38
38
  "test": "vitest run",
@@ -107,6 +107,7 @@
107
107
  "eslint-plugin-react-hooks": "^7.1.1",
108
108
  "eslint-plugin-react-refresh": "^0.5.2",
109
109
  "globals": "^17.6.0",
110
+ "jsdom": "^26.1.0",
110
111
  "leaflet": "^1.9.4",
111
112
  "react": "^19.2.6",
112
113
  "react-day-picker": "^10.0.1",
@@ -116,7 +117,6 @@
116
117
  "react-leaflet": "^5.0.0",
117
118
  "react-qr-code": "^2.2.0",
118
119
  "recharts": "^3.9.0",
119
- "jsdom": "^26.1.0",
120
120
  "tailwindcss": "^4.3.0",
121
121
  "typescript": "~6.0.2",
122
122
  "typescript-eslint": "^8.59.2",