@vincisys/eyeson 0.4.11 → 0.4.12

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.
@@ -2,7 +2,7 @@ import { type LucideIcon } from 'lucide-react';
2
2
  import { type ChangeEvent, type ComponentProps } from 'react';
3
3
  import { type FieldLabelVariant, type FieldSize } from '../../lib/field-styles';
4
4
  export type InputState = 'default' | 'valid' | 'loading' | 'invalid';
5
- export type InputFormat = 'cep' | 'cpf' | 'cnpj' | 'cpfOrCnpj' | 'phone' | 'currency';
5
+ export type InputFormat = 'cep' | 'cpf' | 'cnpj' | 'cpfOrCnpj' | 'phone';
6
6
  export type InputSize = FieldSize;
7
7
  /** @deprecated Use `FieldLabelVariant` from the shared field styles. */
8
8
  export type InputLabelVariant = FieldLabelVariant;
@@ -13,7 +13,7 @@ export type InputProps = Omit<ComponentProps<'input'>, 'className' | 'type' | 'r
13
13
  state?: InputState;
14
14
  /** Tamanho do campo (altura, padding e tipografia). */
15
15
  size?: InputSize;
16
- inputType?: 'text' | 'email';
16
+ inputType?: 'text' | 'email' | 'number';
17
17
  required?: boolean;
18
18
  placeholder?: string;
19
19
  errorMessage?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ/E,OAAO,EAWN,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,MAAM,wBAAwB,CAAC;AAGhC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AACrE,MAAM,MAAM,WAAW,GACtB,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;AAC7D,MAAM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gB,CAAC,KAAK,IAAI,CAAC;CACzE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC7B,SAAS,EACT,KAAe,EACf,QAAgB,EAChB,KAAiB,EACjB,IAAW,EACX,SAAkB,EAClB,QAAgB,EAChB,WAA8B,EAC9B,YAAkC,EAClC,KAAa,EACb,MAAM,EACN,OAAc,EACd,QAAe,EACf,OAAc,EACd,WAAkB,EAClB,cAAqB,EACrB,cAAmB,EACnB,IAAY,EACZ,YAAY,EACZ,aAAa,EACb,mBAA2B,EAC3B,SAAiB,EACjB,mBAA2B,EAC3B,IAAI,EAAE,IAAI,EACV,YAAY,EACZ,KAAK,EACL,EAAE,EACF,IAAI,EACJ,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,UAAU,+BA8MZ"}
package/dist/index.js CHANGED
@@ -3049,39 +3049,25 @@ var $n = /\D/g, er = function(e) {
3049
3049
  return ir(e) ? rr(e) : nr(e);
3050
3050
  }, or = function(e) {
3051
3051
  return er(e).replace(/(\d{1,2})/, "($1").replace(/(\(\d{2})(\d{1,4})/, "$1) $2").replace(/( \d{4})(\d{1,4})/, "$1-$2").replace(/( \d{4})(?:-)(\d{1})(\d{4})/, "$1$2-$3");
3052
- };
3053
- //#endregion
3054
- //#region src/components/Input/Input.tsx
3055
- function sr(e, t = !1) {
3056
- let n = e.trim();
3057
- if (!n) return "";
3058
- let r = n.startsWith("-"), i = n.replace(/[^\d,]/g, "");
3059
- if (!i) return r ? "-" : "";
3060
- let a = i.indexOf(","), o, s;
3061
- a === -1 ? o = i : (o = i.slice(0, a) || "0", s = i.slice(a + 1).replace(/,/g, "").slice(0, 2)), o = o.replace(/^0+(?=\d)/, "");
3062
- let c = o.replace(/\B(?=(\d{3})+(?!\d))/g, "."), l = r ? "-" : "";
3063
- return t ? `${l}${c},${(s ?? "").padEnd(2, "0").slice(0, 2)}` : a === -1 ? `${l}${c}` : `${l}${c},${s ?? ""}`;
3064
- }
3065
- var cr = {
3052
+ }, sr = {
3066
3053
  default: "",
3067
3054
  valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
3068
3055
  invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]",
3069
3056
  loading: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-blue-main)_45%,var(--color-eds-outline-border))]"
3070
3057
  };
3071
- function lr({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: o = !1, placeholder: l = "Digite algo...", errorMessage: u = "Campo obrigatório", fluid: d = !1, format: f, tooltip: h = null, linkText: g = null, linkUrl: _ = null, supportLink: v = null, supportLinkUrl: y = null, supportingText: b = "", lazy: S = !1, labelVariant: C, floatingLabel: w, disableAutocomplete: T = !1, isLoading: E = !1, loadingIconPosition: D = "end", icon: O, defaultValue: k, value: A, id: j, name: N, onBlur: P, onFocus: F, onKeyDown: I, onClick: L, onChange: R, ...z }) {
3072
- let ne = ee(), re = j ?? ne, [B, ie] = x(() => k?.toString() ?? ""), V = A !== void 0, ae = (V ? A : B)?.toString() ?? "", H = v ?? g, U = y ?? _, W = Jt(C, w), G = W === "floating", oe = (e, t = !1) => {
3058
+ function cr({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", inputType: a = "text", required: o = !1, placeholder: l = "Digite algo...", errorMessage: u = "Campo obrigatório", fluid: d = !1, format: f, tooltip: h = null, linkText: g = null, linkUrl: _ = null, supportLink: v = null, supportLinkUrl: y = null, supportingText: b = "", lazy: S = !1, labelVariant: C, floatingLabel: w, disableAutocomplete: T = !1, isLoading: E = !1, loadingIconPosition: D = "end", icon: O, defaultValue: k, value: A, id: j, name: N, onBlur: P, onFocus: F, onKeyDown: I, onClick: L, onChange: R, ...z }) {
3059
+ let ne = ee(), re = j ?? ne, [B, ie] = x(() => k?.toString() ?? ""), V = A !== void 0, ae = (V ? A : B)?.toString() ?? "", H = v ?? g, U = y ?? _, W = Jt(C, w), G = W === "floating", oe = (e) => {
3073
3060
  switch (f) {
3074
3061
  case "cep": return tr(e);
3075
3062
  case "cpf": return rr(e);
3076
3063
  case "cnpj": return nr(e);
3077
3064
  case "cpfOrCnpj": return ar(e);
3078
3065
  case "phone": return or(e);
3079
- case "currency": return sr(e, t);
3080
3066
  default: return e;
3081
3067
  }
3082
- }, K = (e, t, n = !1) => {
3083
- let r = oe(e, n);
3084
- V || ie(r), R?.(r, t);
3068
+ }, K = (e, t) => {
3069
+ let n = oe(e);
3070
+ V || ie(n), R?.(n, t);
3085
3071
  }, q = r === "invalid", J = n || E, se = Yt[i], ce = E ? /* @__PURE__ */ p("span", {
3086
3072
  className: "inline-flex shrink-0 items-center justify-center text-eds-blue-main",
3087
3073
  "data-position": D,
@@ -3131,7 +3117,7 @@ function lr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
3131
3117
  })]
3132
3118
  }),
3133
3119
  /* @__PURE__ */ m("div", {
3134
- className: M("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", se.control, cr[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
3120
+ className: M("group relative inline-flex w-full items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white", se.control, sr[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
3135
3121
  "data-disabled": J || void 0,
3136
3122
  "data-state": r,
3137
3123
  "data-size": i,
@@ -3159,26 +3145,23 @@ function lr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
3159
3145
  className: M("box-border min-w-0 flex-1 border-0 bg-transparent p-0 font-inherit text-eds-neutral-main outline-none", en, se.text),
3160
3146
  disabled: J,
3161
3147
  type: a,
3148
+ step: a === "number" ? z.step ?? "any" : z.step,
3162
3149
  required: o,
3163
3150
  placeholder: l,
3164
3151
  autoComplete: T ? "off" : z.autoComplete,
3165
3152
  "aria-invalid": q || void 0,
3166
3153
  "aria-describedby": q ? `${re}-desc` : void 0,
3167
3154
  "aria-busy": E || void 0,
3168
- value: V || f ? ae : void 0,
3169
- defaultValue: !V && !f ? k : void 0,
3155
+ value: V ? A : void 0,
3156
+ defaultValue: V ? void 0 : k,
3170
3157
  onClick: L,
3171
3158
  onKeyDown: I,
3172
3159
  onFocus: F,
3173
3160
  onBlur: (e) => {
3174
- f === "currency" ? K(e.currentTarget.value, e, !0) : S && K(e.currentTarget.value, e), P?.(e);
3161
+ P?.(e), S && K(e.currentTarget.value, e);
3175
3162
  },
3176
3163
  onChange: (e) => {
3177
- if (S) {
3178
- f && !V && ie(oe(e.currentTarget.value));
3179
- return;
3180
- }
3181
- K(e.currentTarget.value, e);
3164
+ S || K(e.currentTarget.value, e);
3182
3165
  }
3183
3166
  }),
3184
3167
  D === "end" && ce
@@ -3195,16 +3178,16 @@ function lr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
3195
3178
  }
3196
3179
  //#endregion
3197
3180
  //#region src/components/Textarea/Textarea.tsx
3198
- var ur = {
3181
+ var lr = {
3199
3182
  default: "",
3200
3183
  valid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
3201
3184
  invalid: "not-focus-within:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
3202
- }, dr = {
3185
+ }, ur = {
3203
3186
  sm: "min-h-20",
3204
3187
  md: "min-h-24",
3205
3188
  lg: "min-h-32"
3206
3189
  };
3207
- function fr({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", required: a = !1, placeholder: o = "Digite algo...", errorMessage: c = "Campo obrigatório", fluid: l = !1, tooltip: u = null, supportLink: d = null, supportLinkUrl: f = null, supportingText: h = "", labelVariant: g, floatingLabel: _, rows: v = 4, defaultValue: y, value: b, id: S, name: C, onBlur: w, onFocus: T, onKeyDown: E, onClick: D, onChange: O, ...k }) {
3190
+ function dr({ className: e, label: t = "Label", disabled: n = !1, state: r = "default", size: i = "md", required: a = !1, placeholder: o = "Digite algo...", errorMessage: c = "Campo obrigatório", fluid: l = !1, tooltip: u = null, supportLink: d = null, supportLinkUrl: f = null, supportingText: h = "", labelVariant: g, floatingLabel: _, rows: v = 4, defaultValue: y, value: b, id: S, name: C, onBlur: w, onFocus: T, onKeyDown: E, onClick: D, onChange: O, ...k }) {
3208
3191
  let te = ee(), A = S ?? te, [j, N] = x(() => y?.toString() ?? ""), P = b !== void 0, F = (P ? b : j)?.toString() ?? "", I = Jt(g, _), L = I === "floating", R = r === "invalid", z = Yt[i];
3209
3192
  return /* @__PURE__ */ m("div", {
3210
3193
  className: M(Xt, e),
@@ -3246,7 +3229,7 @@ function fr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
3246
3229
  })]
3247
3230
  }),
3248
3231
  /* @__PURE__ */ m("div", {
3249
- className: M("group relative flex w-full flex-col rounded-eds-xs border border-eds-outline-border !bg-white", z.paddingX, "py-2.5", dr[i], ur[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:!bg-eds-neutral-background data-disabled:opacity-70"),
3232
+ className: M("group relative flex w-full flex-col rounded-eds-xs border border-eds-outline-border !bg-white", z.paddingX, "py-2.5", ur[i], lr[r], "focus-within:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-within:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)]", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:!bg-eds-neutral-background data-disabled:opacity-70"),
3250
3233
  "data-disabled": n || void 0,
3251
3234
  "data-state": r,
3252
3235
  "data-size": i,
@@ -3292,12 +3275,12 @@ function fr({ className: e, label: t = "Label", disabled: n = !1, state: r = "de
3292
3275
  }
3293
3276
  //#endregion
3294
3277
  //#region src/components/Select/Select.tsx
3295
- var pr = {
3278
+ var fr = {
3296
3279
  default: "",
3297
3280
  valid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-green-main)_55%,var(--color-eds-outline-border))]",
3298
3281
  invalid: "not-focus-visible:border-[color-mix(in_srgb,var(--color-eds-red-main)_55%,var(--color-eds-outline-border))]"
3299
3282
  };
3300
- function mr({ label: e = "Label", labelVariant: t, floatingLabel: n, items: a, placeholder: o = "Selecione uma opção", disabled: s = !1, required: c = !1, fluid: l = !1, state: u = "default", size: d = "md", supportingText: f = "", errorMessage: h = "Selecione uma opção válida", id: g, name: _, value: v = void 0, defaultValue: y = void 0, onValueChange: b = void 0, renderItem: x = void 0, className: S }) {
3283
+ function pr({ label: e = "Label", labelVariant: t, floatingLabel: n, items: a, placeholder: o = "Selecione uma opção", disabled: s = !1, required: c = !1, fluid: l = !1, state: u = "default", size: d = "md", supportingText: f = "", errorMessage: h = "Selecione uma opção válida", id: g, name: _, value: v = void 0, defaultValue: y = void 0, onValueChange: b = void 0, renderItem: x = void 0, className: S }) {
3301
3284
  let C = ee(), w = g ?? C, T = u === "invalid", E = T || f, D = Yt[d], O = Jt(t, n), k = O === "floating";
3302
3285
  return /* @__PURE__ */ m("div", {
3303
3286
  className: M(Xt, S),
@@ -3325,7 +3308,7 @@ function mr({ label: e = "Label", labelVariant: t, floatingLabel: n, items: a, p
3325
3308
  defaultValue: y,
3326
3309
  value: v,
3327
3310
  children: [/* @__PURE__ */ m(A.Trigger, {
3328
- className: M("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0", D.trigger, pr[u], "focus-visible:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-visible:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)] focus-visible:outline-none", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
3311
+ className: M("group relative box-border inline-flex w-full cursor-pointer items-center gap-2 rounded-eds-xs border border-eds-outline-border bg-white py-0", D.trigger, fr[u], "focus-visible:border-[color-mix(in_srgb,var(--color-eds-neutral-elements)_35%,var(--color-eds-outline-border))] focus-visible:shadow-[0_0_0_3px_var(--color-eds-outline-focus-ring)] focus-visible:outline-none", "data-disabled:cursor-not-allowed data-disabled:border-eds-outline-border data-disabled:bg-eds-neutral-background data-disabled:opacity-70"),
3329
3312
  "data-state": u,
3330
3313
  "data-size": d,
3331
3314
  "data-disabled": s || void 0,
@@ -3390,7 +3373,7 @@ function mr({ label: e = "Label", labelVariant: t, floatingLabel: n, items: a, p
3390
3373
  }
3391
3374
  //#endregion
3392
3375
  //#region src/components/Text/Text.tsx
3393
- var hr = {
3376
+ var mr = {
3394
3377
  variant: {
3395
3378
  heading1: {
3396
3379
  classes: "text-3xl font-semibold",
@@ -3447,20 +3430,20 @@ var hr = {
3447
3430
  description: "Large text"
3448
3431
  }
3449
3432
  }
3450
- }, gr = {
3433
+ }, hr = {
3451
3434
  variant: "body",
3452
3435
  size: "md"
3453
- }, _r = /* @__PURE__ */ new Set([
3436
+ }, gr = /* @__PURE__ */ new Set([
3454
3437
  "heading1",
3455
3438
  "heading2",
3456
3439
  "heading3"
3457
- ]), vr = /* @__PURE__ */ new Set(["mono", "mono-secondary"]);
3458
- function yr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !1, children: i, className: a, as: o, ...s }, c) {
3459
- let l = vr.has(e), u = _r.has(e), d = y(() => o || (l || u ? "span" : "p"), [
3440
+ ]), _r = /* @__PURE__ */ new Set(["mono", "mono-secondary"]);
3441
+ function vr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !1, children: i, className: a, as: o, ...s }, c) {
3442
+ let l = _r.has(e), u = gr.has(e), d = y(() => o || (l || u ? "span" : "p"), [
3460
3443
  o,
3461
3444
  l,
3462
3445
  u
3463
- ]), f = N(hr.variant, e, gr.variant), m = N(hr.size, n ?? "md", gr.size);
3446
+ ]), f = N(mr.variant, e, hr.variant), m = N(mr.size, n ?? "md", hr.size);
3464
3447
  return /* @__PURE__ */ p(d, {
3465
3448
  ref: c,
3466
3449
  "data-eds-component": "Text",
@@ -3469,7 +3452,7 @@ function yr({ variant: e = "body", bold: t = !1, size: n = "md", truncate: r = !
3469
3452
  children: i
3470
3453
  });
3471
3454
  }
3472
- var br = g(yr), xr = {
3455
+ var yr = g(vr), br = {
3473
3456
  layout: {
3474
3457
  auto: {
3475
3458
  classes: "",
@@ -3500,14 +3483,14 @@ var br = g(yr), xr = {
3500
3483
  description: "Pin column to the right edge of the scroll container"
3501
3484
  }
3502
3485
  }
3503
- }, Sr = (e, t) => {
3504
- let n = N(xr.sticky, e, "left").classes, r = t === "head" ? "z-2" : "z-1", i = e === "right" ? "before:-left-6" : "before:-right-6", a = "before:pointer-events-none before:absolute before:inset-y-0 before:w-6";
3486
+ }, xr = (e, t) => {
3487
+ let n = N(br.sticky, e, "left").classes, r = t === "head" ? "z-2" : "z-1", i = e === "right" ? "before:-left-6" : "before:-right-6", a = "before:pointer-events-none before:absolute before:inset-y-0 before:w-6";
3505
3488
  return t === "cell" ? M(n, r, "bg-white", a, i, e === "right" ? "before:bg-gradient-to-r before:from-transparent before:to-white" : "before:bg-gradient-to-l before:from-transparent before:to-white") : M(n, r, "bg-white group-data-[compact]/header:bg-eds-neutral-background", a, i, e === "right" ? "before:bg-gradient-to-r before:from-transparent before:to-white group-data-[compact]/header:before:to-eds-neutral-background" : "before:bg-gradient-to-l before:from-transparent before:to-white group-data-[compact]/header:before:to-eds-neutral-background");
3506
- }, Cr = {
3489
+ }, Sr = {
3507
3490
  layout: "auto",
3508
3491
  variant: "default"
3509
- }, wr = g(({ layout: e = "auto", className: t, containerClassName: n, ...r }, i) => {
3510
- let a = M("isolate w-full", N(xr.layout, e, Cr.layout).classes, "[&_td]:border-b [&_td]:border-eds-neutral-disabled [&_tr:last-child_td]:border-b-0", "[&_td]:p-3", "[&_th]:border-b [&_th]:border-eds-neutral-disabled [&_th]:p-3 [&_th]:font-semibold [&_th]:text-base", "[&_th]:bg-white", "text-base text-left text-eds-neutral-main", t);
3492
+ }, Cr = g(({ layout: e = "auto", className: t, containerClassName: n, ...r }, i) => {
3493
+ let a = M("isolate w-full", N(br.layout, e, Sr.layout).classes, "[&_td]:border-b [&_td]:border-eds-neutral-disabled [&_tr:last-child_td]:border-b-0", "[&_td]:p-3", "[&_th]:border-b [&_th]:border-eds-neutral-disabled [&_th]:p-3 [&_th]:font-semibold [&_th]:text-base", "[&_th]:bg-white", "text-base text-left text-eds-neutral-main", t);
3511
3494
  return /* @__PURE__ */ p("div", {
3512
3495
  className: M("w-full overflow-x-auto rounded-eds-xs border border-eds-outline-border bg-white", n),
3513
3496
  children: /* @__PURE__ */ p("table", {
@@ -3517,7 +3500,7 @@ var br = g(yr), xr = {
3517
3500
  className: a
3518
3501
  })
3519
3502
  });
3520
- }), Tr = g(({ variant: e = "default", sticky: t, ...n }, r) => {
3503
+ }), wr = g(({ variant: e = "default", sticky: t, ...n }, r) => {
3521
3504
  let i = e === "compact", a = M("group/header", i && "[&_th]:bg-eds-neutral-background [&_th]:py-2 text-xs text-eds-neutral-elements", t && "[&_th]:sticky [&_th]:top-0 [&_th]:z-1", n.className);
3522
3505
  return /* @__PURE__ */ p("thead", {
3523
3506
  ref: r,
@@ -3525,41 +3508,41 @@ var br = g(yr), xr = {
3525
3508
  className: a,
3526
3509
  ...i && { "data-compact": "" }
3527
3510
  });
3528
- }), Er = g(({ sticky: e, ...t }, n) => {
3529
- let r = M("group relative", e && Sr(e, "head"), t.className);
3511
+ }), Tr = g(({ sticky: e, ...t }, n) => {
3512
+ let r = M("group relative", e && xr(e, "head"), t.className);
3530
3513
  return /* @__PURE__ */ p("th", {
3531
3514
  ref: n,
3532
3515
  ...t,
3533
3516
  className: r
3534
3517
  });
3535
- }), Dr = g(({ variant: e = Cr.variant, ...t }, n) => {
3536
- let r = M(N(xr.variant, e, Cr.variant).classes, t.className);
3518
+ }), Er = g(({ variant: e = Sr.variant, ...t }, n) => {
3519
+ let r = M(N(br.variant, e, Sr.variant).classes, t.className);
3537
3520
  return /* @__PURE__ */ p("tr", {
3538
3521
  ref: n,
3539
3522
  ...t,
3540
3523
  className: r
3541
3524
  });
3542
- }), Or = g((e, t) => /* @__PURE__ */ p("tbody", {
3525
+ }), Dr = g((e, t) => /* @__PURE__ */ p("tbody", {
3543
3526
  ref: t,
3544
3527
  ...e
3545
- })), kr = g(({ sticky: e, ...t }, n) => {
3546
- let r = M(e && Sr(e, "cell"), t.className);
3528
+ })), Or = g(({ sticky: e, ...t }, n) => {
3529
+ let r = M(e && xr(e, "cell"), t.className);
3547
3530
  return /* @__PURE__ */ p("td", {
3548
3531
  ref: n,
3549
3532
  ...t,
3550
3533
  className: r
3551
3534
  });
3552
- }), Ar = g((e, t) => /* @__PURE__ */ p("tfoot", {
3535
+ }), kr = g((e, t) => /* @__PURE__ */ p("tfoot", {
3553
3536
  ref: t,
3554
3537
  ...e
3555
- })), jr = g((e, t) => /* @__PURE__ */ p("button", {
3538
+ })), Ar = g((e, t) => /* @__PURE__ */ p("button", {
3556
3539
  ref: t,
3557
3540
  ...e,
3558
3541
  type: "button",
3559
3542
  "aria-label": "Redimensionar coluna",
3560
3543
  className: M("opacity-0 h-full group-hover:opacity-100 focus-visible:opacity-100", "w-[10px]", "flex items-center justify-center", "cursor-col-resize touch-none select-none", "absolute top-0 right-0", "m-0 bg-white p-0", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-eds-blue-main", e.className),
3561
3544
  children: /* @__PURE__ */ p("span", { className: "h-5 w-[2px] rounded bg-eds-neutral-disabled" })
3562
- })), Mr = g(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ p(kr, {
3545
+ })), jr = g(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ p(Or, {
3563
3546
  ref: o,
3564
3547
  ...a,
3565
3548
  className: M("w-10 leading-none", a.className),
@@ -3571,7 +3554,7 @@ var br = g(yr), xr = {
3571
3554
  disabled: i,
3572
3555
  className: "relative before:absolute before:-inset-3 before:content-['']"
3573
3556
  })
3574
- })), Nr = g(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ p(Er, {
3557
+ })), Mr = g(({ checked: e, indeterminate: t, onCheckedChange: n, label: r, disabled: i, ...a }, o) => /* @__PURE__ */ p(Tr, {
3575
3558
  ref: o,
3576
3559
  ...a,
3577
3560
  className: M("w-10 leading-none", a.className),
@@ -3584,23 +3567,23 @@ var br = g(yr), xr = {
3584
3567
  className: "relative before:absolute before:-inset-3 before:content-['']"
3585
3568
  })
3586
3569
  }));
3587
- wr.displayName = "Table", Or.displayName = "Table.Body", Er.displayName = "Table.Head", Dr.displayName = "Table.Row", kr.displayName = "Table.Cell", Ar.displayName = "Table.Footer", Tr.displayName = "Table.Header", jr.displayName = "Table.ResizeHandle", Mr.displayName = "Table.CheckCell", Nr.displayName = "Table.CheckHead";
3588
- var Pr = Object.assign(wr, {
3589
- Header: Tr,
3590
- Head: Er,
3591
- Row: Dr,
3592
- Body: Or,
3593
- Cell: kr,
3594
- CheckCell: Mr,
3595
- CheckHead: Nr,
3596
- Footer: Ar,
3597
- ResizeHandle: jr
3598
- }), Fr = {
3570
+ Cr.displayName = "Table", Dr.displayName = "Table.Body", Tr.displayName = "Table.Head", Er.displayName = "Table.Row", Or.displayName = "Table.Cell", kr.displayName = "Table.Footer", wr.displayName = "Table.Header", Ar.displayName = "Table.ResizeHandle", jr.displayName = "Table.CheckCell", Mr.displayName = "Table.CheckHead";
3571
+ var Nr = Object.assign(Cr, {
3572
+ Header: wr,
3573
+ Head: Tr,
3574
+ Row: Er,
3575
+ Body: Dr,
3576
+ Cell: Or,
3577
+ CheckCell: jr,
3578
+ CheckHead: Mr,
3579
+ Footer: kr,
3580
+ ResizeHandle: Ar
3581
+ }), Pr = {
3599
3582
  variant: "segmented",
3600
3583
  size: "md"
3601
3584
  };
3602
- function Ir({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnFocus: i, className: a, listClassName: o, indicatorClassName: s, variant: c = Fr.variant, size: l = Fr.size }) {
3603
- let u = e ?? [], d = c === "segmented", f = c === "underline", h = l === "sm", { ref: g, isOverflowing: _ } = Rr(d), v = Lr(g, _);
3585
+ function Fr({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnFocus: i, className: a, listClassName: o, indicatorClassName: s, variant: c = Pr.variant, size: l = Pr.size }) {
3586
+ let u = e ?? [], d = c === "segmented", f = c === "underline", h = l === "sm", { ref: g, isOverflowing: _ } = Lr(d), v = Ir(g, _);
3604
3587
  if (u.length === 0) return null;
3605
3588
  let ee = u[0]?.value, y = t !== void 0, b = {
3606
3589
  value: y ? t : void 0,
@@ -3638,7 +3621,7 @@ function Ir({ tabs: e, value: t, selectedValue: n, onValueChange: r, activateOnF
3638
3621
  })]
3639
3622
  });
3640
3623
  }
3641
- function Lr(e, t) {
3624
+ function Ir(e, t) {
3642
3625
  let n = b(null), r = b(!1);
3643
3626
  return () => ({
3644
3627
  onPointerDownCapture: (i) => {
@@ -3675,7 +3658,7 @@ function Lr(e, t) {
3675
3658
  }
3676
3659
  });
3677
3660
  }
3678
- function Rr(e) {
3661
+ function Lr(e) {
3679
3662
  let t = b(null), [n, r] = x(!1);
3680
3663
  return v(() => {
3681
3664
  if (!e) return;
@@ -3689,4 +3672,4 @@ function Rr(e) {
3689
3672
  };
3690
3673
  }
3691
3674
  //#endregion
3692
- export { Wt as Attachment, Vt as AttachmentAction, Bt as AttachmentActions, Lt as AttachmentContent, zt as AttachmentDescription, Ut as AttachmentGroup, It as AttachmentMedia, Rt as AttachmentTitle, Ht as AttachmentTrigger, z as Button, ne as COLORS, wt as Calendar, Mt as Card, qt as Checkbox, mn as Combobox, yn as DatePicker, Dn as DateTimePicker, Vn as Dialog, Qn as Empty, Yn as FormDialog, xt as IconButton, lr as Input, mr as Select, Pr as Table, Ir as Tabs, br as Text, fr as Textarea };
3675
+ export { Wt as Attachment, Vt as AttachmentAction, Bt as AttachmentActions, Lt as AttachmentContent, zt as AttachmentDescription, Ut as AttachmentGroup, It as AttachmentMedia, Rt as AttachmentTitle, Ht as AttachmentTrigger, z as Button, ne as COLORS, wt as Calendar, Mt as Card, qt as Checkbox, mn as Combobox, yn as DatePicker, Dn as DateTimePicker, Vn as Dialog, Qn as Empty, Yn as FormDialog, xt as IconButton, cr as Input, pr as Select, Nr as Table, Fr as Tabs, yr as Text, dr as Textarea };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vincisys/eyeson",
3
3
  "private": false,
4
- "version": "0.4.11",
4
+ "version": "0.4.12",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"