Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@julo-ui/form-control

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@julo-ui/form-control - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

dist/chunk-3FJGK4UW.mjs

52

dist/components/form-error/FormErrorMessage.js

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-error/FormErrorMessage.tsx

@@ -88,6 +39,5 @@ var FormErrorMessage_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -94,0 +44,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-error/index.ts

@@ -90,6 +41,5 @@ var form_error_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -96,0 +46,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-helper/FormHelperText.tsx

@@ -88,6 +39,5 @@ var FormHelperText_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -94,0 +44,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-helper/index.ts

@@ -90,6 +41,5 @@ var form_helper_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -96,0 +46,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-label/FormLabel.tsx

@@ -87,6 +38,5 @@ var FormLabel_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -93,0 +43,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-label/index.ts

@@ -89,6 +40,5 @@ var form_label_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -95,0 +45,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/components/form-label/RequiredIndicator.tsx

@@ -87,6 +38,5 @@ var RequiredIndicator_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -93,0 +43,0 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/FormControl.tsx

@@ -97,6 +48,5 @@ var FormControl_exports = {};

var import_react2 = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -142,7 +92,7 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

htmlFor: (_b = props2.htmlFor) != null ? _b : id,
"data-busy": (0, import_shared_utils.dataAttr)(isLoading),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_shared_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_shared_utils.dataAttr)(isReadOnly)
"data-busy": (0, import_dom_utils.dataAttr)(isLoading),
"data-focus": (0, import_dom_utils.dataAttr)(isFocused),
"data-disabled": (0, import_dom_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_dom_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_dom_utils.dataAttr)(isReadOnly)
};

@@ -157,3 +107,3 @@ },

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -173,3 +123,3 @@ return setHasHelperText(false);

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -176,0 +126,0 @@ return setHasFeedbackText(false);

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,48 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/FormControlProvider.tsx

@@ -86,6 +37,5 @@ var FormControlProvider_exports = {};

var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -131,7 +81,7 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

htmlFor: (_b = props2.htmlFor) != null ? _b : id,
"data-busy": (0, import_shared_utils.dataAttr)(isLoading),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_shared_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_shared_utils.dataAttr)(isReadOnly)
"data-busy": (0, import_dom_utils.dataAttr)(isLoading),
"data-focus": (0, import_dom_utils.dataAttr)(isFocused),
"data-disabled": (0, import_dom_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_dom_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_dom_utils.dataAttr)(isReadOnly)
};

@@ -146,3 +96,3 @@ },

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -162,3 +112,3 @@ return setHasHelperText(false);

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -165,0 +115,0 @@ return setHasFeedbackText(false);

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,74 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/callAllFn.js
var require_callAllFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/callAllFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var callAllFn2 = function() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return fns.forEach((fn) => fn == null ? void 0 : fn(...args));
};
};
var _default = callAllFn2;
}
});
// src/index.ts

@@ -132,6 +57,5 @@ var src_exports = {};

var import_react2 = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -177,7 +101,7 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

htmlFor: (_b = props2.htmlFor) != null ? _b : id,
"data-busy": (0, import_shared_utils.dataAttr)(isLoading),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_shared_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_shared_utils.dataAttr)(isReadOnly)
"data-busy": (0, import_dom_utils.dataAttr)(isLoading),
"data-focus": (0, import_dom_utils.dataAttr)(isFocused),
"data-disabled": (0, import_dom_utils.dataAttr)(isDisabled),
...!isReadOnly && !isDisabled && { "data-invalid": (0, import_dom_utils.dataAttr)(isInvalid) },
"data-readonly": (0, import_dom_utils.dataAttr)(isReadOnly)
};

@@ -192,3 +116,3 @@ },

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -208,3 +132,3 @@ return setHasHelperText(false);

...props2,
ref: (0, import_mergeRefs.default)(forwardedRef, (node) => {
ref: (0, import_dom_utils.mergeRefs)(forwardedRef, (node) => {
if (!node)

@@ -489,4 +413,4 @@ return setHasFeedbackText(false);

// src/use-form-control.ts
var import_callAllFn = __toESM(require_callAllFn());
var import_shared_utils2 = require("@julo-ui/shared-utils");
var import_dom_utils2 = require("@julo-ui/dom-utils");
var import_function_utils = require("@julo-ui/function-utils");
function useFormControlProps(props) {

@@ -525,4 +449,4 @@ var _a, _b, _c;

isLoading: isLoading != null ? isLoading : field == null ? void 0 : field.isLoading,
onFocus: (0, import_callAllFn.default)(field == null ? void 0 : field.onFocus, onFocus),
onBlur: (0, import_callAllFn.default)(field == null ? void 0 : field.onBlur, onBlur)
onFocus: (0, import_function_utils.callAllFn)(field == null ? void 0 : field.onFocus, onFocus),
onBlur: (0, import_function_utils.callAllFn)(field == null ? void 0 : field.onBlur, onBlur)
};

@@ -544,6 +468,6 @@ }

readOnly: isReadOnly,
...!isDisabled && !isReadOnly && { "aria-invalid": (0, import_shared_utils2.ariaAttr)(isInvalid) },
"aria-required": (0, import_shared_utils2.ariaAttr)(isRequired),
"aria-readonly": (0, import_shared_utils2.ariaAttr)(isReadOnly),
"aria-busy": (0, import_shared_utils2.ariaAttr)(isLoading)
...!isDisabled && !isReadOnly && { "aria-invalid": (0, import_dom_utils2.ariaAttr)(isInvalid) },
"aria-required": (0, import_dom_utils2.ariaAttr)(isRequired),
"aria-readonly": (0, import_dom_utils2.ariaAttr)(isReadOnly),
"aria-busy": (0, import_dom_utils2.ariaAttr)(isLoading)
};

@@ -550,0 +474,0 @@ }

@@ -8,5 +8,2 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -30,74 +27,2 @@ for (var name in all)

// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/callAllFn.js
var require_callAllFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/callAllFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var callAllFn2 = function() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return fns.forEach((fn) => fn == null ? void 0 : fn(...args));
};
};
var _default = callAllFn2;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js
var require_isFn = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/isFn.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
function isFn(value) {
return typeof value === "function";
}
var _default = isFn;
}
});
// ../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js
var require_mergeRefs = __commonJS({
"../../../node_modules/.pnpm/@julofinance+web-helpers@1.0.3/node_modules/@julofinance/web-helpers/dist/fn/mergeRefs.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: () => _default
});
var _isFn = /* @__PURE__ */ _interopRequireDefault(require_isFn());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
var mergeRefs2 = function() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
const filteredRefs = refs.filter(Boolean);
return (inst) => filteredRefs.forEach((ref) => (0, _isFn.default)(ref) ? ref(inst) : ref.current = inst);
};
var _default = mergeRefs2;
}
});
// src/use-form-control.ts

@@ -110,10 +35,10 @@ var use_form_control_exports = {};

module.exports = __toCommonJS(use_form_control_exports);
var import_callAllFn = __toESM(require_callAllFn());
var import_dom_utils2 = require("@julo-ui/dom-utils");
var import_function_utils = require("@julo-ui/function-utils");
// src/FormControlProvider.tsx
var import_react = require("react");
var import_shared_utils = require("@julo-ui/shared-utils");
var import_dom_utils = require("@julo-ui/dom-utils");
var import_context = require("@julo-ui/context");
var import_badge = __toESM(require("@julo-ui/badge"));
var import_mergeRefs = __toESM(require_mergeRefs());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -126,3 +51,2 @@ var [FormControlProvider, useFormControlContext] = (0, import_context.createContext)({

// src/use-form-control.ts
var import_shared_utils2 = require("@julo-ui/shared-utils");
function useFormControlProps(props) {

@@ -161,4 +85,4 @@ var _a, _b, _c;

isLoading: isLoading != null ? isLoading : field == null ? void 0 : field.isLoading,
onFocus: (0, import_callAllFn.default)(field == null ? void 0 : field.onFocus, onFocus),
onBlur: (0, import_callAllFn.default)(field == null ? void 0 : field.onBlur, onBlur)
onFocus: (0, import_function_utils.callAllFn)(field == null ? void 0 : field.onFocus, onFocus),
onBlur: (0, import_function_utils.callAllFn)(field == null ? void 0 : field.onBlur, onBlur)
};

@@ -180,6 +104,6 @@ }

readOnly: isReadOnly,
...!isDisabled && !isReadOnly && { "aria-invalid": (0, import_shared_utils2.ariaAttr)(isInvalid) },
"aria-required": (0, import_shared_utils2.ariaAttr)(isRequired),
"aria-readonly": (0, import_shared_utils2.ariaAttr)(isReadOnly),
"aria-busy": (0, import_shared_utils2.ariaAttr)(isLoading)
...!isDisabled && !isReadOnly && { "aria-invalid": (0, import_dom_utils2.ariaAttr)(isInvalid) },
"aria-required": (0, import_dom_utils2.ariaAttr)(isRequired),
"aria-readonly": (0, import_dom_utils2.ariaAttr)(isReadOnly),
"aria-busy": (0, import_dom_utils2.ariaAttr)(isLoading)
};

@@ -186,0 +110,0 @@ }

{
"name": "@julo-ui/form-control",
"version": "0.0.5",
"version": "0.0.6",
"description": "React component to provide validation states for form fields",

@@ -30,8 +30,9 @@ "keywords": [

"@julo-ui/context": "0.0.3",
"@julo-ui/shared-utils": "0.0.1-alpha.2",
"@julo-ui/dom-utils": "0.0.1",
"@julo-ui/function-utils": "0.0.1",
"@julo-ui/badge": "0.0.5",
"@julo-ui/typography": "1.0.5"
"@julo-ui/typography": "1.0.6"
},
"devDependencies": {
"@julo-ui/system": "0.0.1-alpha.5"
"@julo-ui/system": "0.0.1-alpha.6"
},

@@ -41,3 +42,3 @@ "peerDependencies": {

"react": ">=18",
"@julo-ui/system": "0.0.1-alpha.5"
"@julo-ui/system": "0.0.1-alpha.6"
},

@@ -44,0 +45,0 @@ "clean-package": "../../../clean-package.config.json",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc