@vritti/quantum-ui 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/DropdownMenu.js +59 -25
  2. package/dist/DropdownMenu.js.map +1 -1
  3. package/dist/OfferingSelector.js +21 -0
  4. package/dist/OfferingSelector.js.map +1 -0
  5. package/dist/OfferingVariantSelector.js +24 -0
  6. package/dist/OfferingVariantSelector.js.map +1 -0
  7. package/dist/Sidebar.js +1 -1
  8. package/dist/Switch.js +23 -6
  9. package/dist/Switch.js.map +1 -1
  10. package/dist/assets/quantum-ui.css +122 -103
  11. package/dist/components/TokenInput.js +3 -4
  12. package/dist/components/TokenInput.js.map +1 -1
  13. package/dist/dropdown-menu.js +1 -1
  14. package/dist/index.js +2 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  17. package/dist/lib/components/DropdownMenu/types.d.ts +4 -0
  18. package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -1
  19. package/dist/lib/components/Switch/Switch.d.ts +2 -0
  20. package/dist/lib/components/Switch/Switch.d.ts.map +1 -1
  21. package/dist/lib/components/TokenInput/TokenInput.d.ts.map +1 -1
  22. package/dist/lib/selects/index.d.ts +2 -0
  23. package/dist/lib/selects/index.d.ts.map +1 -1
  24. package/dist/lib/selects/offering/OfferingSelector.d.ts +4 -0
  25. package/dist/lib/selects/offering/OfferingSelector.d.ts.map +1 -0
  26. package/dist/lib/selects/offering/index.d.ts +2 -0
  27. package/dist/lib/selects/offering/index.d.ts.map +1 -0
  28. package/dist/lib/selects/offering-variant/OfferingVariantSelector.d.ts +6 -0
  29. package/dist/lib/selects/offering-variant/OfferingVariantSelector.d.ts.map +1 -0
  30. package/dist/lib/selects/offering-variant/index.d.ts +2 -0
  31. package/dist/lib/selects/offering-variant/index.d.ts.map +1 -0
  32. package/dist/lib/utils/zod.d.ts +5 -0
  33. package/dist/lib/utils/zod.d.ts.map +1 -1
  34. package/dist/lodash.js +38 -27
  35. package/dist/lodash.js.map +1 -1
  36. package/dist/selects/offering-variant.js +2 -0
  37. package/dist/selects/offering-variant.js.map +1 -0
  38. package/dist/selects/offering.js +2 -0
  39. package/dist/selects/offering.js.map +1 -0
  40. package/dist/useDataTable.js +4906 -2439
  41. package/dist/useDataTable.js.map +1 -1
  42. package/dist/utils/axios.js +2825 -1215
  43. package/dist/utils/axios.js.map +1 -1
  44. package/dist/utils/zod.js +14 -2
  45. package/dist/utils/zod.js.map +1 -1
  46. package/package.json +23 -15
package/dist/utils/zod.js CHANGED
@@ -6907,7 +6907,7 @@ function zodPhoneField(options = {}) {
6907
6907
  }
6908
6908
  return string$1({ error: required }).refine((v) => isValidPhoneNumber(v), "Invalid phone number");
6909
6909
  }
6910
- const CODE_SEGMENT = "[a-z][a-z0-9-]*";
6910
+ const CODE_SEGMENT = "[a-z0-9][a-z0-9-]*";
6911
6911
  const CODE_PATTERN = new RegExp(`^${CODE_SEGMENT}$`);
6912
6912
  const DOTTED_CODE_PATTERN = new RegExp(`^${CODE_SEGMENT}(\\.${CODE_SEGMENT})*$`);
6913
6913
  function zodCodeField(options = {}) {
@@ -6917,6 +6917,18 @@ function zodCodeField(options = {}) {
6917
6917
  const schema = string$1().min(1, required).regex(pattern, message ?? defaultMessage);
6918
6918
  return max != null ? schema.max(max, `Code must be ${max} characters or less`) : schema;
6919
6919
  }
6920
+ function zodCodeArrayField(options = {}) {
6921
+ const { dotted = false, max, min = 1, minMessage = "Add at least one value", message } = options;
6922
+ const pattern = dotted ? DOTTED_CODE_PATTERN : CODE_PATTERN;
6923
+ const hint = dotted ? "Use lowercase words separated by dots." : "Use lowercase letters, numbers, and hyphens.";
6924
+ const item = string$1().min(1);
6925
+ return array(max != null ? item.max(max, `A value must be ${max} characters or less`) : item).min(min, minMessage).superRefine((values, ctx) => {
6926
+ const invalid = values.filter((value) => !pattern.test(value));
6927
+ if (invalid.length > 0) {
6928
+ ctx.addIssue({ code: "custom", message: message ?? `Not valid codes: ${invalid.join(", ")}. ${hint}` });
6929
+ }
6930
+ });
6931
+ }
6920
6932
  function zodFileField(options = {}) {
6921
6933
  const { maxSizeMb, accept, optional = false, required = "A file is required", message } = options;
6922
6934
  const limit = maxSizeMb == null ? null : maxSizeMb * 1024 * 1024;
@@ -6926,5 +6938,5 @@ function zodFileField(options = {}) {
6926
6938
  return optional ? schema.optional() : schema;
6927
6939
  }
6928
6940
 
6929
- export { $brand, $input, $output, CODE_PATTERN, DOTTED_CODE_PATTERN, NEVER, TimePrecision, ZodAny, ZodArray, ZodBase64, ZodBase64URL, ZodBigInt, ZodBigIntFormat, ZodBoolean, ZodCIDRv4, ZodCIDRv6, ZodCUID, ZodCUID2, ZodCatch, ZodCodec, ZodCustom, ZodCustomStringFormat, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodE164, ZodEmail, ZodEmoji, ZodEnum, ZodError, ZodExactOptional, ZodFile, ZodFirstPartyTypeKind, ZodFunction, ZodGUID, ZodIPv4, ZodIPv6, ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime, ZodIntersection, ZodIssueCode, ZodJWT, ZodKSUID, ZodLazy, ZodLiteral, ZodMAC, ZodMap, ZodNaN, ZodNanoID, ZodNever, ZodNonOptional, ZodNull, ZodNullable, ZodNumber, ZodNumberFormat, ZodObject, ZodOptional, ZodPipe, ZodPrefault, ZodPromise, ZodReadonly, ZodRealError, ZodRecord, ZodSet, ZodString, ZodStringFormat, ZodSuccess, ZodSymbol, ZodTemplateLiteral, ZodTransform, ZodTuple, ZodType, ZodULID, ZodURL, ZodUUID, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, ZodXID, ZodXor, _ZodString, _default$1 as _default, _function, any, array, base64, base64url, bigint$1 as bigint, boolean$1 as boolean, _catch$1 as catch, check, cidrv4, cidrv6, clone, codec, coerce, config, index as core, cuid, cuid2, custom, date$1 as date, decode$1 as decode, decodeAsync$1 as decodeAsync, describe$1 as describe, discriminatedUnion, e164, email, emoji, encode$1 as encode, encodeAsync$1 as encodeAsync, _endsWith as endsWith, _enum$1 as enum, exactOptional, file, flattenError, float32, float64, formatError, fromJSONSchema, _function as function, getErrorMap, globalRegistry, _gt as gt, _gte as gte, guid, hash, hex, hostname, httpUrl, _includes as includes, _instanceof as instanceof, int, int32, int64, intersection, ipv4, ipv6, _iso as iso, json, jwt, keyof, ksuid, lazy, _length as length, literal, index$1 as locales, looseObject, looseRecord, _lowercase as lowercase, _lt as lt, _lte as lte, mac, map, _maxLength as maxLength, _maxSize as maxSize, meta$1 as meta, _mime as mime, _minLength as minLength, _minSize as minSize, _multipleOf as multipleOf, nan, nanoid, nativeEnum, _negative as negative, never, _nonnegative as nonnegative, nonoptional, _nonpositive as nonpositive, _normalize as normalize, _null$1 as null, nullable, nullish, number$1 as number, object, optional, _overwrite as overwrite, parse$1 as parse, parseAsync$1 as parseAsync, partialRecord, pipe, _positive as positive, prefault, preprocess, prettifyError, promise, _property as property, readonly, record, refine, _regex as regex, regexes, registry, safeDecode$1 as safeDecode, safeDecodeAsync$1 as safeDecodeAsync, safeEncode$1 as safeEncode, safeEncodeAsync$1 as safeEncodeAsync, safeParse$1 as safeParse, safeParseAsync$1 as safeParseAsync, set, setErrorMap, _size as size, _slugify as slugify, _startsWith as startsWith, strictObject, string$1 as string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, toJSONSchema, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, transform, treeifyError, _trim as trim, tuple, uint32, uint64, ulid, _undefined$1 as undefined, union, unknown, _uppercase as uppercase, url, util, uuid, uuidv4, uuidv6, uuidv7, _void$1 as void, xid, xor, z, zodCodeField, zodCurrencyField, zodFileField, zodNumericField, zodPhoneField };
6941
+ export { $brand, $input, $output, CODE_PATTERN, DOTTED_CODE_PATTERN, NEVER, TimePrecision, ZodAny, ZodArray, ZodBase64, ZodBase64URL, ZodBigInt, ZodBigIntFormat, ZodBoolean, ZodCIDRv4, ZodCIDRv6, ZodCUID, ZodCUID2, ZodCatch, ZodCodec, ZodCustom, ZodCustomStringFormat, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodE164, ZodEmail, ZodEmoji, ZodEnum, ZodError, ZodExactOptional, ZodFile, ZodFirstPartyTypeKind, ZodFunction, ZodGUID, ZodIPv4, ZodIPv6, ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime, ZodIntersection, ZodIssueCode, ZodJWT, ZodKSUID, ZodLazy, ZodLiteral, ZodMAC, ZodMap, ZodNaN, ZodNanoID, ZodNever, ZodNonOptional, ZodNull, ZodNullable, ZodNumber, ZodNumberFormat, ZodObject, ZodOptional, ZodPipe, ZodPrefault, ZodPromise, ZodReadonly, ZodRealError, ZodRecord, ZodSet, ZodString, ZodStringFormat, ZodSuccess, ZodSymbol, ZodTemplateLiteral, ZodTransform, ZodTuple, ZodType, ZodULID, ZodURL, ZodUUID, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, ZodXID, ZodXor, _ZodString, _default$1 as _default, _function, any, array, base64, base64url, bigint$1 as bigint, boolean$1 as boolean, _catch$1 as catch, check, cidrv4, cidrv6, clone, codec, coerce, config, index as core, cuid, cuid2, custom, date$1 as date, decode$1 as decode, decodeAsync$1 as decodeAsync, describe$1 as describe, discriminatedUnion, e164, email, emoji, encode$1 as encode, encodeAsync$1 as encodeAsync, _endsWith as endsWith, _enum$1 as enum, exactOptional, file, flattenError, float32, float64, formatError, fromJSONSchema, _function as function, getErrorMap, globalRegistry, _gt as gt, _gte as gte, guid, hash, hex, hostname, httpUrl, _includes as includes, _instanceof as instanceof, int, int32, int64, intersection, ipv4, ipv6, _iso as iso, json, jwt, keyof, ksuid, lazy, _length as length, literal, index$1 as locales, looseObject, looseRecord, _lowercase as lowercase, _lt as lt, _lte as lte, mac, map, _maxLength as maxLength, _maxSize as maxSize, meta$1 as meta, _mime as mime, _minLength as minLength, _minSize as minSize, _multipleOf as multipleOf, nan, nanoid, nativeEnum, _negative as negative, never, _nonnegative as nonnegative, nonoptional, _nonpositive as nonpositive, _normalize as normalize, _null$1 as null, nullable, nullish, number$1 as number, object, optional, _overwrite as overwrite, parse$1 as parse, parseAsync$1 as parseAsync, partialRecord, pipe, _positive as positive, prefault, preprocess, prettifyError, promise, _property as property, readonly, record, refine, _regex as regex, regexes, registry, safeDecode$1 as safeDecode, safeDecodeAsync$1 as safeDecodeAsync, safeEncode$1 as safeEncode, safeEncodeAsync$1 as safeEncodeAsync, safeParse$1 as safeParse, safeParseAsync$1 as safeParseAsync, set, setErrorMap, _size as size, _slugify as slugify, _startsWith as startsWith, strictObject, string$1 as string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, toJSONSchema, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, transform, treeifyError, _trim as trim, tuple, uint32, uint64, ulid, _undefined$1 as undefined, union, unknown, _uppercase as uppercase, url, util, uuid, uuidv4, uuidv6, uuidv7, _void$1 as void, xid, xor, z, zodCodeArrayField, zodCodeField, zodCurrencyField, zodFileField, zodNumericField, zodPhoneField };
6930
6942
  //# sourceMappingURL=zod.js.map