@star-insure/sdk 4.0.0 → 4.1.0

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.
@@ -4,7 +4,8 @@ interface Props {
4
4
  isActive?: boolean;
5
5
  onClose: () => void;
6
6
  title?: string;
7
+ width?: string;
7
8
  className?: string;
8
9
  }
9
- export default function Modal({ children, isActive, onClose, title, className }: Props): JSX.Element;
10
+ export default function Modal({ children, isActive, onClose, title, width, className }: Props): JSX.Element;
10
11
  export {};
@@ -22,10 +22,6 @@ export declare function gstCalc(input: number | string): {
22
22
  amountInclusive: number;
23
23
  amountExclusive: number;
24
24
  };
25
- /**
26
- * Formats a value nicely
27
- */
28
- export declare function formatMoneyNumerals(value: string | number, decimals?: number): string;
29
25
  /**
30
26
  * Formats a value nicely
31
27
  */
@@ -175,11 +175,15 @@ function gstCalc(input) {
175
175
  * Formats a value nicely
176
176
  */
177
177
 
178
- function formatMoneyNumerals(value, decimals) {
178
+ function formatMoney(value, decimals) {
179
179
  if (decimals === void 0) {
180
180
  decimals = 2;
181
181
  }
182
182
 
183
+ if (value === null || value === undefined) {
184
+ return '';
185
+ }
186
+
183
187
  var toFormat = value;
184
188
 
185
189
  if (typeof value === 'string') {
@@ -191,22 +195,6 @@ function formatMoneyNumerals(value, decimals) {
191
195
  maximumFractionDigits: decimals
192
196
  });
193
197
  }
194
- /**
195
- * Formats a value nicely
196
- */
197
-
198
- function formatMoney(value, decimals) {
199
- if (decimals === void 0) {
200
- decimals = 2;
201
- }
202
-
203
- if (value === null || value === undefined) {
204
- return '';
205
- }
206
-
207
- return ("$" + formatMoneyNumerals(value, decimals) // If the value is negative, we need to move the negative sign to the front
208
- ).replace('$-', '- $');
209
- }
210
198
  /**
211
199
  * Turns a formatted value in to a float
212
200
  */
@@ -1554,6 +1542,8 @@ function Modal(_ref) {
1554
1542
  isActive = _ref$isActive === void 0 ? false : _ref$isActive,
1555
1543
  onClose = _ref.onClose,
1556
1544
  title = _ref.title,
1545
+ _ref$width = _ref.width,
1546
+ width = _ref$width === void 0 ? '' : _ref$width,
1557
1547
  _ref$className = _ref.className,
1558
1548
  className = _ref$className === void 0 ? '' : _ref$className;
1559
1549
  return React__default.createElement(react$1.Transition.Root, {
@@ -1584,7 +1574,7 @@ function Modal(_ref) {
1584
1574
  leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
1585
1575
  leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
1586
1576
  }, React__default.createElement("div", {
1587
- className: className + " w-full align-start inline-block bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-3xl sm:p-6"
1577
+ className: className + " w-full align-start inline-block bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-7xl sm:p-6 " + width
1588
1578
  }, React__default.createElement("div", {
1589
1579
  className: "flex gap-4 mb-4 text-asphalt " + (title ? 'border-b-2 border-asphalt pb-4' : '')
1590
1580
  }, title && React__default.createElement("h3", {
@@ -3179,7 +3169,6 @@ exports.formatDateForTable = formatDateForTable;
3179
3169
  exports.formatDateNice = formatDateNice;
3180
3170
  exports.formatDateTime = formatDateTime;
3181
3171
  exports.formatMoney = formatMoney;
3182
- exports.formatMoneyNumerals = formatMoneyNumerals;
3183
3172
  exports.formatNumber = formatNumber;
3184
3173
  exports.getAddressData = getAddressData;
3185
3174
  exports.getGst = getGst;