@happeouikit/form-elements 2.3.40 → 2.3.41

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/dist/index.es.js CHANGED
@@ -60,20 +60,21 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
60
60
  state: s,
61
61
  errorMessage: u,
62
62
  disabled: l,
63
- ...c
63
+ readOnly: c,
64
+ ...d
64
65
  }) => {
65
- const [d] = se(() => a || nn()), h = [
66
- t ? `${d}-description` : "",
67
- r ? `${d}-hint-message` : "",
68
- s === "error" && u ? `${d}-error-message` : ""
66
+ const [h] = se(() => a || nn()), p = [
67
+ t ? `${h}-description` : "",
68
+ r ? `${h}-hint-message` : "",
69
+ s === "error" && u ? `${h}-error-message` : ""
69
70
  ].join(" ");
70
71
  return /* @__PURE__ */ Me(No, { isDisabled: l || !1, children: [
71
72
  !!e && /* @__PURE__ */ Me(Eo, { children: [
72
- /* @__PURE__ */ V(Vl, { bold: !0, for: d, isRequired: n || !1, children: e }),
73
+ /* @__PURE__ */ V(Vl, { bold: !0, for: h, isRequired: n || !1, children: e }),
73
74
  t && /* @__PURE__ */ V(
74
75
  pe,
75
76
  {
76
- id: `${d}-description`,
77
+ id: `${h}-description`,
77
78
  color: "var(--color-secondary-text-on-light, #4a5464)",
78
79
  children: t
79
80
  }
@@ -86,20 +87,21 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
86
87
  title: e || "Styled input",
87
88
  hasIcon: !!(i || "").toString(),
88
89
  state: s || "default",
89
- id: d,
90
+ id: h,
90
91
  disabled: l,
92
+ readOnly: c,
91
93
  "data-1p-ignore": !0,
92
94
  ...t ? {
93
- "aria-describedby": h
95
+ "aria-describedby": p
94
96
  } : {},
95
- ...c
97
+ ...d
96
98
  }
97
99
  ),
98
- r && /* @__PURE__ */ Me(Kr, { id: `${d}-hint-message`, children: [
100
+ r && /* @__PURE__ */ Me(Kr, { id: `${h}-hint-message`, children: [
99
101
  /* @__PURE__ */ V(wi, { fill: "var(--color-hint-text-on-light, #68778d)" }),
100
102
  /* @__PURE__ */ V(Jr, { color: "var(--color-secondary-text-on-light, #4a5464)", children: r })
101
103
  ] }),
102
- s === "error" && u && /* @__PURE__ */ Me(Kr, { id: `${d}-error-message`, children: [
104
+ s === "error" && u && /* @__PURE__ */ Me(Kr, { id: `${h}-error-message`, children: [
103
105
  /* @__PURE__ */ V(wi, { fill: "var(--color-alert-primary, #da3939)" }),
104
106
  /* @__PURE__ */ V(Jr, { color: "var(--color-alert-primary, #da3939)", children: u })
105
107
  ] })
@@ -169,6 +171,12 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
169
171
  }
170
172
  }
171
173
 
174
+ :read-only {
175
+ background-color: var(--color-surface-darken, #f3f5f7);
176
+ border: solid 1px var(--color-disabled-text-on-light);
177
+ color: var(--color-secondary-text-on-light, #4a5464);
178
+ }
179
+
172
180
  border-color: ${({ state: e = "default" }) => Wn[e]};
173
181
  `, Bl = A.span`
174
182
  position: relative;
@@ -5164,7 +5172,7 @@ const gn = A.span`
5164
5172
 
5165
5173
  input:disabled ~ div {
5166
5174
  p,
5167
- label  {
5175
+ label {
5168
5176
  color: var(--color-disabled-text-on-light);
5169
5177
  cursor: default;
5170
5178
  }