pds-dev-kit-web 2.1.9 → 2.1.11

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 (63) hide show
  1. package/dist/src/common/assets/icons/fill/Audio.d.ts +4 -0
  2. package/dist/src/common/assets/icons/fill/Audio.js +30 -0
  3. package/dist/src/common/assets/icons/fill/Calendar.d.ts +4 -0
  4. package/dist/src/common/assets/icons/fill/Calendar.js +30 -0
  5. package/dist/src/common/assets/icons/fill/Embed.d.ts +4 -0
  6. package/dist/src/common/assets/icons/fill/Embed.js +30 -0
  7. package/dist/src/common/assets/icons/fill/Icon.d.ts +4 -0
  8. package/dist/src/common/assets/icons/fill/Icon.js +30 -0
  9. package/dist/src/common/assets/icons/fill/Information.d.ts +4 -0
  10. package/dist/src/common/assets/icons/fill/Information.js +30 -0
  11. package/dist/src/common/assets/icons/fill/LightBulb.d.ts +4 -0
  12. package/dist/src/common/assets/icons/fill/LightBulb.js +30 -0
  13. package/dist/src/common/assets/icons/fill/List.d.ts +4 -0
  14. package/dist/src/common/assets/icons/fill/List.js +30 -0
  15. package/dist/src/common/assets/icons/fill/MenuDesign.d.ts +4 -0
  16. package/dist/src/common/assets/icons/fill/MenuDesign.js +30 -0
  17. package/dist/src/common/assets/icons/fill/PostInquiry.d.ts +4 -0
  18. package/dist/src/common/assets/icons/fill/PostInquiry.js +30 -0
  19. package/dist/src/common/assets/icons/fill/ScrollingText.d.ts +4 -0
  20. package/dist/src/common/assets/icons/fill/ScrollingText.js +30 -0
  21. package/dist/src/common/assets/icons/fill/SellerPage.d.ts +4 -0
  22. package/dist/src/common/assets/icons/fill/SellerPage.js +30 -0
  23. package/dist/src/common/assets/icons/fill/Slider.d.ts +4 -0
  24. package/dist/src/common/assets/icons/fill/Slider.js +30 -0
  25. package/dist/src/common/assets/icons/fill/index.d.ts +12 -0
  26. package/dist/src/common/assets/icons/fill/index.js +24 -0
  27. package/dist/src/common/assets/icons/line/Audio.d.ts +4 -0
  28. package/dist/src/common/assets/icons/line/Audio.js +30 -0
  29. package/dist/src/common/assets/icons/line/Calendar.d.ts +4 -0
  30. package/dist/src/common/assets/icons/line/Calendar.js +30 -0
  31. package/dist/src/common/assets/icons/line/Embed.d.ts +4 -0
  32. package/dist/src/common/assets/icons/line/Embed.js +30 -0
  33. package/dist/src/common/assets/icons/line/Icon.d.ts +4 -0
  34. package/dist/src/common/assets/icons/line/Icon.js +30 -0
  35. package/dist/src/common/assets/icons/line/LightBulb.d.ts +4 -0
  36. package/dist/src/common/assets/icons/line/LightBulb.js +30 -0
  37. package/dist/src/common/assets/icons/line/List.d.ts +4 -0
  38. package/dist/src/common/assets/icons/line/List.js +30 -0
  39. package/dist/src/common/assets/icons/line/MenuDesign.d.ts +4 -0
  40. package/dist/src/common/assets/icons/line/MenuDesign.js +30 -0
  41. package/dist/src/common/assets/icons/line/ScrollingText.d.ts +4 -0
  42. package/dist/src/common/assets/icons/line/ScrollingText.js +30 -0
  43. package/dist/src/common/assets/icons/line/Slider.d.ts +4 -0
  44. package/dist/src/common/assets/icons/line/Slider.js +30 -0
  45. package/dist/src/common/assets/icons/line/index.d.ts +9 -0
  46. package/dist/src/common/assets/icons/line/index.js +18 -0
  47. package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +23 -2
  48. package/dist/src/common/styles/colorSet/PaletteColor_light.json +23 -2
  49. package/dist/src/common/styles/colorSet/UIColor.json +24 -2
  50. package/dist/src/common/styles/colorSet/index.d.ts +993 -929
  51. package/dist/src/common/styles/colorSet/index.js +2 -2
  52. package/dist/src/common/styles/colorSet/ui-type.d.ts +22 -0
  53. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  54. package/dist/src/desktop/components/SegmentedButtonGroup/SegmentedButtonGroup.js +1 -1
  55. package/dist/src/desktop/components/Slider/Slider.d.ts +1 -1
  56. package/dist/src/desktop/components/Slider/Slider.js +21 -39
  57. package/dist/src/desktop/components/TextLabel/TextLabel.js +2 -2
  58. package/dist/src/mobile/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  59. package/dist/src/mobile/components/SegmentedButtonGroup/SegmentedButtonGroup.js +1 -1
  60. package/dist/src/mobile/components/Slider/Slider.d.ts +1 -1
  61. package/dist/src/mobile/components/Slider/Slider.js +21 -39
  62. package/package.json +1 -1
  63. package/release-note.md +30 -8
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  /* eslint-disable import/order */
7
+ var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
7
8
  var SemanticColor_json_1 = __importDefault(require("./SemanticColor.json"));
8
9
  var UIColor_json_1 = __importDefault(require("./UIColor.json"));
9
- var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
10
10
  var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
11
11
  var colorSet = {
12
+ PaletteColor_Dark: PaletteColor_Dark_json_1.default,
12
13
  SemanticColor: SemanticColor_json_1.default,
13
14
  UIColor: UIColor_json_1.default,
14
- PaletteColor_Dark: PaletteColor_Dark_json_1.default,
15
15
  PaletteColor_light: PaletteColor_light_json_1.default
16
16
  };
17
17
  exports.default = colorSet;
@@ -806,4 +806,26 @@ export interface UITheme {
806
806
  ui_editor_layout_control_panel: string;
807
807
  ui_editor_layout_property_panel: string;
808
808
  ui_editor_layout_navigation_panel_section_item_area_normal: string;
809
+ ui_editor_scroll_bar: string;
810
+ ui_editor_scroll_track: string;
811
+ ui_sw_sidebar_base: string;
812
+ ui_sw_sidebar_label_text_normal: string;
813
+ ui_sw_sidebar_item_text_normal: string;
814
+ ui_sw_sidebar_item_text_selected: string;
815
+ ui_sw_sidebar_label_icon_normal_01: string;
816
+ ui_sw_sidebar_item_icon_normal: string;
817
+ ui_sw_sidebar_item_icon_selected: string;
818
+ ui_sw_sidebar_badge_base_01: string;
819
+ ui_sw_sidebar_badge_base_02: string;
820
+ ui_sw_sidebar_badge_text_01: string;
821
+ ui_sw_sidebar_badge_text_02: string;
822
+ ui_sw_sidebar_divider: string;
823
+ ui_sw_sidebar_label_base_normal: string;
824
+ ui_sw_sidebar_label_base_hover: string;
825
+ ui_sw_sidebar_label_base_pressed: string;
826
+ ui_sw_sidebar_item_base_normal: string;
827
+ ui_sw_sidebar_item_base_hover: string;
828
+ ui_sw_sidebar_item_base_pressed: string;
829
+ ui_sw_sidebar_label_icon_normal_02: string;
830
+ ui_104: string;
809
831
  }
@@ -54,7 +54,7 @@ function BasicButtonGroup(_a) {
54
54
  };
55
55
  return ((0, jsx_runtime_1.jsx)(S_BasicButtonGroup, __assign({ "x-pds-name": "BasicButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: valueArray.map(function (_a, index) {
56
56
  var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, onClick = _a.onClick, onMouseDown = _a.onMouseDown, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'center_bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e;
57
- return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0), tooltipText && ((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", isTooltipOpen: hoveredButtonIndex === index, tooltipPosition: tooltipPosition, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }, void 0) }), void 0))] }), iconName + index));
57
+ return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0), tooltipText && ((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", isTooltipOpen: hoveredButtonIndex === index, tooltipPosition: tooltipPosition, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }, void 0) }), void 0))] }), iconName + index));
58
58
  }) }), void 0));
59
59
  }
60
60
  var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
@@ -73,7 +73,7 @@ function SegmentedButtonGroup(_a) {
73
73
  };
74
74
  return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "desktop", selectionType: selectionType }, { children: valueArray.map(function (_a, index) {
75
75
  var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, tooltipText = _a.tooltipText, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? 'center_bottom' : _d, _e = _a.iconColorTheme, iconColorTheme = _e === void 0 ? 'none' : _e;
76
- return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue), onPointerEnter: function () { return setCurrentButtonIndex(index); }, onPointerLeave: function () { return setCurrentButtonIndex(null); } }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }, void 0), tooltipText && ((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", isTooltipOpen: index === currentButtonIndex, tooltipPosition: tooltipPosition, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }, void 0) }), void 0))] }), String(currentButtonValue)));
76
+ return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue), onPointerEnter: function () { return setCurrentButtonIndex(index); }, onPointerLeave: function () { return setCurrentButtonIndex(null); } }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }, void 0), tooltipText && ((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", isTooltipOpen: index === currentButtonIndex, tooltipPosition: tooltipPosition, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }, void 0) }), void 0))] }), String(currentButtonValue)));
77
77
  }) }), void 0));
78
78
  }
79
79
  var S_SegmentedButtonGroupGroups = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
@@ -5,7 +5,7 @@ export declare type Props = {
5
5
  max: number;
6
6
  step?: number;
7
7
  name?: string;
8
- defaultValue?: string | number;
8
+ value: number;
9
9
  tooltipText?: PDSTextType;
10
10
  state?: 'normal' | 'disabled';
11
11
  prefixText?: PDSTextType;
@@ -24,13 +24,20 @@ var components_1 = require("../../../hybrid/components");
24
24
  var styled_components_1 = __importDefault(require("styled-components"));
25
25
  var TextLabel_1 = require("../TextLabel");
26
26
  function Slider(_a, ref) {
27
- var min = _a.min, max = _a.max, _b = _a.step, step = _b === void 0 ? 1 : _b, name = _a.name, defaultValue = _a.defaultValue, tooltipText = _a.tooltipText, _c = _a.state, state = _c === void 0 ? 'normal' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, customWidth = _a.customWidth, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, onChange = _a.onChange, onClick = _a.onClick;
27
+ var min = _a.min, max = _a.max, _b = _a.step, step = _b === void 0 ? 1 : _b, name = _a.name, value = _a.value, tooltipText = _a.tooltipText, _c = _a.state, state = _c === void 0 ? 'normal' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, customWidth = _a.customWidth, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, onChange = _a.onChange, onClick = _a.onClick;
28
28
  var _e = (0, react_1.useState)(false), isTooltipVisible = _e[0], setIsTooltipVisible = _e[1];
29
29
  var _f = (0, react_1.useState)(false), isDragging = _f[0], setIsDragActive = _f[1];
30
30
  var trackRef = (0, react_1.useRef)(null);
31
31
  var thumbRef = (0, react_1.useRef)(null);
32
32
  var inputRef = (0, react_1.useRef)(null);
33
- var defaultThumbPercentage = ((Number(defaultValue || (max - min) / 2 + min) - min) / (max - min)) * 100;
33
+ (0, react_1.useEffect)(function () {
34
+ if (!trackRef.current || !thumbRef.current) {
35
+ return;
36
+ }
37
+ var width = trackRef.current.getBoundingClientRect().width;
38
+ var thumbPosition = getThumbPositionOnTrack((value - min) / (max - min), value, width);
39
+ updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
40
+ }, [value]);
34
41
  function getPercent(pointValue, width) {
35
42
  if (pointValue <= 0) {
36
43
  return 0;
@@ -43,47 +50,34 @@ function Slider(_a, ref) {
43
50
  function percentToValue(percent, min, max) {
44
51
  return (max - min) * percent + min;
45
52
  }
46
- function getInputValue(inputRef, trackValue) {
47
- var result = { prevInputValue: '', newInputValue: '' };
48
- if (inputRef.current === null) {
49
- return result;
50
- }
51
- result.prevInputValue = inputRef.current.value;
52
- inputRef.current.value = String(trackValue);
53
- result.newInputValue = inputRef.current.value;
54
- return result;
55
- }
56
53
  function getThumbOffset(percent, width) {
57
54
  return ((width * percent - width / 2) / (width / 2)) * -10;
58
55
  }
59
- var getNewInputValue = function (clientX, left, width) {
56
+ var getNewValue = function (clientX, left, width) {
60
57
  var percent = getPercent(clientX - (left + 10), width - 20);
61
58
  var newValue = percentToValue(percent, min, max);
62
- var _a = getInputValue(inputRef, newValue), prevInputValue = _a.prevInputValue, newInputValue = _a.newInputValue;
63
- if (prevInputValue === newInputValue) {
64
- return null;
65
- }
66
- return newInputValue;
59
+ return String(newValue);
67
60
  };
68
61
  var getThumbPositionOnTrack = function (percent, value, width) {
69
62
  var thumbOffset = getThumbOffset(percent, width);
70
- return "calc(" + (Number(value) / (max - min)) * 100 + "% + " + thumbOffset + "px)";
63
+ return "calc(" + ((Number(value) - min) / (max - min)) * 100 + "% + " + thumbOffset + "px)";
71
64
  };
72
65
  var updateFillTrackAndThumb = function (trackElement, thumbElement, thumbPosition) {
73
66
  trackElement.style.backgroundSize = thumbPosition + " 100%";
74
67
  thumbElement.style.left = thumbPosition;
75
68
  };
76
69
  var changeSliderValue = function (clientX) {
77
- if (inputRef.current === null || thumbRef.current === null || trackRef.current === null) {
70
+ if (inputRef.current === null || trackRef.current === null) {
78
71
  return;
79
72
  }
80
73
  var _a = trackRef.current.getBoundingClientRect(), left = _a.left, width = _a.width;
81
- var newInputValue = getNewInputValue(clientX, left, width);
82
- if (newInputValue === null) {
74
+ var newValue = getNewValue(clientX, left, width);
75
+ var prevInputValue = inputRef.current.value;
76
+ inputRef.current.value = String(newValue);
77
+ var newInputValue = inputRef.current.value;
78
+ if (prevInputValue === newInputValue) {
83
79
  return;
84
80
  }
85
- var thumbPosition = getThumbPositionOnTrack(Number(newInputValue) / (max - min), newInputValue, width);
86
- updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
87
81
  inputRef.current.dispatchEvent(new Event('input', { bubbles: true }));
88
82
  };
89
83
  var handleMouseMove = function (e) {
@@ -113,12 +107,6 @@ function Slider(_a, ref) {
113
107
  document.addEventListener('mouseup', handleMouseUp, { once: true });
114
108
  };
115
109
  var handleChange = function (e) {
116
- if (trackRef.current === null || thumbRef.current === null) {
117
- return;
118
- }
119
- var width = trackRef.current.getBoundingClientRect().width;
120
- var thumbPosition = getThumbPositionOnTrack(Number(e.currentTarget.value) / (max - min), e.currentTarget.value, width);
121
- updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
122
110
  if (onChange) {
123
111
  onChange(e);
124
112
  }
@@ -137,7 +125,7 @@ function Slider(_a, ref) {
137
125
  }
138
126
  inputRef.current = node;
139
127
  };
140
- return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, thumbPercentage: defaultThumbPercentage, onMouseDown: handleMouseDown }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, thumbPercentage: defaultThumbPercentage, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, thumbPercentage: defaultThumbPercentage, isDragging: isDragging, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, defaultValue: defaultValue, onInput: handleChange, onClick: handleClick }, void 0), tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
128
+ return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, onMouseDown: handleMouseDown }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, isDragging: isDragging, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, value: value, onInput: handleChange, onClick: handleClick }, void 0), !!tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
141
129
  }
142
130
  var S_SliderBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: row;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: row;\n"])));
143
131
  var S_SliderWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: relative;\n width: ", ";\n"], ["\n display: flex;\n position: relative;\n width: ", ";\n"])), function (_a) {
@@ -170,7 +158,7 @@ var S_Slider = styled_components_1.default.div(templateObject_4 || (templateObje
170
158
  }
171
159
  return '324px';
172
160
  });
173
- var S_Track = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"], ["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"])), function (_a) {
161
+ var S_Track = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"], ["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"])), function (_a) {
174
162
  var theme = _a.theme;
175
163
  return theme.ui_cpnt_slider_track;
176
164
  }, function (_a) {
@@ -178,19 +166,13 @@ var S_Track = styled_components_1.default.div(templateObject_5 || (templateObjec
178
166
  return isDisabled
179
167
  ? "linear-gradient(" + theme.ui_cpnt_slider_track_disabled + ", " + theme.ui_cpnt_slider_track_disabled + ")"
180
168
  : "linear-gradient(" + theme.ui_cpnt_slider_track_active + ", " + theme.ui_cpnt_slider_track_active + ")";
181
- }, function (_a) {
182
- var thumbPercentage = _a.thumbPercentage;
183
- return thumbPercentage + "% 100%";
184
169
  });
185
- var S_Thumb = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n\n &:hover {\n box-shadow: ", ";\n }\n"])), function (_a) {
170
+ var S_Thumb = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n\n &:hover {\n box-shadow: ", ";\n }\n"])), function (_a) {
186
171
  var theme = _a.theme, isDisabled = _a.isDisabled;
187
172
  return isDisabled ? theme.ui_cpnt_slider_thumb_disabled : theme.ui_cpnt_slider_thumb_normal;
188
173
  }, function (_a) {
189
174
  var theme = _a.theme, isDragging = _a.isDragging, isDisabled = _a.isDisabled;
190
175
  return isDragging && !isDisabled ? "0 0 0 8px " + theme.ui_cpnt_slider_thumb_pressed_circle : 'none';
191
- }, function (_a) {
192
- var thumbPercentage = _a.thumbPercentage;
193
- return thumbPercentage;
194
176
  }, function (_a) {
195
177
  var theme = _a.theme, isDragging = _a.isDragging, isDisabled = _a.isDisabled;
196
178
  return !isDragging && !isDisabled && "0 0 0 8px " + theme.ui_cpnt_slider_thumb_hover_circle;
@@ -417,7 +417,7 @@ var S_AfterTextBox = styled_components_1.default.div(templateObject_43 || (templ
417
417
  }
418
418
  });
419
419
  var S_IconWrapper = styled_components_1.default.div(templateObject_44 || (templateObject_44 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 16px;\n height: 100%;\n justify-content: center;\n width: 16px;\n"], ["\n align-items: center;\n display: flex;\n height: 16px;\n height: 100%;\n justify-content: center;\n width: 16px;\n"])));
420
- var S_TooltipWrapper = styled_components_1.default.div(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n max-width: 320px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n ", "\n\n ", ";\n\n ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n max-width: 320px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n ", "\n\n ", ";\n\n ", ";\n"])), function (_a) {
420
+ var S_TooltipWrapper = styled_components_1.default.div(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n ", "\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n line-height: 1.2;\n max-width: 240px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n\n ", ";\n\n ", ";\n"], ["\n ", "\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n box-sizing: border-box;\n color: ", ";\n display: flex;\n justify-content: center;\n line-height: 1.2;\n max-width: 240px;\n overflow-wrap: break-word;\n padding: ", ";\n position: absolute;\n text-align: left;\n white-space: pre-wrap;\n width: max-content;\n word-break: keep-all;\n z-index: 400;\n\n ", ";\n\n ", ";\n"])), caption2Regular, function (_a) {
421
421
  var theme = _a.theme;
422
422
  return theme.ui_cpnt_button_tooltip_base;
423
423
  }, function (_a) {
@@ -429,7 +429,7 @@ var S_TooltipWrapper = styled_components_1.default.div(templateObject_45 || (tem
429
429
  }, function (_a) {
430
430
  var theme = _a.theme;
431
431
  return theme.spacing.spacingA + " " + theme.spacing.spacingB;
432
- }, caption2Regular, function (_a) {
432
+ }, function (_a) {
433
433
  var isTooltipOpen = _a.isTooltipOpen;
434
434
  return !isTooltipOpen && 'display: none';
435
435
  }, function (_a) {
@@ -50,7 +50,7 @@ function BasicButtonGroup(_a) {
50
50
  };
51
51
  return ((0, jsx_runtime_1.jsx)(S_BasicButtonGroup, __assign({ "x-pds-name": "BasicButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: valueArray.map(function (_a, index) {
52
52
  var iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.state, buttonState = _c === void 0 ? 'normal' : _c, _d = _a.iconColorTheme, iconColorTheme = _d === void 0 ? 'none' : _d, onClick = _a.onClick, onMouseDown = _a.onMouseDown;
53
- return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0) }), iconName + index));
53
+ return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }, void 0) }), iconName + index));
54
54
  }) }), void 0));
55
55
  }
56
56
  var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
@@ -69,7 +69,7 @@ function SegmentedButtonGroup(_a) {
69
69
  };
70
70
  return ((0, jsx_runtime_1.jsx)(S_SegmentedButtonGroupGroups, __assign({ "x-pds-name": "SegmentedButtonGroup", "x-pds-element-type": "component", "x-pds-device-type": "mobile", selectionType: selectionType }, { children: valueArray.map(function (_a) {
71
71
  var currentButtonValue = _a.value, iconName = _a.iconName, _b = _a.iconFillType, iconFillType = _b === void 0 ? 'line' : _b, _c = _a.iconColorTheme, iconColorTheme = _c === void 0 ? 'none' : _c, _d = _a.state, buttonState = _d === void 0 ? 'normal' : _d;
72
- return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue) }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, iconFillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }, void 0) }), String(currentButtonValue)));
72
+ return ((0, jsx_runtime_1.jsx)(S_BasicButton, __assign({ size: size, onClick: function () { return handleClick(currentButtonValue); }, onMouseDown: function () { return handleMouseDown(currentButtonValue); }, disabled: state === 'disabled' || buttonState === 'disabled', selectionType: selectionType, isSelected: checkSelection(currentButtonValue) }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getIconColorKey(checkSelection(currentButtonValue), state === 'disabled' || buttonState === 'disabled', iconColorTheme) }, void 0) }), String(currentButtonValue)));
73
73
  }) }), void 0));
74
74
  }
75
75
  var S_SegmentedButtonGroupGroups = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
@@ -5,7 +5,7 @@ export declare type Props = {
5
5
  max: number;
6
6
  step?: number;
7
7
  name?: string;
8
- defaultValue?: string | number;
8
+ value: number;
9
9
  tooltipText?: PDSTextType;
10
10
  state?: 'normal' | 'disabled';
11
11
  prefixText?: PDSTextType;
@@ -24,13 +24,20 @@ var components_1 = require("../../../hybrid/components");
24
24
  var styled_components_1 = __importDefault(require("styled-components"));
25
25
  var TextLabel_1 = require("../TextLabel");
26
26
  function Slider(_a, ref) {
27
- var min = _a.min, max = _a.max, _b = _a.step, step = _b === void 0 ? 1 : _b, name = _a.name, defaultValue = _a.defaultValue, tooltipText = _a.tooltipText, _c = _a.state, state = _c === void 0 ? 'normal' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, customWidth = _a.customWidth, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, onChange = _a.onChange, onClick = _a.onClick;
27
+ var min = _a.min, max = _a.max, _b = _a.step, step = _b === void 0 ? 1 : _b, name = _a.name, value = _a.value, tooltipText = _a.tooltipText, _c = _a.state, state = _c === void 0 ? 'normal' : _c, prefixText = _a.prefixText, suffixText = _a.suffixText, customWidth = _a.customWidth, _d = _a.responsiveMode, responsiveMode = _d === void 0 ? 'none' : _d, onChange = _a.onChange, onClick = _a.onClick;
28
28
  var _e = (0, react_1.useState)(false), isTooltipVisible = _e[0], setIsTooltipVisible = _e[1];
29
29
  var _f = (0, react_1.useState)(false), isTouching = _f[0], setIsTouching = _f[1];
30
30
  var trackRef = (0, react_1.useRef)(null);
31
31
  var thumbRef = (0, react_1.useRef)(null);
32
32
  var inputRef = (0, react_1.useRef)(null);
33
- var defaultThumbPercentage = ((Number(defaultValue || (max - min) / 2 + min) - min) / (max - min)) * 100;
33
+ (0, react_1.useEffect)(function () {
34
+ if (!trackRef.current || !thumbRef.current) {
35
+ return;
36
+ }
37
+ var width = trackRef.current.getBoundingClientRect().width;
38
+ var thumbPosition = getThumbPositionOnTrack((value - min) / (max - min), value, width);
39
+ updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
40
+ }, [value]);
34
41
  function getPercent(pointValue, width) {
35
42
  if (pointValue <= 0) {
36
43
  return 0;
@@ -43,47 +50,34 @@ function Slider(_a, ref) {
43
50
  function percentToValue(percent, min, max) {
44
51
  return (max - min) * percent + min;
45
52
  }
46
- function getInputValue(inputRef, trackValue) {
47
- var result = { prevInputValue: '', newInputValue: '' };
48
- if (inputRef.current === null) {
49
- return result;
50
- }
51
- result.prevInputValue = inputRef.current.value;
52
- inputRef.current.value = String(trackValue);
53
- result.newInputValue = inputRef.current.value;
54
- return result;
55
- }
56
53
  function getThumbOffset(percent, width) {
57
54
  return ((width * percent - width / 2) / (width / 2)) * -10;
58
55
  }
59
- var getNewInputValue = function (clientX, left, width) {
56
+ var getNewValue = function (clientX, left, width) {
60
57
  var percent = getPercent(clientX - (left + 10), width - 20);
61
58
  var newValue = percentToValue(percent, min, max);
62
- var _a = getInputValue(inputRef, newValue), prevInputValue = _a.prevInputValue, newInputValue = _a.newInputValue;
63
- if (prevInputValue === newInputValue) {
64
- return null;
65
- }
66
- return newInputValue;
59
+ return String(newValue);
67
60
  };
68
61
  var getThumbPositionOnTrack = function (percent, value, width) {
69
62
  var thumbOffset = getThumbOffset(percent, width);
70
- return "calc(" + (Number(value) / (max - min)) * 100 + "% + " + thumbOffset + "px)";
63
+ return "calc(" + ((Number(value) - min) / (max - min)) * 100 + "% + " + thumbOffset + "px)";
71
64
  };
72
65
  var updateFillTrackAndThumb = function (trackElement, thumbElement, thumbPosition) {
73
66
  trackElement.style.backgroundSize = thumbPosition + " 100%";
74
67
  thumbElement.style.left = thumbPosition;
75
68
  };
76
69
  var changeSliderValue = function (clientX) {
77
- if (inputRef.current === null || thumbRef.current === null || trackRef.current === null) {
70
+ if (inputRef.current === null || trackRef.current === null) {
78
71
  return;
79
72
  }
80
73
  var _a = trackRef.current.getBoundingClientRect(), left = _a.left, width = _a.width;
81
- var newInputValue = getNewInputValue(clientX, left, width);
82
- if (newInputValue === null) {
74
+ var newValue = getNewValue(clientX, left, width);
75
+ var prevInputValue = inputRef.current.value;
76
+ inputRef.current.value = String(newValue);
77
+ var newInputValue = inputRef.current.value;
78
+ if (prevInputValue === newInputValue) {
83
79
  return;
84
80
  }
85
- var thumbPosition = getThumbPositionOnTrack(Number(newInputValue) / (max - min), newInputValue, width);
86
- updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
87
81
  inputRef.current.dispatchEvent(new Event('input', { bubbles: true }));
88
82
  };
89
83
  var handleTouchMove = function (e) {
@@ -113,12 +107,6 @@ function Slider(_a, ref) {
113
107
  document.addEventListener('touchend', handleTouchEnd, { once: true });
114
108
  };
115
109
  var handleChange = function (e) {
116
- if (trackRef.current === null || thumbRef.current === null) {
117
- return;
118
- }
119
- var width = trackRef.current.getBoundingClientRect().width;
120
- var thumbPosition = getThumbPositionOnTrack(Number(e.currentTarget.value) / (max - min), e.currentTarget.value, width);
121
- updateFillTrackAndThumb(trackRef.current, thumbRef.current, thumbPosition);
122
110
  if (onChange) {
123
111
  onChange(e);
124
112
  }
@@ -137,7 +125,7 @@ function Slider(_a, ref) {
137
125
  }
138
126
  inputRef.current = node;
139
127
  };
140
- return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, thumbPercentage: defaultThumbPercentage, onTouchStart: handleTouchStart }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, thumbPercentage: defaultThumbPercentage, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, thumbPercentage: defaultThumbPercentage, isTouching: isTouching, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, defaultValue: defaultValue, onInput: handleChange, onClick: handleClick }, void 0), tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
128
+ return ((0, jsx_runtime_1.jsxs)(S_SliderBox, __assign({ "x-pds-name": "Slider", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: [prefixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: prefixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use", textAlign: "right" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0)] }, void 0)), (0, jsx_runtime_1.jsx)(S_SliderWrapper, __assign({ customWidth: customWidth, responsiveMode: responsiveMode }, { children: (0, jsx_runtime_1.jsxs)(S_Slider, __assign({ customWidth: customWidth, isDisabled: state === 'disabled', responsiveMode: responsiveMode, onTouchStart: handleTouchStart }, { children: [(0, jsx_runtime_1.jsx)(S_Track, { ref: trackRef, isDisabled: state === 'disabled' }, void 0), (0, jsx_runtime_1.jsxs)(S_Thumb, __assign({ ref: thumbRef, isTouching: isTouching, isDisabled: state === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(S_Range, { ref: handleRangeRef, type: "range", name: name, min: min, max: max, step: step, value: value, onInput: handleChange, onClick: handleClick }, void 0), !!tooltipText && isTooltipVisible && ((0, jsx_runtime_1.jsx)(S_Tooltip, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, styleTheme: "caption2Regular", colorOverride: "ui_cpnt_textlabel_button_tooltip", singleLineMode: "use" }, void 0) }, void 0))] }), void 0)] }), void 0) }), void 0), suffixText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { spacingType: "width", size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: suffixText, styleTheme: "caption2Bold", colorTheme: state === 'normal' ? 'sysTextSecondary' : 'sysTextTertiary', singleLineMode: "use" }, void 0)] }, void 0))] }), void 0));
141
129
  }
142
130
  var S_SliderBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: row;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: row;\n"])));
143
131
  var S_SliderWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: relative;\n width: ", ";\n"], ["\n display: flex;\n position: relative;\n width: ", ";\n"])), function (_a) {
@@ -170,7 +158,7 @@ var S_Slider = styled_components_1.default.div(templateObject_4 || (templateObje
170
158
  }
171
159
  return '324px';
172
160
  });
173
- var S_Track = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"], ["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"])), function (_a) {
161
+ var S_Track = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"], ["\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n border-radius: 2px;\n height: 4px;\n position: absolute;\n width: inherit;\n"])), function (_a) {
174
162
  var theme = _a.theme;
175
163
  return theme.ui_cpnt_slider_track;
176
164
  }, function (_a) {
@@ -178,19 +166,13 @@ var S_Track = styled_components_1.default.div(templateObject_5 || (templateObjec
178
166
  return isDisabled
179
167
  ? "linear-gradient(" + theme.ui_cpnt_slider_track_disabled + ", " + theme.ui_cpnt_slider_track_disabled + ")"
180
168
  : "linear-gradient(" + theme.ui_cpnt_slider_track_active + ", " + theme.ui_cpnt_slider_track_active + ")";
181
- }, function (_a) {
182
- var thumbPercentage = _a.thumbPercentage;
183
- return thumbPercentage + "% 100%";
184
169
  });
185
- var S_Thumb = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"], ["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n left: ", "%;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"])), function (_a) {
170
+ var S_Thumb = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"], ["\n background-color: ", ";\n border-radius: 100%;\n box-shadow: ", ";\n display: flex;\n height: 20px;\n justify-content: center;\n position: absolute;\n transform: translateX(-10px);\n width: 20px;\n"])), function (_a) {
186
171
  var theme = _a.theme, isDisabled = _a.isDisabled;
187
172
  return isDisabled ? theme.ui_cpnt_slider_thumb_disabled : theme.ui_cpnt_slider_thumb_normal;
188
173
  }, function (_a) {
189
174
  var theme = _a.theme, isTouching = _a.isTouching, isDisabled = _a.isDisabled;
190
175
  return isTouching && !isDisabled ? "0 0 0 8px " + theme.ui_cpnt_slider_thumb_pressed_circle : 'none';
191
- }, function (_a) {
192
- var thumbPercentage = _a.thumbPercentage;
193
- return thumbPercentage;
194
176
  });
195
177
  var S_Range = styled_components_1.default.input(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n clip: rect(0 0 0 0);\n height: 100%;\n margin: 0;\n outline: none;\n position: absolute;\n width: 100%;\n"], ["\n clip: rect(0 0 0 0);\n height: 100%;\n margin: 0;\n outline: none;\n position: absolute;\n width: 100%;\n"])));
196
178
  exports.default = (0, react_1.forwardRef)(Slider);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.1.9",
3
+ "version": "2.1.11",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.1.9]
2
+ ## [v2.1.10]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### Components
6
- * Icon 수정 및 추가
7
- * ic_accordion
8
- * ic_download
9
- * ic_post_storage
10
- * ic_section_custom_32
11
- * ic_section_custom_40
12
- * ic_target
6
+ * BasicButtonGroup
7
+ * iconFillType이 제대로 작동하도록 수정
8
+ * SegmentedButtonGroup
9
+ * iconFillType이 제대로 작동하도록 수정
10
+ * Icon
11
+ * ic_audio
12
+ * fill, line 추가
13
+ * ic_calendar
14
+ * fill, line 추가
15
+ * ic_embed
16
+ * fill, line 추가
17
+ * ic_icon
18
+ * fill, line 추가
19
+ * ic_list
20
+ * fill, line 추가
21
+ * ic_post_inquiry
22
+ * fill 추가
23
+ * ic_scrolling_text
24
+ * fill, line 추가
25
+ * ic_seller_page
26
+ * fill 추가
27
+ * ic_slider
28
+ * fill, line 추가
29
+ * TextLabel
30
+ * 툴팁 텍스트의 행간을 1.2로 수정
31
+ * 툴팁 최대 너비를 320px -> 240px로 수정
32
+
33
+ ### Color
34
+ * 컬러 키 값 23.07.29 15시 46분 기준 싱크