sag_components 2.0.0-beta235 → 2.0.0-beta237

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.d.ts CHANGED
@@ -1284,7 +1284,7 @@ declare function ModalWithOverlay(props: any): react_jsx_runtime.JSX.Element;
1284
1284
 
1285
1285
  declare function DropdownNew(props: any): react_jsx_runtime.JSX.Element;
1286
1286
 
1287
- declare function WeeksPicker({ label, disabled, borderColor, borderColorFocus, textColor, hoverColor, required, placeholder, borderRadius, year, width, height, withMarginBottom, onChange, selectedValue, allowedWeekRange, restrictToRange, }: {
1287
+ declare function WeeksPicker({ label, disabled, borderColor, borderColorFocus, textColor, hoverColor, required, placeholder, borderRadius, year, width, height, withMarginBottom, onChange, selectedValue, isDarkerBackground, allowedWeekRange, restrictToRange, }: {
1288
1288
  label: any;
1289
1289
  disabled: any;
1290
1290
  borderColor: any;
@@ -1300,6 +1300,7 @@ declare function WeeksPicker({ label, disabled, borderColor, borderColorFocus, t
1300
1300
  withMarginBottom?: boolean;
1301
1301
  onChange: any;
1302
1302
  selectedValue: any;
1303
+ isDarkerBackground?: boolean;
1303
1304
  allowedWeekRange?: any;
1304
1305
  restrictToRange?: boolean;
1305
1306
  }): react_jsx_runtime.JSX.Element;
package/dist/index.esm.js CHANGED
@@ -8929,27 +8929,26 @@ const IconContainer$5 = styled.div`
8929
8929
  cursor: pointer;
8930
8930
  `;
8931
8931
 
8932
- const DropdownSingleNew = _ref => {
8933
- let {
8934
- label,
8935
- labelEmptyValue,
8936
- options,
8937
- selectedValue,
8938
- onChange,
8939
- required,
8940
- disabled,
8941
- width,
8942
- height,
8943
- withMarginBottom = true,
8944
- error,
8945
- errorMessage,
8946
- xIconShow,
8947
- labelColor,
8948
- showLabelOnTop,
8949
- orderBy,
8950
- placeHolder = "",
8951
- elementType
8952
- } = _ref;
8932
+ const DropdownSingleNew = ({
8933
+ label,
8934
+ labelEmptyValue,
8935
+ options,
8936
+ selectedValue,
8937
+ onChange,
8938
+ required,
8939
+ disabled,
8940
+ width,
8941
+ height,
8942
+ withMarginBottom = true,
8943
+ error,
8944
+ errorMessage,
8945
+ xIconShow,
8946
+ labelColor,
8947
+ showLabelOnTop,
8948
+ orderBy,
8949
+ placeHolder = "",
8950
+ elementType
8951
+ }) => {
8953
8952
  const [isFocused, setIsFocused] = useState(false);
8954
8953
  const [showOptions, setShowOptions] = useState(false);
8955
8954
  const [showAbove, setShowAbove] = useState(false);
@@ -9454,27 +9453,26 @@ const IconContainer$4 = styled.div`
9454
9453
  cursor: pointer;
9455
9454
  `;
9456
9455
 
9457
- const DropdownMultiNew = _ref => {
9458
- let {
9459
- label,
9460
- labelEmptyValue,
9461
- options,
9462
- selectedValue,
9463
- onChange,
9464
- required,
9465
- disabled,
9466
- width,
9467
- height,
9468
- withMarginBottom = true,
9469
- error,
9470
- errorMessage,
9471
- labelColor,
9472
- xIconShow,
9473
- checkBoxColor,
9474
- showLabelOnTop,
9475
- orderBy,
9476
- elementType
9477
- } = _ref;
9456
+ const DropdownMultiNew = ({
9457
+ label,
9458
+ labelEmptyValue,
9459
+ options,
9460
+ selectedValue,
9461
+ onChange,
9462
+ required,
9463
+ disabled,
9464
+ width,
9465
+ height,
9466
+ withMarginBottom = true,
9467
+ error,
9468
+ errorMessage,
9469
+ labelColor,
9470
+ xIconShow,
9471
+ checkBoxColor,
9472
+ showLabelOnTop,
9473
+ orderBy,
9474
+ elementType
9475
+ }) => {
9478
9476
  const [isFocused, setIsFocused] = useState(false);
9479
9477
  const [showOptions, setShowOptions] = useState(false);
9480
9478
  const [showAbove, setShowAbove] = useState(false);
@@ -34973,18 +34971,17 @@ css`
34973
34971
  * • onApply(start,end) — callback, both numbers (inclusive)
34974
34972
  * • onCancel() — callback
34975
34973
  */
34976
- const WeeksCalendar = _ref => {
34977
- let {
34978
- year,
34979
- defaultStartWeek = null,
34980
- defaultEndWeek = null,
34981
- backgroundColor = "#066768",
34982
- hoverBackgroundColor = "#E6F0F0",
34983
- allowedWeekRange = null,
34984
- // New prop for range restriction
34985
- onApply,
34986
- onCancel
34987
- } = _ref;
34974
+ const WeeksCalendar = ({
34975
+ year,
34976
+ defaultStartWeek = null,
34977
+ defaultEndWeek = null,
34978
+ backgroundColor = "#066768",
34979
+ hoverBackgroundColor = "#E6F0F0",
34980
+ allowedWeekRange = null,
34981
+ // New prop for range restriction
34982
+ onApply,
34983
+ onCancel
34984
+ }) => {
34988
34985
  // state -------------------------------------------------
34989
34986
  const [startWeek, setStartWeek] = useState(defaultStartWeek);
34990
34987
  const [endWeek, setEndWeek] = useState(defaultEndWeek);
@@ -35115,13 +35112,14 @@ const StyledInput$1 = styled.input`
35115
35112
  border-radius: ${props => props.borderRadius || '4px'};
35116
35113
  border: none;
35117
35114
  outline: none;
35115
+ background-color: ${props => props.isDarkerBackground ? '#F2F2F2' : 'white'} !important;
35118
35116
  width: ${props => props.width || '90%'};
35119
35117
  height: ${props => props.height || 'auto'};
35120
35118
  transition: border-color 0.3s ease;
35121
35119
  font-size: 14px;
35122
35120
  font-weight: 400;
35123
35121
  box-sizing: border-box;
35124
- color: ${props => props.disabled ? '#888' : (props.isFocused || props.value ? props.textColor : '#757575') || '#333'};
35122
+ color: ${props => props.disabled ? '#D0D0D0' : (props.isFocused || props.value ? props.textColor : '#757575') || '#333'};
35125
35123
  cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
35126
35124
  `;
35127
35125
  const StyledLabel = styled.label`
@@ -35168,9 +35166,8 @@ const InputContainer$1 = styled.div`
35168
35166
  overflow: hidden;
35169
35167
  width: 100%;
35170
35168
  height: 100%;
35171
- box-sizing: border-box;
35172
- background-color: transparent;
35173
- border: 1px solid ${props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1'};
35169
+ box-sizing: border-box;
35170
+ border: 1px solid ${props => props.disabled ? '#D0D0D0' : props.error ? 'red' : '#B1B1B1'};
35174
35171
  font-weight: 400;
35175
35172
  font-size: 14px;
35176
35173
  border-radius: 12px;
@@ -35212,6 +35209,7 @@ const WeeksPicker = _ref => {
35212
35209
  withMarginBottom = true,
35213
35210
  onChange,
35214
35211
  selectedValue,
35212
+ isDarkerBackground = false,
35215
35213
  // New props for range restriction
35216
35214
  allowedWeekRange = null,
35217
35215
  // { startWeek: number, endWeek: number } or null
@@ -35408,7 +35406,8 @@ const WeeksPicker = _ref => {
35408
35406
  placeholder: isFocused ? placeholder : "",
35409
35407
  disabled: disabled,
35410
35408
  borderColor: borderColor,
35411
- textColor: textColor
35409
+ textColor: textColor,
35410
+ isDarkerBackground: isDarkerBackground
35412
35411
  }), /*#__PURE__*/React$1.createElement(CalendarDiv, {
35413
35412
  onClick: disabled ? undefined : handleToggle
35414
35413
  }, /*#__PURE__*/React$1.createElement(CalendarInOpen, {
@@ -36092,12 +36091,6 @@ const ToggleSwitchLabel = styled.label`
36092
36091
  position: relative;
36093
36092
  cursor: pointer;
36094
36093
  user-select: none;
36095
- opacity: ${_ref => {
36096
- let {
36097
- disabled
36098
- } = _ref;
36099
- return disabled ? 0.5 : 1;
36100
- }};
36101
36094
  `;
36102
36095
  const ToggleInput = styled.input`
36103
36096
  display: none;
@@ -36105,19 +36098,15 @@ const ToggleInput = styled.input`
36105
36098
  const ToggleSlider = styled.span`
36106
36099
  display: block;
36107
36100
  position: relative;
36108
- background: ${_ref2 => {
36109
- let {
36110
- checked,
36111
- disabled
36112
- } = _ref2;
36113
- return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
36114
- }};
36101
+ background: ${({
36102
+ checked,
36103
+ disabled
36104
+ }) => checked ? "#006d6a" : disabled ? "#B1B1B1" : "#D0D0D0"};
36115
36105
  border-radius: 999px;
36116
36106
  transition: background 0.2s;
36117
- ${_ref3 => {
36118
- let {
36119
- size
36120
- } = _ref3;
36107
+ ${({
36108
+ size
36109
+ }) => {
36121
36110
  switch (size) {
36122
36111
  case "s":
36123
36112
  return css`width: 40px; height: 20px;`;
@@ -36133,13 +36122,14 @@ const ToggleSlider = styled.span`
36133
36122
  left: 3px;
36134
36123
  top: 50%;
36135
36124
  transform: translateY(-50%);
36136
- background: #fff;
36125
+ background: ${({
36126
+ disabled
36127
+ }) => disabled ? "#D0D0D0" : "#fff"};
36137
36128
  border-radius: 50%;
36138
36129
  transition: left 0.2s, width 0.2s, height 0.2s;
36139
- ${_ref4 => {
36140
- let {
36141
- size
36142
- } = _ref4;
36130
+ ${({
36131
+ size
36132
+ }) => {
36143
36133
  switch (size) {
36144
36134
  case "s":
36145
36135
  return css`width: 14px; height: 14px;`;
@@ -36149,11 +36139,10 @@ const ToggleSlider = styled.span`
36149
36139
  return css`width: 20px; height: 20px;`;
36150
36140
  }
36151
36141
  }}
36152
- left: ${_ref5 => {
36153
- let {
36154
- checked,
36155
- size
36156
- } = _ref5;
36142
+ left: ${({
36143
+ checked,
36144
+ size
36145
+ }) => {
36157
36146
  if (!checked) return "3px";
36158
36147
  switch (size) {
36159
36148
  case "s":
@@ -54868,7 +54857,7 @@ const DropdownContainer = styled.div`
54868
54857
  `;
54869
54858
  const DropdownButton = styled.button`
54870
54859
  width: 100%;
54871
- background: #fff;
54860
+ background: ${props => props.isDarkerBackground ? '#F2F2F2' : '#fff'};
54872
54861
  border: 1px solid #8B8989;
54873
54862
  border-radius: 12px;
54874
54863
  padding: 17px;
@@ -54881,7 +54870,7 @@ const DropdownButton = styled.button`
54881
54870
  ${props => props.disabled && css`
54882
54871
  color: #D0D0D0;
54883
54872
  cursor: not-allowed;
54884
- border: 1px solid #D0D0D0;
54873
+ border: 1px solid #D9D9D9;
54885
54874
  background: ${props => props.isDarkerBackground ? '#F2F2F2' : '#fff'};
54886
54875
  `}
54887
54876
  `;
@@ -54907,11 +54896,10 @@ const DropdownList = styled.ul`
54907
54896
  `}
54908
54897
  `;
54909
54898
  const SectionDiv = styled.div`
54910
- ${_ref => {
54911
- let {
54912
- $showBorder,
54913
- margin
54914
- } = _ref;
54899
+ ${({
54900
+ $showBorder,
54901
+ margin
54902
+ }) => {
54915
54903
  switch ($showBorder) {
54916
54904
  case 'Template Offer':
54917
54905
  return css`border-top: 1px solid #e6e2e2ff;
@@ -54991,8 +54979,8 @@ const Label$1 = styled.label`
54991
54979
  padding-inline-start: 5px;
54992
54980
  margin-right: 10px;
54993
54981
  z-index: 2;
54994
- color: ${props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor};
54995
- background-color: ${props => props.disabled ? '#F2F2F2' : props.showLabelOnTop ? 'white' : 'transparent'};
54982
+ color: ${props => props.error ? 'red' : props.disabled ? '#D0D0D0' : props.labelColor};
54983
+ background-color: ${props => props.isDarkerBackground ? '#F2F2F2' : props.showLabelOnTop ? 'white' : 'transparent'};
54996
54984
  position: absolute;
54997
54985
  top: ${props => props.isFocused || props.hasValue ? '0px' : '50%'};
54998
54986
  left: ${props => props.isFocused || props.hasValue ? '23px' : '14px'};
@@ -55523,7 +55511,8 @@ const OverlayDropdown = _ref => {
55523
55511
  labelColor: labelColor,
55524
55512
  hasValue: hasValue,
55525
55513
  disabled: disabled,
55526
- showLabelOnTop: showLabelOnTop
55514
+ showLabelOnTop: showLabelOnTop,
55515
+ isDarkerBackground: isDarkerBackground
55527
55516
  }, getLabel(), getRequired()), /*#__PURE__*/React$1.createElement(DropdownButton, {
55528
55517
  ref: buttonRef,
55529
55518
  onClick: toggleDropdown,