@saas-ui/forms 2.0.0-next.5 → 2.0.0-next.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/ajv/index.d.ts +358 -11
  3. package/dist/ajv/index.js +7 -9
  4. package/dist/ajv/index.js.map +1 -1
  5. package/dist/ajv/index.mjs +7 -10
  6. package/dist/ajv/index.mjs.map +1 -1
  7. package/dist/index.d.ts +296 -194
  8. package/dist/index.js +345 -2584
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.mjs +347 -2580
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/yup/index.d.ts +573 -106
  13. package/dist/yup/index.js +6 -10
  14. package/dist/yup/index.js.map +1 -1
  15. package/dist/yup/index.mjs +4 -8
  16. package/dist/yup/index.mjs.map +1 -1
  17. package/dist/zod/index.d.ts +490 -14
  18. package/dist/zod/index.js +5 -0
  19. package/dist/zod/index.js.map +1 -1
  20. package/dist/zod/index.mjs +5 -1
  21. package/dist/zod/index.mjs.map +1 -1
  22. package/package.json +16 -9
  23. package/src/array-field.tsx +34 -17
  24. package/src/base-field.tsx +4 -9
  25. package/src/create-field.tsx +2 -1
  26. package/src/create-form.tsx +33 -10
  27. package/src/default-fields.tsx +21 -4
  28. package/src/display-field.tsx +1 -2
  29. package/src/display-if.tsx +14 -8
  30. package/src/field-resolver.ts +10 -8
  31. package/src/field.tsx +6 -3
  32. package/src/fields.tsx +16 -13
  33. package/src/form-context.tsx +84 -0
  34. package/src/form.tsx +44 -17
  35. package/src/index.ts +17 -15
  36. package/src/object-field.tsx +6 -2
  37. package/src/password-input/password-input.tsx +1 -1
  38. package/src/select/select-context.tsx +130 -0
  39. package/src/select/select.stories.tsx +116 -85
  40. package/src/select/select.tsx +154 -142
  41. package/src/types.ts +59 -6
  42. package/src/use-array-field.tsx +9 -3
  43. package/src/utils.ts +8 -1
  44. package/src/watch-field.tsx +2 -6
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/lodash.mergewith/index.js","../../../node_modules/react-fast-compare/index.js","../src/display-field.tsx","../src/field.tsx","../src/fields-context.tsx","../src/default-fields.tsx","../src/number-input/number-input.tsx","../src/password-input/password-input.tsx","../../../node_modules/@chakra-ui/system/dist/chunk-NLMMK76H.mjs","../../../node_modules/@chakra-ui/color-mode/dist/chunk-7NLW6UB6.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-7V3ZYTH7.mjs","../../../node_modules/@chakra-ui/shared-utils/dist/index.mjs","../../../node_modules/@chakra-ui/styled-system/dist/index.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-T2VHL7RE.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-NAGWYFCH.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-E32MZNBA.mjs","../../../node_modules/@chakra-ui/object-utils/dist/index.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-3LE6AY5Q.mjs","../../../node_modules/@chakra-ui/system/dist/chunk-QEVFQ4EU.mjs","../../../node_modules/@chakra-ui/system/dist/index.mjs","../../../node_modules/@chakra-ui/icon/dist/chunk-DKFDJSXF.mjs","../../../node_modules/@chakra-ui/icon/dist/chunk-QODHG6BI.mjs","../../../node_modules/@chakra-ui/icons/dist/chunk-BRE73WBG.mjs","../../../node_modules/@chakra-ui/icons/dist/chunk-WQWU3AO7.mjs","../../../node_modules/@chakra-ui/icons/dist/chunk-PXNOCNOR.mjs","../../../node_modules/@chakra-ui/icons/dist/chunk-VJ54TX72.mjs","../src/input-right-button/input-right-button.tsx","../src/radio/radio-input.tsx","../src/utils.ts","../src/select/select.tsx","../src/select/native-select.tsx","../src/create-field.tsx","../src/base-field.tsx","../src/fields.tsx","../src/form.tsx","../src/field-resolver.ts","../src/layout.tsx","../src/array-field.tsx","../src/use-array-field.tsx","../src/object-field.tsx","../src/auto-form.tsx","../src/submit-button.tsx","../src/display-if.tsx","../src/step-form.tsx","../src/use-step-form.tsx","../src/watch-field.tsx","../src/create-form.tsx","../src/index.ts"],"names":["transform","Buffer","Symbol","Uint8Array","Map","isObject","Stack","isFunction","mergeWith","isEqual","React","forwardRef","Input","InputGroup","jsx","jsxs","useContext","import_lodash","_a","mergeWith2","_a2","mergeWith3","mergeWith4","get","filterUndefined","runIfFn","styleProps","color","chakra","Button","useMultiStyleConfig","cx","ChevronDownIcon","value","rest","useFormContext","FormControl","FormLabel","BaseField","Field","NumberInputField","useTheme","createContext","useStyleConfig","mapNestedFields","name","callAllHandlers","steps","useWatch","useFieldArray","useForm","Controller","FormProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAUA,QAAI,mBAAmB;AAGvB,QAAI,iBAAiB;AAGrB,QAAI,YAAY;AAAhB,QACI,WAAW;AAGf,QAAI,mBAAmB;AAGvB,QAAI,UAAU;AAAd,QACI,WAAW;AADf,QAEI,WAAW;AAFf,QAGI,UAAU;AAHd,QAII,UAAU;AAJd,QAKI,WAAW;AALf,QAMI,UAAU;AANd,QAOI,SAAS;AAPb,QAQI,SAAS;AARb,QASI,YAAY;AAThB,QAUI,UAAU;AAVd,QAWI,YAAY;AAXhB,QAYI,WAAW;AAZf,QAaI,YAAY;AAbhB,QAcI,SAAS;AAdb,QAeI,YAAY;AAfhB,QAgBI,eAAe;AAhBnB,QAiBI,aAAa;AAEjB,QAAI,iBAAiB;AAArB,QACI,cAAc;AADlB,QAEI,aAAa;AAFjB,QAGI,aAAa;AAHjB,QAII,UAAU;AAJd,QAKI,WAAW;AALf,QAMI,WAAW;AANf,QAOI,WAAW;AAPf,QAQI,kBAAkB;AARtB,QASI,YAAY;AAThB,QAUI,YAAY;AAMhB,QAAI,eAAe;AAGnB,QAAI,eAAe;AAGnB,QAAI,WAAW;AAGf,QAAI,iBAAiB,CAAC;AACtB,mBAAe,UAAU,IAAI,eAAe,UAAU,IACtD,eAAe,OAAO,IAAI,eAAe,QAAQ,IACjD,eAAe,QAAQ,IAAI,eAAe,QAAQ,IAClD,eAAe,eAAe,IAAI,eAAe,SAA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EAAE,QAAQ,QAAQ,cAAc,YAAY,GAAG,KAAK,IAAI;AAC9D,QAAM,EAAE,YAAY,YAAY,IAAI,kBAAkB;AAEtD,SACE,gBAAAhC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,YAAY;AAAA,MACZ,WAAWiB,IAAG,yBAAyB,MAAM,SAAS;AAAA,MAErD,wBAAc,cAAc,cAAc;AAAA;AAAA,EAC7C;AAEJ;AAEA,WAAW,cAAc;;;AE1NzB;AAAA,EAEE,kBAAAI;AAAA,EAEA,YAAAa;AAAA,OACK;AAgBA,IAAM,aAAa,CAIxB,UACG;AACH,QAAM,EAAE,MAAM,cAAc,YAAY,QAAQ,IAAI;AACpD,QAAM,OAAOb,gBAA6B;AAE1C,QAAM,QAAQa,UAAS;AAAA,IACrB;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,EACT,CAAC;AAED,SAAO,MAAM,SAAS,OAAO,IAAI,KAAK;AACxC;;;ACdQ,gBAAAlC,aAAA;AAdD,SAAS,WAAoC;AAAA,EAClD;AAAA,EACA;AACF,IAAgC,CAAC,GAAG;AAClC,QAAM,aAAa,CAKjB,UACG;AACH,UAAM,EAAE,QAAQ,GAAG,KAAK,IAAI;AAC5B,WACE,gBAAAA,MAAC,kBAAe,OAAO,UAAU,CAAC,GAChC,0BAAAA,MAAC,QAAK,UAAU,qCAAW,MAAM,SAAU,GAAG,MAAM,GACtD;AAAA,EAEJ;AAEA,SAAO;AACT;;;AC6HA;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAAmC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAf;AAAA,EACA;AAAA,EACA,YAAAa;AAAA,EACA,cAAAG;AAAA,EACA,gBAAAC;AAAA,OACK","sourcesContent":["/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport {\n Text,\n FormControl,\n FormControlProps,\n FormLabel,\n} from '@chakra-ui/react'\n\nimport { FieldProps } from './types'\n\nexport interface DisplayFieldProps\n extends FormControlProps,\n Omit<FieldProps, 'type' | 'label'> {}\n/**\n *\n *\n * @see Docs https://saas-ui.dev/\n */\nexport const DisplayField: React.FC<DisplayFieldProps> = ({\n name,\n label,\n placeholder,\n ...props\n}) => {\n return (\n <FormControl {...props}>\n {label ? <FormLabel htmlFor={name}>{label}</FormLabel> : null}\n <Text fontSize=\"md\">\n <FormValue name={name} />\n </Text>\n </FormControl>\n )\n}\n\nDisplayField.displayName = 'DisplayField'\n\nexport const FormValue: React.FC<{ name: string }> = ({ name }) => {\n const { getValues } = useFormContext()\n return getValues(name) || null\n}\n\nFormValue.displayName = 'FormValue'\n","import * as React from 'react'\nimport { RegisterOptions, FieldValues } from 'react-hook-form'\n\nimport { FocusableElement } from '@chakra-ui/utils'\nimport { useField } from './fields-context'\nimport { FieldProps } from './types'\n\nexport interface Option {\n value: string\n label?: string\n [key: string]: unknown\n}\n\nexport type FieldRules = Pick<\n RegisterOptions,\n 'required' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern'\n>\n\nconst defaultInputType = 'text'\n\n/**\n * Form field component.\n * \n * Build-in types:\n * text, number, password, textarea, select, native-select, checkbox, radio, switch, pin\n *\n * Will default to a text field if there is no matching type.\n\n * @see Docs https://saas-ui.dev/docs/components/forms/field\n */\nexport const Field = React.forwardRef(\n <TFieldValues extends FieldValues = FieldValues>(\n props: FieldProps<TFieldValues>,\n ref: React.ForwardedRef<FocusableElement>\n ) => {\n const { type = defaultInputType } = props\n const InputComponent = useField(type)\n return <InputComponent ref={ref} {...props} />\n }\n) as (<TFieldValues extends FieldValues>(\n props: FieldProps<TFieldValues> & {\n ref?: React.ForwardedRef<FocusableElement>\n }\n) => React.ReactElement) & {\n displayName?: string\n}\n","import React from 'react'\nimport { defaultFieldTypes, InputField } from './default-fields'\n\nconst FieldsContext = React.createContext<Record<string, React.FC<any>> | null>(\n null\n)\n\nexport const FieldsProvider: React.FC<{\n value: Record<string, React.FC<any>>\n children: React.ReactNode\n}> = (props) => {\n const fields = { ...defaultFieldTypes, ...props.value }\n return (\n <FieldsContext.Provider value={fields}>\n {props.children}\n </FieldsContext.Provider>\n )\n}\n\nexport const useField = (type: string): React.FC<any> => {\n const context = React.useContext(FieldsContext)\n return context?.[type] || InputField\n}\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Input,\n Textarea,\n Checkbox,\n Switch,\n InputGroup,\n InputProps,\n TextareaProps,\n SwitchProps,\n CheckboxProps,\n PinInputField,\n HStack,\n PinInput,\n UsePinInputProps,\n SystemProps,\n} from '@chakra-ui/react'\n\nimport { NumberInput, NumberInputProps } from './number-input'\nimport { PasswordInput, PasswordInputProps } from './password-input'\nimport { RadioInput, RadioInputProps } from './radio'\n\nimport { Select, SelectProps, NativeSelect, NativeSelectProps } from './select'\n\nimport { createField } from './create-field'\n\nexport interface InputFieldProps extends InputProps {\n type?: string\n leftAddon?: React.ReactNode\n rightAddon?: React.ReactNode\n}\n\nexport const InputField = createField<InputFieldProps>(\n forwardRef(({ type = 'text', leftAddon, rightAddon, size, ...rest }, ref) => {\n const input = <Input type={type} size={size} {...rest} ref={ref} />\n if (leftAddon || rightAddon) {\n return (\n <InputGroup size={size}>\n {leftAddon}\n {input}\n {rightAddon}\n </InputGroup>\n )\n }\n return input\n })\n)\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n type: 'number'\n}\n\nexport const NumberInputField = createField<NumberInputFieldProps>(\n NumberInput,\n {\n isControlled: true,\n }\n)\n\nexport const PasswordInputField = createField<PasswordInputProps>(\n forwardRef((props, ref) => <PasswordInput ref={ref} {...props} />)\n)\n\nexport const TextareaField = createField<TextareaProps>(Textarea)\n\nexport const SwitchField = createField<SwitchProps>(\n forwardRef(({ type, value, ...rest }, ref) => {\n return <Switch isChecked={!!value} {...rest} ref={ref} />\n }),\n {\n isControlled: true,\n }\n)\n\nexport const SelectField = createField<SelectProps>(Select, {\n isControlled: true,\n})\n\nexport const CheckboxField = createField<CheckboxProps>(\n forwardRef(({ label, type, ...props }, ref) => {\n return (\n <Checkbox ref={ref} {...props}>\n {label}\n </Checkbox>\n )\n }),\n {\n hideLabel: true,\n }\n)\n\nexport const RadioField = createField<RadioInputProps>(RadioInput, {\n isControlled: true,\n})\n\nexport const NativeSelectField = createField<NativeSelectProps>(NativeSelect, {\n isControlled: true,\n})\n\nexport interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {\n pinLength?: number\n pinType?: 'alphanumeric' | 'number'\n spacing?: SystemProps['margin']\n}\n\nexport const PinField = createField<PinFieldProps>(\n forwardRef((props, ref) => {\n const { pinLength = 4, pinType, spacing, ...inputProps } = props\n\n const inputs: React.ReactNode[] = []\n for (let i = 0; i < pinLength; i++) {\n inputs.push(<PinInputField key={i} ref={ref} />)\n }\n\n return (\n <HStack spacing={spacing}>\n <PinInput {...inputProps} type={pinType}>\n {inputs}\n </PinInput>\n </HStack>\n )\n }),\n {\n isControlled: true,\n }\n)\n\nexport const defaultFieldTypes = {\n text: InputField,\n email: InputField,\n url: InputField,\n phone: InputField,\n number: NumberInputField,\n password: PasswordInputField,\n textarea: TextareaField,\n switch: SwitchField,\n select: SelectField,\n checkbox: CheckboxField,\n radio: RadioField,\n pin: PinField,\n 'native-select': NativeSelectField,\n}\n\nexport type DefaultFields = typeof defaultFieldTypes\n","import * as React from 'react'\n\nimport {\n forwardRef,\n NumberInput as ChakraNumberInput,\n NumberInputField,\n NumberInputStepper,\n NumberIncrementStepper,\n NumberDecrementStepper,\n NumberInputProps as ChakraNumberInputProps,\n} from '@chakra-ui/react'\n\nimport { ChevronDownIcon, ChevronUpIcon } from '@saas-ui/core'\n\ninterface NumberInputOptions {\n /**\n * Hide the stepper.\n */\n hideStepper?: boolean\n /**\n * Render a custom increment icon.\n */\n incrementIcon?: React.ReactNode\n /**\n * Render a custom decrement icon.\n */\n decrementIcon?: React.ReactNode\n}\n\nexport interface NumberInputProps\n extends ChakraNumberInputProps,\n NumberInputOptions {}\n\nexport const NumberInput = forwardRef<NumberInputProps, 'div'>((props, ref) => {\n const {\n hideStepper,\n incrementIcon = <ChevronUpIcon />,\n decrementIcon = <ChevronDownIcon />,\n ...rest\n } = props\n\n return (\n <ChakraNumberInput {...rest} ref={ref}>\n <NumberInputField />\n\n {!hideStepper && (\n <NumberInputStepper>\n <NumberIncrementStepper children={incrementIcon} />\n <NumberDecrementStepper children={decrementIcon} />\n </NumberInputStepper>\n )}\n </ChakraNumberInput>\n )\n})\n\nNumberInput.defaultProps = {\n hideStepper: false,\n}\n\nNumberInput.displayName = 'NumberInput'\n","import React, { useState } from 'react'\n\nimport { forwardRef, InputGroup, Input, InputProps } from '@chakra-ui/react'\n\nimport { ViewIcon, ViewOffIcon } from '@chakra-ui/icons'\n\nimport { InputRightButton } from '../input-right-button'\n\ninterface PasswordOptions {\n viewIcon?: React.ReactNode\n viewOffIcon?: React.ReactNode\n leftAddon?: React.ReactNode\n}\n\nexport interface PasswordInputProps extends InputProps, PasswordOptions {}\n\nexport const PasswordInput = forwardRef<PasswordInputProps, 'div'>(\n (props, ref) => {\n const {\n viewIcon,\n viewOffIcon,\n autoComplete,\n w,\n width,\n size,\n variant,\n leftAddon,\n ...inputProps\n } = props\n const [show, setShow] = useState(false)\n const handleClick = () => setShow(!show)\n\n const label = show ? 'Hide password' : 'Show password'\n\n let icon\n if (show) {\n icon = viewIcon || <ViewIcon />\n } else {\n icon = viewOffIcon || <ViewOffIcon />\n }\n\n const groupProps = {\n width: w || width,\n size,\n variant,\n }\n\n return (\n <InputGroup {...groupProps}>\n {leftAddon}\n <Input\n {...inputProps}\n ref={ref}\n type={show ? 'text' : 'password'}\n autoComplete={show ? 'off' : autoComplete}\n />\n <InputRightButton\n onClick={handleClick}\n aria-label={label}\n variant=\"ghost\"\n >\n {icon}\n </InputRightButton>\n </InputGroup>\n )\n }\n)\n\nPasswordInput.displayName = 'PasswordInput'\n","// src/use-theme.ts\nimport { ThemeContext } from \"@emotion/react\";\nimport { useContext } from \"react\";\nfunction useTheme() {\n const theme = useContext(\n ThemeContext\n );\n if (!theme) {\n throw Error(\n \"useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`\"\n );\n }\n return theme;\n}\n\nexport {\n useTheme\n};\n","// src/color-mode-context.ts\nimport { createContext, useContext } from \"react\";\nvar ColorModeContext = createContext({});\nColorModeContext.displayName = \"ColorModeContext\";\nfunction useColorMode() {\n const context = useContext(ColorModeContext);\n if (context === void 0) {\n throw new Error(\"useColorMode must be used within a ColorModeProvider\");\n }\n return context;\n}\nfunction useColorModeValue(light, dark) {\n const { colorMode } = useColorMode();\n return colorMode === \"dark\" ? dark : light;\n}\n\nexport {\n ColorModeContext,\n useColorMode,\n useColorModeValue\n};\n","import {\n useTheme\n} from \"./chunk-NLMMK76H.mjs\";\n\n// src/hooks.ts\nimport { useColorMode } from \"@chakra-ui/color-mode\";\nfunction useChakra() {\n const colorModeResult = useColorMode();\n const theme = useTheme();\n return { ...colorModeResult, theme };\n}\nfunction getBreakpointValue(theme, value, fallback) {\n var _a, _b;\n if (value == null)\n return value;\n const getValue = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__breakpoints) == null ? void 0 : _a2.asArray) == null ? void 0 : _b2[val];\n };\n return (_b = (_a = getValue(value)) != null ? _a : getValue(fallback)) != null ? _b : fallback;\n}\nfunction getTokenValue(theme, value, fallback) {\n var _a, _b;\n if (value == null)\n return value;\n const getValue = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.value;\n };\n return (_b = (_a = getValue(value)) != null ? _a : getValue(fallback)) != null ? _b : fallback;\n}\nfunction useToken(scale, token, fallback) {\n const theme = useTheme();\n return getToken(scale, token, fallback)(theme);\n}\nfunction getToken(scale, token, fallback) {\n const _token = Array.isArray(token) ? token : [token];\n const _fallback = Array.isArray(fallback) ? fallback : [fallback];\n return (theme) => {\n const fallbackArr = _fallback.filter(Boolean);\n const result = _token.map((token2, index) => {\n var _a, _b;\n if (scale === \"breakpoints\") {\n return getBreakpointValue(theme, token2, (_a = fallbackArr[index]) != null ? _a : token2);\n }\n const path = `${scale}.${token2}`;\n return getTokenValue(theme, path, (_b = fallbackArr[index]) != null ? _b : token2);\n });\n return Array.isArray(token) ? result : result[0];\n };\n}\n\nexport {\n useChakra,\n useToken,\n getToken\n};\n","// src/index.ts\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction isDev() {\n return process.env.NODE_ENV !== \"production\";\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !Array.isArray(value);\n}\nvar warn = (options) => {\n const { condition, message } = options;\n if (condition && isDev()) {\n console.warn(message);\n }\n};\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nvar isFunction = (value) => typeof value === \"function\";\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nexport {\n ariaAttr,\n callAll,\n callAllHandlers,\n cx,\n dataAttr,\n isObject,\n runIfFn,\n warn\n};\n","// src/utils/create-transform.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar isImportant = (value) => /!(important)?$/.test(value);\nvar withoutImportant = (value) => typeof value === \"string\" ? value.replace(/!(important)?$/, \"\").trim() : value;\nvar tokenToCSSVar = (scale, value) => (theme) => {\n const valueStr = String(value);\n const important = isImportant(valueStr);\n const valueWithoutImportant = withoutImportant(valueStr);\n const key = scale ? `${scale}.${valueWithoutImportant}` : valueWithoutImportant;\n let transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? `${transformed} !important` : transformed;\n};\nfunction createTransform(options) {\n const { scale, transform: transform2, compose } = options;\n const fn = (value, theme) => {\n var _a;\n const _value = tokenToCSSVar(scale, value)(theme);\n let result = (_a = transform2 == null ? void 0 : transform2(_value, theme)) != null ? _a : _value;\n if (compose) {\n result = compose(result, theme);\n }\n return result;\n };\n return fn;\n}\n\n// src/utils/pipe.ts\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\n\n// src/utils/prop-config.ts\nfunction toConfig(scale, transform2) {\n return (property) => {\n const result = { property, scale };\n result.transform = createTransform({\n scale,\n transform: transform2\n });\n return result;\n };\n}\nvar getRtl = ({ rtl, ltr }) => (theme) => theme.direction === \"rtl\" ? rtl : ltr;\nfunction logical(options) {\n const { property, scale, transform: transform2 } = options;\n return {\n scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale,\n compose: transform2\n }) : transform2\n };\n}\n\n// src/utils/templates.ts\nvar transformTemplate = [\n \"rotate(var(--chakra-rotate, 0))\",\n \"scaleX(var(--chakra-scale-x, 1))\",\n \"scaleY(var(--chakra-scale-y, 1))\",\n \"skewX(var(--chakra-skew-x, 0))\",\n \"skewY(var(--chakra-skew-y, 0))\"\n];\nfunction getTransformTemplate() {\n return [\n \"translateX(var(--chakra-translate-x, 0))\",\n \"translateY(var(--chakra-translate-y, 0))\",\n ...transformTemplate\n ].join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\n \"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\",\n ...transformTemplate\n ].join(\" \");\n}\nvar filterTemplate = {\n \"--chakra-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-drop-shadow\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n filter: [\n \"var(--chakra-blur)\",\n \"var(--chakra-brightness)\",\n \"var(--chakra-contrast)\",\n \"var(--chakra-grayscale)\",\n \"var(--chakra-hue-rotate)\",\n \"var(--chakra-invert)\",\n \"var(--chakra-saturate)\",\n \"var(--chakra-sepia)\",\n \"var(--chakra-drop-shadow)\"\n ].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\n \"var(--chakra-backdrop-blur)\",\n \"var(--chakra-backdrop-brightness)\",\n \"var(--chakra-backdrop-contrast)\",\n \"var(--chakra-backdrop-grayscale)\",\n \"var(--chakra-backdrop-hue-rotate)\",\n \"var(--chakra-backdrop-invert)\",\n \"var(--chakra-backdrop-opacity)\",\n \"var(--chakra-backdrop-saturate)\",\n \"var(--chakra-backdrop-sepia)\"\n ].join(\" \"),\n \"--chakra-backdrop-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-opacity\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\"\n};\nfunction getRingTemplate(value) {\n return {\n \"--chakra-ring-offset-shadow\": `var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)`,\n \"--chakra-ring-shadow\": `var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)`,\n \"--chakra-ring-width\": value,\n boxShadow: [\n `var(--chakra-ring-offset-shadow)`,\n `var(--chakra-ring-shadow)`,\n `var(--chakra-shadow, 0 0 #0000)`\n ].join(\", \")\n };\n}\nvar flexDirectionTemplate = {\n \"row-reverse\": {\n space: \"--chakra-space-x-reverse\",\n divide: \"--chakra-divide-x-reverse\"\n },\n \"column-reverse\": {\n space: \"--chakra-space-y-reverse\",\n divide: \"--chakra-divide-y-reverse\"\n }\n};\n\n// src/utils/parse-gradient.ts\nvar directionMap = {\n \"to-t\": \"to top\",\n \"to-tr\": \"to top right\",\n \"to-r\": \"to right\",\n \"to-br\": \"to bottom right\",\n \"to-b\": \"to bottom\",\n \"to-bl\": \"to bottom left\",\n \"to-l\": \"to left\",\n \"to-tl\": \"to top left\"\n};\nvar valueSet = new Set(Object.values(directionMap));\nvar globalSet = /* @__PURE__ */ new Set([\n \"none\",\n \"-moz-initial\",\n \"inherit\",\n \"initial\",\n \"revert\",\n \"unset\"\n]);\nvar trimSpace = (str) => str.trim();\nfunction parseGradient(value, theme) {\n if (value == null || globalSet.has(value))\n return value;\n const regex = /(^[a-z-A-Z]+)\\((.*)\\)/g;\n const results = regex.exec(value);\n const type = results == null ? void 0 : results[1];\n const values = results == null ? void 0 : results[2];\n if (!type || !values)\n return value;\n const _type = type.includes(\"-gradient\") ? type : `${type}-gradient`;\n const [maybeDirection, ...stops] = values.split(\",\").map(trimSpace).filter(Boolean);\n if ((stops == null ? void 0 : stops.length) === 0)\n return value;\n const direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n const _values = stops.map((stop) => {\n if (valueSet.has(stop))\n return stop;\n const firstStop = stop.indexOf(\" \");\n const [_color, _stop] = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop];\n const _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \");\n const key = `colors.${_color}`;\n const color2 = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [\n color2,\n ...Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]\n ].join(\" \") : color2;\n });\n return `${_type}(${_values.join(\", \")})`;\n}\nvar isCSSFunction = (value) => {\n return typeof value === \"string\" && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = (value, theme) => parseGradient(value, theme != null ? theme : {});\n\n// src/utils/transform-functions.ts\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar analyzeCSSValue = (value) => {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n};\nvar wrap = (str) => (value) => `${str}(${value})`;\nvar transformFunctions = {\n filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip(value) {\n return value === \"text\" ? { color: \"transparent\", backgroundClip: \"text\" } : { backgroundClip: value };\n },\n transform(value) {\n if (value === \"auto\")\n return getTransformTemplate();\n if (value === \"auto-gpu\")\n return getTransformGpuTemplate();\n return value;\n },\n vh(value) {\n return value === \"$100vh\" ? \"var(--chakra-vh)\" : value;\n },\n px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n },\n fraction(value) {\n return !(typeof value === \"number\") || value > 1 ? value : `${value * 100}%`;\n },\n float(value, theme) {\n const map = { left: \"right\", right: \"left\" };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree(value) {\n if (isCssVar(value) || value == null)\n return value;\n const unitless = typeof value === \"string\" && !value.endsWith(\"deg\");\n return typeof value === \"number\" || unitless ? `${value}deg` : value;\n },\n gradient: gradientTransform,\n blur: wrap(\"blur\"),\n opacity: wrap(\"opacity\"),\n brightness: wrap(\"brightness\"),\n contrast: wrap(\"contrast\"),\n dropShadow: wrap(\"drop-shadow\"),\n grayscale: wrap(\"grayscale\"),\n hueRotate: wrap(\"hue-rotate\"),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage(value) {\n if (value == null)\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? `url(${value})` : value;\n },\n outline(value) {\n const isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? { outline: \"2px solid transparent\", outlineOffset: \"2px\" } : { outline: value };\n },\n flexDirection(value) {\n var _a;\n const { space: space2, divide: divide2 } = (_a = flexDirectionTemplate[value]) != null ? _a : {};\n const result = { flexDirection: value };\n if (space2)\n result[space2] = 1;\n if (divide2)\n result[divide2] = 1;\n return result;\n }\n};\n\n// src/utils/index.ts\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n spaceT: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n degreeT(property) {\n return { property, transform: transformFunctions.degree };\n },\n prop(property, scale, transform2) {\n return {\n property,\n scale,\n ...scale && {\n transform: createTransform({ scale, transform: transform2 })\n }\n };\n },\n propT(property, transform2) {\n return { property, transform: transform2 };\n },\n sizes: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.px)),\n sizesT: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.fraction)),\n shadows: toConfig(\"shadows\"),\n logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\n// src/config/background.ts\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.propT(\"backgroundImage\", transformFunctions.bgImage),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: { transform: transformFunctions.bgClip },\n bgSize: t.prop(\"backgroundSize\"),\n bgPosition: t.prop(\"backgroundPosition\"),\n bg: t.colors(\"background\"),\n bgColor: t.colors(\"backgroundColor\"),\n bgPos: t.prop(\"backgroundPosition\"),\n bgRepeat: t.prop(\"backgroundRepeat\"),\n bgAttachment: t.prop(\"backgroundAttachment\"),\n bgGradient: t.propT(\"backgroundImage\", transformFunctions.gradient),\n bgClip: { transform: transformFunctions.bgClip }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\n// src/config/border.ts\nvar border = {\n border: t.borders(\"border\"),\n borderWidth: t.borderWidths(\"borderWidth\"),\n borderStyle: t.borderStyles(\"borderStyle\"),\n borderColor: t.colors(\"borderColor\"),\n borderRadius: t.radii(\"borderRadius\"),\n borderTop: t.borders(\"borderTop\"),\n borderBlockStart: t.borders(\"borderBlockStart\"),\n borderTopLeftRadius: t.radii(\"borderTopLeftRadius\"),\n borderStartStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopLeftRadius\",\n rtl: \"borderTopRightRadius\"\n }\n }),\n borderEndStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomLeftRadius\",\n rtl: \"borderBottomRightRadius\"\n }\n }),\n borderTopRightRadius: t.radii(\"borderTopRightRadius\"),\n borderStartEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopRightRadius\",\n rtl: \"borderTopLeftRadius\"\n }\n }),\n borderEndEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomRightRadius\",\n rtl: \"borderBottomLeftRadius\"\n }\n }),\n borderRight: t.borders(\"borderRight\"),\n borderInlineEnd: t.borders(\"borderInlineEnd\"),\n borderBottom: t.borders(\"borderBottom\"),\n borderBlockEnd: t.borders(\"borderBlockEnd\"),\n borderBottomLeftRadius: t.radii(\"borderBottomLeftRadius\"),\n borderBottomRightRadius: t.radii(\"borderBottomRightRadius\"),\n borderLeft: t.borders(\"borderLeft\"),\n borderInlineStart: {\n property: \"borderInlineStart\",\n scale: \"borders\"\n },\n borderInlineStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"],\n rtl: [\"borderTopRightRadius\", \"borderBottomRightRadius\"]\n }\n }),\n borderInlineEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopRightRadius\", \"borderBottomRightRadius\"],\n rtl: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]\n }\n }),\n borderX: t.borders([\"borderLeft\", \"borderRight\"]),\n borderInline: t.borders(\"borderInline\"),\n borderY: t.borders([\"borderTop\", \"borderBottom\"]),\n borderBlock: t.borders(\"borderBlock\"),\n borderTopWidth: t.borderWidths(\"borderTopWidth\"),\n borderBlockStartWidth: t.borderWidths(\"borderBlockStartWidth\"),\n borderTopColor: t.colors(\"borderTopColor\"),\n borderBlockStartColor: t.colors(\"borderBlockStartColor\"),\n borderTopStyle: t.borderStyles(\"borderTopStyle\"),\n borderBlockStartStyle: t.borderStyles(\"borderBlockStartStyle\"),\n borderBottomWidth: t.borderWidths(\"borderBottomWidth\"),\n borderBlockEndWidth: t.borderWidths(\"borderBlockEndWidth\"),\n borderBottomColor: t.colors(\"borderBottomColor\"),\n borderBlockEndColor: t.colors(\"borderBlockEndColor\"),\n borderBottomStyle: t.borderStyles(\"borderBottomStyle\"),\n borderBlockEndStyle: t.borderStyles(\"borderBlockEndStyle\"),\n borderLeftWidth: t.borderWidths(\"borderLeftWidth\"),\n borderInlineStartWidth: t.borderWidths(\"borderInlineStartWidth\"),\n borderLeftColor: t.colors(\"borderLeftColor\"),\n borderInlineStartColor: t.colors(\"borderInlineStartColor\"),\n borderLeftStyle: t.borderStyles(\"borderLeftStyle\"),\n borderInlineStartStyle: t.borderStyles(\"borderInlineStartStyle\"),\n borderRightWidth: t.borderWidths(\"borderRightWidth\"),\n borderInlineEndWidth: t.borderWidths(\"borderInlineEndWidth\"),\n borderRightColor: t.colors(\"borderRightColor\"),\n borderInlineEndColor: t.colors(\"borderInlineEndColor\"),\n borderRightStyle: t.borderStyles(\"borderRightStyle\"),\n borderInlineEndStyle: t.borderStyles(\"borderInlineEndStyle\"),\n borderTopRadius: t.radii([\"borderTopLeftRadius\", \"borderTopRightRadius\"]),\n borderBottomRadius: t.radii([\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\"\n ])\n};\nObject.assign(border, {\n rounded: border.borderRadius,\n roundedTop: border.borderTopRadius,\n roundedTopLeft: border.borderTopLeftRadius,\n roundedTopRight: border.borderTopRightRadius,\n roundedTopStart: border.borderStartStartRadius,\n roundedTopEnd: border.borderStartEndRadius,\n roundedBottom: border.borderBottomRadius,\n roundedBottomLeft: border.borderBottomLeftRadius,\n roundedBottomRight: border.borderBottomRightRadius,\n roundedBottomStart: border.borderEndStartRadius,\n roundedBottomEnd: border.borderEndEndRadius,\n roundedLeft: border.borderLeftRadius,\n roundedRight: border.borderRightRadius,\n roundedStart: border.borderInlineStartRadius,\n roundedEnd: border.borderInlineEndRadius,\n borderStart: border.borderInlineStart,\n borderEnd: border.borderInlineEnd,\n borderTopStartRadius: border.borderStartStartRadius,\n borderTopEndRadius: border.borderStartEndRadius,\n borderBottomStartRadius: border.borderEndStartRadius,\n borderBottomEndRadius: border.borderEndEndRadius,\n borderStartRadius: border.borderInlineStartRadius,\n borderEndRadius: border.borderInlineEndRadius,\n borderStartWidth: border.borderInlineStartWidth,\n borderEndWidth: border.borderInlineEndWidth,\n borderStartColor: border.borderInlineStartColor,\n borderEndColor: border.borderInlineEndColor,\n borderStartStyle: border.borderInlineStartStyle,\n borderEndStyle: border.borderInlineEndStyle\n});\n\n// src/config/color.ts\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\n// src/config/effect.ts\nvar effect = {\n boxShadow: t.shadows(\"boxShadow\"),\n mixBlendMode: true,\n blendMode: t.prop(\"mixBlendMode\"),\n backgroundBlendMode: true,\n bgBlendMode: t.prop(\"backgroundBlendMode\"),\n opacity: true\n};\nObject.assign(effect, {\n shadow: effect.boxShadow\n});\n\n// src/config/filter.ts\nvar filter = {\n filter: { transform: transformFunctions.filter },\n blur: t.blur(\"--chakra-blur\"),\n brightness: t.propT(\"--chakra-brightness\", transformFunctions.brightness),\n contrast: t.propT(\"--chakra-contrast\", transformFunctions.contrast),\n hueRotate: t.degreeT(\"--chakra-hue-rotate\"),\n invert: t.propT(\"--chakra-invert\", transformFunctions.invert),\n saturate: t.propT(\"--chakra-saturate\", transformFunctions.saturate),\n dropShadow: t.propT(\"--chakra-drop-shadow\", transformFunctions.dropShadow),\n backdropFilter: { transform: transformFunctions.backdropFilter },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\n \"--chakra-backdrop-brightness\",\n transformFunctions.brightness\n ),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.degreeT(\"--chakra-backdrop-hue-rotate\"),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\n// src/config/flexbox.ts\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: { transform: transformFunctions.flexDirection },\n flex: true,\n flexFlow: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: t.sizes(\"flexBasis\"),\n justifySelf: true,\n alignSelf: true,\n order: true,\n placeItems: true,\n placeContent: true,\n placeSelf: true,\n gap: t.space(\"gap\"),\n rowGap: t.space(\"rowGap\"),\n columnGap: t.space(\"columnGap\")\n};\nObject.assign(flexbox, {\n flexDir: flexbox.flexDirection\n});\n\n// src/config/grid.ts\nvar grid = {\n gridGap: t.space(\"gridGap\"),\n gridColumnGap: t.space(\"gridColumnGap\"),\n gridRowGap: t.space(\"gridRowGap\"),\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridAutoRows: true,\n gridTemplate: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\n\n// src/config/interactivity.ts\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: { transform: transformFunctions.outline },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\n// src/config/layout.ts\nvar layout = {\n width: t.sizesT(\"width\"),\n inlineSize: t.sizesT(\"inlineSize\"),\n height: t.sizes(\"height\"),\n blockSize: t.sizes(\"blockSize\"),\n boxSize: t.sizes([\"width\", \"height\"]),\n minWidth: t.sizes(\"minWidth\"),\n minInlineSize: t.sizes(\"minInlineSize\"),\n minHeight: t.sizes(\"minHeight\"),\n minBlockSize: t.sizes(\"minBlockSize\"),\n maxWidth: t.sizes(\"maxWidth\"),\n maxInlineSize: t.sizes(\"maxInlineSize\"),\n maxHeight: t.sizes(\"maxHeight\"),\n maxBlockSize: t.sizes(\"maxBlockSize\"),\n overflow: true,\n overflowX: true,\n overflowY: true,\n overscrollBehavior: true,\n overscrollBehaviorX: true,\n overscrollBehaviorY: true,\n display: true,\n hideFrom: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const mq = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minWQuery) != null ? _c : `@media screen and (min-width: ${value})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n hideBelow: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const mq = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.maxWQuery) != null ? _c : `@media screen and (max-width: ${value})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n verticalAlign: true,\n boxSizing: true,\n boxDecorationBreak: true,\n float: t.propT(\"float\", transformFunctions.float),\n objectFit: true,\n objectPosition: true,\n visibility: true,\n isolation: true\n};\nObject.assign(layout, {\n w: layout.width,\n h: layout.height,\n minW: layout.minWidth,\n maxW: layout.maxWidth,\n minH: layout.minHeight,\n maxH: layout.maxHeight,\n overscroll: layout.overscrollBehavior,\n overscrollX: layout.overscrollBehaviorX,\n overscrollY: layout.overscrollBehaviorY\n});\n\n// src/config/list.ts\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\n// src/get.ts\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\n\n// src/config/others.ts\nvar srOnly = {\n border: \"0px\",\n clip: \"rect(0, 0, 0, 0)\",\n width: \"1px\",\n height: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\nvar srFocusable = {\n position: \"static\",\n width: \"auto\",\n height: \"auto\",\n clip: \"auto\",\n padding: \"0\",\n margin: \"0\",\n overflow: \"visible\",\n whiteSpace: \"normal\"\n};\nvar getWithPriority = (theme, key, styles) => {\n const result = {};\n const obj = memoizedGet(theme, key, {});\n for (const prop in obj) {\n const isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles)\n result[prop] = obj[prop];\n }\n return result;\n};\nvar others = {\n srOnly: {\n transform(value) {\n if (value === true)\n return srOnly;\n if (value === \"focusable\")\n return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `layerStyles.${value}`, styles)\n },\n textStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `textStyles.${value}`, styles)\n },\n apply: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, value, styles)\n }\n};\n\n// src/config/position.ts\nvar position = {\n position: true,\n pos: t.prop(\"position\"),\n zIndex: t.prop(\"zIndex\", \"zIndices\"),\n inset: t.spaceT(\"inset\"),\n insetX: t.spaceT([\"left\", \"right\"]),\n insetInline: t.spaceT(\"insetInline\"),\n insetY: t.spaceT([\"top\", \"bottom\"]),\n insetBlock: t.spaceT(\"insetBlock\"),\n top: t.spaceT(\"top\"),\n insetBlockStart: t.spaceT(\"insetBlockStart\"),\n bottom: t.spaceT(\"bottom\"),\n insetBlockEnd: t.spaceT(\"insetBlockEnd\"),\n left: t.spaceT(\"left\"),\n insetInlineStart: t.logical({\n scale: \"space\",\n property: { ltr: \"left\", rtl: \"right\" }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: { ltr: \"right\", rtl: \"left\" }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n\n// src/config/ring.ts\nvar ring = {\n ring: { transform: transformFunctions.ring },\n ringColor: t.colors(\"--chakra-ring-color\"),\n ringOffset: t.prop(\"--chakra-ring-offset-width\"),\n ringOffsetColor: t.colors(\"--chakra-ring-offset-color\"),\n ringInset: t.prop(\"--chakra-ring-inset\")\n};\n\n// src/config/space.ts\nvar space = {\n margin: t.spaceT(\"margin\"),\n marginTop: t.spaceT(\"marginTop\"),\n marginBlockStart: t.spaceT(\"marginBlockStart\"),\n marginRight: t.spaceT(\"marginRight\"),\n marginInlineEnd: t.spaceT(\"marginInlineEnd\"),\n marginBottom: t.spaceT(\"marginBottom\"),\n marginBlockEnd: t.spaceT(\"marginBlockEnd\"),\n marginLeft: t.spaceT(\"marginLeft\"),\n marginInlineStart: t.spaceT(\"marginInlineStart\"),\n marginX: t.spaceT([\"marginInlineStart\", \"marginInlineEnd\"]),\n marginInline: t.spaceT(\"marginInline\"),\n marginY: t.spaceT([\"marginTop\", \"marginBottom\"]),\n marginBlock: t.spaceT(\"marginBlock\"),\n padding: t.space(\"padding\"),\n paddingTop: t.space(\"paddingTop\"),\n paddingBlockStart: t.space(\"paddingBlockStart\"),\n paddingRight: t.space(\"paddingRight\"),\n paddingBottom: t.space(\"paddingBottom\"),\n paddingBlockEnd: t.space(\"paddingBlockEnd\"),\n paddingLeft: t.space(\"paddingLeft\"),\n paddingInlineStart: t.space(\"paddingInlineStart\"),\n paddingInlineEnd: t.space(\"paddingInlineEnd\"),\n paddingX: t.space([\"paddingInlineStart\", \"paddingInlineEnd\"]),\n paddingInline: t.space(\"paddingInline\"),\n paddingY: t.space([\"paddingTop\", \"paddingBottom\"]),\n paddingBlock: t.space(\"paddingBlock\")\n};\nObject.assign(space, {\n m: space.margin,\n mt: space.marginTop,\n mr: space.marginRight,\n me: space.marginInlineEnd,\n marginEnd: space.marginInlineEnd,\n mb: space.marginBottom,\n ml: space.marginLeft,\n ms: space.marginInlineStart,\n marginStart: space.marginInlineStart,\n mx: space.marginX,\n my: space.marginY,\n p: space.padding,\n pt: space.paddingTop,\n py: space.paddingY,\n px: space.paddingX,\n pb: space.paddingBottom,\n pl: space.paddingLeft,\n ps: space.paddingInlineStart,\n paddingStart: space.paddingInlineStart,\n pr: space.paddingRight,\n pe: space.paddingInlineEnd,\n paddingEnd: space.paddingInlineEnd\n});\n\n// src/config/text-decoration.ts\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: { property: \"textDecoration\" },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\n// src/config/transform.ts\nvar transform = {\n clipPath: true,\n transform: t.propT(\"transform\", transformFunctions.transform),\n transformOrigin: true,\n translateX: t.spaceT(\"--chakra-translate-x\"),\n translateY: t.spaceT(\"--chakra-translate-y\"),\n skewX: t.degreeT(\"--chakra-skew-x\"),\n skewY: t.degreeT(\"--chakra-skew-y\"),\n scaleX: t.prop(\"--chakra-scale-x\"),\n scaleY: t.prop(\"--chakra-scale-y\"),\n scale: t.prop([\"--chakra-scale-x\", \"--chakra-scale-y\"]),\n rotate: t.degreeT(\"--chakra-rotate\")\n};\n\n// src/config/transition.ts\nvar transition = {\n transition: true,\n transitionDelay: true,\n animation: true,\n willChange: true,\n transitionDuration: t.prop(\"transitionDuration\", \"transition.duration\"),\n transitionProperty: t.prop(\"transitionProperty\", \"transition.property\"),\n transitionTimingFunction: t.prop(\n \"transitionTimingFunction\",\n \"transition.easing\"\n )\n};\n\n// src/config/typography.ts\nvar typography = {\n fontFamily: t.prop(\"fontFamily\", \"fonts\"),\n fontSize: t.prop(\"fontSize\", \"fontSizes\", transformFunctions.px),\n fontWeight: t.prop(\"fontWeight\", \"fontWeights\"),\n lineHeight: t.prop(\"lineHeight\", \"lineHeights\"),\n letterSpacing: t.prop(\"letterSpacing\", \"letterSpacings\"),\n textAlign: true,\n fontStyle: true,\n textIndent: true,\n wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\n isTruncated: {\n transform(value) {\n if (value === true) {\n return {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n };\n }\n }\n },\n noOfLines: {\n static: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n display: \"-webkit-box\",\n WebkitBoxOrient: \"vertical\",\n WebkitLineClamp: \"var(--chakra-line-clamp)\"\n },\n property: \"--chakra-line-clamp\"\n }\n};\n\n// src/config/scroll.ts\nvar scroll = {\n scrollBehavior: true,\n scrollSnapAlign: true,\n scrollSnapStop: true,\n scrollSnapType: true,\n scrollMargin: t.spaceT(\"scrollMargin\"),\n scrollMarginTop: t.spaceT(\"scrollMarginTop\"),\n scrollMarginBottom: t.spaceT(\"scrollMarginBottom\"),\n scrollMarginLeft: t.spaceT(\"scrollMarginLeft\"),\n scrollMarginRight: t.spaceT(\"scrollMarginRight\"),\n scrollMarginX: t.spaceT([\"scrollMarginLeft\", \"scrollMarginRight\"]),\n scrollMarginY: t.spaceT([\"scrollMarginTop\", \"scrollMarginBottom\"]),\n scrollPadding: t.spaceT(\"scrollPadding\"),\n scrollPaddingTop: t.spaceT(\"scrollPaddingTop\"),\n scrollPaddingBottom: t.spaceT(\"scrollPaddingBottom\"),\n scrollPaddingLeft: t.spaceT(\"scrollPaddingLeft\"),\n scrollPaddingRight: t.spaceT(\"scrollPaddingRight\"),\n scrollPaddingX: t.spaceT([\"scrollPaddingLeft\", \"scrollPaddingRight\"]),\n scrollPaddingY: t.spaceT([\"scrollPaddingTop\", \"scrollPaddingBottom\"])\n};\n\n// src/create-theme-vars/calc.ts\nimport { isObject as isObject2 } from \"@chakra-ui/shared-utils\";\nfunction resolveReference(operand) {\n if (isObject2(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpression = (operator, ...operands) => operands.map(resolveReference).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpression(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpression(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpression(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpression(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = resolveReference(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\n// src/create-theme-vars/css-var.ts\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n return escapeSymbol(escapeDot(valueStr));\n}\nfunction escapeDot(value) {\n if (value.includes(\"\\\\.\"))\n return value;\n const isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? value.replace(\".\", `\\\\.`) : value;\n}\nfunction escapeSymbol(value) {\n return value.replace(/[!-,/:-@[-^`{-~]/g, \"\\\\$&\");\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, value].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return `var(${name}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVarDefinition(value, prefix = \"\") {\n return escape(`--${addPrefix(value, prefix)}`);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n const cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\n\n// ../../utilities/breakpoint-utils/src/breakpoint.ts\nimport { isObject as isObject3 } from \"@chakra-ui/shared-utils\";\nfunction getLastItem(array) {\n const length = array == null ? 0 : array.length;\n return length ? array[length - 1] : void 0;\n}\nfunction analyzeCSSValue2(value) {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n}\nfunction px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue2(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n}\nvar sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;\nvar sortBps = (breakpoints) => Object.fromEntries(Object.entries(breakpoints).sort(sortByBreakpointValue));\nfunction normalize(breakpoints) {\n const sorted = sortBps(breakpoints);\n return Object.assign(Object.values(sorted), sorted);\n}\nfunction keys(breakpoints) {\n const value = Object.keys(sortBps(breakpoints));\n return new Set(value);\n}\nfunction subtract2(value) {\n var _a;\n if (!value)\n return value;\n value = (_a = px(value)) != null ? _a : value;\n const OFFSET = -0.02;\n return typeof value === \"number\" ? `${value + OFFSET}` : value.replace(/(\\d+\\.?\\d*)/u, (m) => `${parseFloat(m) + OFFSET}`);\n}\nfunction toMediaQueryString(min, max) {\n const query = [\"@media screen\"];\n if (min)\n query.push(\"and\", `(min-width: ${px(min)})`);\n if (max)\n query.push(\"and\", `(max-width: ${px(max)})`);\n return query.join(\" \");\n}\nfunction analyzeBreakpoints(breakpoints) {\n var _a;\n if (!breakpoints)\n return null;\n breakpoints.base = (_a = breakpoints.base) != null ? _a : \"0px\";\n const normalized = normalize(breakpoints);\n const queries = Object.entries(breakpoints).sort(sortByBreakpointValue).map(([breakpoint, minW], index, entry) => {\n var _a2;\n let [, maxW] = (_a2 = entry[index + 1]) != null ? _a2 : [];\n maxW = parseFloat(maxW) > 0 ? subtract2(maxW) : void 0;\n return {\n _minW: subtract2(minW),\n breakpoint,\n minW,\n maxW,\n maxWQuery: toMediaQueryString(null, maxW),\n minWQuery: toMediaQueryString(minW),\n minMaxQuery: toMediaQueryString(minW, maxW)\n };\n });\n const _keys = keys(breakpoints);\n const _keysArr = Array.from(_keys.values());\n return {\n keys: _keys,\n normalized,\n isResponsive(test) {\n const keys2 = Object.keys(test);\n return keys2.length > 0 && keys2.every((key) => _keys.has(key));\n },\n asObject: sortBps(breakpoints),\n asArray: normalize(breakpoints),\n details: queries,\n get(key) {\n return queries.find((q) => q.breakpoint === key);\n },\n media: [\n null,\n ...normalized.map((minW) => toMediaQueryString(minW)).slice(1)\n ],\n toArrayValue(test) {\n if (!isObject3(test)) {\n throw new Error(\"toArrayValue: value must be an object\");\n }\n const result = _keysArr.map((bp) => {\n var _a2;\n return (_a2 = test[bp]) != null ? _a2 : null;\n });\n while (getLastItem(result) === null) {\n result.pop();\n }\n return result;\n },\n toObjectValue(test) {\n if (!Array.isArray(test)) {\n throw new Error(\"toObjectValue: value must be an array\");\n }\n return test.reduce((acc, value, index) => {\n const key = _keysArr[index];\n if (key != null && value != null)\n acc[key] = value;\n return acc;\n }, {});\n }\n };\n}\n\n// src/create-theme-vars/create-theme-vars.ts\nimport { isObject as isObject4 } from \"@chakra-ui/shared-utils\";\n\n// src/pseudos.ts\nvar state = {\n hover: (str, post) => `${str}:hover ${post}, ${str}[data-hover] ${post}`,\n focus: (str, post) => `${str}:focus ${post}, ${str}[data-focus] ${post}`,\n focusVisible: (str, post) => `${str}:focus-visible ${post}`,\n focusWithin: (str, post) => `${str}:focus-within ${post}`,\n active: (str, post) => `${str}:active ${post}, ${str}[data-active] ${post}`,\n disabled: (str, post) => `${str}:disabled ${post}, ${str}[data-disabled] ${post}`,\n invalid: (str, post) => `${str}:invalid ${post}, ${str}[data-invalid] ${post}`,\n checked: (str, post) => `${str}:checked ${post}, ${str}[data-checked] ${post}`,\n indeterminate: (str, post) => `${str}:indeterminate ${post}, ${str}[aria-checked=mixed] ${post}, ${str}[data-indeterminate] ${post}`,\n readOnly: (str, post) => `${str}:read-only ${post}, ${str}[readonly] ${post}, ${str}[data-read-only] ${post}`,\n expanded: (str, post) => `${str}:read-only ${post}, ${str}[aria-expanded=true] ${post}, ${str}[data-expanded] ${post}`,\n placeholderShown: (str, post) => `${str}:placeholder-shown ${post}`\n};\nvar toGroup = (fn) => merge((v) => fn(v, \"&\"), \"[role=group]\", \"[data-group]\", \".group\");\nvar toPeer = (fn) => merge((v) => fn(v, \"~ &\"), \"[data-peer]\", \".peer\");\nvar merge = (fn, ...selectors) => selectors.map(fn).join(\", \");\nvar pseudoSelectors = {\n _hover: \"&:hover, &[data-hover]\",\n _active: \"&:active, &[data-active]\",\n _focus: \"&:focus, &[data-focus]\",\n _highlighted: \"&[data-highlighted]\",\n _focusWithin: \"&:focus-within\",\n _focusVisible: \"&:focus-visible, &[data-focus-visible]\",\n _disabled: \"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]\",\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n _before: \"&::before\",\n _after: \"&::after\",\n _empty: \"&:empty\",\n _expanded: \"&[aria-expanded=true], &[data-expanded]\",\n _checked: \"&[aria-checked=true], &[data-checked]\",\n _grabbed: \"&[aria-grabbed=true], &[data-grabbed]\",\n _pressed: \"&[aria-pressed=true], &[data-pressed]\",\n _invalid: \"&[aria-invalid=true], &[data-invalid]\",\n _valid: \"&[data-valid], &[data-state=valid]\",\n _loading: \"&[data-loading], &[aria-busy=true]\",\n _selected: \"&[aria-selected=true], &[data-selected]\",\n _hidden: \"&[hidden], &[data-hidden]\",\n _autofill: \"&:-webkit-autofill\",\n _even: \"&:nth-of-type(even)\",\n _odd: \"&:nth-of-type(odd)\",\n _first: \"&:first-of-type\",\n _firstLetter: \"&::first-letter\",\n _last: \"&:last-of-type\",\n _notFirst: \"&:not(:first-of-type)\",\n _notLast: \"&:not(:last-of-type)\",\n _visited: \"&:visited\",\n _activeLink: \"&[aria-current=page]\",\n _activeStep: \"&[aria-current=step]\",\n _indeterminate: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n _groupHover: toGroup(state.hover),\n _peerHover: toPeer(state.hover),\n _groupFocus: toGroup(state.focus),\n _peerFocus: toPeer(state.focus),\n _groupFocusVisible: toGroup(state.focusVisible),\n _peerFocusVisible: toPeer(state.focusVisible),\n _groupActive: toGroup(state.active),\n _peerActive: toPeer(state.active),\n _groupDisabled: toGroup(state.disabled),\n _peerDisabled: toPeer(state.disabled),\n _groupInvalid: toGroup(state.invalid),\n _peerInvalid: toPeer(state.invalid),\n _groupChecked: toGroup(state.checked),\n _peerChecked: toPeer(state.checked),\n _groupFocusWithin: toGroup(state.focusWithin),\n _peerFocusWithin: toPeer(state.focusWithin),\n _peerPlaceholderShown: toPeer(state.placeholderShown),\n _placeholder: \"&::placeholder\",\n _placeholderShown: \"&:placeholder-shown\",\n _fullScreen: \"&:fullscreen\",\n _selection: \"&::selection\",\n _rtl: \"[dir=rtl] &, &[dir=rtl]\",\n _ltr: \"[dir=ltr] &, &[dir=ltr]\",\n _mediaDark: \"@media (prefers-color-scheme: dark)\",\n _mediaReduceMotion: \"@media (prefers-reduced-motion: reduce)\",\n _dark: \".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]\",\n _light: \".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]\"\n};\nvar pseudoPropNames = Object.keys(\n pseudoSelectors\n);\n\n// src/create-theme-vars/create-theme-vars.ts\nimport mergeWith from \"lodash.mergewith\";\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), void 0, prefix);\n}\nfunction createThemeVars(flatTokens, options) {\n let cssVars = {};\n const cssMap = {};\n for (const [token, tokenValue] of Object.entries(flatTokens)) {\n const { isSemantic, value } = tokenValue;\n const { variable, reference } = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix);\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n const keys2 = token.split(\".\");\n const [firstKey, ...referenceKeys] = keys2;\n const negativeLookupKey = `${firstKey}.-${referenceKeys.join(\".\")}`;\n const negativeValue = calc.negate(value);\n const negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n var: variable,\n varRef: negatedReference\n };\n }\n cssVars[variable] = value;\n cssMap[token] = {\n value,\n var: variable,\n varRef: reference\n };\n continue;\n }\n const lookupToken = (maybeToken) => {\n const scale = String(token).split(\".\")[0];\n const withScale = [scale, maybeToken].join(\".\");\n const resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue)\n return maybeToken;\n const { reference: reference2 } = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix);\n return reference2;\n };\n const normalizedValue = isObject4(value) ? value : { default: value };\n cssVars = mergeWith(\n cssVars,\n Object.entries(normalizedValue).reduce(\n (acc, [conditionAlias, conditionValue]) => {\n var _a, _b;\n const maybeReference = lookupToken(conditionValue);\n if (conditionAlias === \"default\") {\n acc[variable] = maybeReference;\n return acc;\n }\n const conditionSelector = (_b = (_a = pseudoSelectors) == null ? void 0 : _a[conditionAlias]) != null ? _b : conditionAlias;\n acc[conditionSelector] = { [variable]: maybeReference };\n return acc;\n },\n {}\n )\n );\n cssMap[token] = {\n value: reference,\n var: variable,\n varRef: reference\n };\n }\n return {\n cssVars,\n cssMap\n };\n}\n\n// ../../utilities/object-utils/src/index.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// src/create-theme-vars/theme-tokens.ts\nvar tokens = [\n \"colors\",\n \"borders\",\n \"borderWidths\",\n \"borderStyles\",\n \"fonts\",\n \"fontSizes\",\n \"fontWeights\",\n \"letterSpacings\",\n \"lineHeights\",\n \"radii\",\n \"space\",\n \"shadows\",\n \"sizes\",\n \"zIndices\",\n \"transition\",\n \"blur\",\n \"breakpoints\"\n];\nfunction extractTokens(theme) {\n const _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n const { __cssMap, __cssVars, __breakpoints, ...cleanTheme } = rawTheme;\n return cleanTheme;\n}\n\n// src/create-theme-vars/flatten-tokens.ts\nimport { isObject as isObject5 } from \"@chakra-ui/shared-utils\";\nfunction flattenTokens({\n tokens: tokens2,\n semanticTokens\n}) {\n var _a, _b;\n const tokenEntries = Object.entries((_a = flatten(tokens2)) != null ? _a : {}).map(\n ([token, value]) => {\n const enhancedToken = { isSemantic: false, value };\n return [token, enhancedToken];\n }\n );\n const semanticTokenEntries = Object.entries(\n (_b = flatten(semanticTokens, 1)) != null ? _b : {}\n ).map(([token, value]) => {\n const enhancedToken = { isSemantic: true, value };\n return [token, enhancedToken];\n });\n return Object.fromEntries([\n ...tokenEntries,\n ...semanticTokenEntries\n ]);\n}\nfunction flatten(target, maxDepth = Infinity) {\n if (!isObject5(target) && !Array.isArray(target) || !maxDepth) {\n return target;\n }\n return Object.entries(target).reduce((result, [key, value]) => {\n if (isObject5(value) || Array.isArray(value)) {\n Object.entries(flatten(value, maxDepth - 1)).forEach(\n ([childKey, childValue]) => {\n result[`${key}.${childKey}`] = childValue;\n }\n );\n } else {\n result[key] = value;\n }\n return result;\n }, {});\n}\n\n// src/create-theme-vars/to-css-var.ts\nfunction toCSSVar(rawTheme) {\n var _a;\n const theme = omitVars(rawTheme);\n const tokens2 = extractTokens(theme);\n const semanticTokens = extractSemanticTokens(theme);\n const flatTokens = flattenTokens({ tokens: tokens2, semanticTokens });\n const cssVarPrefix = (_a = theme.config) == null ? void 0 : _a.cssVarPrefix;\n const {\n cssMap,\n cssVars\n } = createThemeVars(flatTokens, { cssVarPrefix });\n const defaultCssVars = {\n \"--chakra-ring-inset\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-ring-offset-width\": \"0px\",\n \"--chakra-ring-offset-color\": \"#fff\",\n \"--chakra-ring-color\": \"rgba(66, 153, 225, 0.6)\",\n \"--chakra-ring-offset-shadow\": \"0 0 #0000\",\n \"--chakra-ring-shadow\": \"0 0 #0000\",\n \"--chakra-space-x-reverse\": \"0\",\n \"--chakra-space-y-reverse\": \"0\"\n };\n Object.assign(theme, {\n __cssVars: { ...defaultCssVars, ...cssVars },\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\n// src/css.ts\nimport { isObject as isObject7, runIfFn as runIfFn2 } from \"@chakra-ui/shared-utils\";\nimport mergeWith3 from \"lodash.mergewith\";\n\n// src/system.ts\nimport mergeWith2 from \"lodash.mergewith\";\nvar systemProps = mergeWith2(\n {},\n background,\n border,\n color,\n flexbox,\n layout,\n filter,\n ring,\n interactivity,\n grid,\n others,\n position,\n effect,\n space,\n scroll,\n typography,\n textDecoration,\n transform,\n list,\n transition\n);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = Object.keys(\n layoutSystem\n);\nvar propNames = [...Object.keys(systemProps), ...pseudoPropNames];\nvar styleProps = { ...systemProps, ...pseudoSelectors };\nvar isStyleProp = (prop) => prop in styleProps;\n\n// src/utils/expand-responsive.ts\nimport { isObject as isObject6, runIfFn } from \"@chakra-ui/shared-utils\";\nvar expandResponsive = (styles) => (theme) => {\n if (!theme.__breakpoints)\n return styles;\n const { isResponsive, toArrayValue, media: medias } = theme.__breakpoints;\n const computedStyles = {};\n for (const key in styles) {\n let value = runIfFn(styles[key], theme);\n if (value == null)\n continue;\n value = isObject6(value) && isResponsive(value) ? toArrayValue(value) : value;\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n const queries = value.slice(0, medias.length).length;\n for (let index = 0; index < queries; index += 1) {\n const media = medias == null ? void 0 : medias[index];\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n computedStyles[media] = computedStyles[media] || {};\n if (value[index] == null) {\n continue;\n }\n computedStyles[media][key] = value[index];\n }\n }\n return computedStyles;\n};\n\n// src/utils/split-by-comma.ts\nfunction splitByComma(value) {\n const chunks = [];\n let chunk = \"\";\n let inParens = false;\n for (let i = 0; i < value.length; i++) {\n const char = value[i];\n if (char === \"(\") {\n inParens = true;\n chunk += char;\n } else if (char === \")\") {\n inParens = false;\n chunk += char;\n } else if (char === \",\" && !inParens) {\n chunks.push(chunk);\n chunk = \"\";\n } else {\n chunk += char;\n }\n }\n chunk = chunk.trim();\n if (chunk) {\n chunks.push(chunk);\n }\n return chunks;\n}\n\n// src/css.ts\nfunction isCssVar2(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar isCSSVariableTokenValue = (key, value) => key.startsWith(\"--\") && typeof value === \"string\" && !isCssVar2(value);\nvar resolveTokenValue = (theme, value) => {\n var _a, _b;\n if (value == null)\n return value;\n const getVar = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.varRef;\n };\n const getValue = (val) => {\n var _a2;\n return (_a2 = getVar(val)) != null ? _a2 : val;\n };\n const [tokenValue, fallbackValue] = splitByComma(value);\n value = (_b = (_a = getVar(tokenValue)) != null ? _a : getValue(fallbackValue)) != null ? _b : getValue(value);\n return value;\n};\nfunction getCss(options) {\n const { configs = {}, pseudos = {}, theme } = options;\n const css2 = (stylesOrFn, nested = false) => {\n var _a, _b, _c;\n const _styles = runIfFn2(stylesOrFn, theme);\n const styles = expandResponsive(_styles)(theme);\n let computedStyles = {};\n for (let key in styles) {\n const valueOrFn = styles[key];\n let value = runIfFn2(valueOrFn, theme);\n if (key in pseudos) {\n key = pseudos[key];\n }\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n let config = configs[key];\n if (config === true) {\n config = { property: key };\n }\n if (isObject7(value)) {\n computedStyles[key] = (_a = computedStyles[key]) != null ? _a : {};\n computedStyles[key] = mergeWith3(\n {},\n computedStyles[key],\n css2(value, true)\n );\n continue;\n }\n let rawValue = (_c = (_b = config == null ? void 0 : config.transform) == null ? void 0 : _b.call(config, value, theme, _styles)) != null ? _c : value;\n rawValue = (config == null ? void 0 : config.processResult) ? css2(rawValue, true) : rawValue;\n const configProperty = runIfFn2(config == null ? void 0 : config.property, theme);\n if (!nested && (config == null ? void 0 : config.static)) {\n const staticStyles = runIfFn2(config.static, theme);\n computedStyles = mergeWith3({}, computedStyles, staticStyles);\n }\n if (configProperty && Array.isArray(configProperty)) {\n for (const property of configProperty) {\n computedStyles[property] = rawValue;\n }\n continue;\n }\n if (configProperty) {\n if (configProperty === \"&\" && isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n continue;\n }\n if (isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n continue;\n }\n computedStyles[key] = rawValue;\n }\n return computedStyles;\n };\n return css2;\n}\nvar css = (styles) => (theme) => {\n const cssFn = getCss({\n theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n};\n\n// src/define-styles.ts\nfunction defineStyle(styles) {\n return styles;\n}\nfunction defineStyleConfig(config) {\n return config;\n}\nfunction createMultiStyleConfigHelpers(parts) {\n return {\n definePartsStyle(config) {\n return config;\n },\n defineMultiStyleConfig(config) {\n return { parts, ...config };\n }\n };\n}\n\n// src/style-config.ts\nimport { runIfFn as runIfFn3, isObject as isObject8 } from \"@chakra-ui/shared-utils\";\nimport mergeWith4 from \"lodash.mergewith\";\nfunction normalize2(value, toArray) {\n if (Array.isArray(value))\n return value;\n if (isObject8(value))\n return toArray(value);\n if (value != null)\n return [value];\n}\nfunction getNextIndex(values, i) {\n for (let j = i + 1; j < values.length; j++) {\n if (values[j] != null)\n return j;\n }\n return -1;\n}\nfunction createResolver(theme) {\n const breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n var _a, _b;\n if (!breakpointUtil)\n return;\n const result = {};\n const normalized = normalize2(value, breakpointUtil.toArrayValue);\n if (!normalized)\n return result;\n const len = normalized.length;\n const isSingle = len === 1;\n const isMultipart = !!config.parts;\n for (let i = 0; i < len; i++) {\n const key = breakpointUtil.details[i];\n const nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n const query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n const styles = runIfFn3((_a = config[prop]) == null ? void 0 : _a[normalized[i]], props);\n if (!styles)\n continue;\n if (isMultipart) {\n (_b = config.parts) == null ? void 0 : _b.forEach((part) => {\n mergeWith4(result, {\n [part]: isSingle ? styles[part] : { [query]: styles[part] }\n });\n });\n continue;\n }\n if (!isMultipart) {\n if (isSingle)\n mergeWith4(result, styles);\n else\n result[query] = styles;\n continue;\n }\n result[query] = styles;\n }\n return result;\n };\n}\nfunction resolveStyleConfig(config) {\n return (props) => {\n var _a;\n const { variant, size, theme } = props;\n const recipe = createResolver(theme);\n return mergeWith4(\n {},\n runIfFn3((_a = config.baseStyle) != null ? _a : {}, props),\n recipe(config, \"sizes\", size, props),\n recipe(config, \"variants\", variant, props)\n );\n };\n}\n\n// src/get-css-var.ts\nfunction getCSSVar(theme, scale, value) {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n}\n\n// src/theming-props.ts\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\nexport {\n addPrefix,\n background,\n border,\n calc,\n color,\n createMultiStyleConfigHelpers,\n css,\n cssVar,\n defineStyle,\n defineStyleConfig,\n effect,\n filter,\n flatten,\n flattenTokens,\n flexbox,\n getCSSVar,\n getCss,\n grid,\n interactivity,\n isStyleProp,\n layout,\n layoutPropNames,\n list,\n omitThemingProps,\n others,\n position,\n propNames,\n pseudoPropNames,\n pseudoSelectors,\n resolveStyleConfig,\n ring,\n scroll,\n space,\n systemProps,\n textDecoration,\n toCSSVar,\n toVarDefinition,\n toVarReference,\n tokenToCSSVar,\n transform,\n transition,\n typography\n};\n","import {\n useChakra\n} from \"./chunk-7V3ZYTH7.mjs\";\n\n// src/use-style-config.ts\nimport {\n resolveStyleConfig\n} from \"@chakra-ui/styled-system\";\nimport { mergeThemeOverride } from \"@chakra-ui/theme-utils\";\nimport {\n filterUndefined,\n memoizedGet as get,\n mergeWith,\n omit\n} from \"@chakra-ui/utils\";\nimport { useRef } from \"react\";\nimport isEqual from \"react-fast-compare\";\nfunction useStyleConfigImpl(themeKey, props = {}) {\n var _a;\n const { styleConfig: styleConfigProp, ...rest } = props;\n const { theme, colorMode } = useChakra();\n const themeStyleConfig = themeKey ? get(theme, `components.${themeKey}`) : void 0;\n const styleConfig = styleConfigProp || themeStyleConfig;\n const mergedProps = mergeWith(\n { theme, colorMode },\n (_a = styleConfig == null ? void 0 : styleConfig.defaultProps) != null ? _a : {},\n filterUndefined(omit(rest, [\"children\"]))\n );\n const stylesRef = useRef({});\n if (styleConfig) {\n const getStyles = resolveStyleConfig(styleConfig);\n const styles = getStyles(mergedProps);\n const isStyleEqual = isEqual(stylesRef.current, styles);\n if (!isStyleEqual) {\n stylesRef.current = styles;\n }\n }\n return stylesRef.current;\n}\nfunction useStyleConfig(themeKey, props = {}) {\n return useStyleConfigImpl(themeKey, props);\n}\nfunction useMultiStyleConfig(themeKey, props = {}) {\n return useStyleConfigImpl(themeKey, props);\n}\nfunction useComponentStyles__unstable(themeKey, props) {\n var _a;\n const { baseConfig, ...restProps } = props;\n const { theme } = useChakra();\n const overrides = (_a = theme.components) == null ? void 0 : _a[themeKey];\n const styleConfig = overrides ? mergeThemeOverride(overrides, baseConfig) : baseConfig;\n return useStyleConfigImpl(null, {\n ...restProps,\n styleConfig\n });\n}\n\nexport {\n useStyleConfig,\n useMultiStyleConfig,\n useComponentStyles__unstable\n};\n","// src/should-forward-prop.ts\nimport { propNames } from \"@chakra-ui/styled-system\";\nvar allPropNames = /* @__PURE__ */ new Set([\n ...propNames,\n \"textStyle\",\n \"layerStyle\",\n \"apply\",\n \"noOfLines\",\n \"focusBorderColor\",\n \"errorBorderColor\",\n \"as\",\n \"__css\",\n \"css\",\n \"sx\"\n]);\nvar validHTMLProps = /* @__PURE__ */ new Set([\n \"htmlWidth\",\n \"htmlHeight\",\n \"htmlSize\",\n \"htmlTranslate\"\n]);\nfunction shouldForwardProp(prop) {\n return validHTMLProps.has(prop) || !allPropNames.has(prop);\n}\n\nexport {\n shouldForwardProp\n};\n","import {\n shouldForwardProp\n} from \"./chunk-NAGWYFCH.mjs\";\n\n// src/system.ts\nimport { useColorMode } from \"@chakra-ui/color-mode\";\nimport {\n css,\n isStyleProp\n} from \"@chakra-ui/styled-system\";\nimport { filterUndefined, objectFilter, runIfFn } from \"@chakra-ui/utils\";\nimport { assignAfter } from \"@chakra-ui/object-utils\";\nimport createStyled from \"@emotion/styled\";\nimport React from \"react\";\nvar _a;\nvar emotion_styled = (_a = createStyled.default) != null ? _a : createStyled;\nvar toCSSObject = ({ baseStyle }) => (props) => {\n const { theme, css: cssProp, __css, sx, ...rest } = props;\n const styleProps = objectFilter(rest, (_, prop) => isStyleProp(prop));\n const finalBaseStyle = runIfFn(baseStyle, props);\n const finalStyles = assignAfter(\n {},\n __css,\n finalBaseStyle,\n filterUndefined(styleProps),\n sx\n );\n const computedCSS = css(finalStyles)(props.theme);\n return cssProp ? [computedCSS, cssProp] : computedCSS;\n};\nfunction styled(component, options) {\n const { baseStyle, ...styledOptions } = options != null ? options : {};\n if (!styledOptions.shouldForwardProp) {\n styledOptions.shouldForwardProp = shouldForwardProp;\n }\n const styleObject = toCSSObject({ baseStyle });\n const Component = emotion_styled(\n component,\n styledOptions\n )(styleObject);\n const chakraComponent = React.forwardRef(function ChakraComponent(props, ref) {\n const { colorMode, forced } = useColorMode();\n return React.createElement(Component, {\n ref,\n \"data-theme\": forced ? colorMode : void 0,\n ...props\n });\n });\n return chakraComponent;\n}\n\nexport {\n toCSSObject,\n styled\n};\n","// src/index.ts\nfunction compact(object) {\n const clone = Object.assign({}, object);\n for (let key in clone) {\n if (clone[key] === void 0)\n delete clone[key];\n }\n return clone;\n}\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\nfunction split(object, keys) {\n const picked = {};\n const omitted = {};\n for (const [key, value] of Object.entries(object)) {\n if (keys.includes(key))\n picked[key] = value;\n else\n omitted[key] = value;\n }\n return [picked, omitted];\n}\nfunction assignAfter(target, ...sources) {\n if (target == null) {\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n const result = { ...target };\n for (const nextSource of sources) {\n if (nextSource == null)\n continue;\n for (const nextKey in nextSource) {\n if (!Object.prototype.hasOwnProperty.call(nextSource, nextKey))\n continue;\n if (nextKey in result)\n delete result[nextKey];\n result[nextKey] = nextSource[nextKey];\n }\n }\n return result;\n}\nexport {\n assignAfter,\n compact,\n omit,\n pick,\n split\n};\n","import {\n styled\n} from \"./chunk-E32MZNBA.mjs\";\n\n// src/factory.ts\nfunction factory() {\n const cache = /* @__PURE__ */ new Map();\n return new Proxy(styled, {\n apply(target, thisArg, argArray) {\n return styled(...argArray);\n },\n get(_, element) {\n if (!cache.has(element)) {\n cache.set(element, styled(element));\n }\n return cache.get(element);\n }\n });\n}\nvar chakra = factory();\n\nexport {\n chakra\n};\n","// src/forward-ref.tsx\nimport { forwardRef as forwardReactRef } from \"react\";\nfunction forwardRef(component) {\n return forwardReactRef(component);\n}\n\nexport {\n forwardRef\n};\n","import {\n useComponentStyles__unstable,\n useMultiStyleConfig,\n useStyleConfig\n} from \"./chunk-T2VHL7RE.mjs\";\nimport {\n chakra\n} from \"./chunk-3LE6AY5Q.mjs\";\nimport {\n forwardRef\n} from \"./chunk-QEVFQ4EU.mjs\";\nimport {\n getToken,\n useChakra,\n useToken\n} from \"./chunk-7V3ZYTH7.mjs\";\nimport {\n useTheme\n} from \"./chunk-NLMMK76H.mjs\";\nimport {\n CSSVars,\n GlobalStyle,\n StylesProvider,\n ThemeProvider,\n createStylesContext,\n useStyles\n} from \"./chunk-3ZTTLJBV.mjs\";\nimport {\n styled,\n toCSSObject\n} from \"./chunk-E32MZNBA.mjs\";\nimport {\n shouldForwardProp\n} from \"./chunk-NAGWYFCH.mjs\";\nimport \"./chunk-WBEJV2FA.mjs\";\n\n// src/index.ts\nexport * from \"@chakra-ui/color-mode\";\nexport * from \"@chakra-ui/styled-system\";\nimport { keyframes } from \"@emotion/react\";\nexport {\n CSSVars,\n GlobalStyle,\n StylesProvider,\n ThemeProvider,\n chakra,\n createStylesContext,\n forwardRef,\n getToken,\n keyframes,\n shouldForwardProp,\n styled,\n toCSSObject,\n useChakra,\n useComponentStyles__unstable,\n useMultiStyleConfig,\n useStyleConfig,\n useStyles,\n useTheme,\n useToken\n};\n","// src/icon.tsx\nimport {\n chakra,\n forwardRef,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar fallbackIcon = {\n path: /* @__PURE__ */ jsxs(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", children: [\n /* @__PURE__ */ jsx(\n \"path\",\n {\n strokeLinecap: \"round\",\n fill: \"none\",\n d: \"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n strokeLinecap: \"round\",\n d: \"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0\"\n }\n ),\n /* @__PURE__ */ jsx(\"circle\", { fill: \"none\", strokeMiterlimit: \"10\", cx: \"12\", cy: \"12\", r: \"11.25\" })\n ] }),\n viewBox: \"0 0 24 24\"\n};\nvar Icon = forwardRef((props, ref) => {\n const {\n as: element,\n viewBox,\n color = \"currentColor\",\n focusable = false,\n children,\n className,\n __css,\n ...rest\n } = props;\n const _className = cx(\"chakra-icon\", className);\n const customStyles = useStyleConfig(\"Icon\", props);\n const styles = {\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color,\n ...__css,\n ...customStyles\n };\n const shared = {\n ref,\n focusable,\n className: _className,\n __css: styles\n };\n const _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;\n if (element && typeof element !== \"string\") {\n return /* @__PURE__ */ jsx(chakra.svg, { as: element, ...shared, ...rest });\n }\n const _path = children != null ? children : fallbackIcon.path;\n return /* @__PURE__ */ jsx(chakra.svg, { verticalAlign: \"middle\", viewBox: _viewBox, ...shared, ...rest, children: _path });\n});\nIcon.displayName = \"Icon\";\nvar icon_default = Icon;\n\nexport {\n Icon,\n icon_default\n};\n","import {\n Icon\n} from \"./chunk-DKFDJSXF.mjs\";\n\n// src/create-icon.tsx\nimport { forwardRef } from \"@chakra-ui/system\";\nimport { Children } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createIcon(options) {\n const {\n viewBox = \"0 0 24 24\",\n d: pathDefinition,\n displayName,\n defaultProps = {}\n } = options;\n const path = Children.toArray(options.path);\n const Comp = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, viewBox, ...defaultProps, ...props, children: path.length ? path : /* @__PURE__ */ jsx(\"path\", { fill: \"currentColor\", d: pathDefinition }) }));\n Comp.displayName = displayName;\n return Comp;\n}\n\nexport {\n createIcon\n};\n","// src/ViewOff.tsx\nimport { createIcon } from \"@chakra-ui/icon\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ViewOffIcon = createIcon({\n displayName: \"ViewOffIcon\",\n path: /* @__PURE__ */ jsxs(\"g\", { fill: \"currentColor\", children: [\n /* @__PURE__ */ jsx(\"path\", { d: \"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z\" }),\n /* @__PURE__ */ jsx(\"path\", { d: \"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z\" })\n ] })\n});\n\nexport {\n ViewOffIcon\n};\n","// src/View.tsx\nimport { createIcon } from \"@chakra-ui/icon\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ViewIcon = createIcon({\n displayName: \"ViewIcon\",\n path: /* @__PURE__ */ jsxs(\"g\", { fill: \"currentColor\", children: [\n /* @__PURE__ */ jsx(\"path\", { d: \"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z\" }),\n /* @__PURE__ */ jsx(\"circle\", { cx: \"12\", cy: \"12\", r: \"2\" })\n ] })\n});\n\nexport {\n ViewIcon\n};\n","// src/Minus.tsx\nimport { createIcon } from \"@chakra-ui/icon\";\nimport { jsx } from \"react/jsx-runtime\";\nvar MinusIcon = createIcon({\n displayName: \"MinusIcon\",\n path: /* @__PURE__ */ jsx(\"g\", { fill: \"currentColor\", children: /* @__PURE__ */ jsx(\"rect\", { height: \"4\", width: \"20\", x: \"2\", y: \"10\" }) })\n});\n\nexport {\n MinusIcon\n};\n","// src/Add.tsx\nimport { createIcon } from \"@chakra-ui/icon\";\nvar AddIcon = createIcon({\n d: \"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z\",\n displayName: \"AddIcon\"\n});\n\nexport {\n AddIcon\n};\n","import * as React from 'react'\n\nimport {\n Button,\n ButtonProps,\n forwardRef,\n InputRightElement,\n} from '@chakra-ui/react'\n\nexport type InputRightButtonProps = ButtonProps\n\nexport const InputRightButton = forwardRef<InputRightButtonProps, 'div'>(\n (props, ref) => {\n return (\n <InputRightElement w=\"auto\" px=\"1\" py=\"1\" alignItems=\"stretch\">\n <Button ref={ref} height=\"auto\" {...props} />\n </InputRightElement>\n )\n }\n)\n\nInputRightButton.id = 'InputRightElement'\n\nInputRightButton.displayName = 'InputRightButton'\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Stack,\n RadioGroup,\n RadioGroupProps,\n Radio,\n RadioProps,\n SystemProps,\n StackDirection,\n} from '@chakra-ui/react'\nimport { FieldOptions, FieldOption } from '../types'\nimport { mapOptions } from '../utils'\n\nexport interface RadioOption\n extends Omit<RadioProps, 'value' | 'label'>,\n FieldOption {}\n\nexport type RadioOptions = FieldOptions<RadioOption>\n\ninterface RadioInputOptions {\n options: RadioOptions\n spacing?: SystemProps['margin']\n direction?: StackDirection\n}\n\nexport interface RadioInputProps\n extends Omit<RadioGroupProps, 'children'>,\n RadioInputOptions {}\n\nexport const RadioInput = forwardRef<RadioInputProps, 'div'>(\n ({ options: optionsProp, spacing, direction, ...props }, ref) => {\n const { onBlur, onChange, ...groupProps } = props\n\n const options = mapOptions(optionsProp)\n\n return (\n <RadioGroup onChange={onChange} {...groupProps}>\n <Stack spacing={spacing} direction={direction}>\n {options.map(({ value, label, ...radioProps }, i) => {\n return (\n <Radio\n key={i}\n onBlur={onBlur}\n value={value}\n ref={ref}\n {...radioProps}\n >\n {label || value}\n </Radio>\n )\n })}\n </Stack>\n </RadioGroup>\n )\n }\n)\n\nRadioInput.displayName = 'RadioInput'\n","import * as React from 'react'\nimport { FieldOption, FieldOptions } from './types'\n\nexport const mapNestedFields = (name: string, children: React.ReactNode) => {\n return React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child.props.name) {\n return React.cloneElement(child, {\n ...child.props,\n name: `${name}.${child.props.name}`,\n })\n }\n return child\n })\n}\n\nexport const mapOptions = <TOption extends FieldOption = FieldOption>(\n options: FieldOptions<TOption>\n) => {\n return options.map((option) => {\n if (typeof option === 'string') {\n return {\n label: option,\n value: option,\n }\n }\n return option\n })\n}\n","import * as React from 'react'\n\nimport {\n chakra,\n forwardRef,\n Menu,\n MenuProps,\n MenuButton,\n MenuList,\n MenuListProps,\n MenuItemOption,\n MenuOptionGroup,\n MenuOptionGroupProps,\n Button,\n ButtonProps,\n omitThemingProps,\n useMultiStyleConfig,\n SystemStyleObject,\n useFormControl,\n HTMLChakraProps,\n MenuItemOptionProps,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\nimport { ChevronDownIcon } from '@saas-ui/core'\n\nimport { FieldOptions, FieldOption } from '../types'\nimport { mapOptions } from '../utils'\n\nexport interface SelectOption\n extends Omit<MenuItemOptionProps, 'value'>,\n FieldOption {}\n\ninterface SelectOptions {\n /**\n * An array of options\n * If you leave this empty the children prop will be rendered.\n */\n options?: FieldOptions<SelectOption>\n /**\n * Props passed to the MenuList.\n */\n menuListProps?: MenuListProps\n /**\n * Customize how the value is rendered.\n * @type (value?: string[]) => React.ReactElement\n */\n renderValue?: (value?: string[]) => React.ReactElement | undefined\n /**\n * Enable multiple select.\n */\n multiple?: boolean\n}\n\nexport interface SelectProps\n extends Omit<MenuProps, 'children'>,\n Pick<ButtonProps, 'isDisabled' | 'leftIcon' | 'rightIcon'>,\n Pick<MenuOptionGroupProps, 'onChange'>,\n SelectOptions {}\n\nconst SelectButton = forwardRef((props, ref) => {\n const styles = useMultiStyleConfig('Input', props)\n\n /* @ts-ignore */\n const focusStyles = styles.field._focusVisible\n\n const height = styles.field.h || styles.field.height\n\n const buttonStyles: SystemStyleObject = {\n fontWeight: 'normal',\n textAlign: 'left',\n color: 'inherit',\n _active: {\n bg: 'transparent',\n },\n minH: height,\n _focus: focusStyles,\n _expanded: focusStyles,\n ...styles.field,\n h: 'auto',\n }\n\n // Using a Button, so we can simply use leftIcon and rightIcon\n return <MenuButton as={Button} {...props} ref={ref} sx={buttonStyles} />\n})\n\nSelectButton.displayName = 'SelectButton'\n\nexport const Select = forwardRef<SelectProps, 'select'>((props, ref) => {\n const {\n name,\n options: optionsProp,\n children,\n onChange,\n defaultValue,\n value,\n placeholder,\n isDisabled,\n leftIcon,\n rightIcon = <ChevronDownIcon />,\n multiple,\n size,\n variant,\n menuListProps,\n renderValue = (value) => value?.join(', '),\n ...rest\n } = props\n const menuProps = omitThemingProps(rest)\n\n const [currentValue, setCurrentValue] = React.useState(value || defaultValue)\n\n const controlProps = useFormControl({ name } as HTMLChakraProps<'input'>)\n\n const options = React.useMemo(\n () => optionsProp && mapOptions(optionsProp),\n [optionsProp]\n )\n\n const handleChange = (value: string | string[]) => {\n setCurrentValue(value)\n onChange?.(value)\n }\n\n const buttonProps = {\n isDisabled,\n leftIcon,\n rightIcon,\n size,\n variant,\n }\n\n const getDisplayValue = React.useCallback(\n (value: string) => {\n if (!options) {\n return value\n }\n\n for (const option of options) {\n if (option.label && option.value === value) {\n return option.label\n }\n }\n\n return value\n },\n [options]\n )\n\n const displayValue = currentValue\n ? (Array.isArray(currentValue) ? currentValue : [currentValue]).map(\n getDisplayValue\n )\n : []\n\n return (\n <Menu {...menuProps} closeOnSelect={!multiple}>\n <chakra.div className={cx('sui-select')}>\n <SelectButton ref={ref} {...buttonProps}>\n {renderValue(displayValue) || placeholder}\n </SelectButton>\n <MenuList maxH=\"60vh\" overflowY=\"auto\" {...menuListProps}>\n <MenuOptionGroup\n defaultValue={\n (defaultValue || value) as string | string[] | undefined\n }\n onChange={handleChange}\n type={multiple ? 'checkbox' : 'radio'}\n >\n {options\n ? options.map(({ value, label, ...rest }, i) => (\n <MenuItemOption key={i} value={value} {...rest}>\n {label || value}\n </MenuItemOption>\n ))\n : children}\n </MenuOptionGroup>\n </MenuList>\n <chakra.input\n {...controlProps}\n name={name}\n type=\"hidden\"\n value={currentValue}\n className=\"saas-select__input\"\n />\n </chakra.div>\n </Menu>\n )\n})\n\nSelect.displayName = 'Select'\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Select as ChakraSelect,\n SelectProps as ChakraSelectProps,\n} from '@chakra-ui/react'\n\ninterface Option {\n value: string\n label?: string\n}\n\ninterface NativeSelectOptions {\n options?: Option[]\n}\n\nexport interface NativeSelectProps\n extends ChakraSelectProps,\n NativeSelectOptions {}\n\nexport const NativeSelect = forwardRef<NativeSelectProps, 'select'>(\n ({ options, children, ...props }, ref) => {\n return (\n <ChakraSelect ref={ref} {...props}>\n {children ||\n options?.map(({ value, label }) => {\n return (\n <option key={value} value={value}>\n {label || value}\n </option>\n )\n })}\n </ChakraSelect>\n )\n }\n)\n\nNativeSelect.displayName = 'NativeSelect'\n","import * as React from 'react'\nimport { useFormContext, Controller } from 'react-hook-form'\n\nimport { forwardRef, useMergeRefs } from '@chakra-ui/react'\nimport { callAllHandlers } from '@chakra-ui/utils'\nimport { BaseFieldProps, FieldProps } from './types'\nimport { BaseField } from './base-field'\n\ninterface CreateFieldProps {\n displayName: string\n hideLabel?: boolean\n BaseField: React.FC<any>\n}\n\nconst _createField = (\n InputComponent: React.FC<any>,\n { displayName, hideLabel, BaseField }: CreateFieldProps\n) => {\n const Field = forwardRef((props, ref) => {\n const {\n id,\n name,\n label,\n help,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n rules,\n ...inputProps\n } = props\n\n const inputRules = {\n required: isRequired,\n ...rules,\n }\n\n return (\n <BaseField\n id={id}\n name={name}\n label={label}\n help={help}\n hideLabel={hideLabel}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n >\n <InputComponent\n ref={ref}\n id={id}\n name={name}\n label={hideLabel ? label : undefined} // Only pass down the label when it should be inline.\n rules={inputRules}\n {...inputProps}\n />\n </BaseField>\n )\n })\n Field.displayName = displayName\n\n return Field\n}\n\nconst withControlledInput = (InputComponent: React.FC<any>) => {\n return forwardRef<FieldProps, typeof InputComponent>(\n ({ name, rules, ...inputProps }, ref) => {\n const { control } = useFormContext()\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref: _ref, ...field } }) => (\n <InputComponent\n {...field}\n {...inputProps}\n onChange={callAllHandlers(inputProps.onChange, field.onChange)}\n onBlur={callAllHandlers(inputProps.onBlur, field.onBlur)}\n ref={useMergeRefs(ref, _ref)}\n />\n )}\n />\n )\n }\n )\n}\n\nconst withUncontrolledInput = (InputComponent: React.FC<any>) => {\n return forwardRef<FieldProps, typeof InputComponent>(\n ({ name, rules, ...inputProps }, ref) => {\n const { register } = useFormContext()\n\n const { ref: _ref, ...field } = register(name, rules)\n\n return (\n <InputComponent\n {...field}\n {...inputProps}\n onChange={callAllHandlers(inputProps.onChange, field.onChange)}\n onBlur={callAllHandlers(inputProps.onBlur, field.onBlur)}\n ref={useMergeRefs(ref, _ref)}\n />\n )\n }\n )\n}\n\nexport interface CreateFieldOptions {\n isControlled?: boolean\n hideLabel?: boolean\n BaseField?: React.FC<any>\n}\n\n/**\n * Register a new field type\n * @param type The name for this field in kebab-case, eg `email` or `array-field`\n * @param component The React component\n * @param options\n * @param options.isControlled Set this to true if this is a controlled field.\n * @param options.hideLabel Hide the field label, for example for the checkbox field.\n */\nexport const createField = <TProps extends object>(\n component: React.FC<TProps>,\n options?: CreateFieldOptions\n) => {\n let InputComponent\n if (options?.isControlled) {\n InputComponent = withControlledInput(component)\n } else {\n InputComponent = withUncontrolledInput(component)\n }\n\n const Field = _createField(InputComponent, {\n displayName: `${component.displayName ?? 'Custom'}Field`,\n hideLabel: options?.hideLabel,\n BaseField: options?.BaseField || BaseField,\n }) as React.FC<TProps & BaseFieldProps>\n\n return Field\n}\n","import * as React from 'react'\nimport {\n useFormContext,\n FormState,\n get,\n RegisterOptions,\n FieldValues,\n} from 'react-hook-form'\n\nimport {\n Box,\n FormControl,\n FormLabel,\n FormHelperText,\n FormErrorMessage,\n} from '@chakra-ui/react'\nimport { FocusableElement } from '@chakra-ui/utils'\nimport { useField } from './fields-context'\nimport { BaseFieldProps, FieldProps } from './types'\n\nconst getError = (name: string, formState: FormState<{ [x: string]: any }>) => {\n return get(formState.errors, name)\n}\n\nconst isTouched = (\n name: string,\n formState: FormState<{ [x: string]: any }>\n) => {\n return get(formState.touchedFields, name)\n}\n\n/**\n * The default BaseField component\n * Composes the Chakra UI FormControl component, with FormLabel, FormHelperText and FormErrorMessage.\n */\nexport const BaseField: React.FC<BaseFieldProps> = (props) => {\n const { name, label, help, hideLabel, children, ...controlProps } = props\n\n const { formState } = useFormContext()\n\n const error = getError(name, formState)\n\n return (\n <FormControl {...controlProps} isInvalid={!!error}>\n {label && !hideLabel ? <FormLabel>{label}</FormLabel> : null}\n <Box>\n {children}\n {help && !error?.message ? (\n <FormHelperText>{help}</FormHelperText>\n ) : null}\n {error?.message && (\n <FormErrorMessage>{error?.message}</FormErrorMessage>\n )}\n </Box>\n </FormControl>\n )\n}\n\nBaseField.displayName = 'BaseField'\n","import * as React from 'react'\n\nimport { Form } from './form'\nimport { FormLayout } from './layout'\nimport { BaseFieldProps } from './types'\nimport { Field } from './field'\n\nimport { ArrayField } from './array-field'\nimport { ObjectField } from './object-field'\nimport { FieldResolver } from './field-resolver'\nimport { useFormContext } from 'react-hook-form'\n\nexport interface FieldsProps {\n schema: any\n fieldResolver?: FieldResolver\n focusFirstField?: boolean\n}\n\nconst mapNestedFields = (resolver: FieldResolver, name: string) => {\n return resolver\n .getNestedFields(name)\n ?.map(\n (\n { name, type, ...nestedFieldProps }: BaseFieldProps,\n i\n ): React.ReactNode => (\n <Field\n key={name || i}\n name={name}\n type={type as any}\n {...nestedFieldProps}\n />\n )\n )\n}\n\nexport const AutoFields: React.FC<FieldsProps> = ({\n schema,\n fieldResolver,\n focusFirstField,\n ...props\n}) => {\n const resolver = React.useMemo(\n () => fieldResolver || Form.getFieldResolver(schema),\n [schema, fieldResolver]\n )\n\n const fields = React.useMemo(() => resolver.getFields(), [resolver])\n\n const form = useFormContext()\n\n React.useEffect(() => {\n if (focusFirstField && fields[0]?.name) {\n form.setFocus(fields[0].name)\n }\n }, [schema, fieldResolver, focusFirstField])\n\n return (\n <FormLayout {...props}>\n {fields.map(\n ({\n name,\n type,\n defaultValue,\n ...fieldProps\n }: BaseFieldProps): React.ReactNode => {\n if (type === 'array') {\n return (\n <ArrayField key={name} name={name} {...fieldProps}>\n {mapNestedFields(resolver, name)}\n </ArrayField>\n )\n } else if (type === 'object') {\n return (\n <ObjectField key={name} name={name} {...fieldProps}>\n {mapNestedFields(resolver, name)}\n </ObjectField>\n )\n }\n\n return (\n <Field key={name} name={name} type={type as any} {...fieldProps} />\n )\n }\n )}\n </FormLayout>\n )\n}\n\nAutoFields.displayName = 'Fields'\n","import * as React from 'react'\n\nimport { chakra, HTMLChakraProps, forwardRef } from '@chakra-ui/react'\nimport { cx, runIfFn } from '@chakra-ui/utils'\n\nimport {\n useForm,\n FormProvider,\n UseFormProps,\n UseFormReturn,\n FieldValues,\n SubmitHandler,\n SubmitErrorHandler,\n ResolverOptions,\n ResolverResult,\n WatchObserver,\n} from 'react-hook-form'\nimport { objectFieldResolver, FieldResolver } from './field-resolver'\nimport { MaybeRenderProp } from '@chakra-ui/react-utils'\n\nexport type { UseFormReturn, FieldValues, SubmitHandler }\n\nimport { FieldProps } from './types'\n\nimport { Field as DefaultField } from './field'\n\nexport interface FormRenderContext<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TFieldTypes = FieldProps<TFieldValues>\n> extends UseFormReturn<TFieldValues, TContext> {\n Field: React.FC<TFieldTypes>\n}\n\ninterface FormOptions<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n> {\n /**\n * The form schema, supports Yup, Zod, and AJV.\n */\n schema?: TSchema\n /**\n * Triggers when any of the field change.\n */\n onChange?: WatchObserver<TFieldValues>\n /**\n * The submit handler.\n */\n onSubmit: SubmitHandler<TFieldValues>\n /**\n * Triggers when there are validation errors.\n */\n onError?: SubmitErrorHandler<TFieldValues>\n /**\n * The Hook Form state ref.\n */\n formRef?: React.RefObject<UseFormReturn<TFieldValues, TContext>>\n /**\n * The form children, can be a render prop or a ReactNode.\n */\n children?: MaybeRenderProp<\n FormRenderContext<TFieldValues, TContext, TFieldTypes>\n >\n}\n\nexport interface FormProps<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n> extends UseFormProps<TFieldValues, TContext>,\n Omit<\n HTMLChakraProps<'form'>,\n 'children' | 'onChange' | 'onSubmit' | 'onError'\n >,\n FormOptions<TFieldValues, TContext, TSchema, TFieldTypes> {}\n\n/**\n * The wrapper component provides context, state, and focus management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const Form = forwardRef(\n <\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n >(\n props: FormProps<TFieldValues, TContext, TSchema>,\n ref: React.ForwardedRef<HTMLFormElement>\n ) => {\n const {\n mode = 'all',\n resolver,\n reValidateMode,\n shouldFocusError,\n shouldUnregister,\n shouldUseNativeValidation,\n criteriaMode,\n delayError,\n schema,\n defaultValues,\n values,\n context,\n resetOptions,\n onChange,\n onSubmit,\n onError,\n formRef,\n children,\n ...rest\n } = props\n\n const form = {\n mode,\n resolver,\n defaultValues,\n values,\n reValidateMode,\n shouldFocusError,\n shouldUnregister,\n shouldUseNativeValidation,\n criteriaMode,\n delayError,\n context,\n resetOptions,\n }\n\n if (schema && !resolver) {\n form.resolver = Form.getResolver?.(schema)\n }\n\n const methods = useForm<TFieldValues, TContext>(form)\n const { handleSubmit } = methods\n\n // This exposes the useForm api through the forwarded ref\n React.useImperativeHandle(formRef, () => methods, [formRef, methods])\n\n React.useEffect(() => {\n let subscription: any\n if (onChange) {\n subscription = methods.watch(onChange)\n }\n return () => subscription?.unsubscribe()\n }, [methods, onChange])\n\n return (\n <FormProvider {...methods}>\n <chakra.form\n ref={ref}\n onSubmit={handleSubmit(onSubmit, onError)}\n {...rest}\n className={cx('sui-form', props.className)}\n >\n {runIfFn(children, {\n Field: DefaultField as any,\n ...methods,\n })}\n </chakra.form>\n </FormProvider>\n )\n }\n) as (<\n TFieldValues extends FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n>(\n props: FormProps<TFieldValues, TContext, TSchema, TFieldTypes> & {\n ref?: React.ForwardedRef<HTMLFormElement>\n }\n) => React.ReactElement) & {\n displayName?: string\n getResolver?: GetResolver\n getFieldResolver: GetFieldResolver\n}\n\nForm.getFieldResolver = objectFieldResolver\n\nForm.displayName = 'Form'\n\nexport type GetResolver = <\n TFieldValues extends FieldValues,\n TContext extends object\n>(\n schema: any\n) => (\n values: TFieldValues,\n context: TContext | undefined,\n options: ResolverOptions<TFieldValues>\n) => Promise<ResolverResult<TFieldValues>>\n\nexport type GetFieldResolver = (schema: any) => FieldResolver\n","import { BaseFieldProps as FieldProps } from './types'\n\nimport { get } from '@chakra-ui/utils'\n\nexport type FieldResolver = {\n getFields(): FieldProps[]\n getNestedFields(name: string): FieldProps[]\n}\n\ninterface SchemaField extends FieldProps {\n items?: SchemaField[]\n properties?: Record<string, SchemaField>\n}\n\nexport type ObjectSchema = Record<string, SchemaField>\n\nconst mapFields = (schema: ObjectSchema): FieldProps[] =>\n schema &&\n Object.entries(schema).map(([name, { items, label, title, ...field }]) => {\n return {\n ...field,\n name,\n label: label || title || name, // json schema compatibility\n }\n })\n\nexport const objectFieldResolver = (schema: ObjectSchema): FieldResolver => {\n const getFields = () => {\n return mapFields(schema)\n }\n const getNestedFields = (name: string) => {\n const field = get(schema, name)\n\n if (!field) return []\n\n if (field.items?.type === 'object') {\n return mapFields(field.items.properties)\n } else if (field.type === 'object') {\n return mapFields(field.properties)\n }\n return [field.items]\n }\n\n return { getFields, getNestedFields }\n}\n","import * as React from 'react'\n\nimport {\n chakra,\n ResponsiveValue,\n SimpleGrid,\n SimpleGridProps,\n useTheme,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nexport interface FormLayoutProps extends SimpleGridProps {}\n\ninterface FormLayoutItemProps {\n children: React.ReactNode\n}\n\nconst FormLayoutItem: React.FC<FormLayoutItemProps> = ({ children }) => {\n return <chakra.div>{children}</chakra.div>\n}\n\nFormLayoutItem.displayName = 'FormLayoutItem'\n\n/**\n * Create consistent field spacing and positioning.\n *\n *\n * Renders form items in a `SimpleGrid`\n * @see https://chakra-ui.com/docs/layout/simple-grid\n *\n * @see https://saas-ui.dev/docs/components/forms/form\n */\nexport const FormLayout = ({ children, ...props }: FormLayoutProps) => {\n const theme = useTheme()\n\n const defaultProps = theme.components?.SuiFormLayout?.defaultProps ?? {\n spacing: 4,\n }\n\n const gridProps = {\n ...defaultProps,\n ...props,\n }\n\n return (\n <SimpleGrid\n {...gridProps}\n className={cx('sui-form__layout', props.className)}\n >\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return <FormLayoutItem>{child}</FormLayoutItem>\n }\n return child\n })}\n </SimpleGrid>\n )\n}\n\nFormLayout.displayName = 'FormLayout'\n","import * as React from 'react'\n\nimport {\n chakra,\n ResponsiveValue,\n forwardRef,\n Button,\n ButtonProps,\n} from '@chakra-ui/react'\nimport { AddIcon, MinusIcon } from '@chakra-ui/icons'\n\nimport { FormLayout, FormLayoutProps } from './layout'\nimport { BaseField } from './base-field'\nimport { BaseFieldProps } from './types'\n\nimport { mapNestedFields } from './utils'\n\nimport {\n useArrayField,\n useArrayFieldRow,\n useArrayFieldContext,\n ArrayFieldProvider,\n ArrayFieldOptions,\n ArrayFieldRowProvider,\n useArrayFieldRowContext,\n useArrayFieldRemoveButton,\n useArrayFieldAddButton,\n UseArrayFieldReturn,\n} from './use-array-field'\n\nexport interface ArrayFieldButtonProps extends ButtonProps {}\n\ninterface ArrayField {\n id: string\n [key: string]: unknown\n}\n\ninterface ArrayFieldRowProps extends FormLayoutProps {\n /**\n * Amount of field columns\n */\n columns?: ResponsiveValue<number>\n /**\n * Spacing between fields\n */\n spacing?: ResponsiveValue<string | number>\n /**\n * The array index\n */\n index: number\n /**\n * The fields\n */\n children: React.ReactNode\n}\n/**\n * Render prop component, to get access to the internal fields state. Must be a child of ArrayFieldContainer.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRow: React.FC<ArrayFieldRowProps> = ({\n children,\n index,\n ...rowFieldsProps\n}) => {\n return (\n <ArrayFieldRowContainer index={index}>\n <ArrayFieldRowFields {...rowFieldsProps}>{children}</ArrayFieldRowFields>\n <ArrayFieldRemoveButton />\n </ArrayFieldRowContainer>\n )\n}\n\nArrayFieldRow.displayName = 'ArrayFieldRow'\n\nexport interface ArrayFieldRowFieldsProps extends FormLayoutProps {\n /**\n * Amount of field columns\n */\n columns?: ResponsiveValue<number>\n /**\n * Spacing between fields\n */\n spacing?: ResponsiveValue<string | number>\n /**\n * The fields\n */\n children: React.ReactNode\n}\n/**\n * Add the name prefix to the fields and acts as a horizontal form layout by default.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRowFields: React.FC<ArrayFieldRowFieldsProps> = ({\n children,\n ...layoutProps\n}) => {\n const { name } = useArrayFieldRowContext()\n return (\n <FormLayout flex=\"1\" mr=\"2\" {...layoutProps}>\n {mapNestedFields(name, children)}\n </FormLayout>\n )\n}\n\nArrayFieldRowFields.displayName = 'ArrayFieldRowFields'\n\n/**\n * The row container component providers row context.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRowContainer: React.FC<ArrayFieldRowProps> = ({\n children,\n index,\n ...rest\n}) => {\n const context = useArrayFieldRow({ index })\n\n const styles = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-end',\n width: '100%',\n mb: 4,\n }\n\n return (\n <ArrayFieldRowProvider value={context}>\n <chakra.div {...rest} __css={styles}>\n {children}\n </chakra.div>\n </ArrayFieldRowProvider>\n )\n}\n\nArrayFieldRowContainer.displayName = 'ArrayFieldRowContainer'\n\n/**\n * The default remove button.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRemoveButton: React.FC<ArrayFieldButtonProps> = (\n props\n) => {\n return (\n <Button aria-label=\"Remove row\" {...useArrayFieldRemoveButton()} {...props}>\n {props.children || <MinusIcon />}\n </Button>\n )\n}\n\nArrayFieldRemoveButton.displayName = 'ArrayFieldRemoveButton'\n\n/**\n * The default add button.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldAddButton: React.FC<ArrayFieldButtonProps> = (props) => {\n return (\n <Button\n aria-label=\"Add row\"\n float=\"right\"\n {...useArrayFieldAddButton()}\n {...props}\n >\n {props.children || <AddIcon />}\n </Button>\n )\n}\n\nArrayFieldAddButton.displayName = 'ArrayFieldAddButton'\n\nexport interface ArrayFieldProps\n extends ArrayFieldOptions,\n Omit<BaseFieldProps, 'defaultValue'> {}\n\n/**\n * The wrapper component that composes the default ArrayField functionality.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayField = forwardRef(\n (props: ArrayFieldProps, ref: React.ForwardedRef<UseArrayFieldReturn>) => {\n const { children, ...containerProps } = props\n\n return (\n <ArrayFieldContainer ref={ref} {...containerProps}>\n <ArrayFieldRows>\n {(fields: ArrayField[]) => (\n <>\n {fields.map(({ id }, index: number) => (\n <ArrayFieldRow key={id} index={index}>\n {children}\n </ArrayFieldRow>\n ))}\n </>\n )}\n </ArrayFieldRows>\n <ArrayFieldAddButton />\n </ArrayFieldContainer>\n )\n }\n) as ((\n props: ArrayFieldProps & {\n ref?: React.ForwardedRef<UseArrayFieldReturn>\n }\n) => React.ReactElement) & {\n displayName: string\n}\n\nArrayField.displayName = 'ArrayField'\n\nexport interface ArrayFieldRowsProps {\n children: (fields: ArrayField[]) => React.ReactElement | null\n}\n\nexport const ArrayFieldRows = ({\n children,\n}: ArrayFieldRowsProps): React.ReactElement | null => {\n const { fields } = useArrayFieldContext()\n return children(fields)\n}\n\nArrayFieldRows.displayName = 'ArrayFieldRows'\n\n/**\n * The container component provides context and state management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldContainer = React.forwardRef(\n (\n {\n name,\n defaultValue,\n keyName,\n min,\n max,\n children,\n ...fieldProps\n }: ArrayFieldProps,\n ref: React.ForwardedRef<UseArrayFieldReturn>\n ) => {\n const context = useArrayField({\n name,\n defaultValue,\n keyName,\n min,\n max,\n })\n\n // This exposes the useArrayField api through the forwarded ref\n React.useImperativeHandle(ref, () => context, [ref, context])\n\n return (\n <ArrayFieldProvider value={context}>\n <BaseField name={name} {...fieldProps}>\n {children}\n </BaseField>\n </ArrayFieldProvider>\n )\n }\n)\n\nArrayFieldContainer.displayName = 'ArrayFieldContainer'\n","import * as React from 'react'\nimport {\n useFieldArray,\n useFormContext,\n UseFieldArrayReturn,\n} from 'react-hook-form'\n\nimport { createContext } from '@chakra-ui/react-utils'\n\nexport interface UseArrayFieldReturn extends UseFieldArrayReturn {\n /**\n * The array field name\n */\n name: string\n /**\n * The default value for new items\n */\n defaultValue: Record<string, any>\n /**\n * Min amount of items\n */\n min?: number\n /**\n * Max amount of items\n */\n max?: number\n}\n\nexport const [ArrayFieldProvider, useArrayFieldContext] =\n createContext<UseArrayFieldReturn>({\n name: 'ArrayFieldContext',\n })\n\nexport interface UseArrayFieldRowReturn {\n /**\n * Name of the array field including the index, eg 'field.0'\n */\n name: string\n /**\n * The field index\n */\n index: number\n /**\n * Remove this array item\n */\n remove: () => void\n /**\n * True if this is the first item\n */\n isFirst: boolean\n /**\n * True if this is the last item\n */\n isLast: boolean\n}\n\nexport const [ArrayFieldRowProvider, useArrayFieldRowContext] =\n createContext<UseArrayFieldRowReturn>({\n name: 'ArrayFieldRowContext',\n })\n\nexport interface ArrayFieldOptions {\n /**\n * The field name\n */\n name: string\n /**\n * Default value for new values in the array\n */\n defaultValue?: Record<string, any>\n /**\n * Default key name for rows, change this if your data uses a different 'id' field\n * @default \"id\"\n */\n keyName?: string\n min?: number\n max?: number\n}\n\nexport const useArrayField = ({\n name,\n defaultValue = {},\n keyName,\n min,\n max,\n}: ArrayFieldOptions) => {\n const { control } = useFormContext()\n const context = useFieldArray({\n control,\n name,\n keyName,\n })\n\n return {\n ...context,\n name,\n defaultValue,\n min,\n max,\n }\n}\n\nexport interface UseArrayFieldRowProps {\n index: number\n}\n\nexport const useArrayFieldRow = ({ index }: UseArrayFieldRowProps) => {\n const { clearErrors } = useFormContext()\n const { name, remove, fields } = useArrayFieldContext()\n\n React.useEffect(() => {\n // reset errors, to make sure min/max errors reset correctly\n clearErrors(name)\n }, [])\n\n return {\n index,\n isFirst: index === 0,\n isLast: index === fields.length - 1,\n name: `${name}.${index}`,\n remove: React.useCallback(() => {\n clearErrors(name)\n remove(index)\n }, [index]),\n }\n}\n\nexport const useArrayFieldRemoveButton = () => {\n const { isFirst, remove } = useArrayFieldRowContext()\n const { min, fields } = useArrayFieldContext()\n\n const isDisabled = isFirst && !!(min && fields.length <= min)\n\n return {\n onClick: () => remove(),\n isDisabled,\n }\n}\n\nexport const useArrayFieldAddButton = () => {\n const { append, defaultValue, max, fields } = useArrayFieldContext()\n\n const isDisabled = !!(max && fields.length >= max)\n\n return {\n onClick: () =>\n append(defaultValue, {\n shouldFocus: false,\n }),\n isDisabled,\n }\n}\n","import * as React from 'react'\nimport {\n FormControl,\n FormLabel,\n FormLabelProps,\n ResponsiveValue,\n useStyleConfig,\n} from '@chakra-ui/react'\n\nimport { FormLayout } from './layout'\nimport { BaseFieldProps } from './types'\n\nimport { mapNestedFields } from './utils'\n\nexport interface ObjectFieldProps extends BaseFieldProps {\n name: string\n children: React.ReactNode\n columns?: ResponsiveValue<number>\n spacing?: ResponsiveValue<string | number>\n}\n\nexport const FormLegend = (props: FormLabelProps) => {\n const styles = useStyleConfig('SuiFormLegend')\n return <FormLabel as=\"legend\" sx={styles} {...props} />\n}\n/**\n * The object field component.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/object-field\n */\nexport const ObjectField: React.FC<ObjectFieldProps> = (props) => {\n const { name, label, hideLabel, children, columns, spacing, ...fieldProps } =\n props\n\n return (\n <FormControl name={name} as=\"fieldset\" {...fieldProps}>\n <FormLegend display={hideLabel ? 'none' : 'block'}>{label}</FormLegend>\n <FormLayout columns={columns} gridGap={spacing}>\n {mapNestedFields(name, children)}\n </FormLayout>\n </FormControl>\n )\n}\n\nObjectField.displayName = 'ObjectField'\n","import * as React from 'react'\nimport { FieldValues } from 'react-hook-form'\nimport { forwardRef } from '@chakra-ui/react'\n\nimport { Form, FormProps } from './form'\nimport { FormLayout } from './layout'\nimport { AutoFields } from './fields'\nimport { SubmitButton } from './submit-button'\n\ninterface AutoFormOptions {\n /**\n * The submit button label.\n * Pass `null` to render no submit button.\n */\n submitLabel?: React.ReactNode\n /**\n * The schema.\n * Supports object schema, Zod, Yup or Ajv (JSON Schema).\n * @see https://www.saas-ui.dev/docs/forms/auto-form\n */\n schema: any\n /**\n * The field resolver.\n */\n fieldResolver?: any\n}\n\nexport interface AutoFormProps<\n TFieldValues extends FieldValues,\n TContext extends object = object\n> extends Omit<FormProps<TFieldValues, TContext>, 'schema' | 'children'>,\n AutoFormOptions {\n children?: React.ReactNode\n}\n/**\n * The wrapper component that manages context and state.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/auto-form\n */\nexport const AutoForm = forwardRef(\n <\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object\n >(\n props: AutoFormProps<TFieldValues, TContext>,\n ref: React.ForwardedRef<HTMLFormElement>\n ) => {\n const {\n schema,\n submitLabel = 'Submit',\n fieldResolver,\n children,\n ...rest\n } = props\n\n return (\n <Form {...rest} schema={schema} ref={ref}>\n <FormLayout>\n {<AutoFields schema={schema} fieldResolver={fieldResolver} />}\n {submitLabel && <SubmitButton>{submitLabel}</SubmitButton>}\n {children}\n </FormLayout>\n </Form>\n )\n }\n)\n\nAutoForm.displayName = 'AutoForm'\n","import * as React from 'react'\n\nimport { useFormContext } from 'react-hook-form'\n\nimport { Button, ButtonProps, forwardRef } from '@chakra-ui/react'\n\nexport interface SubmitButtonProps extends ButtonProps {\n /**\n * Disable the submit button if the form is untouched.\n *\n * Change the default behavior by updating\n * `SubmitButton.defaultProps.disableIfUntouched`\n */\n disableIfUntouched?: boolean\n /**\n * Disable the submit button if the form is invalid.\n *\n * Change the default behavior by updating\n * `SubmitButton.defaultProps.disableIfInvalid`\n */\n disableIfInvalid?: boolean\n}\n/**\n * A button with type submit and default color scheme primary and isLoading state when the form is submitting.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const SubmitButton = forwardRef<SubmitButtonProps, 'button'>(\n (props, ref) => {\n const {\n children = 'Submit',\n disableIfUntouched,\n disableIfInvalid,\n isDisabled: isDisabledProp,\n isLoading,\n ...rest\n } = props\n const { formState } = useFormContext()\n\n const isDisabled =\n (disableIfUntouched && !formState.isDirty) ||\n (disableIfInvalid && !formState.isValid) ||\n isDisabledProp\n\n return (\n <Button\n {...rest}\n ref={ref}\n type=\"submit\"\n isLoading={formState.isSubmitting || isLoading}\n isDisabled={isDisabled}\n >\n {children}\n </Button>\n )\n }\n)\n\nSubmitButton.defaultProps = {\n variant: 'primary',\n disableIfUntouched: false,\n disableIfInvalid: false,\n}\n\nSubmitButton.displayName = 'SubmitButton'\n","import * as React from 'react'\nimport {\n useFormContext,\n useWatch,\n FieldValues,\n UseFormReturn,\n} from 'react-hook-form'\n\nexport interface DisplayIfProps<\n TFieldValues extends FieldValues = FieldValues\n> {\n children: React.ReactElement\n name: string\n defaultValue?: unknown\n isDisabled?: boolean\n isExact?: boolean\n condition?: (value: unknown, context: UseFormReturn<TFieldValues>) => boolean\n}\n/**\n * Conditionally render parts of a form.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const DisplayIf = <TFieldValues extends FieldValues = FieldValues>({\n children,\n name,\n defaultValue,\n isDisabled,\n isExact,\n condition = (value) => !!value,\n}: DisplayIfProps<TFieldValues>) => {\n const value = useWatch({\n name,\n defaultValue,\n disabled: isDisabled,\n exact: isExact,\n })\n const context = useFormContext<TFieldValues>()\n return condition(value, context) ? children : null\n}\n\nDisplayIf.displayName = 'DisplayIf'\n","import * as React from 'react'\n\nimport { FieldValues, UseFormReturn } from 'react-hook-form'\n\nimport {\n chakra,\n Button,\n ButtonProps,\n HTMLChakraProps,\n ThemingProps,\n} from '@chakra-ui/react'\n\nimport { callAllHandlers, runIfFn, cx } from '@chakra-ui/utils'\n\nimport {\n StepperProvider,\n StepperSteps,\n StepperStepsProps,\n StepperStep,\n useStepperContext,\n StepperContainer,\n StepperProps,\n} from '@saas-ui/core'\n\nimport { Form } from './form'\nimport { SubmitButton } from './submit-button'\n\nimport {\n useStepForm,\n useFormStep,\n StepFormProvider,\n UseStepFormProps,\n FormStepSubmitHandler,\n} from './use-step-form'\n\nexport interface StepFormProps<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object\n> extends UseStepFormProps<TFieldValues> {}\n\n/**\n * The wrapper component provides context, state, and focus management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const StepForm = React.forwardRef(\n <\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object\n >(\n props: StepFormProps<TFieldValues, TContext>,\n ref: React.ForwardedRef<HTMLFormElement>\n ) => {\n const { children, ...rest } = props\n\n const stepper = useStepForm<TFieldValues>(props)\n\n const { getFormProps, ...ctx } = stepper\n\n const context = React.useMemo(() => ctx, [ctx])\n\n return (\n <StepperProvider value={context}>\n <StepFormProvider value={context}>\n <Form ref={ref} {...rest} {...getFormProps()}>\n {runIfFn(children, stepper)}\n </Form>\n </StepFormProvider>\n </StepperProvider>\n )\n }\n) as <TFieldValues extends FieldValues>(\n props: StepFormProps<TFieldValues> & {\n ref?: React.ForwardedRef<HTMLFormElement>\n }\n) => React.ReactElement\n\nexport interface FormStepOptions {\n /**\n * The step name\n */\n name: string\n /**\n * Schema\n */\n schema?: any\n /**\n * Hook Form Resolver\n */\n resolver?: any\n}\n\nexport interface FormStepperProps\n extends StepperStepsProps,\n ThemingProps<'Stepper'> {}\n\n/**\n * Renders a stepper that displays progress above the form.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const FormStepper: React.FC<FormStepperProps> = (props) => {\n const { activeIndex, setIndex } = useStepperContext()\n\n const { children, orientation, variant, colorScheme, size, ...rest } = props\n\n const elements = React.Children.map(children, (child) => {\n if (\n React.isValidElement<FormStepProps>(child) &&\n child?.type === FormStep\n ) {\n const { isCompleted } = useFormStep(child.props) // Register this step\n return (\n <StepperStep\n name={child.props.name}\n title={child.props.title}\n isCompleted={isCompleted}\n {...rest}\n >\n {child.props.children}\n </StepperStep>\n )\n }\n return child\n })\n\n const onChange = React.useCallback((i: number) => {\n setIndex(i)\n }, [])\n\n return (\n <StepperContainer\n orientation={orientation}\n step={activeIndex}\n variant={variant}\n colorScheme={colorScheme}\n size={size}\n onChange={onChange}\n >\n <StepperSteps mb=\"4\" {...props}>\n {elements}\n </StepperSteps>\n </StepperContainer>\n )\n}\n\nexport interface FormStepProps\n extends FormStepOptions,\n Omit<HTMLChakraProps<'div'>, 'onSubmit'> {\n onSubmit?: FormStepSubmitHandler\n}\n/**\n * The form step containing fields for a specific step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const FormStep: React.FC<FormStepProps> = (props) => {\n const { name, schema, resolver, children, className, onSubmit, ...rest } =\n props\n const step = useFormStep({ name, schema, resolver, onSubmit })\n\n const { isActive } = step\n\n return isActive ? (\n <chakra.div {...rest} className={cx('sui-form__step', className)}>\n {children}\n </chakra.div>\n ) : null\n}\n\nFormStep.displayName = 'FormStep'\n\n/**\n * A button that this opens the previous step when clicked. Disabled on the first step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const PrevButton: React.FC<ButtonProps> = (props) => {\n const { isFirstStep, isCompleted, prevStep } = useStepperContext()\n\n return (\n <Button\n isDisabled={isFirstStep || isCompleted}\n label=\"Back\"\n {...props}\n className={cx('sui-form__prev-button', props.className)}\n onClick={callAllHandlers(props.onClick, prevStep)}\n />\n )\n}\n\nPrevButton.displayName = 'PrevButton'\n\nexport interface NextButtonProps extends Omit<ButtonProps, 'children'> {\n submitLabel?: string\n label?: string\n}\n\n/**\n * A button that submits the active step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const NextButton: React.FC<NextButtonProps> = (props) => {\n const { label = 'Next', submitLabel = 'Complete', ...rest } = props\n const { isLastStep, isCompleted } = useStepperContext()\n\n return (\n <SubmitButton\n {...rest}\n isDisabled={isCompleted}\n className={cx('sui-form__next-button', props.className)}\n >\n {isLastStep || isCompleted ? submitLabel : label}\n </SubmitButton>\n )\n}\n\nNextButton.displayName = 'NextButton'\n","import * as React from 'react'\nimport { FieldValues, SubmitHandler } from 'react-hook-form'\nimport { createContext, MaybeRenderProp } from '@chakra-ui/react-utils'\nimport {\n useStepper,\n useStep,\n UseStepperProps,\n UseStepperReturn,\n} from '@saas-ui/core'\n\nexport interface StepState {\n name: string\n schema?: any\n resolver?: any\n isActive?: boolean\n isCompleted?: boolean\n onSubmit?: FormStepSubmitHandler\n}\n\nexport type FormStepSubmitHandler<\n TFieldValues extends FieldValues = FieldValues\n> = (data: TFieldValues, stepper: UseStepperReturn) => Promise<void>\n\nexport interface StepFormContext extends UseStepperReturn {\n updateStep(state: StepState): void\n steps: Record<string, StepState>\n}\n\nexport const [StepFormProvider, useStepFormContext] =\n createContext<StepFormContext>({\n name: 'StepFormContext',\n errorMessage:\n 'useStepFormContext: `context` is undefined. Seems you forgot to wrap step form components in `<StepForm />`',\n })\n\nimport { FormProps } from './form'\n\nexport interface UseStepFormProps<\n TFieldValues extends FieldValues = FieldValues\n> extends Omit<UseStepperProps, 'onChange'>,\n Omit<FormProps<TFieldValues>, 'children'> {\n children: MaybeRenderProp<UseStepFormReturn<TFieldValues>>\n}\n\nexport interface UseStepFormReturn<\n TFieldValues extends FieldValues = FieldValues\n> extends UseStepperReturn {\n getFormProps(): {\n onSubmit: SubmitHandler<TFieldValues>\n schema?: any\n resolver?: any\n }\n updateStep(step: any): void\n steps: Record<string, any>\n}\n\nexport function useStepForm<TFieldValues extends FieldValues = FieldValues>(\n props: UseStepFormProps<TFieldValues>\n): UseStepFormReturn<TFieldValues> {\n const { onChange, ...rest } = props\n const stepper = useStepper(rest)\n\n const { activeStep, isLastStep, nextStep } = stepper\n\n const [steps, updateSteps] = React.useState<Record<string, StepState>>({})\n\n const onSubmitStep: SubmitHandler<TFieldValues> = React.useCallback(\n async (data) => {\n try {\n const step = steps[activeStep]\n\n if (isLastStep) {\n await props.onSubmit?.(data)\n\n updateStep({\n ...step,\n isCompleted: true,\n })\n\n nextStep() // show completed step\n return\n }\n\n await step.onSubmit?.(data, stepper)\n\n nextStep()\n } catch (e) {\n // Step submission failed.\n }\n },\n [steps, activeStep, isLastStep]\n )\n\n const getFormProps = React.useCallback(() => {\n const step = steps[activeStep]\n return {\n onSubmit: onSubmitStep,\n schema: step?.schema,\n resolver: step?.resolver,\n }\n }, [steps, onSubmitStep, activeStep])\n\n const updateStep = React.useCallback(\n (step: StepState) => {\n updateSteps((steps) => {\n return {\n ...steps,\n [step.name]: step,\n }\n })\n },\n [steps]\n )\n\n return {\n getFormProps,\n updateStep,\n steps,\n ...stepper,\n }\n}\n\nexport interface UseFormStepProps {\n name: string\n schema?: any\n resolver?: any\n onSubmit?: FormStepSubmitHandler\n}\n\nexport function useFormStep(props: UseFormStepProps): StepState {\n const { name, schema, resolver, onSubmit } = props\n const step = useStep({ name })\n\n const { steps, updateStep } = useStepFormContext()\n\n React.useEffect(() => {\n updateStep({ name, schema, resolver, onSubmit })\n }, [name, schema])\n\n return {\n ...step,\n ...(steps[name] || { name, schema }),\n }\n}\n","import {\n FieldValues,\n useFormContext,\n UseFormReturn,\n useWatch,\n} from 'react-hook-form'\n\nexport interface WatchFieldProps<\n Value = unknown,\n TFieldValues extends FieldValues = FieldValues\n> {\n name: string\n defaultValue?: Value\n isDisabled?: boolean\n isExact?: boolean\n children: (\n value: Value,\n form: UseFormReturn<TFieldValues>\n ) => React.ReactElement | void\n}\n\nexport const WatchField = <\n Value = unknown,\n TFieldValues extends FieldValues = FieldValues\n>(\n props: WatchFieldProps<Value, TFieldValues>\n) => {\n const { name, defaultValue, isDisabled, isExact } = props\n const form = useFormContext<TFieldValues>()\n\n const field = useWatch({\n name,\n defaultValue,\n disabled: isDisabled,\n exact: isExact,\n })\n\n return props.children(field, form) || null\n}\n","import React from 'react'\nimport { FieldsProvider } from './fields-context'\nimport { Form, FieldValues, FormProps, GetResolver } from './form'\nimport { WithFields } from './types'\n\nexport interface CreateFormProps<FieldDefs> {\n resolver?: GetResolver\n fields?: FieldDefs extends Record<string, React.FC<any>> ? FieldDefs : never\n}\n\nexport function createForm<FieldDefs, Schema = any>({\n resolver,\n fields,\n}: CreateFormProps<FieldDefs> = {}) {\n const CreateForm = <\n TFieldValues extends FieldValues,\n TContext extends object = object,\n TSchema extends Schema = Schema\n >(\n props: WithFields<FormProps<TFieldValues, TContext, TSchema>, FieldDefs>\n ) => {\n const { schema, ...rest } = props\n return (\n <FieldsProvider value={fields || {}}>\n <Form resolver={resolver?.(props.schema)} {...rest} />\n </FieldsProvider>\n )\n }\n\n return CreateForm\n}\n","export * from './display-field'\nexport * from './field'\nexport * from './fields'\nexport * from './fields-context'\nexport * from './form'\nexport * from './auto-form'\nexport * from './layout'\nexport * from './submit-button'\nexport * from './array-field'\nexport * from './use-array-field'\nexport * from './object-field'\nexport * from './display-if'\nexport * from './step-form'\nexport * from './use-step-form'\nexport * from './field-resolver'\nexport * from './watch-field'\nexport * from './input-right-button'\nexport * from './select'\nexport * from './password-input'\nexport * from './radio'\n\nexport * from './base-field'\n\nexport {\n CheckboxField,\n InputField,\n NativeSelectField,\n NumberInputField,\n PasswordInputField,\n PinField,\n RadioField,\n SelectField,\n SwitchField,\n TextareaField,\n defaultFieldTypes,\n} from './default-fields'\n\nexport type {\n DefaultFields,\n InputFieldProps,\n NumberInputFieldProps,\n PinFieldProps,\n} from './default-fields'\n\nexport type {\n FieldProps,\n WithFields,\n BaseFieldProps,\n FieldOptions,\n} from './types'\n\nexport { createForm } from './create-form'\nexport type { CreateFormProps } from './create-form'\n\nexport { createField } from './create-field'\nexport type { CreateFieldOptions } from './create-field'\n\nexport type {\n BatchFieldArrayUpdate,\n ChangeHandler,\n Control,\n ControllerFieldState,\n ControllerProps,\n ControllerRenderProps,\n CriteriaMode,\n CustomElement,\n DeepMap,\n DeepPartial,\n DeepPartialSkipArrayKey,\n DefaultValues,\n DelayCallback,\n EmptyObject,\n ErrorOption,\n EventType,\n Field as FieldDef,\n FieldArray,\n FieldArrayMethodProps,\n FieldArrayWithId,\n FieldElement,\n FieldError,\n FieldErrors,\n FieldName,\n FieldNamesMarkedBoolean,\n FieldRefs,\n FieldValue,\n FieldValues,\n FormProviderProps,\n FormState,\n FormStateProxy,\n FormStateSubjectRef,\n GetIsDirty,\n InternalFieldErrors,\n InternalFieldName,\n InternalNameSet,\n IsAny,\n IsFlatObject,\n KeepStateOptions,\n LiteralUnion,\n Message,\n Mode,\n MultipleFieldErrors,\n Names,\n NativeFieldValue,\n NestedValue,\n NonUndefined,\n Noop,\n Primitive,\n ReadFormState,\n Ref,\n RefCallBack,\n RegisterOptions,\n Resolver,\n ResolverError,\n ResolverOptions,\n ResolverResult,\n ResolverSuccess,\n SetFieldValue,\n SetValueConfig,\n Subjects,\n SubmitErrorHandler,\n SubmitHandler,\n TriggerConfig,\n UnpackNestedValue,\n UseControllerProps,\n UseControllerReturn,\n UseFieldArrayProps,\n UseFieldArrayReturn,\n UseFormClearErrors,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormProps,\n UseFormRegister,\n UseFormRegisterReturn,\n UseFormReset,\n UseFormResetField,\n UseFormReturn,\n UseFormSetError,\n UseFormSetFocus,\n UseFormSetValue,\n UseFormStateProps,\n UseFormStateReturn,\n UseFormTrigger,\n UseFormUnregister,\n UseFormWatch,\n UseWatchProps,\n Validate,\n ValidateResult,\n ValidationMode,\n ValidationRule,\n ValidationValue,\n ValidationValueMessage,\n WatchInternal,\n WatchObserver,\n} from 'react-hook-form'\n\nexport {\n appendErrors,\n useController,\n useFieldArray,\n useForm,\n useFormContext,\n useFormState,\n useWatch,\n Controller,\n FormProvider,\n} from 'react-hook-form'\n"]}
1
+ {"version":3,"sources":["../src/form-context.tsx","../src/display-field.tsx","../src/field.tsx","../src/fields-context.tsx","../src/default-fields.tsx","../src/number-input/number-input.tsx","../src/password-input/password-input.tsx","../src/input-right-button/input-right-button.tsx","../src/radio/radio-input.tsx","../src/utils.ts","../src/select/select.tsx","../src/select/select-context.tsx","../src/select/native-select.tsx","../src/create-field.tsx","../src/base-field.tsx","../src/fields.tsx","../src/layout.tsx","../src/array-field.tsx","../src/use-array-field.tsx","../src/object-field.tsx","../src/submit-button.tsx","../src/display-if.tsx","../src/step-form.tsx","../src/form.tsx","../src/use-step-form.tsx","../src/field-resolver.ts","../src/watch-field.tsx","../src/create-form.tsx","../src/index.ts"],"names":["jsx","React","forwardRef","Input","InputGroup","jsxs","Button","ChevronDownIcon","createContext","value","FormControl","FormLabel","BaseField","Field","NumberInputField","chakra","cx","mapNestedFields","name","useFormContext","callAllHandlers","runIfFn","steps","get","useWatch","useFieldArray","useForm","Controller","Form"],"mappings":";AAAA,SAAS,eAAe,kBAAkB;AAC1C;AAAA,EACE,gBAAgB;AAAA,EAEh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,eAAe,+CAAgB;AAAA,UAC9B,GAAG;AAAA;AAAA,MACN,GACF;AAAA,IAEJ;AAAA,EACF;AAYA,SAAO;AACT;;;AC0GA;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAAyB;AAAA,EACA,WAAAC;AAAA,EACA;AAAA,EACA,YAAAF;AAAA,EACA,cAAAG;AAAA,OACK;AA5GA,IAAMC,QAAO,WAAW","sourcesContent":["import { createContext, useContext } from 'react'\nimport {\n FormProvider as HookFormProvider,\n FormProviderProps as HookFormProviderProps,\n useFormContext as useHookFormContext,\n FieldValues,\n} from 'react-hook-form'\nimport { FieldResolver } from './field-resolver'\nimport { BaseFieldProps, FieldProps } from './types'\n\nexport type FormContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TSchema = any\n> = {\n fieldResolver?: FieldResolver\n schema?: TSchema\n fields?: {\n [key: string]: unknown\n }\n}\n\nexport type FormProviderProps<\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TSchema = any\n> = HookFormProviderProps<TFieldValues, TContext> & {\n fieldResolver?: FieldResolver\n schema?: TSchema\n fields?: {\n [key: string]: unknown\n }\n}\n\nconst FormContext = createContext<FormContextValue | null>(null)\n\nexport const useFormContext = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TSchema = any\n>() => {\n const context = useContext(FormContext)\n const hookContext = useHookFormContext()\n\n if (!context) {\n throw new Error('FormProvider must be used within a Form component')\n }\n\n return {\n ...hookContext,\n ...context,\n }\n}\n\nexport const useFieldProps = <TFieldValues extends FieldValues = FieldValues>(\n name: string\n): BaseFieldProps<TFieldValues> | undefined => {\n const parsedName = name?.replace(/\\.[0-9]/g, '.$')\n const context = useFormContext()\n return context?.fields?.[parsedName] as any\n}\n\nexport type UseFormReturn<\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TSchema = any\n> = ReturnType<typeof useFormContext>\n\nexport const FormProvider = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TSchema = any\n>(\n props: FormProviderProps<TFieldValues, TContext, TSchema>\n) => {\n const { children, fieldResolver, schema, fields, ...rest } = props\n return (\n <HookFormProvider {...rest}>\n <FormContext.Provider value={{ fieldResolver, schema, fields }}>\n {children}\n </FormContext.Provider>\n </HookFormProvider>\n )\n}\n","import * as React from 'react'\nimport { useFormContext } from './form-context'\nimport {\n Text,\n FormControl,\n FormControlProps,\n FormLabel,\n} from '@chakra-ui/react'\n\nimport { FieldProps } from './types'\n\nexport interface DisplayFieldProps\n extends FormControlProps,\n Omit<FieldProps, 'type' | 'label'> {}\n/**\n *\n *\n * @see Docs https://saas-ui.dev/\n */\nexport const DisplayField: React.FC<DisplayFieldProps> = ({\n name,\n label,\n placeholder,\n ...props\n}) => {\n return (\n <FormControl {...props}>\n {label ? <FormLabel htmlFor={name}>{label}</FormLabel> : null}\n <Text fontSize=\"md\">\n <FormValue name={name} />\n </Text>\n </FormControl>\n )\n}\n\nDisplayField.displayName = 'DisplayField'\n\nexport const FormValue: React.FC<{ name: string }> = ({ name }) => {\n const { getValues } = useFormContext()\n return getValues(name) || null\n}\n\nFormValue.displayName = 'FormValue'\n","import * as React from 'react'\nimport { RegisterOptions, FieldValues } from 'react-hook-form'\n\nimport { FocusableElement } from '@chakra-ui/utils'\nimport { useField } from './fields-context'\nimport { FieldProps } from './types'\nimport { useFieldProps } from './form-context'\n\nexport interface Option {\n value: string\n label?: string\n [key: string]: unknown\n}\n\nexport type FieldRules = Pick<\n RegisterOptions,\n 'required' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern'\n>\n\nconst defaultInputType = 'text'\n\n/**\n * Form field component.\n * \n * Build-in types:\n * text, number, password, textarea, select, native-select, checkbox, radio, switch, pin\n *\n * Will default to a text field if there is no matching type.\n\n * @see Docs https://saas-ui.dev/docs/components/forms/field\n */\nexport const Field = React.forwardRef(\n <TFieldValues extends FieldValues = FieldValues>(\n props: FieldProps<TFieldValues>,\n ref: React.ForwardedRef<FocusableElement>\n ) => {\n const { type = defaultInputType, name } = props\n const overrides = useFieldProps(name)\n const InputComponent = useField(overrides?.type || type)\n\n return <InputComponent ref={ref} {...props} {...overrides} />\n }\n) as (<TFieldValues extends FieldValues>(\n props: FieldProps<TFieldValues> & {\n ref?: React.ForwardedRef<FocusableElement>\n }\n) => React.ReactElement) & {\n displayName?: string\n}\n","import React from 'react'\nimport { defaultFieldTypes, InputField } from './default-fields'\n\nconst FieldsContext = React.createContext<Record<string, React.FC<any>> | null>(\n null\n)\n\nexport const FieldsProvider: React.FC<{\n value: Record<string, React.FC<any>>\n children: React.ReactNode\n}> = (props) => {\n const fields = { ...defaultFieldTypes, ...props.value }\n return (\n <FieldsContext.Provider value={fields}>\n {props.children}\n </FieldsContext.Provider>\n )\n}\n\nexport const useField = (type: string): React.FC<any> => {\n const context = React.useContext(FieldsContext)\n return context?.[type] || InputField\n}\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Input,\n Textarea,\n Checkbox,\n Switch,\n InputGroup,\n InputProps,\n TextareaProps,\n SwitchProps,\n CheckboxProps,\n PinInputField,\n HStack,\n PinInput,\n UsePinInputProps,\n SystemProps,\n} from '@chakra-ui/react'\n\nimport { NumberInput, NumberInputProps } from './number-input'\nimport { PasswordInput, PasswordInputProps } from './password-input'\nimport { RadioInput, RadioInputProps } from './radio'\n\nimport {\n Select,\n SelectButton,\n SelectList,\n SelectProps,\n NativeSelect,\n NativeSelectProps,\n} from './select'\n\nimport { createField } from './create-field'\n\nexport interface InputFieldProps extends InputProps {\n type?: string\n leftAddon?: React.ReactNode\n rightAddon?: React.ReactNode\n}\n\nexport const InputField = createField<InputFieldProps>(\n forwardRef(({ type = 'text', leftAddon, rightAddon, size, ...rest }, ref) => {\n const input = <Input type={type} size={size} {...rest} ref={ref} />\n if (leftAddon || rightAddon) {\n return (\n <InputGroup size={size}>\n {leftAddon}\n {input}\n {rightAddon}\n </InputGroup>\n )\n }\n return input\n })\n)\n\nexport interface NumberInputFieldProps extends NumberInputProps {\n type: 'number'\n}\n\nexport const NumberInputField = createField<NumberInputFieldProps>(\n NumberInput,\n {\n isControlled: true,\n }\n)\n\nexport const PasswordInputField = createField<PasswordInputProps>(\n forwardRef((props, ref) => <PasswordInput ref={ref} {...props} />)\n)\n\nexport const TextareaField = createField<TextareaProps>(Textarea)\n\nexport const SwitchField = createField<SwitchProps>(\n forwardRef(({ type, value, ...rest }, ref) => {\n return <Switch isChecked={!!value} {...rest} ref={ref} />\n }),\n {\n isControlled: true,\n }\n)\n\nexport const SelectField = createField<SelectProps>(\n forwardRef((props, ref) => {\n return (\n <Select ref={ref} {...props}>\n <SelectButton />\n <SelectList />\n </Select>\n )\n }),\n {\n isControlled: true,\n }\n)\n\nexport const CheckboxField = createField<CheckboxProps>(\n forwardRef(({ label, type, ...props }, ref) => {\n return (\n <Checkbox ref={ref} {...props}>\n {label}\n </Checkbox>\n )\n }),\n {\n hideLabel: true,\n }\n)\n\nexport const RadioField = createField<RadioInputProps>(RadioInput, {\n isControlled: true,\n})\n\nexport const NativeSelectField = createField<NativeSelectProps>(NativeSelect, {\n isControlled: true,\n})\n\nexport interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {\n pinLength?: number\n pinType?: 'alphanumeric' | 'number'\n spacing?: SystemProps['margin']\n}\n\nexport const PinField = createField<PinFieldProps>(\n forwardRef((props, ref) => {\n const { pinLength = 4, pinType, spacing, ...inputProps } = props\n\n const inputs: React.ReactNode[] = []\n for (let i = 0; i < pinLength; i++) {\n inputs.push(<PinInputField key={i} ref={ref} />)\n }\n\n return (\n <HStack spacing={spacing}>\n <PinInput {...inputProps} type={pinType}>\n {inputs}\n </PinInput>\n </HStack>\n )\n }),\n {\n isControlled: true,\n }\n)\n\nexport const defaultFieldTypes = {\n text: InputField,\n email: InputField,\n url: InputField,\n phone: InputField,\n number: NumberInputField,\n password: PasswordInputField,\n textarea: TextareaField,\n switch: SwitchField,\n select: SelectField,\n checkbox: CheckboxField,\n radio: RadioField,\n pin: PinField,\n 'native-select': NativeSelectField,\n}\n\nexport type DefaultFields = typeof defaultFieldTypes\n","import * as React from 'react'\n\nimport {\n forwardRef,\n NumberInput as ChakraNumberInput,\n NumberInputField,\n NumberInputStepper,\n NumberIncrementStepper,\n NumberDecrementStepper,\n NumberInputProps as ChakraNumberInputProps,\n} from '@chakra-ui/react'\n\nimport { ChevronDownIcon, ChevronUpIcon } from '@saas-ui/core'\n\ninterface NumberInputOptions {\n /**\n * Hide the stepper.\n */\n hideStepper?: boolean\n /**\n * Render a custom increment icon.\n */\n incrementIcon?: React.ReactNode\n /**\n * Render a custom decrement icon.\n */\n decrementIcon?: React.ReactNode\n}\n\nexport interface NumberInputProps\n extends ChakraNumberInputProps,\n NumberInputOptions {}\n\nexport const NumberInput = forwardRef<NumberInputProps, 'div'>((props, ref) => {\n const {\n hideStepper,\n incrementIcon = <ChevronUpIcon />,\n decrementIcon = <ChevronDownIcon />,\n ...rest\n } = props\n\n return (\n <ChakraNumberInput {...rest} ref={ref}>\n <NumberInputField />\n\n {!hideStepper && (\n <NumberInputStepper>\n <NumberIncrementStepper children={incrementIcon} />\n <NumberDecrementStepper children={decrementIcon} />\n </NumberInputStepper>\n )}\n </ChakraNumberInput>\n )\n})\n\nNumberInput.defaultProps = {\n hideStepper: false,\n}\n\nNumberInput.displayName = 'NumberInput'\n","import React, { useState } from 'react'\n\nimport { forwardRef, InputGroup, Input, InputProps } from '@chakra-ui/react'\n\nimport { ViewIcon, ViewOffIcon } from '@saas-ui/core/icons'\n\nimport { InputRightButton } from '../input-right-button'\n\ninterface PasswordOptions {\n viewIcon?: React.ReactNode\n viewOffIcon?: React.ReactNode\n leftAddon?: React.ReactNode\n}\n\nexport interface PasswordInputProps extends InputProps, PasswordOptions {}\n\nexport const PasswordInput = forwardRef<PasswordInputProps, 'div'>(\n (props, ref) => {\n const {\n viewIcon,\n viewOffIcon,\n autoComplete,\n w,\n width,\n size,\n variant,\n leftAddon,\n ...inputProps\n } = props\n const [show, setShow] = useState(false)\n const handleClick = () => setShow(!show)\n\n const label = show ? 'Hide password' : 'Show password'\n\n let icon\n if (show) {\n icon = viewIcon || <ViewIcon />\n } else {\n icon = viewOffIcon || <ViewOffIcon />\n }\n\n const groupProps = {\n width: w || width,\n size,\n variant,\n }\n\n return (\n <InputGroup {...groupProps}>\n {leftAddon}\n <Input\n {...inputProps}\n ref={ref}\n type={show ? 'text' : 'password'}\n autoComplete={show ? 'off' : autoComplete}\n />\n <InputRightButton\n onClick={handleClick}\n aria-label={label}\n variant=\"ghost\"\n >\n {icon}\n </InputRightButton>\n </InputGroup>\n )\n }\n)\n\nPasswordInput.displayName = 'PasswordInput'\n","import * as React from 'react'\n\nimport {\n Button,\n ButtonProps,\n forwardRef,\n InputRightElement,\n} from '@chakra-ui/react'\n\nexport type InputRightButtonProps = ButtonProps\n\nexport const InputRightButton = forwardRef<InputRightButtonProps, 'div'>(\n (props, ref) => {\n return (\n <InputRightElement w=\"auto\" px=\"1\" py=\"1\" alignItems=\"stretch\">\n <Button ref={ref} height=\"auto\" {...props} />\n </InputRightElement>\n )\n }\n)\n\nInputRightButton.id = 'InputRightElement'\n\nInputRightButton.displayName = 'InputRightButton'\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Stack,\n RadioGroup,\n RadioGroupProps,\n Radio,\n RadioProps,\n SystemProps,\n StackDirection,\n} from '@chakra-ui/react'\nimport { FieldOptions, FieldOption } from '../types'\nimport { mapOptions } from '../utils'\n\nexport interface RadioOption\n extends Omit<RadioProps, 'value' | 'label'>,\n FieldOption {}\n\nexport type RadioOptions = FieldOptions<RadioOption>\n\ninterface RadioInputOptions {\n options: RadioOptions\n spacing?: SystemProps['margin']\n direction?: StackDirection\n}\n\nexport interface RadioInputProps\n extends Omit<RadioGroupProps, 'children'>,\n RadioInputOptions {}\n\nexport const RadioInput = forwardRef<RadioInputProps, 'div'>(\n ({ options: optionsProp, spacing, direction, ...props }, ref) => {\n const { onBlur, onChange, ...groupProps } = props\n\n const options = mapOptions(optionsProp)\n\n return (\n <RadioGroup onChange={onChange} {...groupProps}>\n <Stack spacing={spacing} direction={direction}>\n {options.map(({ value, label, ...radioProps }, i) => {\n return (\n <Radio\n key={i}\n onBlur={onBlur}\n value={value}\n ref={ref}\n {...radioProps}\n >\n {label || value}\n </Radio>\n )\n })}\n </Stack>\n </RadioGroup>\n )\n }\n)\n\nRadioInput.displayName = 'RadioInput'\n","import * as React from 'react'\nimport { FieldOption, FieldOptions } from './types'\n\nexport const mapNestedFields = (name: string, children: React.ReactNode) => {\n return React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child.props.name) {\n let childName = child.props.name\n if (childName.includes('.')) {\n childName = childName.replace(/^.*\\.(.*)/, '$1')\n } else if (childName.includes('.$')) {\n childName = childName.replace(/^.*\\.\\$(.*)/, '$1')\n }\n\n return React.cloneElement(child, {\n ...child.props,\n name: `${name}.${childName}`,\n })\n }\n return child\n })\n}\n\nexport const mapOptions = <TOption extends FieldOption = FieldOption>(\n options: FieldOptions<TOption>\n) => {\n return options.map((option) => {\n if (typeof option === 'string') {\n return {\n label: option,\n value: option,\n }\n }\n return option\n })\n}\n","import * as React from 'react'\n\nimport {\n chakra,\n forwardRef,\n Menu,\n MenuProps,\n MenuButton,\n MenuList,\n MenuListProps,\n MenuItemOption,\n MenuOptionGroup,\n Button,\n ButtonProps,\n omitThemingProps,\n useMultiStyleConfig,\n SystemStyleObject,\n MenuItemOptionProps,\n useFormControlContext,\n} from '@chakra-ui/react'\nimport { cx, dataAttr } from '@chakra-ui/utils'\nimport { ChevronDownIcon } from '@saas-ui/core'\n\nimport { FieldOption } from '../types'\n\nimport {\n SelectOptions,\n SelectProvider,\n useSelect,\n useSelectContext,\n} from './select-context'\n\nexport interface SelectOption\n extends Omit<MenuItemOptionProps, 'value'>,\n FieldOption {}\n\nexport interface SelectProps\n extends Omit<MenuProps, 'children'>,\n SelectOptions {}\n\nexport interface SelectButtonProps extends ButtonProps {}\n\n/**\n * Button that opens the select menu and displays the selected value.\n *\n * @see https://saas-ui.dev/docs/components/forms/select\n */\nexport const SelectButton = forwardRef<SelectButtonProps, 'button'>(\n (props, ref) => {\n const styles = useMultiStyleConfig('SuiSelect', props)\n\n const {\n displayValue,\n renderValue,\n placeholder,\n isDisabled: isSelectDisabled,\n } = useSelectContext()\n\n const context = useFormControlContext()\n\n const {\n isInvalid,\n isReadOnly,\n isDisabled,\n isFocused,\n isRequired,\n id,\n onBlur,\n onFocus,\n } = context || {}\n\n const { rightIcon = <ChevronDownIcon />, ...rest } = props\n\n /* @ts-ignore */\n const focusStyles = styles.field?._focusVisible\n /* @ts-ignore */\n const readOnlyStyles = styles.field?._readOnly\n /* @ts-ignore */\n const invalid = styles.field?._invalid\n\n const height = styles.field?.h || styles.field?.height\n\n const buttonStyles: SystemStyleObject = {\n fontWeight: 'normal',\n textAlign: 'left',\n color: 'inherit',\n _active: {\n bg: 'transparent',\n },\n minH: height,\n _focus: focusStyles,\n _expanded: focusStyles,\n _readOnly: readOnlyStyles,\n _invalid: invalid,\n ...styles.field,\n h: 'auto',\n }\n\n // Using a Button, so we can simply use leftIcon and rightIcon\n return (\n <MenuButton\n as={Button}\n id={id || React.useId()}\n {...rest}\n onFocus={onFocus}\n onBlur={onBlur}\n isDisabled={isDisabled || isSelectDisabled}\n data-invalid={dataAttr(isInvalid)}\n data-read-only={dataAttr(isReadOnly)}\n data-focus={dataAttr(isFocused)}\n data-required={dataAttr(isRequired)}\n rightIcon={rightIcon}\n ref={ref}\n sx={buttonStyles}\n >\n {renderValue(displayValue) || placeholder}\n </MenuButton>\n )\n }\n)\n\nSelectButton.displayName = 'SelectButton'\n\n/**\n * Allow users to select a value from a list of options.\n *\n * @see https://saas-ui.dev/docs/components/forms/select\n */\nexport const Select = forwardRef<SelectProps, 'select'>((props, ref) => {\n const { name, children, isDisabled, multiple, ...rest } = props\n\n const menuProps = omitThemingProps(rest)\n\n const context = useSelect(props)\n\n const { value, controlProps } = context\n\n return (\n <SelectProvider value={context}>\n <Menu {...menuProps} closeOnSelect={!multiple}>\n <chakra.div className={cx('sui-select')}>\n {children}\n <chakra.input\n {...controlProps}\n ref={ref}\n name={name}\n type=\"hidden\"\n value={value || ''}\n className=\"saas-select__input\"\n />\n </chakra.div>\n </Menu>\n </SelectProvider>\n )\n})\n\nexport interface SelectListProps extends MenuListProps {}\n\n/**\n * The list of options to choose from.\n *\n * @see https://saas-ui.dev/docs/components/forms/select\n */\nexport const SelectList: React.FC<SelectListProps> = (props) => {\n const { defaultValue, value, options, multiple, onChange } =\n useSelectContext()\n\n return (\n <MenuList maxH=\"100vh\" overflowY=\"auto\" {...props}>\n <MenuOptionGroup\n defaultValue={(defaultValue || value) as string | string[] | undefined}\n value={value}\n onChange={onChange}\n type={multiple ? 'checkbox' : 'radio'}\n >\n {options\n ? options.map(({ value, label, ...rest }, i) => (\n <SelectOption key={i} value={value} {...rest}>\n {label || value}\n </SelectOption>\n ))\n : props.children}\n </MenuOptionGroup>\n </MenuList>\n )\n}\n\nSelect.displayName = 'Select'\n\n/**\n * An option in a select list\n *\n * @see https://saas-ui.dev/docs/components/forms/select\n */\nexport const SelectOption = forwardRef<MenuItemOptionProps, 'button'>(\n (props, ref) => {\n return <MenuItemOption ref={ref} {...props} />\n }\n)\nSelectOption.id = 'MenuItemOption'\nSelectOption.displayName = 'SelectOption'\n","import {\n HTMLChakraProps,\n useControllableState,\n useFormControl,\n} from '@chakra-ui/react'\nimport { createContext } from '@chakra-ui/react-utils'\nimport React from 'react'\nimport { FieldOptions } from '../types'\nimport { mapOptions } from '../utils'\nimport { SelectOption } from './select'\n\nexport const [SelectProvider, useSelectContext] = createContext<\n ReturnType<typeof useSelect>\n>({\n strict: true,\n})\n\nexport interface SelectOptions {\n /**\n * The name of the input field in a native form.\n */\n name: string\n /**\n * The value of the select field.\n */\n value?: string | string[]\n /**\n * The initial value of the select field.\n */\n defaultValue?: string | string[]\n /**\n * The callback invoked when the value of the select field changes.\n * @param value The value of the select field.\n */\n onChange?: (value: string | string[]) => void\n /**\n * The placeholder text when there's no value.\n */\n placeholder?: string\n /**\n * If `true`, the select will be disabled.\n */\n isDisabled?: boolean\n /**\n * An array of options\n * If you leave this empty the children prop will be rendered.\n */\n options?: FieldOptions<SelectOption>\n /**\n * Enable multiple select.\n */\n multiple?: boolean\n /**\n * The function used to render the value of the select field.\n * @param value The value of the select field.\n * @returns The rendered value.\n */\n renderValue?: (value: string | string[]) => React.ReactNode\n}\n\nexport const useSelect = (props: SelectOptions) => {\n const {\n name,\n value,\n defaultValue,\n onChange,\n multiple,\n placeholder,\n options: optionsProp,\n isDisabled,\n renderValue = (value) =>\n typeof value === 'string' ? value : value?.join(', '),\n } = props\n const [currentValue, setCurrentValue] = useControllableState({\n value,\n defaultValue,\n onChange,\n })\n\n const controlProps = useFormControl({ name } as HTMLChakraProps<'input'>)\n\n const options = React.useMemo(\n () => optionsProp && mapOptions(optionsProp),\n [optionsProp]\n )\n\n const handleChange = (value: string | string[]) => {\n setCurrentValue(value)\n }\n\n const getDisplayValue = React.useCallback(\n (value: string) => {\n if (!options) {\n return value\n }\n\n for (const option of options) {\n if (option.value === value) {\n return option.label || option.value\n }\n }\n\n return value\n },\n [options]\n )\n\n const displayValue = React.useMemo(\n () =>\n currentValue\n ? (Array.isArray(currentValue) ? currentValue : [currentValue]).map(\n getDisplayValue\n )\n : [],\n [currentValue, getDisplayValue]\n )\n\n return {\n defaultValue,\n value: currentValue,\n displayValue,\n renderValue,\n onChange: handleChange,\n options,\n multiple,\n controlProps,\n placeholder,\n isDisabled,\n }\n}\n","import * as React from 'react'\n\nimport {\n forwardRef,\n Select as ChakraSelect,\n SelectProps as ChakraSelectProps,\n} from '@chakra-ui/react'\n\ninterface Option {\n value: string\n label?: string\n}\n\ninterface NativeSelectOptions {\n options?: Option[]\n}\n\nexport interface NativeSelectProps\n extends ChakraSelectProps,\n NativeSelectOptions {}\n\nexport const NativeSelect = forwardRef<NativeSelectProps, 'select'>(\n ({ options, children, ...props }, ref) => {\n return (\n <ChakraSelect ref={ref} {...props}>\n {children ||\n options?.map(({ value, label }) => {\n return (\n <option key={value} value={value}>\n {label || value}\n </option>\n )\n })}\n </ChakraSelect>\n )\n }\n)\n\nNativeSelect.displayName = 'NativeSelect'\n","import * as React from 'react'\nimport { Controller } from 'react-hook-form'\n\nimport { forwardRef, useMergeRefs } from '@chakra-ui/react'\nimport { callAllHandlers } from '@chakra-ui/utils'\nimport { BaseFieldProps, FieldProps } from './types'\nimport { BaseField } from './base-field'\nimport { useFormContext } from './form-context'\n\ninterface CreateFieldProps {\n displayName: string\n hideLabel?: boolean\n BaseField: React.FC<any>\n}\n\nconst _createField = (\n InputComponent: React.FC<any>,\n { displayName, hideLabel, BaseField }: CreateFieldProps\n) => {\n const Field = forwardRef((props, ref) => {\n const {\n id,\n name,\n label,\n help,\n isDisabled,\n isInvalid,\n isReadOnly,\n isRequired,\n rules,\n ...inputProps\n } = props\n\n const inputRules = {\n required: isRequired,\n ...rules,\n }\n\n return (\n <BaseField\n id={id}\n name={name}\n label={label}\n help={help}\n hideLabel={hideLabel}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n >\n <InputComponent\n ref={ref}\n id={id}\n name={name}\n label={hideLabel ? label : undefined} // Only pass down the label when it should be inline.\n rules={inputRules}\n {...inputProps}\n />\n </BaseField>\n )\n })\n Field.displayName = displayName\n\n return Field\n}\n\nconst withControlledInput = (InputComponent: React.FC<any>) => {\n return forwardRef<FieldProps, typeof InputComponent>(\n ({ name, rules, ...inputProps }, ref) => {\n const { control } = useFormContext()\n\n return (\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { ref: _ref, ...field } }) => (\n <InputComponent\n {...field}\n {...inputProps}\n onChange={callAllHandlers(inputProps.onChange, field.onChange)}\n onBlur={callAllHandlers(inputProps.onBlur, field.onBlur)}\n ref={useMergeRefs(ref, _ref)}\n />\n )}\n />\n )\n }\n )\n}\n\nconst withUncontrolledInput = (InputComponent: React.FC<any>) => {\n return forwardRef<FieldProps, typeof InputComponent>(\n ({ name, rules, ...inputProps }, ref) => {\n const { register } = useFormContext()\n\n const { ref: _ref, ...field } = register(name, rules)\n\n return (\n <InputComponent\n {...field}\n {...inputProps}\n onChange={callAllHandlers(inputProps.onChange, field.onChange)}\n onBlur={callAllHandlers(inputProps.onBlur, field.onBlur)}\n ref={useMergeRefs(ref, _ref)}\n />\n )\n }\n )\n}\n\nexport interface CreateFieldOptions {\n isControlled?: boolean\n hideLabel?: boolean\n BaseField?: React.FC<any>\n}\n\n/**\n * Register a new field type\n * @param type The name for this field in kebab-case, eg `email` or `array-field`\n * @param component The React component\n * @param options\n * @param options.isControlled Set this to true if this is a controlled field.\n * @param options.hideLabel Hide the field label, for example for the checkbox field.\n */\nexport const createField = <TProps extends object>(\n component: React.FC<TProps>,\n options?: CreateFieldOptions\n) => {\n let InputComponent\n if (options?.isControlled) {\n InputComponent = withControlledInput(component)\n } else {\n InputComponent = withUncontrolledInput(component)\n }\n\n const Field = _createField(InputComponent, {\n displayName: `${component.displayName ?? 'Custom'}Field`,\n hideLabel: options?.hideLabel,\n BaseField: options?.BaseField || BaseField,\n }) as React.FC<TProps & BaseFieldProps>\n\n return Field\n}\n","import * as React from 'react'\nimport { FormState, get } from 'react-hook-form'\n\nimport {\n Box,\n FormControl,\n FormLabel,\n FormHelperText,\n FormErrorMessage,\n} from '@chakra-ui/react'\n\nimport { useFormContext } from './form-context'\n\nimport { BaseFieldProps, FieldProps } from './types'\n\nconst getError = (name: string, formState: FormState<{ [x: string]: any }>) => {\n return get(formState.errors, name)\n}\n\nconst isTouched = (\n name: string,\n formState: FormState<{ [x: string]: any }>\n) => {\n return get(formState.touchedFields, name)\n}\n\n/**\n * The default BaseField component\n * Composes the Chakra UI FormControl component, with FormLabel, FormHelperText and FormErrorMessage.\n */\nexport const BaseField: React.FC<BaseFieldProps> = (props) => {\n const { name, label, help, hideLabel, children, ...controlProps } = props\n\n const { formState } = useFormContext()\n\n const error = getError(name, formState)\n\n return (\n <FormControl {...controlProps} isInvalid={!!error}>\n {label && !hideLabel ? <FormLabel>{label}</FormLabel> : null}\n <Box>\n {children}\n {help && !error?.message ? (\n <FormHelperText>{help}</FormHelperText>\n ) : null}\n {error?.message && (\n <FormErrorMessage>{error?.message}</FormErrorMessage>\n )}\n </Box>\n </FormControl>\n )\n}\n\nBaseField.displayName = 'BaseField'\n","import * as React from 'react'\n\nimport { FormLayout } from './layout'\nimport { BaseFieldProps } from './types'\nimport { Field } from './field'\n\nimport { ArrayField } from './array-field'\nimport { ObjectField } from './object-field'\nimport { FieldResolver } from './field-resolver'\nimport { useFormContext } from './form-context'\n\nexport interface FieldsProps<TSchema = any> {\n schema?: TSchema\n fieldResolver?: FieldResolver\n focusFirstField?: boolean\n}\n\nconst mapNestedFields = (resolver: FieldResolver, name: string) => {\n return resolver\n .getNestedFields(name)\n ?.map(\n (\n { name, type, ...nestedFieldProps }: BaseFieldProps,\n i\n ): React.ReactNode => (\n <Field\n key={name || i}\n name={name}\n type={type as any}\n {...nestedFieldProps}\n />\n )\n )\n}\n\nexport const AutoFields: React.FC<FieldsProps> = ({\n schema: schemaProp,\n fieldResolver: fieldResolverProp,\n focusFirstField,\n ...props\n}) => {\n const context = useFormContext()\n const schema = schemaProp || context.schema\n const fieldResolver = fieldResolverProp || context.fieldResolver\n const resolver = React.useMemo(() => fieldResolver, [schema, fieldResolver])\n\n const fields = React.useMemo(() => resolver?.getFields(), [resolver])\n\n const form = useFormContext()\n\n React.useEffect(() => {\n if (focusFirstField && fields?.[0]?.name) {\n form.setFocus(fields[0].name)\n }\n }, [schema, fieldResolver, focusFirstField])\n\n if (!resolver) {\n return null\n }\n\n return (\n <FormLayout {...props}>\n {fields?.map(\n ({\n name,\n type,\n defaultValue,\n ...fieldProps\n }: BaseFieldProps): React.ReactNode => {\n if (type === 'array') {\n return (\n <ArrayField key={name} name={name} {...fieldProps}>\n {mapNestedFields(resolver, name)}\n </ArrayField>\n )\n } else if (type === 'object') {\n return (\n <ObjectField key={name} name={name} {...fieldProps}>\n {mapNestedFields(resolver, name)}\n </ObjectField>\n )\n }\n\n return (\n <Field key={name} name={name} type={type as any} {...fieldProps} />\n )\n }\n )}\n </FormLayout>\n )\n}\n\nAutoFields.displayName = 'Fields'\n","import * as React from 'react'\n\nimport {\n chakra,\n ResponsiveValue,\n SimpleGrid,\n SimpleGridProps,\n useTheme,\n} from '@chakra-ui/react'\nimport { cx } from '@chakra-ui/utils'\n\nexport interface FormLayoutProps extends SimpleGridProps {}\n\ninterface FormLayoutItemProps {\n children: React.ReactNode\n}\n\nconst FormLayoutItem: React.FC<FormLayoutItemProps> = ({ children }) => {\n return <chakra.div>{children}</chakra.div>\n}\n\nFormLayoutItem.displayName = 'FormLayoutItem'\n\n/**\n * Create consistent field spacing and positioning.\n *\n *\n * Renders form items in a `SimpleGrid`\n * @see https://chakra-ui.com/docs/layout/simple-grid\n *\n * @see https://saas-ui.dev/docs/components/forms/form\n */\nexport const FormLayout = ({ children, ...props }: FormLayoutProps) => {\n const theme = useTheme()\n\n const defaultProps = theme.components?.SuiFormLayout?.defaultProps ?? {\n spacing: 4,\n }\n\n const gridProps = {\n ...defaultProps,\n ...props,\n }\n\n return (\n <SimpleGrid\n {...gridProps}\n className={cx('sui-form__layout', props.className)}\n >\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return <FormLayoutItem>{child}</FormLayoutItem>\n }\n return child\n })}\n </SimpleGrid>\n )\n}\n\nFormLayout.displayName = 'FormLayout'\n","import * as React from 'react'\n\nimport {\n chakra,\n ResponsiveValue,\n forwardRef,\n Button,\n ButtonProps,\n} from '@chakra-ui/react'\nimport { PlusIcon, MinusIcon } from '@saas-ui/core/icons'\n\nimport { FormLayout, FormLayoutProps } from './layout'\nimport { BaseField } from './base-field'\nimport { BaseFieldProps } from './types'\n\nimport { mapNestedFields } from './utils'\n\nimport {\n useArrayField,\n useArrayFieldRow,\n useArrayFieldContext,\n ArrayFieldProvider,\n ArrayFieldOptions,\n ArrayFieldRowProvider,\n useArrayFieldRowContext,\n useArrayFieldRemoveButton,\n useArrayFieldAddButton,\n UseArrayFieldReturn,\n} from './use-array-field'\nimport { FieldPath, FieldValues } from 'react-hook-form'\nimport { isFunction } from '@chakra-ui/utils'\nimport { MaybeRenderProp } from '@chakra-ui/react-utils'\n\nexport interface ArrayFieldButtonProps extends ButtonProps {}\n\ninterface ArrayField {\n id: string\n [key: string]: unknown\n}\n\ninterface ArrayFieldRowProps extends FormLayoutProps {\n /**\n * Amount of field columns\n */\n columns?: ResponsiveValue<number>\n /**\n * Spacing between fields\n */\n spacing?: ResponsiveValue<string | number>\n /**\n * The array index\n */\n index: number\n /**\n * The fields\n */\n children: React.ReactNode\n}\n/**\n * Render prop component, to get access to the internal fields state. Must be a child of ArrayFieldContainer.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRow: React.FC<ArrayFieldRowProps> = ({\n children,\n index,\n ...rowFieldsProps\n}) => {\n return (\n <ArrayFieldRowContainer index={index}>\n <ArrayFieldRowFields {...rowFieldsProps}>{children}</ArrayFieldRowFields>\n <ArrayFieldRemoveButton />\n </ArrayFieldRowContainer>\n )\n}\n\nArrayFieldRow.displayName = 'ArrayFieldRow'\n\nexport interface ArrayFieldRowFieldsProps extends FormLayoutProps {\n /**\n * Amount of field columns\n */\n columns?: ResponsiveValue<number>\n /**\n * Spacing between fields\n */\n spacing?: ResponsiveValue<string | number>\n /**\n * The fields\n */\n children: React.ReactNode\n}\n/**\n * Add the name prefix to the fields and acts as a horizontal form layout by default.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRowFields: React.FC<ArrayFieldRowFieldsProps> = ({\n children,\n ...layoutProps\n}) => {\n const { name } = useArrayFieldRowContext()\n return (\n <FormLayout flex=\"1\" mr=\"2\" {...layoutProps}>\n {mapNestedFields(name, children)}\n </FormLayout>\n )\n}\n\nArrayFieldRowFields.displayName = 'ArrayFieldRowFields'\n\n/**\n * The row container component providers row context.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRowContainer: React.FC<ArrayFieldRowProps> = ({\n children,\n index,\n ...rest\n}) => {\n const context = useArrayFieldRow({ index })\n\n const styles = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-end',\n width: '100%',\n mb: 4,\n }\n\n return (\n <ArrayFieldRowProvider value={context}>\n <chakra.div {...rest} __css={styles}>\n {children}\n </chakra.div>\n </ArrayFieldRowProvider>\n )\n}\n\nArrayFieldRowContainer.displayName = 'ArrayFieldRowContainer'\n\n/**\n * The default remove button.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldRemoveButton: React.FC<ArrayFieldButtonProps> = (\n props\n) => {\n return (\n <Button aria-label=\"Remove row\" {...useArrayFieldRemoveButton()} {...props}>\n {props.children || <MinusIcon />}\n </Button>\n )\n}\n\nArrayFieldRemoveButton.displayName = 'ArrayFieldRemoveButton'\n\n/**\n * The default add button.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldAddButton: React.FC<ArrayFieldButtonProps> = (props) => {\n return (\n <Button\n aria-label=\"Add row\"\n float=\"right\"\n {...useArrayFieldAddButton()}\n {...props}\n >\n {props.children || <PlusIcon />}\n </Button>\n )\n}\n\nArrayFieldAddButton.displayName = 'ArrayFieldAddButton'\n\nexport interface ArrayFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> extends ArrayFieldOptions<TFieldValues, TName>,\n Omit<\n BaseFieldProps<TFieldValues, TName>,\n 'name' | 'defaultValue' | 'children'\n > {\n children: MaybeRenderProp<ArrayField[]>\n}\n\n/**\n * The wrapper component that composes the default ArrayField functionality.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayField = forwardRef(\n (props: ArrayFieldProps, ref: React.ForwardedRef<UseArrayFieldReturn>) => {\n const { children, ...containerProps } = props\n\n const rowFn = isFunction(children)\n ? children\n : (fields: ArrayField[]) => (\n <>\n {fields.map(({ id }, index: number) => (\n <ArrayFieldRow key={id} index={index}>\n {children}\n </ArrayFieldRow>\n )) || null}\n </>\n )\n\n return (\n <ArrayFieldContainer ref={ref} {...containerProps}>\n <ArrayFieldRows>{rowFn as any}</ArrayFieldRows>\n <ArrayFieldAddButton />\n </ArrayFieldContainer>\n )\n }\n) as ((\n props: ArrayFieldProps & {\n ref?: React.ForwardedRef<UseArrayFieldReturn>\n }\n) => React.ReactElement) & {\n displayName: string\n}\n\nArrayField.displayName = 'ArrayField'\n\nexport interface ArrayFieldRowsProps {\n children: (fields: ArrayField[]) => React.ReactElement | null\n}\n\nexport const ArrayFieldRows = ({\n children,\n}: ArrayFieldRowsProps): React.ReactElement | null => {\n const { fields } = useArrayFieldContext()\n return children(fields)\n}\n\nArrayFieldRows.displayName = 'ArrayFieldRows'\n\nexport interface ArrayFieldContainerProps\n extends Omit<ArrayFieldProps, 'children'> {\n children: React.ReactNode\n}\n\n/**\n * The container component provides context and state management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/array-field\n */\nexport const ArrayFieldContainer = React.forwardRef(\n (\n {\n name,\n defaultValue,\n keyName,\n min,\n max,\n children,\n ...fieldProps\n }: ArrayFieldContainerProps,\n ref: React.ForwardedRef<UseArrayFieldReturn>\n ) => {\n const context = useArrayField({\n name,\n defaultValue,\n keyName,\n min,\n max,\n })\n\n // This exposes the useArrayField api through the forwarded ref\n React.useImperativeHandle(ref, () => context, [ref, context])\n\n return (\n <ArrayFieldProvider value={context}>\n <BaseField name={name} {...fieldProps}>\n {children}\n </BaseField>\n </ArrayFieldProvider>\n )\n }\n)\n\nArrayFieldContainer.displayName = 'ArrayFieldContainer'\n","import * as React from 'react'\nimport {\n useFieldArray,\n UseFieldArrayReturn,\n FieldValues,\n FieldPath,\n} from 'react-hook-form'\n\nimport { useFormContext } from './form-context'\n\nimport { createContext } from '@chakra-ui/react-utils'\n\nexport interface UseArrayFieldReturn extends UseFieldArrayReturn {\n /**\n * The array field name\n */\n name: string\n /**\n * The default value for new items\n */\n defaultValue: Record<string, any>\n /**\n * Min amount of items\n */\n min?: number\n /**\n * Max amount of items\n */\n max?: number\n}\n\nexport const [ArrayFieldProvider, useArrayFieldContext] =\n createContext<UseArrayFieldReturn>({\n name: 'ArrayFieldContext',\n })\n\nexport interface UseArrayFieldRowReturn {\n /**\n * Name of the array field including the index, eg 'field.0'\n */\n name: string\n /**\n * The field index\n */\n index: number\n /**\n * Remove this array item\n */\n remove: () => void\n /**\n * True if this is the first item\n */\n isFirst: boolean\n /**\n * True if this is the last item\n */\n isLast: boolean\n}\n\nexport const [ArrayFieldRowProvider, useArrayFieldRowContext] =\n createContext<UseArrayFieldRowReturn>({\n name: 'ArrayFieldRowContext',\n })\n\nexport interface ArrayFieldOptions<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> {\n /**\n * The field name\n */\n name: TName\n /**\n * Default value for new values in the array\n */\n defaultValue?: Record<string, any>\n /**\n * Default key name for rows, change this if your data uses a different 'id' field\n * @default \"id\"\n */\n keyName?: string\n min?: number\n max?: number\n}\n\nexport const useArrayField = ({\n name,\n defaultValue = {},\n keyName,\n min,\n max,\n}: ArrayFieldOptions) => {\n const { control } = useFormContext()\n const context = useFieldArray({\n control,\n name,\n keyName,\n })\n\n return {\n ...context,\n name,\n defaultValue,\n min,\n max,\n }\n}\n\nexport interface UseArrayFieldRowProps {\n index: number\n}\n\nexport const useArrayFieldRow = ({ index }: UseArrayFieldRowProps) => {\n const { clearErrors } = useFormContext()\n const { name, remove, fields } = useArrayFieldContext()\n\n React.useEffect(() => {\n // reset errors, to make sure min/max errors reset correctly\n clearErrors(name)\n }, [])\n\n return {\n index,\n isFirst: index === 0,\n isLast: index === fields.length - 1,\n name: `${name}.${index}`,\n remove: React.useCallback(() => {\n clearErrors(name)\n remove(index)\n }, [index]),\n }\n}\n\nexport const useArrayFieldRemoveButton = () => {\n const { isFirst, remove } = useArrayFieldRowContext()\n const { min, fields } = useArrayFieldContext()\n\n const isDisabled = isFirst && !!(min && fields.length <= min)\n\n return {\n onClick: () => remove(),\n isDisabled,\n }\n}\n\nexport const useArrayFieldAddButton = () => {\n const { append, defaultValue, max, fields } = useArrayFieldContext()\n\n const isDisabled = !!(max && fields.length >= max)\n\n return {\n onClick: () =>\n append(defaultValue, {\n shouldFocus: false,\n }),\n isDisabled,\n }\n}\n","import * as React from 'react'\nimport {\n FormControl,\n FormLabel,\n FormLabelProps,\n ResponsiveValue,\n useStyleConfig,\n} from '@chakra-ui/react'\n\nimport { FormLayout } from './layout'\nimport { BaseFieldProps } from './types'\n\nimport { mapNestedFields } from './utils'\nimport { FieldPath, FieldValues } from 'react-hook-form'\n\nexport interface ObjectFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> extends BaseFieldProps {\n name: TName\n children: React.ReactNode\n columns?: ResponsiveValue<number>\n spacing?: ResponsiveValue<string | number>\n}\n\nexport const FormLegend = (props: FormLabelProps) => {\n const styles = useStyleConfig('SuiFormLegend')\n return <FormLabel as=\"legend\" sx={styles} {...props} />\n}\n/**\n * The object field component.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/object-field\n */\nexport const ObjectField: React.FC<ObjectFieldProps> = (props) => {\n const { name, label, hideLabel, children, columns, spacing, ...fieldProps } =\n props\n\n return (\n <FormControl name={name} as=\"fieldset\" {...fieldProps}>\n <FormLegend display={hideLabel ? 'none' : 'block'}>{label}</FormLegend>\n <FormLayout columns={columns} gridGap={spacing}>\n {mapNestedFields(name, children)}\n </FormLayout>\n </FormControl>\n )\n}\n\nObjectField.displayName = 'ObjectField'\n","import * as React from 'react'\n\nimport { useFormContext } from 'react-hook-form'\n\nimport { Button, ButtonProps, forwardRef } from '@chakra-ui/react'\n\nexport interface SubmitButtonProps extends ButtonProps {\n /**\n * Disable the submit button if the form is untouched.\n *\n * Change the default behavior by updating\n * `SubmitButton.defaultProps.disableIfUntouched`\n */\n disableIfUntouched?: boolean\n /**\n * Disable the submit button if the form is invalid.\n *\n * Change the default behavior by updating\n * `SubmitButton.defaultProps.disableIfInvalid`\n */\n disableIfInvalid?: boolean\n}\n/**\n * A button with type submit and default color scheme primary and isLoading state when the form is submitting.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const SubmitButton = forwardRef<SubmitButtonProps, 'button'>(\n (props, ref) => {\n const {\n children = 'Submit',\n disableIfUntouched,\n disableIfInvalid,\n isDisabled: isDisabledProp,\n isLoading,\n ...rest\n } = props\n const { formState } = useFormContext()\n\n const isDisabled =\n (disableIfUntouched && !formState.isDirty) ||\n (disableIfInvalid && !formState.isValid) ||\n isDisabledProp\n\n return (\n <Button\n {...rest}\n ref={ref}\n type=\"submit\"\n isLoading={formState.isSubmitting || isLoading}\n isDisabled={isDisabled}\n >\n {children}\n </Button>\n )\n }\n)\n\nSubmitButton.defaultProps = {\n variant: 'primary',\n disableIfUntouched: false,\n disableIfInvalid: false,\n}\n\nSubmitButton.displayName = 'SubmitButton'\n","import * as React from 'react'\nimport {\n useWatch,\n FieldValues,\n UseFormReturn,\n FieldPath,\n} from 'react-hook-form'\n\nimport { useFormContext } from './form-context'\n\nexport interface DisplayIfProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> {\n children: React.ReactElement\n name: TName\n defaultValue?: unknown\n isDisabled?: boolean\n isExact?: boolean\n condition?: (value: unknown, context: UseFormReturn<TFieldValues>) => boolean\n}\n/**\n * Conditionally render parts of a form.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const DisplayIf = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n children,\n name,\n defaultValue,\n isDisabled,\n isExact,\n condition = (value) => !!value,\n}: DisplayIfProps<TFieldValues, TName>) => {\n const value = useWatch<TFieldValues>({\n name,\n defaultValue: defaultValue as any,\n disabled: isDisabled,\n exact: isExact,\n })\n const context = useFormContext() as any\n return condition(value, context) ? children : null\n}\n\nDisplayIf.displayName = 'DisplayIf'\n","import * as React from 'react'\n\nimport { FieldValues, UseFormReturn } from 'react-hook-form'\n\nimport {\n chakra,\n Button,\n ButtonProps,\n HTMLChakraProps,\n ThemingProps,\n} from '@chakra-ui/react'\n\nimport { callAllHandlers, runIfFn, cx } from '@chakra-ui/utils'\n\nimport {\n StepperProvider,\n StepperSteps,\n StepperStepsProps,\n StepperStep,\n useStepperContext,\n StepperContainer,\n StepperProps,\n} from '@saas-ui/core'\n\nimport { Form } from './form'\nimport { SubmitButton } from './submit-button'\n\nimport {\n useStepForm,\n useFormStep,\n StepFormProvider,\n UseStepFormProps,\n FormStepSubmitHandler,\n} from './use-step-form'\n\nexport interface StepFormProps<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object\n> extends UseStepFormProps<TFieldValues> {}\n\n/**\n * The wrapper component provides context, state, and focus management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const StepForm = React.forwardRef(\n <\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object\n >(\n props: StepFormProps<TFieldValues, TContext>,\n ref: React.ForwardedRef<HTMLFormElement>\n ) => {\n const { children, ...rest } = props\n\n const stepper = useStepForm<TFieldValues>(props)\n\n const { getFormProps, ...ctx } = stepper\n\n const context = React.useMemo(() => ctx, [ctx])\n\n return (\n <StepperProvider value={context}>\n <StepFormProvider value={context}>\n <Form ref={ref} {...rest} {...getFormProps()}>\n {runIfFn(children, stepper)}\n </Form>\n </StepFormProvider>\n </StepperProvider>\n )\n }\n) as <TFieldValues extends FieldValues>(\n props: StepFormProps<TFieldValues> & {\n ref?: React.ForwardedRef<HTMLFormElement>\n }\n) => React.ReactElement\n\nexport interface FormStepOptions {\n /**\n * The step name\n */\n name: string\n /**\n * Schema\n */\n schema?: any\n /**\n * Hook Form Resolver\n */\n resolver?: any\n}\n\nexport interface FormStepperProps\n extends StepperStepsProps,\n ThemingProps<'Stepper'> {}\n\n/**\n * Renders a stepper that displays progress above the form.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const FormStepper: React.FC<FormStepperProps> = (props) => {\n const { activeIndex, setIndex } = useStepperContext()\n\n const { children, orientation, variant, colorScheme, size, ...rest } = props\n\n const elements = React.Children.map(children, (child) => {\n if (\n React.isValidElement<FormStepProps>(child) &&\n child?.type === FormStep\n ) {\n const { isCompleted } = useFormStep(child.props) // Register this step\n return (\n <StepperStep\n name={child.props.name}\n title={child.props.title}\n isCompleted={isCompleted}\n {...rest}\n >\n {child.props.children}\n </StepperStep>\n )\n }\n return child\n })\n\n const onChange = React.useCallback((i: number) => {\n setIndex(i)\n }, [])\n\n return (\n <StepperContainer\n orientation={orientation}\n step={activeIndex}\n variant={variant}\n colorScheme={colorScheme}\n size={size}\n onChange={onChange}\n >\n <StepperSteps mb=\"4\" {...props}>\n {elements}\n </StepperSteps>\n </StepperContainer>\n )\n}\n\nexport interface FormStepProps\n extends FormStepOptions,\n Omit<HTMLChakraProps<'div'>, 'onSubmit'> {\n onSubmit?: FormStepSubmitHandler\n}\n/**\n * The form step containing fields for a specific step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const FormStep: React.FC<FormStepProps> = (props) => {\n const { name, schema, resolver, children, className, onSubmit, ...rest } =\n props\n const step = useFormStep({ name, schema, resolver, onSubmit })\n\n const { isActive } = step\n\n return isActive ? (\n <chakra.div {...rest} className={cx('sui-form__step', className)}>\n {children}\n </chakra.div>\n ) : null\n}\n\nFormStep.displayName = 'FormStep'\n\n/**\n * A button that this opens the previous step when clicked. Disabled on the first step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const PrevButton: React.FC<ButtonProps> = (props) => {\n const { isFirstStep, isCompleted, prevStep } = useStepperContext()\n\n return (\n <Button\n isDisabled={isFirstStep || isCompleted}\n label=\"Back\"\n {...props}\n className={cx('sui-form__prev-button', props.className)}\n onClick={callAllHandlers(props.onClick, prevStep)}\n />\n )\n}\n\nPrevButton.displayName = 'PrevButton'\n\nexport interface NextButtonProps extends Omit<ButtonProps, 'children'> {\n submitLabel?: string\n label?: string\n}\n\n/**\n * A button that submits the active step.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/step-form\n */\nexport const NextButton: React.FC<NextButtonProps> = (props) => {\n const { label = 'Next', submitLabel = 'Complete', ...rest } = props\n const { isLastStep, isCompleted } = useStepperContext()\n\n return (\n <SubmitButton\n {...rest}\n isDisabled={isCompleted}\n className={cx('sui-form__next-button', props.className)}\n >\n {isLastStep || isCompleted ? submitLabel : label}\n </SubmitButton>\n )\n}\n\nNextButton.displayName = 'NextButton'\n","import * as React from 'react'\n\nimport { chakra, HTMLChakraProps, forwardRef } from '@chakra-ui/react'\nimport { cx, runIfFn } from '@chakra-ui/utils'\n\nimport {\n useForm,\n UseFormProps,\n UseFormReturn,\n FieldValues,\n SubmitHandler,\n SubmitErrorHandler,\n ResolverOptions,\n ResolverResult,\n WatchObserver,\n} from 'react-hook-form'\nimport { FormProvider } from './form-context'\nimport { FieldResolver } from './field-resolver'\nimport { MaybeRenderProp } from '@chakra-ui/react-utils'\n\nexport type { UseFormReturn, FieldValues, SubmitHandler }\n\nimport { FieldProps, DefaultFieldOverrides } from './types'\n\nimport { Field as DefaultField } from './field'\nimport { FormLayout } from './layout'\nimport { AutoFields } from './fields'\nimport { SubmitButton } from './submit-button'\nimport { DisplayIf, DisplayIfProps } from './display-if'\nimport { ArrayField, ArrayFieldProps } from './array-field'\nimport { ObjectField, ObjectFieldProps } from './object-field'\n\nexport interface FormRenderContext<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TFieldTypes = FieldProps<TFieldValues>\n> extends UseFormReturn<TFieldValues, TContext> {\n Field: React.FC<TFieldTypes>\n DisplayIf: React.FC<DisplayIfProps<TFieldValues>>\n ArrayField: React.FC<ArrayFieldProps<TFieldValues>>\n ObjectField: React.FC<ObjectFieldProps<TFieldValues>>\n}\n\ninterface FormOptions<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n> {\n /**\n * The form schema.\n */\n schema?: TSchema\n /**\n * Triggers when any of the field change.\n */\n onChange?: WatchObserver<TFieldValues>\n /**\n * The submit handler.\n */\n onSubmit: SubmitHandler<TFieldValues>\n /**\n * Triggers when there are validation errors.\n */\n onError?: SubmitErrorHandler<TFieldValues>\n /**\n * The Hook Form state ref.\n */\n formRef?: React.RefObject<UseFormReturn<TFieldValues, TContext>>\n /**\n * The form children, can be a render prop or a ReactNode.\n */\n children?: MaybeRenderProp<\n FormRenderContext<TFieldValues, TContext, TFieldTypes>\n >\n /**\n * The field resolver, used to resolve the fields from schemas.\n */\n fieldResolver?: FieldResolver\n /**\n * Field overrides\n */\n fields?: DefaultFieldOverrides\n}\n\nexport interface FormProps<\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n> extends UseFormProps<TFieldValues, TContext>,\n Omit<\n HTMLChakraProps<'form'>,\n 'children' | 'onChange' | 'onSubmit' | 'onError'\n >,\n FormOptions<TFieldValues, TContext, TSchema, TFieldTypes> {}\n\n/**\n * The wrapper component provides context, state, and focus management.\n *\n * @see Docs https://saas-ui.dev/docs/components/forms/form\n */\nexport const Form = forwardRef(\n <\n TFieldValues extends FieldValues = FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n >(\n props: FormProps<TFieldValues, TContext, TSchema, TFieldTypes>,\n ref: React.ForwardedRef<HTMLFormElement>\n ) => {\n const {\n mode = 'all',\n resolver,\n fieldResolver,\n fields,\n reValidateMode,\n shouldFocusError,\n shouldUnregister,\n shouldUseNativeValidation,\n criteriaMode,\n delayError,\n schema,\n defaultValues,\n values,\n context,\n resetOptions,\n onChange,\n onSubmit,\n onError,\n formRef,\n children,\n ...rest\n } = props\n\n const form = {\n mode,\n resolver,\n defaultValues,\n values,\n reValidateMode,\n shouldFocusError,\n shouldUnregister,\n shouldUseNativeValidation,\n criteriaMode,\n delayError,\n context,\n resetOptions,\n }\n\n const methods = useForm<TFieldValues, TContext>(form)\n const { handleSubmit } = methods\n\n // This exposes the useForm api through the forwarded ref\n React.useImperativeHandle(formRef, () => methods, [formRef, methods])\n\n React.useEffect(() => {\n let subscription: any\n if (onChange) {\n subscription = methods.watch(onChange)\n }\n return () => subscription?.unsubscribe()\n }, [methods, onChange])\n\n let _children = children\n if (!_children && fieldResolver) {\n _children = (\n <FormLayout>\n <AutoFields />\n <SubmitButton {...fields?.submit} />\n </FormLayout>\n )\n }\n\n return (\n <FormProvider\n {...methods}\n schema={schema}\n fieldResolver={fieldResolver}\n fields={fields}\n >\n <chakra.form\n ref={ref}\n onSubmit={handleSubmit(onSubmit, onError)}\n {...rest}\n className={cx('sui-form', props.className)}\n >\n {runIfFn(_children, {\n Field: DefaultField as any,\n DisplayIf: DisplayIf,\n ArrayField: ArrayField as any,\n ObjectField: ObjectField as any,\n ...methods,\n })}\n </chakra.form>\n </FormProvider>\n )\n }\n) as (<\n TFieldValues extends FieldValues,\n TContext extends object = object,\n TSchema = any,\n TFieldTypes = FieldProps<TFieldValues>\n>(\n props: FormProps<TFieldValues, TContext, TSchema, TFieldTypes> & {\n ref?: React.ForwardedRef<HTMLFormElement>\n }\n) => React.ReactElement) & {\n displayName?: string\n}\n\nForm.displayName = 'Form'\n\nexport type GetResolver = <\n TFieldValues extends FieldValues,\n TContext extends object\n>(\n schema: any\n) => (\n values: TFieldValues,\n context: TContext | undefined,\n options: ResolverOptions<TFieldValues>\n) => Promise<ResolverResult<TFieldValues>>\n","import * as React from 'react'\nimport { FieldValues, SubmitHandler } from 'react-hook-form'\nimport { createContext, MaybeRenderProp } from '@chakra-ui/react-utils'\nimport {\n useStepper,\n useStep,\n UseStepperProps,\n UseStepperReturn,\n} from '@saas-ui/core'\n\nexport interface StepState {\n name: string\n schema?: any\n resolver?: any\n isActive?: boolean\n isCompleted?: boolean\n onSubmit?: FormStepSubmitHandler\n}\n\nexport type FormStepSubmitHandler<\n TFieldValues extends FieldValues = FieldValues\n> = (data: TFieldValues, stepper: UseStepperReturn) => Promise<void>\n\nexport interface StepFormContext extends UseStepperReturn {\n updateStep(state: StepState): void\n steps: Record<string, StepState>\n}\n\nexport const [StepFormProvider, useStepFormContext] =\n createContext<StepFormContext>({\n name: 'StepFormContext',\n errorMessage:\n 'useStepFormContext: `context` is undefined. Seems you forgot to wrap step form components in `<StepForm />`',\n })\n\nimport { FormProps } from './form'\n\nexport interface UseStepFormProps<\n TFieldValues extends FieldValues = FieldValues\n> extends Omit<UseStepperProps, 'onChange'>,\n Omit<FormProps<TFieldValues>, 'children'> {\n children: MaybeRenderProp<UseStepFormReturn<TFieldValues>>\n}\n\nexport interface UseStepFormReturn<\n TFieldValues extends FieldValues = FieldValues\n> extends UseStepperReturn {\n getFormProps(): {\n onSubmit: SubmitHandler<TFieldValues>\n schema?: any\n resolver?: any\n }\n updateStep(step: any): void\n steps: Record<string, any>\n}\n\nexport function useStepForm<TFieldValues extends FieldValues = FieldValues>(\n props: UseStepFormProps<TFieldValues>\n): UseStepFormReturn<TFieldValues> {\n const { onChange, ...rest } = props\n const stepper = useStepper(rest)\n\n const { activeStep, isLastStep, nextStep } = stepper\n\n const [steps, updateSteps] = React.useState<Record<string, StepState>>({})\n\n const onSubmitStep: SubmitHandler<TFieldValues> = React.useCallback(\n async (data) => {\n try {\n const step = steps[activeStep]\n\n if (isLastStep) {\n await props.onSubmit?.(data)\n\n updateStep({\n ...step,\n isCompleted: true,\n })\n\n nextStep() // show completed step\n return\n }\n\n await step.onSubmit?.(data, stepper)\n\n nextStep()\n } catch (e) {\n // Step submission failed.\n }\n },\n [steps, activeStep, isLastStep]\n )\n\n const getFormProps = React.useCallback(() => {\n const step = steps[activeStep]\n return {\n onSubmit: onSubmitStep,\n schema: step?.schema,\n resolver: step?.resolver,\n }\n }, [steps, onSubmitStep, activeStep])\n\n const updateStep = React.useCallback(\n (step: StepState) => {\n updateSteps((steps) => {\n return {\n ...steps,\n [step.name]: step,\n }\n })\n },\n [steps]\n )\n\n return {\n getFormProps,\n updateStep,\n steps,\n ...stepper,\n }\n}\n\nexport interface UseFormStepProps {\n name: string\n schema?: any\n resolver?: any\n onSubmit?: FormStepSubmitHandler\n}\n\nexport function useFormStep(props: UseFormStepProps): StepState {\n const { name, schema, resolver, onSubmit } = props\n const step = useStep({ name })\n\n const { steps, updateStep } = useStepFormContext()\n\n React.useEffect(() => {\n updateStep({ name, schema, resolver, onSubmit })\n }, [name, schema])\n\n return {\n ...step,\n ...(steps[name] || { name, schema }),\n }\n}\n","import { BaseFieldProps } from './types'\n\nimport { get } from '@chakra-ui/utils'\n\nexport type FieldResolver = {\n getFields(): BaseFieldProps[]\n getNestedFields(name: string): BaseFieldProps[]\n}\n\nexport type GetFieldResolver<TSchema = any> = (schema: TSchema) => FieldResolver\n\ninterface SchemaField extends BaseFieldProps {\n items?: SchemaField[]\n properties?: Record<string, SchemaField>\n}\n\nexport type ObjectSchema = Record<string, SchemaField>\n\nconst mapFields = (schema: ObjectSchema): BaseFieldProps[] =>\n schema &&\n Object.entries(schema).map(([name, { items, label, title, ...field }]) => {\n return {\n ...field,\n name,\n label: label || title || name, // json schema compatibility\n }\n })\n\nexport const objectFieldResolver: GetFieldResolver<ObjectSchema> = (schema) => {\n const getFields = (): BaseFieldProps[] => {\n return mapFields(schema)\n }\n const getNestedFields = (name: string): BaseFieldProps[] => {\n const field = get(schema, name)\n\n if (!field) return []\n\n if (field.items?.type === 'object') {\n return mapFields(field.items.properties)\n } else if (field.type === 'object') {\n return mapFields(field.properties)\n }\n return [field.items]\n }\n\n return { getFields, getNestedFields }\n}\n","import { FieldValues, useWatch } from 'react-hook-form'\nimport { useFormContext, UseFormReturn } from './form-context'\n\nexport interface WatchFieldProps<\n Value = unknown,\n TFieldValues extends FieldValues = FieldValues\n> {\n name: string\n defaultValue?: Value\n isDisabled?: boolean\n isExact?: boolean\n children: (\n value: Value,\n form: UseFormReturn<TFieldValues>\n ) => React.ReactElement | void\n}\n\nexport const WatchField = <\n Value = unknown,\n TFieldValues extends FieldValues = FieldValues\n>(\n props: WatchFieldProps<Value, TFieldValues>\n) => {\n const { name, defaultValue, isDisabled, isExact } = props\n const form = useFormContext<TFieldValues>()\n\n const field = useWatch({\n name,\n defaultValue,\n disabled: isDisabled,\n exact: isExact,\n })\n\n return props.children(field, form) || null\n}\n","import React, { ForwardedRef } from 'react'\nimport { FieldsProvider } from './fields-context'\nimport { Form, FieldValues, FormProps, GetResolver } from './form'\nimport { WithFields } from './types'\nimport { objectFieldResolver } from './field-resolver'\nimport { GetFieldResolver } from './field-resolver'\nimport { forwardRef } from '@chakra-ui/react'\n\nexport interface CreateFormProps<FieldDefs> {\n resolver?: GetResolver\n fieldResolver?: GetFieldResolver\n fields?: FieldDefs extends Record<string, React.FC<any>> ? FieldDefs : never\n}\n\nexport function createForm<FieldDefs, Schema = any>({\n resolver,\n fieldResolver = objectFieldResolver,\n fields,\n}: CreateFormProps<FieldDefs> = {}) {\n const CreateForm = forwardRef(\n <\n TFieldValues extends FieldValues,\n TContext extends object = object,\n TSchema extends Schema = Schema\n >(\n props: WithFields<FormProps<TFieldValues, TContext, TSchema>, FieldDefs>,\n ref: ForwardedRef<HTMLFormElement>\n ) => {\n const { schema, ...rest } = props\n return (\n <FieldsProvider value={fields || {}}>\n <Form\n ref={ref}\n resolver={resolver?.(props.schema)}\n fieldResolver={fieldResolver?.(schema)}\n {...rest}\n />\n </FieldsProvider>\n )\n }\n ) as (<\n TFieldValues extends FieldValues,\n TContext extends object = object,\n TSchema extends Schema = Schema\n >(\n props: WithFields<FormProps<TFieldValues, TContext, TSchema>, FieldDefs> & {\n ref?: React.ForwardedRef<HTMLFormElement>\n }\n ) => React.ReactElement) & {\n displayName?: string\n }\n\n return CreateForm\n}\n","export * from './display-field'\nexport * from './field'\nexport * from './fields'\nexport * from './fields-context'\n// export * from './auto-form'\nexport * from './layout'\nexport * from './submit-button'\nexport * from './array-field'\nexport * from './use-array-field'\nexport * from './object-field'\nexport * from './display-if'\nexport * from './step-form'\nexport * from './use-step-form'\nexport * from './field-resolver'\nexport * from './watch-field'\nexport * from './input-right-button'\nexport * from './select'\nexport * from './password-input'\nexport * from './radio'\n\nexport * from './base-field'\n\nexport {\n CheckboxField,\n InputField,\n NativeSelectField,\n NumberInputField,\n PasswordInputField,\n PinField,\n RadioField,\n SelectField,\n SwitchField,\n TextareaField,\n defaultFieldTypes,\n type DefaultFields,\n type InputFieldProps,\n type NumberInputFieldProps,\n type PinFieldProps,\n} from './default-fields'\n\nexport type {\n FieldProps,\n WithFields,\n BaseFieldProps,\n FieldOptions,\n} from './types'\n\nexport { createForm, type CreateFormProps } from './create-form'\nexport { createField, type CreateFieldOptions } from './create-field'\n\nexport {\n Form as BaseForm,\n type FormProps,\n type FormRenderContext,\n} from './form'\n\nexport { FormProvider, useFormContext } from './form-context'\n\nimport { createForm } from './create-form'\nexport const Form = createForm()\n\nexport type {\n BatchFieldArrayUpdate,\n ChangeHandler,\n Control,\n ControllerFieldState,\n ControllerProps,\n ControllerRenderProps,\n CriteriaMode,\n CustomElement,\n DeepMap,\n DeepPartial,\n DeepPartialSkipArrayKey,\n DefaultValues,\n DelayCallback,\n EmptyObject,\n ErrorOption,\n EventType,\n Field as FieldDef,\n FieldArray,\n FieldArrayMethodProps,\n FieldArrayWithId,\n FieldElement,\n FieldError,\n FieldErrors,\n FieldName,\n FieldNamesMarkedBoolean,\n FieldRefs,\n FieldValue,\n FieldValues,\n FormProviderProps,\n FormState,\n FormStateProxy,\n FormStateSubjectRef,\n GetIsDirty,\n InternalFieldErrors,\n InternalFieldName,\n InternalNameSet,\n IsAny,\n IsFlatObject,\n KeepStateOptions,\n LiteralUnion,\n Message,\n Mode,\n MultipleFieldErrors,\n Names,\n NativeFieldValue,\n NestedValue,\n NonUndefined,\n Noop,\n Primitive,\n ReadFormState,\n Ref,\n RefCallBack,\n RegisterOptions,\n Resolver,\n ResolverError,\n ResolverOptions,\n ResolverResult,\n ResolverSuccess,\n SetFieldValue,\n SetValueConfig,\n Subjects,\n SubmitErrorHandler,\n SubmitHandler,\n TriggerConfig,\n UnpackNestedValue,\n UseControllerProps,\n UseControllerReturn,\n UseFieldArrayProps,\n UseFieldArrayReturn,\n UseFormClearErrors,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormProps,\n UseFormRegister,\n UseFormRegisterReturn,\n UseFormReset,\n UseFormResetField,\n UseFormReturn,\n UseFormSetError,\n UseFormSetFocus,\n UseFormSetValue,\n UseFormStateProps,\n UseFormStateReturn,\n UseFormTrigger,\n UseFormUnregister,\n UseFormWatch,\n UseWatchProps,\n Validate,\n ValidateResult,\n ValidationMode,\n ValidationRule,\n ValidationValue,\n ValidationValueMessage,\n WatchInternal,\n WatchObserver,\n} from 'react-hook-form'\n\nexport {\n appendErrors,\n useController,\n useFieldArray,\n useForm,\n useFormState,\n useWatch,\n Controller,\n} from 'react-hook-form'\n"]}