@driveflux/beam 1.11.8 → 1.11.10

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.
@@ -1,132 +1,18 @@
1
- function _define_property(obj, key, value) {
2
- if (key in obj) {
3
- Object.defineProperty(obj, key, {
4
- value: value,
5
- enumerable: true,
6
- configurable: true,
7
- writable: true
8
- });
9
- } else {
10
- obj[key] = value;
11
- }
12
- return obj;
13
- }
14
- function _object_spread(target) {
15
- for(var i = 1; i < arguments.length; i++){
16
- var source = arguments[i] != null ? arguments[i] : {};
17
- var ownKeys = Object.keys(source);
18
- if (typeof Object.getOwnPropertySymbols === "function") {
19
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
- }));
22
- }
23
- ownKeys.forEach(function(key) {
24
- _define_property(target, key, source[key]);
25
- });
26
- }
27
- return target;
28
- }
29
- function ownKeys(object, enumerableOnly) {
30
- var keys = Object.keys(object);
31
- if (Object.getOwnPropertySymbols) {
32
- var symbols = Object.getOwnPropertySymbols(object);
33
- if (enumerableOnly) {
34
- symbols = symbols.filter(function(sym) {
35
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
- });
37
- }
38
- keys.push.apply(keys, symbols);
39
- }
40
- return keys;
41
- }
42
- function _object_spread_props(target, source) {
43
- source = source != null ? source : {};
44
- if (Object.getOwnPropertyDescriptors) {
45
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
- } else {
47
- ownKeys(Object(source)).forEach(function(key) {
48
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
- });
50
- }
51
- return target;
52
- }
53
- function _object_without_properties(source, excluded) {
54
- if (source == null) return {};
55
- var target = _object_without_properties_loose(source, excluded);
56
- var key, i;
57
- if (Object.getOwnPropertySymbols) {
58
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
59
- for(i = 0; i < sourceSymbolKeys.length; i++){
60
- key = sourceSymbolKeys[i];
61
- if (excluded.indexOf(key) >= 0) continue;
62
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
63
- target[key] = source[key];
64
- }
65
- }
66
- return target;
67
- }
68
- function _object_without_properties_loose(source, excluded) {
69
- if (source == null) return {};
70
- var target = {};
71
- var sourceKeys = Object.keys(source);
72
- var key, i;
73
- for(i = 0; i < sourceKeys.length; i++){
74
- key = sourceKeys[i];
75
- if (excluded.indexOf(key) >= 0) continue;
76
- target[key] = source[key];
77
- }
78
- return target;
79
- }
80
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
81
2
  import * as React from 'react';
82
3
  import FieldWrapper from '../field-wrapper/FieldWrapper.js';
83
4
  import { cn } from '../utils.js';
84
- var Input = /*#__PURE__*/ React.forwardRef(function(props, ref) {
85
- var // for wrapper
86
- wrapperProps = props.wrapperProps, htmlFor = props.htmlFor, label = props.label, helperText = props.helperText, showRequired = props.showRequired, showOptional = props.showOptional, outerPrefix = props.outerPrefix, outerSuffix = props.outerSuffix, error = props.error, // for input container
87
- className = props.className, // for input
88
- prefix = props.prefix, suffix = props.suffix, inputClassName = props.inputClassName, inputRef = props.inputRef, isDisabled = props.isDisabled, inputProps = _object_without_properties(props, [
89
- "wrapperProps",
90
- "htmlFor",
91
- "label",
92
- "helperText",
93
- "showRequired",
94
- "showOptional",
95
- "outerPrefix",
96
- "outerSuffix",
97
- "error",
98
- "className",
99
- "prefix",
100
- "suffix",
101
- "inputClassName",
102
- "inputRef",
103
- "isDisabled"
104
- ]);
105
- return /*#__PURE__*/ _jsx(FieldWrapper, _object_spread_props(_object_spread({
106
- htmlFor: htmlFor,
107
- label: label,
108
- helperText: helperText,
109
- showOptional: showOptional,
110
- showRequired: showRequired,
111
- outerPrefix: outerPrefix,
112
- outerSuffix: outerSuffix,
113
- error: error
114
- }, wrapperProps), {
115
- children: /*#__PURE__*/ _jsxs("div", {
116
- ref: ref,
117
- "aria-disabled": isDisabled,
118
- className: cn('flex gap-x-2 h-10 w-full border border-primary2 bg-white px-3 py-2 text-sm ring-offset-white items-center file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-black focus-within:border-black focus-within:outline-none disabled:cursor-not-allowed disabled:opacity-50', isDisabled && 'bg-primary1 cursor-text hover:border-primary2', !!error && 'border-alert4 hover:border-alert4 focus-within:border-alert4', className),
119
- children: [
120
- prefix,
121
- /*#__PURE__*/ _jsx("input", _object_spread({
122
- ref: inputRef,
123
- disabled: isDisabled,
124
- className: cn('border-none outline-none placeholder-primary2 placeholder:tracking-normal w-full', isDisabled && 'bg-primary1 cursor-text', inputClassName)
125
- }, inputProps)),
126
- suffix
127
- ]
128
- })
129
- }));
5
+ const Input = React.forwardRef((props, ref) => {
6
+ const {
7
+ // for wrapper
8
+ wrapperProps, htmlFor, label, helperText, showRequired, showOptional, outerPrefix, outerSuffix, error,
9
+ // for input container
10
+ className,
11
+ // for input
12
+ prefix, suffix, inputClassName, inputRef, isDisabled, ...inputProps } = props;
13
+ return (_jsx(FieldWrapper, { htmlFor: htmlFor, label: label, helperText: helperText, showOptional: showOptional, showRequired: showRequired, outerPrefix: outerPrefix, outerSuffix: outerSuffix, error: error, ...wrapperProps, children: _jsxs("div", { ref: ref, "aria-disabled": isDisabled, className: cn('flex gap-x-2 h-10 w-full border border-primary2 bg-white px-3 py-2 text-sm ring-offset-white items-center file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-black focus-within:border-black focus-within:outline-none disabled:cursor-not-allowed disabled:opacity-50', isDisabled && 'bg-primary1 cursor-text hover:border-primary2', !!error &&
14
+ 'border-alert4 hover:border-alert4 focus-within:border-alert4', className), children: [prefix, _jsx("input", { ref: inputRef, disabled: isDisabled, className: cn('border-none outline-none placeholder-primary2 placeholder:tracking-normal w-full disabled:bg-primary1', isDisabled && 'bg-primary1 cursor-text', inputClassName), ...inputProps }), suffix] }) }));
130
15
  });
131
16
  Input.displayName = 'Input';
132
17
  export default Input;
18
+ //# sourceMappingURL=Input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,YAEN,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAahC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA6B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzE,MAAM;IACL,cAAc;IACd,YAAY,EACZ,OAAO,EACP,KAAK,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,KAAK;IACL,sBAAsB;IACtB,SAAS;IACT,YAAY;IACZ,MAAM,EACN,MAAM,EACN,cAAc,EACd,QAAQ,EACR,UAAU,EACV,GAAG,UAAU,EACb,GAAG,KAAK,CAAA;IAET,OAAO,CACN,KAAC,YAAY,IACZ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,KACR,YAAY,YAEhB,eACC,GAAG,EAAE,GAAG,mBACO,UAAU,EACzB,SAAS,EAAE,EAAE,CACZ,kSAAkS,EAClS,UAAU,IAAI,+CAA+C,EAC7D,CAAC,CAAC,KAAK;gBACN,8DAA8D,EAC/D,SAAS,CACT,aAEA,MAAM,EACP,gBACC,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,EAAE,CACZ,kFAAkF,EAClF,UAAU,IAAI,yBAAyB,EACvC,cAAc,CACd,KACG,UAAU,GACb,EACD,MAAM,IACF,GACQ,CACf,CAAA;AACF,CAAC,CAAC,CAAA;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,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CAAA"}
@@ -154,7 +154,7 @@ var CommandInput = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
154
154
  ]);
155
155
  return /*#__PURE__*/ _jsxs("div", {
156
156
  ref: ref,
157
- className: cn('flex items-center gap-2 h-10 w-full px-3 border border-primary2 bg-white text-sm cursor-pointer outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-black focus-within:border-black focus-within:outline-none', error && 'border-alert4 hover:border-alert4 focus-within:border-alert4', className),
157
+ className: cn('flex items-center gap-2 h-10 w-full border border-primary2 bg-white text-sm cursor-pointer outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-black focus-within:border-black focus-within:outline-none', error && 'border-alert4 hover:border-alert4 focus-within:border-alert4', className),
158
158
  children: [
159
159
  prefix,
160
160
  /*#__PURE__*/ _jsx(CommandPrimitive.Input, _object_spread_props(_object_spread({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/beam",
3
- "version": "1.11.8",
3
+ "version": "1.11.10",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./accordion": {