sag_components 2.0.0-beta277 → 2.0.0-beta279

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.esm.js CHANGED
@@ -36110,19 +36110,15 @@ const ToggleInput = styled.input`
36110
36110
  const ToggleSlider = styled.span`
36111
36111
  display: block;
36112
36112
  position: relative;
36113
- background: ${_ref => {
36114
- let {
36115
- checked,
36116
- disabled
36117
- } = _ref;
36118
- return checked ? "#006d6a" : disabled ? "#B1B1B1" : "#D0D0D0";
36119
- }};
36113
+ background: ${({
36114
+ checked,
36115
+ disabled
36116
+ }) => checked ? "#006d6a" : disabled ? "#B1B1B1" : "#D0D0D0"};
36120
36117
  border-radius: 999px;
36121
36118
  transition: background 0.2s;
36122
- ${_ref2 => {
36123
- let {
36124
- size
36125
- } = _ref2;
36119
+ ${({
36120
+ size
36121
+ }) => {
36126
36122
  switch (size) {
36127
36123
  case "s":
36128
36124
  return css`width: 40px; height: 20px;`;
@@ -36138,18 +36134,14 @@ const ToggleSlider = styled.span`
36138
36134
  left: 3px;
36139
36135
  top: 50%;
36140
36136
  transform: translateY(-50%);
36141
- background: ${_ref3 => {
36142
- let {
36143
- disabled
36144
- } = _ref3;
36145
- return disabled ? "#D0D0D0" : "#fff";
36146
- }};
36137
+ background: ${({
36138
+ disabled
36139
+ }) => disabled ? "#D0D0D0" : "#fff"};
36147
36140
  border-radius: 50%;
36148
36141
  transition: left 0.2s, width 0.2s, height 0.2s;
36149
- ${_ref4 => {
36150
- let {
36151
- size
36152
- } = _ref4;
36142
+ ${({
36143
+ size
36144
+ }) => {
36153
36145
  switch (size) {
36154
36146
  case "s":
36155
36147
  return css`width: 14px; height: 14px;`;
@@ -36159,11 +36151,10 @@ const ToggleSlider = styled.span`
36159
36151
  return css`width: 20px; height: 20px;`;
36160
36152
  }
36161
36153
  }}
36162
- left: ${_ref5 => {
36163
- let {
36164
- checked,
36165
- size
36166
- } = _ref5;
36154
+ left: ${({
36155
+ checked,
36156
+ size
36157
+ }) => {
36167
36158
  if (!checked) return "3px";
36168
36159
  switch (size) {
36169
36160
  case "s":
@@ -36177,9 +36168,9 @@ const ToggleSlider = styled.span`
36177
36168
  }
36178
36169
  `;
36179
36170
 
36180
- /**
36181
- * ToggleSwitch component for on/off states.
36182
- * Supports small/large sizes and disabled state.
36171
+ /**
36172
+ * ToggleSwitch component for on/off states.
36173
+ * Supports small/large sizes and disabled state.
36183
36174
  */
36184
36175
  function ToggleSwitch(_ref) {
36185
36176
  let {
@@ -37855,7 +37846,7 @@ const FilterPop = props => {
37855
37846
  }));
37856
37847
  return {
37857
37848
  visibleItems: visible,
37858
- totalHeight: (sortedList.length + 1) * (itemHeight + 8),
37849
+ totalHeight: sortedList.length * itemHeight,
37859
37850
  offsetY: startIndex * itemHeight
37860
37851
  };
37861
37852
  }, [sortedList, scrollTop, itemHeight, overscan, maxHeight]);
@@ -40365,7 +40356,7 @@ const FieldRow$1 = styled.div`
40365
40356
  display: flex;
40366
40357
  gap: 8px;
40367
40358
  align-items: center;
40368
- justify-content: center;
40359
+ justify-content: center;
40369
40360
  padding: 16px;
40370
40361
  `;
40371
40362
  const Label$2 = styled.label`
@@ -40373,6 +40364,7 @@ const Label$2 = styled.label`
40373
40364
  display: flex;
40374
40365
  align-items: center;
40375
40366
  gap: 8px;
40367
+ white-space: nowrap;
40376
40368
  `;
40377
40369
  const Input$1 = styled.input`
40378
40370
  width: 64px;
@@ -40600,7 +40592,7 @@ const RangePop = props => {
40600
40592
  max: param.type === "percent" ? 100 : param.type === "week" ? 53 : undefined
40601
40593
  }));
40602
40594
  }
40603
- }), errors[`field_${idx}`] && /*#__PURE__*/React$1.createElement(ErrorText, null, errors[`field_${idx}`]?.message)))), /*#__PURE__*/React$1.createElement(Label$2, null, paramType)), /*#__PURE__*/React$1.createElement(Actions$1, null, /*#__PURE__*/React$1.createElement(LinkButton, {
40595
+ }), errors[`field_${idx}`] && /*#__PURE__*/React$1.createElement(ErrorText, null, errors[`field_${idx}`]?.message)))), /*#__PURE__*/React$1.createElement(Label$2, null, paramType === 'Week' ? paramType : "")), /*#__PURE__*/React$1.createElement(Actions$1, null, /*#__PURE__*/React$1.createElement(LinkButton, {
40604
40596
  leftIcon: "none",
40605
40597
  onClick: handleCancel,
40606
40598
  rightIcon: "none",
@@ -41252,13 +41244,23 @@ const TableHeader = ({
41252
41244
  });
41253
41245
  } else if (rangeFilter) {
41254
41246
  const currentFilterState = filterState[key];
41255
- return /*#__PURE__*/React$1.createElement(RangePop, {
41256
- menuName: title,
41257
- width: "300px",
41258
- height: "auto",
41259
- buttonColor: "#066768",
41260
- hoverColor: "#044d4e",
41261
- paramType: "Week",
41247
+
41248
+ // Determine if this is a price column
41249
+ const isPriceColumn = key.toLowerCase().includes('price') || key.toLowerCase().includes('cost') || key.toLowerCase().includes('amount');
41250
+
41251
+ // Configure RangePop based on column type
41252
+ const rangeConfig = isPriceColumn ? {
41253
+ paramType: '$',
41254
+ params: [{
41255
+ label: 'From $',
41256
+ type: 'price'
41257
+ }, {
41258
+ label: 'To $',
41259
+ type: 'price'
41260
+ }],
41261
+ radioOptions: ['All Prices', 'Custom Range']
41262
+ } : {
41263
+ paramType: 'Week',
41262
41264
  params: [{
41263
41265
  label: 'From',
41264
41266
  type: 'week'
@@ -41266,7 +41268,17 @@ const TableHeader = ({
41266
41268
  label: 'To',
41267
41269
  type: 'week'
41268
41270
  }],
41269
- radioOptions: ['All weeks', 'Custom Range'],
41271
+ radioOptions: ['All Weeks', 'Custom Range']
41272
+ };
41273
+ return /*#__PURE__*/React$1.createElement(RangePop, {
41274
+ menuName: title,
41275
+ width: "300px",
41276
+ height: "auto",
41277
+ buttonColor: "#066768",
41278
+ hoverColor: "#044d4e",
41279
+ paramType: rangeConfig.paramType,
41280
+ params: rangeConfig.params,
41281
+ radioOptions: rangeConfig.radioOptions,
41270
41282
  initialValues: currentFilterState ? {
41271
41283
  selectedRadio: currentFilterState.selectedRadio,
41272
41284
  fields: currentFilterState.fields