@flexmatch-dev/react-ui 0.0.1 → 0.0.2
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.
- package/cjs/assets/icon-check.d.ts +7 -0
- package/cjs/assets/icon-check.d.ts.map +1 -0
- package/cjs/assets/icon-check.js +28 -0
- package/cjs/assets/icon-close.d.ts +3 -0
- package/cjs/assets/icon-close.d.ts.map +1 -0
- package/cjs/assets/icon-close.js +24 -0
- package/cjs/assets/icon-selectbox-arrow.d.ts +7 -0
- package/cjs/assets/icon-selectbox-arrow.d.ts.map +1 -0
- package/cjs/assets/icon-selectbox-arrow.js +28 -0
- package/cjs/assets/index.d.ts +4 -0
- package/cjs/assets/index.d.ts.map +1 -0
- package/cjs/assets/index.js +27 -0
- package/cjs/components/Input/Chip/InputChipButton.d.ts +5 -0
- package/cjs/components/Input/Chip/InputChipButton.d.ts.map +1 -0
- package/cjs/components/Input/Chip/InputChipButton.js +31 -0
- package/cjs/components/Input/Chip/InputChipRow.d.ts +13 -0
- package/cjs/components/Input/Chip/InputChipRow.d.ts.map +1 -0
- package/cjs/components/Input/Chip/InputChipRow.js +96 -0
- package/cjs/components/Input/Chip/InputTextbox.d.ts +5 -0
- package/cjs/components/Input/Chip/InputTextbox.d.ts.map +1 -0
- package/cjs/components/Input/Chip/InputTextbox.js +30 -0
- package/cjs/components/Input/Chip/index.d.ts +15 -0
- package/cjs/components/Input/Chip/index.d.ts.map +1 -0
- package/cjs/components/Input/Chip/index.js +17 -0
- package/cjs/components/Input/Selectable/InputCardSelect.d.ts +13 -0
- package/cjs/components/Input/Selectable/InputCardSelect.d.ts.map +1 -0
- package/cjs/components/Input/Selectable/InputCardSelect.js +62 -0
- package/cjs/components/Input/Selectable/InputCardSelectButton.d.ts +13 -0
- package/cjs/components/Input/Selectable/InputCardSelectButton.d.ts.map +1 -0
- package/cjs/components/Input/Selectable/InputCardSelectButton.js +83 -0
- package/cjs/components/Input/Selectable/InputCheckbox.d.ts +11 -0
- package/cjs/components/Input/Selectable/InputCheckbox.d.ts.map +1 -0
- package/cjs/components/Input/Selectable/InputCheckbox.js +43 -0
- package/cjs/components/Input/Selectable/InputOptionSwitch.d.ts.map +1 -1
- package/cjs/components/Input/Selectable/InputOptionSwitch.js +5 -2
- package/cjs/components/Input/Selectable/InputOptionSwitchButton.d.ts +2 -1
- package/cjs/components/Input/Selectable/InputOptionSwitchButton.d.ts.map +1 -1
- package/cjs/components/Input/Selectable/InputOptionSwitchButton.js +5 -1
- package/cjs/components/Input/Selectable/InputRadiobutton.d.ts +10 -0
- package/cjs/components/Input/Selectable/InputRadiobutton.d.ts.map +1 -0
- package/cjs/components/Input/Selectable/InputRadiobutton.js +69 -0
- package/cjs/components/Input/Selectable/InputSelectbox.d.ts +12 -0
- package/cjs/components/Input/Selectable/InputSelectbox.d.ts.map +1 -0
- package/cjs/components/Input/Selectable/InputSelectbox.js +92 -0
- package/cjs/components/atoms/button.ui.d.ts +6 -0
- package/cjs/components/atoms/button.ui.d.ts.map +1 -0
- package/cjs/components/atoms/button.ui.js +31 -0
- package/cjs/components/atoms/card-select.ui.d.ts +14 -0
- package/cjs/components/atoms/card-select.ui.d.ts.map +1 -0
- package/cjs/components/atoms/card-select.ui.js +72 -0
- package/cjs/components/atoms/checkbox.ui.d.ts +9 -0
- package/cjs/components/atoms/checkbox.ui.d.ts.map +1 -0
- package/cjs/components/atoms/checkbox.ui.js +86 -0
- package/cjs/components/atoms/chip.ui.d.ts +10 -0
- package/cjs/components/atoms/chip.ui.d.ts.map +1 -0
- package/cjs/components/atoms/chip.ui.js +35 -0
- package/cjs/components/atoms/index.d.ts +8 -0
- package/cjs/components/atoms/index.d.ts.map +1 -0
- package/cjs/components/atoms/index.js +55 -0
- package/cjs/components/atoms/info-card.ui.d.ts +7 -0
- package/cjs/components/atoms/info-card.ui.d.ts.map +1 -0
- package/cjs/components/atoms/info-card.ui.js +36 -0
- package/cjs/components/atoms/select.ui.d.ts +19 -0
- package/cjs/components/atoms/select.ui.d.ts.map +1 -0
- package/cjs/components/atoms/select.ui.js +87 -0
- package/cjs/components/atoms/textarea.ui.d.ts +5 -0
- package/cjs/components/atoms/textarea.ui.d.ts.map +1 -0
- package/cjs/components/atoms/textarea.ui.js +33 -0
- package/cjs/components/atoms/textbox.ui.d.ts +5 -1
- package/cjs/components/atoms/textbox.ui.d.ts.map +1 -1
- package/cjs/components/atoms/textbox.ui.js +51 -7
- package/cjs/constant/chip.constant.d.ts +5 -0
- package/cjs/constant/chip.constant.d.ts.map +1 -0
- package/cjs/constant/chip.constant.js +10 -0
- package/cjs/context/Input.d.ts +5 -0
- package/cjs/context/Input.d.ts.map +1 -1
- package/cjs/index.d.ts +9 -1
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +56 -16
- package/dist/index.css +1019 -3
- package/lib/assets/icon-check.d.ts +7 -0
- package/lib/assets/icon-check.d.ts.map +1 -0
- package/lib/assets/icon-check.js +22 -0
- package/lib/assets/icon-close.d.ts +3 -0
- package/lib/assets/icon-close.d.ts.map +1 -0
- package/lib/assets/icon-close.js +18 -0
- package/lib/assets/icon-selectbox-arrow.d.ts +7 -0
- package/lib/assets/icon-selectbox-arrow.d.ts.map +1 -0
- package/lib/assets/icon-selectbox-arrow.js +22 -0
- package/lib/assets/index.d.ts +4 -0
- package/lib/assets/index.d.ts.map +1 -0
- package/lib/assets/index.js +3 -0
- package/lib/components/Input/Chip/InputChipButton.d.ts +5 -0
- package/lib/components/Input/Chip/InputChipButton.d.ts.map +1 -0
- package/lib/components/Input/Chip/InputChipButton.js +24 -0
- package/lib/components/Input/Chip/InputChipRow.d.ts +13 -0
- package/lib/components/Input/Chip/InputChipRow.d.ts.map +1 -0
- package/lib/components/Input/Chip/InputChipRow.js +89 -0
- package/lib/components/Input/Chip/InputTextbox.d.ts +5 -0
- package/lib/components/Input/Chip/InputTextbox.d.ts.map +1 -0
- package/lib/components/Input/Chip/InputTextbox.js +23 -0
- package/lib/components/Input/Chip/index.d.ts +15 -0
- package/lib/components/Input/Chip/index.d.ts.map +1 -0
- package/lib/components/Input/Chip/index.js +10 -0
- package/lib/components/Input/Selectable/InputCardSelect.d.ts +13 -0
- package/lib/components/Input/Selectable/InputCardSelect.d.ts.map +1 -0
- package/lib/components/Input/Selectable/InputCardSelect.js +55 -0
- package/lib/components/Input/Selectable/InputCardSelectButton.d.ts +13 -0
- package/lib/components/Input/Selectable/InputCardSelectButton.d.ts.map +1 -0
- package/lib/components/Input/Selectable/InputCardSelectButton.js +76 -0
- package/lib/components/Input/Selectable/InputCheckbox.d.ts +11 -0
- package/lib/components/Input/Selectable/InputCheckbox.d.ts.map +1 -0
- package/lib/components/Input/Selectable/InputCheckbox.js +37 -0
- package/lib/components/Input/Selectable/InputOptionSwitch.d.ts.map +1 -1
- package/lib/components/Input/Selectable/InputOptionSwitch.js +6 -2
- package/lib/components/Input/Selectable/InputOptionSwitchButton.d.ts +2 -1
- package/lib/components/Input/Selectable/InputOptionSwitchButton.d.ts.map +1 -1
- package/lib/components/Input/Selectable/InputOptionSwitchButton.js +4 -1
- package/lib/components/Input/Selectable/InputRadiobutton.d.ts +10 -0
- package/lib/components/Input/Selectable/InputRadiobutton.d.ts.map +1 -0
- package/lib/components/Input/Selectable/InputRadiobutton.js +62 -0
- package/lib/components/Input/Selectable/InputSelectbox.d.ts +12 -0
- package/lib/components/Input/Selectable/InputSelectbox.d.ts.map +1 -0
- package/lib/components/Input/Selectable/InputSelectbox.js +85 -0
- package/lib/components/atoms/button.ui.d.ts +6 -0
- package/lib/components/atoms/button.ui.d.ts.map +1 -0
- package/lib/components/atoms/button.ui.js +24 -0
- package/lib/components/atoms/card-select.ui.d.ts +14 -0
- package/lib/components/atoms/card-select.ui.d.ts.map +1 -0
- package/lib/components/atoms/card-select.ui.js +65 -0
- package/lib/components/atoms/checkbox.ui.d.ts +9 -0
- package/lib/components/atoms/checkbox.ui.d.ts.map +1 -0
- package/lib/components/atoms/checkbox.ui.js +79 -0
- package/lib/components/atoms/chip.ui.d.ts +10 -0
- package/lib/components/atoms/chip.ui.d.ts.map +1 -0
- package/lib/components/atoms/chip.ui.js +28 -0
- package/lib/components/atoms/index.d.ts +8 -0
- package/lib/components/atoms/index.d.ts.map +1 -0
- package/lib/components/atoms/index.js +7 -0
- package/lib/components/atoms/info-card.ui.d.ts +7 -0
- package/lib/components/atoms/info-card.ui.d.ts.map +1 -0
- package/lib/components/atoms/info-card.ui.js +29 -0
- package/lib/components/atoms/select.ui.d.ts +19 -0
- package/lib/components/atoms/select.ui.d.ts.map +1 -0
- package/lib/components/atoms/select.ui.js +80 -0
- package/lib/components/atoms/textarea.ui.d.ts +5 -0
- package/lib/components/atoms/textarea.ui.d.ts.map +1 -0
- package/lib/components/atoms/textarea.ui.js +26 -0
- package/lib/components/atoms/textbox.ui.d.ts +5 -1
- package/lib/components/atoms/textbox.ui.d.ts.map +1 -1
- package/lib/components/atoms/textbox.ui.js +53 -9
- package/lib/constant/chip.constant.d.ts +5 -0
- package/lib/constant/chip.constant.d.ts.map +1 -0
- package/lib/constant/chip.constant.js +4 -0
- package/lib/context/Input.d.ts +5 -0
- package/lib/context/Input.d.ts.map +1 -1
- package/lib/index.d.ts +9 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +14 -3
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var _excluded = ["children"],
|
|
2
|
+
_excluded2 = ["children"],
|
|
3
|
+
_excluded3 = ["children", "onClick", "disabled"],
|
|
4
|
+
_excluded4 = ["children"],
|
|
5
|
+
_excluded5 = ["isOpen"];
|
|
6
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
|
+
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); }
|
|
14
|
+
import clsx from 'clsx';
|
|
15
|
+
import { IconSelectboxArrow } from "../../assets";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
var ButtonUI = function ButtonUI(props) {
|
|
18
|
+
return /*#__PURE__*/_jsx("button", _objectSpread(_objectSpread({}, props), {}, {
|
|
19
|
+
className: clsx(props.className, 'flexmatch-selectbox-button', props.error && 'error'),
|
|
20
|
+
children: props.children
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
var ButtonOverlayUI = function ButtonOverlayUI(props) {
|
|
24
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
25
|
+
className: clsx(props.className, 'flexmatch-selectbox-button-overlay')
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
var MenuUI = function MenuUI(_ref) {
|
|
29
|
+
var children = _ref.children,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
32
|
+
className: clsx(props.className, 'flexmatch-selectbox-menu'),
|
|
33
|
+
children: children
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
var ItemBackgroundUI = function ItemBackgroundUI(_ref2) {
|
|
37
|
+
var children = _ref2.children,
|
|
38
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
39
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
40
|
+
className: clsx(props.className, 'flexmatch-selectbox-item-background'),
|
|
41
|
+
children: children
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
var ItemUI = function ItemUI(_ref3) {
|
|
45
|
+
var children = _ref3.children,
|
|
46
|
+
onClick = _ref3.onClick,
|
|
47
|
+
disabled = _ref3.disabled,
|
|
48
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
49
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
50
|
+
onClick: disabled ? undefined : onClick,
|
|
51
|
+
className: clsx(props.className, 'flexmatch-selectbox-item', disabled && 'disabled', onClick && 'cursor-pointer'),
|
|
52
|
+
children: children
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
var ItemTextUI = function ItemTextUI(_ref4) {
|
|
56
|
+
var children = _ref4.children,
|
|
57
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
58
|
+
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({}, props), {}, {
|
|
59
|
+
className: clsx(props.className, 'flexmatch-selectbox-item-text', 'no-drag'),
|
|
60
|
+
children: children
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
var ToggleUI = function ToggleUI(_ref5) {
|
|
64
|
+
var isOpen = _ref5.isOpen,
|
|
65
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
66
|
+
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
67
|
+
className: clsx(props.className, 'flexmatch-selectbox-toggle', isOpen && 'open'),
|
|
68
|
+
children: /*#__PURE__*/_jsx(IconSelectboxArrow, {})
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
var SelectBoxUI = {
|
|
72
|
+
Button: ButtonUI,
|
|
73
|
+
ButtonOverlay: ButtonOverlayUI,
|
|
74
|
+
Menu: MenuUI,
|
|
75
|
+
ItemBackground: ItemBackgroundUI,
|
|
76
|
+
Item: ItemUI,
|
|
77
|
+
ItemText: ItemTextUI,
|
|
78
|
+
Toggle: ToggleUI
|
|
79
|
+
};
|
|
80
|
+
export default SelectBoxUI;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const TextareaUI: import("react").ForwardRefExoticComponent<import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
2
|
+
error?: boolean;
|
|
3
|
+
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
4
|
+
export default TextareaUI;
|
|
5
|
+
//# sourceMappingURL=textarea.ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.ui.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/textarea.ui.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,UAAU;YAFN,OAAO;uDAahB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["className", "rows", "error"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { forwardRef } from 'react';
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
var TextareaUI = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
|
+
var className = _ref.className,
|
|
15
|
+
rows = _ref.rows,
|
|
16
|
+
error = _ref.error,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/_jsx("textarea", _objectSpread(_objectSpread({
|
|
19
|
+
ref: ref
|
|
20
|
+
}, props), {}, {
|
|
21
|
+
rows: rows,
|
|
22
|
+
className: clsx(className, 'flexmatch-textarea', error && 'error')
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
25
|
+
TextareaUI.displayName = 'TextareaUI';
|
|
26
|
+
export default TextareaUI;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface TextboxUIProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
2
|
+
label?: string;
|
|
3
|
+
error?: boolean;
|
|
4
|
+
height?: string | number | undefined;
|
|
5
|
+
}
|
|
2
6
|
declare const TextboxUI: import("react").ForwardRefExoticComponent<TextboxUIProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
7
|
export default TextboxUI;
|
|
4
8
|
//# sourceMappingURL=textbox.ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textbox.ui.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/textbox.ui.tsx"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"textbox.ui.d.ts","sourceRoot":"","sources":["../../../src/components/atoms/textbox.ui.tsx"],"names":[],"mappings":"AAGA,UAAU,cAAe,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACtC;AACD,QAAA,MAAM,SAAS,6GAgDd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,24 +1,68 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className"];
|
|
2
|
+
var _excluded = ["className", "label", "readOnly", "disabled", "error", "height"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
7
|
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); }
|
|
8
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
14
|
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; }
|
|
9
15
|
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; }
|
|
10
16
|
import clsx from 'clsx';
|
|
11
|
-
import { forwardRef } from 'react';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
19
|
var TextboxUI = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
20
|
var className = _ref.className,
|
|
21
|
+
label = _ref.label,
|
|
22
|
+
readOnly = _ref.readOnly,
|
|
23
|
+
disabled = _ref.disabled,
|
|
24
|
+
error = _ref.error,
|
|
25
|
+
height = _ref.height,
|
|
15
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
var _useState = useState(0),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
labelWidth = _useState2[0],
|
|
30
|
+
setLabelWidth = _useState2[1];
|
|
31
|
+
var labelRef = useRef(null);
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
if (label && labelRef.current) {
|
|
34
|
+
setLabelWidth(labelRef.current.offsetWidth);
|
|
35
|
+
}
|
|
36
|
+
}, [label]);
|
|
37
|
+
var heightStyle = useMemo(function () {
|
|
38
|
+
if (typeof height === 'number') {
|
|
39
|
+
return "".concat(height, "px");
|
|
40
|
+
}
|
|
41
|
+
if (typeof height === 'string') {
|
|
42
|
+
return height;
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}, [height]);
|
|
46
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
47
|
+
className: clsx('flexmatch-textbox-container', className),
|
|
48
|
+
children: [/*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({
|
|
49
|
+
style: {
|
|
50
|
+
paddingRight: "".concat(labelWidth + 14, "px"),
|
|
51
|
+
height: heightStyle
|
|
52
|
+
},
|
|
53
|
+
ref: ref
|
|
54
|
+
}, props), {}, {
|
|
55
|
+
type: "text",
|
|
56
|
+
readOnly: readOnly,
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
className: clsx(className, 'flexmatch-textbox', error && 'error')
|
|
59
|
+
})), (label === null || label === void 0 ? void 0 : label.length) && /*#__PURE__*/_jsx("label", {
|
|
60
|
+
htmlFor: props.id,
|
|
61
|
+
ref: labelRef,
|
|
62
|
+
className: clsx('flexmatch-textbox-label text-b3', disabled && 'disabled', readOnly && 'readonly'),
|
|
63
|
+
children: label
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
22
66
|
});
|
|
23
67
|
TextboxUI.displayName = 'TextboxUI';
|
|
24
68
|
export default TextboxUI;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.constant.d.ts","sourceRoot":"","sources":["../../src/constant/chip.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,QAAwB,CAAC;AAC1D,eAAO,MAAM,oBAAoB,QAAsB,CAAC;AACxD,eAAO,MAAM,uBAAuB,QAAO,CAAC;AAC5C,eAAO,MAAM,wBAAwB,QAAa,CAAC"}
|
package/lib/context/Input.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export interface InputSelectableOption<T> {
|
|
|
3
3
|
value: T;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface InputSelectableExtraOption<T> {
|
|
7
|
+
value: T;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: React.ReactNode | undefined;
|
|
10
|
+
}
|
|
6
11
|
export interface InputSelectableProps<T> {
|
|
7
12
|
value?: T | undefined;
|
|
8
13
|
onChange?: (value: T) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/context/Input.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;CACrC"}
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/context/Input.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC;IACT,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;CACrC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { IconCheck } from '@assets/index';
|
|
2
2
|
export { default as TextboxUI } from '@atoms/textbox.ui';
|
|
3
|
+
export { default as TextareaUI } from '@atoms/textarea.ui';
|
|
4
|
+
export { default as InfoCardUI } from '@atoms/info-card.ui';
|
|
5
|
+
export { default as InputChip } from '@/components/Input/Chip';
|
|
3
6
|
export { default as InputOptionSwitch } from '@components/Input/Selectable/InputOptionSwitch';
|
|
7
|
+
export { default as InputSelectbox } from '@components/Input/Selectable/InputSelectbox';
|
|
8
|
+
export { default as InputCheckbox } from '@components/Input/Selectable/InputCheckbox';
|
|
9
|
+
export { default as InputCardSelect } from '@components/Input/Selectable/InputCardSelect';
|
|
10
|
+
export { default as InputRadiobutton } from '@components/Input/Selectable/InputRadiobutton';
|
|
11
|
+
export type { InputSelectableOption, InputSelectableExtraOption, InputSelectableProps, } from '@context/Input';
|
|
4
12
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAE5F,YAAY,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,gBAAgB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
// * assets
|
|
2
|
+
export { IconCheck } from "./assets";
|
|
3
|
+
|
|
4
|
+
// * atoms
|
|
3
5
|
export { default as TextboxUI } from "./components/atoms/textbox.ui";
|
|
4
|
-
export { default as
|
|
6
|
+
export { default as TextareaUI } from "./components/atoms/textarea.ui";
|
|
7
|
+
export { default as InfoCardUI } from "./components/atoms/info-card.ui";
|
|
8
|
+
|
|
9
|
+
// * molecules
|
|
10
|
+
export { default as InputChip } from "./components/Input/Chip";
|
|
11
|
+
export { default as InputOptionSwitch } from "./components/Input/Selectable/InputOptionSwitch";
|
|
12
|
+
export { default as InputSelectbox } from "./components/Input/Selectable/InputSelectbox";
|
|
13
|
+
export { default as InputCheckbox } from "./components/Input/Selectable/InputCheckbox";
|
|
14
|
+
export { default as InputCardSelect } from "./components/Input/Selectable/InputCardSelect";
|
|
15
|
+
export { default as InputRadiobutton } from "./components/Input/Selectable/InputRadiobutton";
|