@shoplflow/base 0.31.18 → 0.31.20

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/dist/index.cjs CHANGED
@@ -3112,7 +3112,8 @@ var Input = React3.forwardRef(
3112
3112
  className,
3113
3113
  width,
3114
3114
  borderRadius,
3115
- customNumberInputHeight
3115
+ customNumberInputHeight,
3116
+ onKeyDown
3116
3117
  } = _b, rest = __objRest(_b, [
3117
3118
  "onFocus",
3118
3119
  "onBlur",
@@ -3129,7 +3130,8 @@ var Input = React3.forwardRef(
3129
3130
  "className",
3130
3131
  "width",
3131
3132
  "borderRadius",
3132
- "customNumberInputHeight"
3133
+ "customNumberInputHeight",
3134
+ "onKeyDown"
3133
3135
  ]);
3134
3136
  const [text, setText] = React3.useState("");
3135
3137
  const [isFocused, setIsFocused] = React3.useState(false);
@@ -3165,7 +3167,12 @@ var Input = React3.forwardRef(
3165
3167
  };
3166
3168
  const handleOnBlur = (event) => {
3167
3169
  onBlur && onBlur(event);
3168
- setIsFocused(false);
3170
+ };
3171
+ const handleOnKeyDown = (event) => {
3172
+ if (event.code === "Tab") {
3173
+ setIsFocused(false);
3174
+ }
3175
+ onKeyDown && onKeyDown(event);
3169
3176
  };
3170
3177
  const handleOnChange = (event) => {
3171
3178
  onChange && onChange(event);
@@ -3237,6 +3244,7 @@ var Input = React3.forwardRef(
3237
3244
  onFocus: handleOnFocus,
3238
3245
  onBlur: handleOnBlur,
3239
3246
  onChange: handleOnChange,
3247
+ onKeyDown: handleOnKeyDown,
3240
3248
  maxLength,
3241
3249
  disabled,
3242
3250
  value: text,
@@ -5068,6 +5076,9 @@ var getEachDateStyle = (props) => {
5068
5076
  };
5069
5077
  var getEachMonthAreaStyle = (props) => {
5070
5078
  const { inRange, isStart, isEnd, isReady, disabled } = props;
5079
+ if (isStart && isEnd) {
5080
+ return;
5081
+ }
5071
5082
  if (isStart && isReady && !isEnd) {
5072
5083
  return react$1.css`
5073
5084
  &::after {
@@ -5439,7 +5450,10 @@ var getEachDateStyle3 = (props) => {
5439
5450
  };
5440
5451
  var getEachWeekAreaStyle = (props) => {
5441
5452
  const { inRange, isStart, isEnd, isReady, disabled } = props;
5442
- if (isStart && isReady && !isEnd) {
5453
+ if (isStart && isEnd) {
5454
+ return;
5455
+ }
5456
+ if (isStart && isReady) {
5443
5457
  return react$1.css`
5444
5458
  &::after {
5445
5459
  content: '';
@@ -5703,6 +5717,57 @@ var WeekDatepicker = ({
5703
5717
  ] });
5704
5718
  };
5705
5719
  exports.WeekDatepicker = WeekDatepicker;
5720
+ var Title = ({
5721
+ title,
5722
+ titleTypography = "body1_700",
5723
+ titleColor = "neutral700",
5724
+ total,
5725
+ description,
5726
+ tooltipPlacement = "right",
5727
+ isRequired,
5728
+ isShowHelpIcon,
5729
+ tooltipOffsetValue,
5730
+ tooltipMessage = "",
5731
+ rightSource
5732
+ }) => {
5733
+ const domain = exports.getDomain();
5734
+ const descriptionTypography = domain === "hada" ? "body2_400" : "body1_400";
5735
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Vertical, { width: "100%", children: [
5736
+ /* @__PURE__ */ jsxRuntime.jsxs(
5737
+ exports.StackContainer,
5738
+ {
5739
+ direction: "row",
5740
+ align: "center",
5741
+ width: "100%",
5742
+ minHeight: "40px",
5743
+ height: "auto",
5744
+ justify: "space-between",
5745
+ children: [
5746
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { align: "center", spacing: "spacing04", children: [
5747
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Text, { color: titleColor, typography: titleTypography, wordBreak: "break-all", children: [
5748
+ title,
5749
+ " ",
5750
+ isRequired && /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_700", color: "red300", children: "*" })
5751
+ ] }),
5752
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { color: "primary300", typography: "body1_700", children: total }),
5753
+ isShowHelpIcon && /* @__PURE__ */ jsxRuntime.jsx(
5754
+ exports.Tooltip,
5755
+ {
5756
+ placement: tooltipPlacement,
5757
+ offset: tooltipOffsetValue,
5758
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(ShoplAssets.HelpIcon, { width: 20, height: 20 }),
5759
+ popper: /* @__PURE__ */ jsxRuntime.jsx(exports.Tooltip.Content, { content: tooltipMessage })
5760
+ }
5761
+ )
5762
+ ] }),
5763
+ rightSource && rightSource
5764
+ ]
5765
+ }
5766
+ ),
5767
+ description && /* @__PURE__ */ jsxRuntime.jsx(exports.StackContainer, { minHeight: "30px", height: "auto", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: descriptionTypography, color: "neutral500", wordBreak: "break-all", children: description }) })
5768
+ ] });
5769
+ };
5770
+ exports.Title = Title;
5706
5771
  var SpaceMarginWrapper = styled6__default.default(framerMotion.motion.div)`
5707
5772
  position: relative;
5708
5773
  display: flex;