linear-react-components-ui 1.1.24-rc.1 → 1.1.25-beta.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.
Files changed (114) hide show
  1. package/lib/{BaseMask-0c14ef51.d.ts → BaseMask-78847f45.d.ts} +1 -1
  2. package/lib/{Cnpj-bde01dd0.d.ts → Cnpj-8366781f.d.ts} +1 -1
  3. package/lib/{Cpf-3fa496ad.d.ts → Cpf-3dfd54eb.d.ts} +1 -1
  4. package/lib/{Phone-2bb0b397.d.ts → Phone-1962c0f2.d.ts} +1 -1
  5. package/lib/{ZipCode-09460e18.d.ts → ZipCode-be9c5b3b.d.ts} +1 -1
  6. package/lib/assets/styles/button.scss +1 -1
  7. package/lib/assets/styles/calendar.scss +3 -3
  8. package/lib/assets/styles/datepicker2.scss +8 -7
  9. package/lib/assets/styles/dialog.scss +1 -1
  10. package/lib/assets/styles/drawers.scss +1 -2
  11. package/lib/assets/styles/fieldset.scss +1 -1
  12. package/lib/assets/styles/gridlayout.scss +20 -19
  13. package/lib/assets/styles/multiSelect.scss +6 -6
  14. package/lib/assets/styles/periodpicker.scss +1 -1
  15. package/lib/assets/styles/radio.scss +114 -87
  16. package/lib/assets/styles/selectfield.scss +7 -3
  17. package/lib/assets/styles/split.scss +1 -1
  18. package/lib/assets/styles/table.scss +6 -0
  19. package/lib/assets/styles/tabs.scss +6 -2
  20. package/lib/assets/styles/textfield.scss +7 -3
  21. package/lib/assets/styles/tooltip.scss +5 -4
  22. package/lib/buttons/DefaultButton.js +1 -1
  23. package/lib/checkbox/index.js +3 -1
  24. package/lib/checkbox/types.d.ts +1 -0
  25. package/lib/dialog/base/Content.js +4 -4
  26. package/lib/dialog/base/index.js +20 -22
  27. package/lib/dialog/form/index.js +6 -4
  28. package/lib/drawer/Drawer.js +3 -4
  29. package/lib/drawer/index.js +1 -1
  30. package/lib/form2/index.d.ts +1 -1
  31. package/lib/form2/types.d.ts +4 -0
  32. package/lib/form2/useForm/index.js +2 -0
  33. package/lib/icons/helper.d.ts +12 -0
  34. package/lib/icons/helper.js +12 -0
  35. package/lib/{index-3b70931d.d.ts → index-02a27c19.d.ts} +2 -20
  36. package/lib/index-053f615b.d.ts +26 -0
  37. package/lib/{index-7dfa8924.d.ts → index-25b80f32.d.ts} +1 -1
  38. package/lib/{index-9e576346.d.ts → index-6f5c772d.d.ts} +1 -1
  39. package/lib/{index-208e7f62.d.ts → index-6fcf446c.d.ts} +2 -20
  40. package/lib/index-7159df18.d.ts +21 -0
  41. package/lib/index-afb7b5a9.d.ts +15 -0
  42. package/lib/inputs/date/index.js +3 -6
  43. package/lib/inputs/multiSelect/Dropdown.js +4 -3
  44. package/lib/inputs/multiSelect/index.js +23 -5
  45. package/lib/inputs/multiSelect/types.d.ts +2 -0
  46. package/lib/inputs/period/PeriodList.js +3 -12
  47. package/lib/inputs/period/index.js +97 -124
  48. package/lib/inputs/search/index.js +6 -2
  49. package/lib/inputs/select/multiple/index.js +3 -2
  50. package/lib/inputs/select/simple/index.js +4 -3
  51. package/lib/inputs/select/types.d.ts +1 -0
  52. package/lib/inputs/types.d.ts +1 -0
  53. package/lib/inputs2/checkboxfield/base.d.ts +29 -0
  54. package/lib/inputs2/checkboxfield/base.js +134 -0
  55. package/lib/inputs2/checkboxfield/index.d.ts +3 -2
  56. package/lib/inputs2/checkboxfield/index.js +32 -124
  57. package/lib/inputs2/colorfield/index.d.ts +6 -5
  58. package/lib/inputs2/date/base/index.js +1 -2
  59. package/lib/inputs2/date/datefield/base.d.ts +13 -0
  60. package/lib/inputs2/date/datefield/base.js +330 -0
  61. package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
  62. package/lib/inputs2/date/datefield/index.js +34 -322
  63. package/lib/inputs2/date/datefield/types.d.ts +5 -3
  64. package/lib/inputs2/date/dateperiodfield/base.d.ts +13 -0
  65. package/lib/inputs2/date/dateperiodfield/base.js +595 -0
  66. package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
  67. package/lib/inputs2/date/dateperiodfield/index.js +34 -587
  68. package/lib/inputs2/date/dateperiodfield/types.d.ts +5 -3
  69. package/lib/inputs2/filefield/index.d.ts +6 -5
  70. package/lib/inputs2/index.d.ts +18 -15
  71. package/lib/inputs2/mask/BaseMask.d.ts +6 -5
  72. package/lib/inputs2/mask/Cnpj.d.ts +7 -6
  73. package/lib/inputs2/mask/Cpf.d.ts +7 -6
  74. package/lib/inputs2/mask/Phone.d.ts +7 -6
  75. package/lib/inputs2/mask/ZipCode.d.ts +7 -6
  76. package/lib/inputs2/numberfield/currency.d.ts +5 -4
  77. package/lib/inputs2/numberfield/decimal.d.ts +5 -4
  78. package/lib/inputs2/numberfield/index.d.ts +5 -4
  79. package/lib/inputs2/numberfield/index.js +19 -2
  80. package/lib/inputs2/numberfield/types.d.ts +5 -4
  81. package/lib/inputs2/radiofield/base.d.ts +12 -0
  82. package/lib/inputs2/radiofield/base.js +156 -0
  83. package/lib/inputs2/radiofield/index.d.ts +1 -1
  84. package/lib/inputs2/radiofield/index.js +30 -119
  85. package/lib/inputs2/radiofield/types.d.ts +6 -3
  86. package/lib/inputs2/selectfield/base.d.ts +11 -0
  87. package/lib/inputs2/selectfield/base.js +513 -0
  88. package/lib/inputs2/selectfield/index.d.ts +1 -1
  89. package/lib/inputs2/selectfield/index.js +35 -502
  90. package/lib/inputs2/selectfield/item.d.ts +1 -1
  91. package/lib/inputs2/selectfield/listbox.d.ts +1 -1
  92. package/lib/inputs2/selectfield/options.d.ts +1 -1
  93. package/lib/inputs2/selectfield/search.d.ts +1 -1
  94. package/lib/inputs2/selectfield/selections.d.ts +1 -1
  95. package/lib/inputs2/selectfield/types.d.ts +8 -6
  96. package/lib/inputs2/slot/index.d.ts +2 -2
  97. package/lib/inputs2/textareafield/base.d.ts +26 -0
  98. package/lib/inputs2/textareafield/base.js +166 -0
  99. package/lib/inputs2/textareafield/index.d.ts +4 -3
  100. package/lib/inputs2/textareafield/index.js +30 -154
  101. package/lib/inputs2/textfield/base.d.ts +26 -0
  102. package/lib/inputs2/textfield/base.js +131 -0
  103. package/lib/inputs2/textfield/index.d.ts +5 -4
  104. package/lib/inputs2/textfield/index.js +30 -120
  105. package/lib/radio/index.js +8 -7
  106. package/lib/table/index.js +18 -8
  107. package/lib/table/types.d.ts +1 -0
  108. package/lib/tabs/index.js +2 -2
  109. package/lib/tooltip/TooltipContent.js +1 -1
  110. package/lib/tooltip/useTooltip.js +25 -0
  111. package/package.json +1 -1
  112. package/lib/index-4b31b471.d.ts +0 -15
  113. package/lib/index-8a0c7463.d.ts +0 -41
  114. package/lib/index-9203efed.d.ts +0 -26
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InputBase = void 0;
7
+ require("../../assets/styles/checkbox2.scss");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _lodash = _interopRequireDefault(require("lodash"));
10
+ var _hint = _interopRequireDefault(require("../../hint"));
11
+ var _icons = _interopRequireDefault(require("../../icons"));
12
+ var _popover = _interopRequireWildcard(require("../../popover"));
13
+ var _tooltip = require("../../tooltip");
14
+ const _excluded = ["name", "label", "errors", "onChange", "size", "tooltip", "tooltipPosition", "tooltipWidth", "tabIndex", "variant", "customClass", "customClassLabel", "customClassWrapper", "labelUppercase", "rounded", "customClassInputContainer", "skeletonize", "hintPosition", "themePopover", "popoverAlign", "disabled", "readOnly"];
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
18
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
19
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
20
+ const InputBase = exports.InputBase = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
21
+ var _props$checked, _props$hint;
22
+ const {
23
+ name,
24
+ label,
25
+ errors,
26
+ onChange,
27
+ size = 'default',
28
+ tooltip,
29
+ tooltipPosition,
30
+ tooltipWidth,
31
+ tabIndex = 0,
32
+ variant = 'default',
33
+ customClass = '',
34
+ customClassLabel = '',
35
+ customClassWrapper = '',
36
+ labelUppercase = false,
37
+ rounded = false,
38
+ customClassInputContainer = '',
39
+ skeletonize = false,
40
+ hintPosition = 'below',
41
+ themePopover = 'light',
42
+ popoverAlign = 'left',
43
+ disabled,
44
+ readOnly
45
+ } = props,
46
+ rest = _objectWithoutProperties(props, _excluded);
47
+ const inputId = _react.default.useMemo(() => props.id || "checkboxfield-".concat(name), [props.id, name]);
48
+ const inputRootRef = _react.default.useRef(null);
49
+ const isChecked = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : Boolean(props.value);
50
+ const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
51
+ const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
52
+ const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
53
+ const handleOnChange = _react.default.useCallback(event => {
54
+ if (readOnly || disabled) return;
55
+ Object.defineProperty(event.target, 'value', {
56
+ value: event.target.checked,
57
+ writable: true,
58
+ enumerable: true,
59
+ configurable: true
60
+ });
61
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
62
+ }, [readOnly, disabled, onChange]);
63
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
64
+ ref: inputRootRef,
65
+ "data-testid": "test-chebox-field-root",
66
+ className: "checkbox-field-root ".concat(customClassWrapper),
67
+ "data-state-error": hasValidationErrors
68
+ }, /*#__PURE__*/_react.default.createElement("div", {
69
+ "data-state-skeletonize": skeletonize,
70
+ className: "container ".concat(customClassInputContainer)
71
+ }, /*#__PURE__*/_react.default.createElement("div", {
72
+ className: "input-root"
73
+ }, /*#__PURE__*/_react.default.createElement("input", _extends({
74
+ ref: ref,
75
+ id: inputId,
76
+ name: name,
77
+ readOnly: readOnly,
78
+ disabled: disabled,
79
+ className: "input ".concat(customClass),
80
+ tabIndex: !readOnly && !tabIndex ? 0 : -1,
81
+ "data-testid": "test-checkbox-field-input",
82
+ "data-state-size": size,
83
+ "data-state-error": hasValidationErrors,
84
+ "data-state-variant": variant,
85
+ "data-state-rounded": rounded,
86
+ "data-state-read-only": readOnly,
87
+ "data-state-skeletonize": skeletonize
88
+ }, rest, {
89
+ type: "checkbox",
90
+ checked: isChecked,
91
+ onChange: handleOnChange
92
+ })), /*#__PURE__*/_react.default.createElement(_icons.default, {
93
+ customClass: "checkmark",
94
+ name: "checkmark",
95
+ colorStyle: "default"
96
+ })), hasLabel && /*#__PURE__*/_react.default.createElement("label", {
97
+ className: "label ".concat(customClassLabel),
98
+ title: label,
99
+ htmlFor: inputId,
100
+ "aria-readonly": readOnly,
101
+ "aria-disabled": disabled,
102
+ "data-testid": "test-checkbox-field-label",
103
+ "data-state-skeletonize": skeletonize,
104
+ "data-state-disabled": disabled,
105
+ "data-state-read-only": readOnly,
106
+ "data-state-uppercase": labelUppercase,
107
+ "data-state-input-required": props.required
108
+ }, label), hasLabel && hasHintMessages && hintPosition === 'onLabelRight' && !skeletonize && /*#__PURE__*/_react.default.createElement(_popover.default, {
109
+ customClass: "label-popover",
110
+ theme: themePopover,
111
+ align: popoverAlign,
112
+ iconColor: "#03bde2"
113
+ }, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, {
114
+ text: props === null || props === void 0 ? void 0 : props.hint
115
+ }))), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
116
+ customClass: "hint",
117
+ description: props.hint,
118
+ disabled: disabled,
119
+ skeletonize: skeletonize,
120
+ visible: hasHintMessages
121
+ }), hasValidationErrors && /*#__PURE__*/_react.default.createElement("span", {
122
+ className: "error",
123
+ "data-state-skeletonize": skeletonize,
124
+ "aria-describedby": String(name).concat('-errors')
125
+ }, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
126
+ key: "".concat(index + 1, "-").concat(error)
127
+ }, error, "\xA0")))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
128
+ targetRef: inputRootRef,
129
+ text: tooltip,
130
+ width: tooltipWidth,
131
+ position: tooltipPosition
132
+ }));
133
+ });
134
+ InputBase.displayName = 'CheckboxFieldInputBase';
@@ -1,7 +1,8 @@
1
1
  import 'react';
2
+ import '../../@types/PermissionAttr.js';
3
+ import './base.js';
4
+ export { C as CheckboxFieldInputProps, I as Input } from '../../index-7159df18.js';
2
5
  import '../../@types/Size.js';
3
6
  import '../../@types/ColorStyles.js';
4
7
  import '../../tooltip/types.js';
5
8
  import '../../@types/Position.js';
6
- import '../../@types/PermissionAttr.js';
7
- export { C as CheckboxFieldInputProps, I as Input } from '../../index-8a0c7463.js';
@@ -6,47 +6,29 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Input = void 0;
7
7
  require("../../assets/styles/checkbox2.scss");
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _lodash = _interopRequireDefault(require("lodash"));
10
- var _hint = _interopRequireDefault(require("../../hint"));
11
- var _icons = _interopRequireDefault(require("../../icons"));
12
9
  var _gridlayout = _interopRequireDefault(require("../../gridlayout"));
13
- var _popover = _interopRequireWildcard(require("../../popover"));
14
- var _tooltip = require("../../tooltip");
15
10
  var _permissionValidations = require("../../permissionValidations");
16
- const _excluded = ["name", "label", "errors", "onChange", "size", "onDeniedActions", "permissionAttr", "variant", "customClass", "customClassLabel", "customClassWrapper", "labelUppercase", "rounded", "customClassInputContainer", "skeletonize", "hintPosition", "gridLayout", "themePopover", "popoverAlign", "tooltip", "tooltipPosition", "tooltipWidth"];
17
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
+ var _base = require("./base");
12
+ const _excluded = ["onDeniedActions", "permissionAttr", "gridLayout", "readOnly", "disabled"];
18
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
14
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
15
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
20
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
21
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
22
  const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
23
- const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
24
- var _props$checked, _props$hint;
25
- const {
26
- name,
27
- label,
28
- errors,
29
- onChange,
30
- size = 'default',
31
- onDeniedActions = undefined,
32
- permissionAttr = undefined,
33
- variant = 'default',
34
- customClass = '',
35
- customClassLabel = '',
36
- customClassWrapper = '',
37
- labelUppercase = false,
38
- rounded = false,
39
- customClassInputContainer = '',
40
- skeletonize = false,
41
- hintPosition = 'below',
42
- gridLayout = undefined,
43
- themePopover = 'light',
44
- popoverAlign = 'left',
45
- tooltip,
46
- tooltipPosition,
47
- tooltipWidth
48
- } = props,
49
- rest = _objectWithoutProperties(props, _excluded);
23
+ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
24
+ let {
25
+ onDeniedActions,
26
+ permissionAttr,
27
+ gridLayout,
28
+ readOnly,
29
+ disabled
30
+ } = _ref,
31
+ props = _objectWithoutProperties(_ref, _excluded);
50
32
  const onDenied = _react.default.useMemo(() => {
51
33
  return onDeniedActions || (0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr);
52
34
  }, [onDeniedActions, permissionAttr]);
@@ -54,96 +36,22 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
54
36
  hideContent,
55
37
  unvisible
56
38
  } = onDenied;
57
- const inputId = _react.default.useMemo(() => props.id || "checkboxfield-".concat(name), [props.id, name]);
58
- const inputRootRef = _react.default.useRef(null);
59
- const isChecked = (_props$checked = props.checked) !== null && _props$checked !== void 0 ? _props$checked : Boolean(props.value);
60
- const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
61
- const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
62
- const isDisabled = Boolean(props.disabled || onDenied.disabled);
63
- const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
64
- const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
65
- const handleOnChange = _react.default.useCallback(event => {
66
- if (isReadOnly || isDisabled) return;
67
- Object.defineProperty(event.target, 'value', {
68
- value: event.target.checked,
69
- writable: true,
70
- enumerable: true,
71
- configurable: true
72
- });
73
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
74
- }, [isReadOnly, isDisabled, onChange]);
75
- if (unvisible || hideContent) return null;
76
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
77
- cols: gridLayout
78
- }, /*#__PURE__*/_react.default.createElement("div", {
79
- ref: inputRootRef,
80
- "data-testid": "test-chebox-field-root",
81
- className: "checkbox-field-root ".concat(customClassWrapper),
82
- "data-state-error": hasValidationErrors
83
- }, /*#__PURE__*/_react.default.createElement("div", {
84
- "data-state-skeletonize": skeletonize,
85
- className: "container ".concat(customClassInputContainer)
86
- }, /*#__PURE__*/_react.default.createElement("div", {
87
- className: "input-root"
88
- }, /*#__PURE__*/_react.default.createElement("input", _extends({
89
- ref: ref,
90
- id: inputId,
91
- name: name,
39
+ const isReadOnly = Boolean(readOnly || onDenied.readOnly);
40
+ const isDisabled = Boolean(disabled || onDenied.disabled);
41
+ const inputProps = _objectSpread({
92
42
  readOnly: isReadOnly,
93
- disabled: isDisabled,
94
- className: "input ".concat(customClass),
95
- tabIndex: !isReadOnly ? 0 : -1,
96
- "data-testid": "test-checkbox-field-input",
97
- "data-state-size": size,
98
- "data-state-error": hasValidationErrors,
99
- "data-state-variant": variant,
100
- "data-state-rounded": rounded,
101
- "data-state-read-only": isReadOnly,
102
- "data-state-skeletonize": skeletonize
103
- }, rest, {
104
- type: "checkbox",
105
- checked: isChecked,
106
- onChange: handleOnChange
107
- })), /*#__PURE__*/_react.default.createElement(_icons.default, {
108
- customClass: "checkmark",
109
- name: "checkmark",
110
- colorStyle: "default"
111
- })), hasLabel && /*#__PURE__*/_react.default.createElement("label", {
112
- className: "label ".concat(customClassLabel),
113
- title: label,
114
- htmlFor: inputId,
115
- "aria-readonly": isReadOnly,
116
- "aria-disabled": isDisabled,
117
- "data-testid": "test-checkbox-field-label",
118
- "data-state-skeletonize": skeletonize,
119
- "data-state-disabled": isDisabled,
120
- "data-state-read-only": isReadOnly,
121
- "data-state-uppercase": labelUppercase,
122
- "data-state-input-required": props.required
123
- }, label), hasLabel && hasHintMessages && hintPosition === 'onLabelRight' && !skeletonize && /*#__PURE__*/_react.default.createElement(_popover.default, {
124
- customClass: "label-popover",
125
- theme: themePopover,
126
- align: popoverAlign,
127
- iconColor: "#03bde2"
128
- }, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, {
129
- text: props === null || props === void 0 ? void 0 : props.hint
130
- }))), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
131
- customClass: "hint",
132
- description: props.hint,
133
- disabled: isDisabled,
134
- skeletonize: skeletonize,
135
- visible: hasHintMessages
136
- }), hasValidationErrors && /*#__PURE__*/_react.default.createElement("span", {
137
- className: "error",
138
- "data-state-skeletonize": skeletonize,
139
- "aria-describedby": String(name).concat('-errors')
140
- }, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
141
- key: "".concat(index + 1, "-").concat(error)
142
- }, error, "\xA0"))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
143
- targetRef: inputRootRef,
144
- text: tooltip,
145
- width: tooltipWidth,
146
- position: tooltipPosition
147
- }));
43
+ disabled: isDisabled
44
+ }, props);
45
+ if (unvisible || hideContent) return null;
46
+ if (gridLayout) {
47
+ return /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
48
+ cols: gridLayout
49
+ }, /*#__PURE__*/_react.default.createElement(_base.InputBase, _extends({
50
+ ref: ref
51
+ }, inputProps)));
52
+ }
53
+ return /*#__PURE__*/_react.default.createElement(_base.InputBase, _extends({
54
+ ref: ref
55
+ }, inputProps));
148
56
  });
149
57
  Input.displayName = 'CheckboxFieldInput';
@@ -1,9 +1,10 @@
1
1
  import 'react';
2
2
  export { LeftSlot, RightSlot } from '../slot/index.js';
3
- import '../../index-3b70931d.js';
4
- export { C as ColorFieldInputProps, I as Input } from '../../index-9e576346.js';
5
- import '../../@types/Align.js';
6
- import '../../@types/ColorStyles.js';
7
- import '../../@types/Position.js';
3
+ import '../../index-02a27c19.js';
4
+ export { C as ColorFieldInputProps, I as Input } from '../../index-6f5c772d.js';
8
5
  import '../../@types/PermissionAttr.js';
6
+ import '../textfield/base.js';
9
7
  import '../../tooltip/types.js';
8
+ import '../../@types/Position.js';
9
+ import '../../@types/Align.js';
10
+ import '../../@types/ColorStyles.js';
@@ -147,8 +147,7 @@ const Triggers = exports.Triggers = /*#__PURE__*/_react.default.forwardRef((prop
147
147
  "aria-controls": inputFieldId,
148
148
  "data-state-read-only": isReadOnly,
149
149
  "data-state-visible": showClearButton,
150
- "data-state-valid-date-selected": hasValidDateSelection,
151
- "data-state-valid-period-selected": hasValidPeriodSelected,
150
+ "data-state-valid-date-selected": hasValidDateSelection || hasValidPeriodSelected,
152
151
  onClick: handleOnClickClear,
153
152
  onMouseDown: event => {
154
153
  event.preventDefault();
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import { DateFieldInputBaseProps } from './types.js';
3
+ import 'moment';
4
+ import '../../../@types/Align.js';
5
+ import '../../../@types/ColorStyles.js';
6
+ import '../../../tooltip/types.js';
7
+ import '../../../@types/Position.js';
8
+ import '../../../@types/PermissionAttr.js';
9
+ import '../types.js';
10
+
11
+ declare const InputBase: React__default.ForwardRefExoticComponent<DateFieldInputBaseProps & React__default.RefAttributes<HTMLInputElement>>;
12
+
13
+ export { InputBase };