@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.
package/dist/sdk.esm.js CHANGED
@@ -168,11 +168,15 @@ function gstCalc(input) {
168
168
  * Formats a value nicely
169
169
  */
170
170
 
171
- function formatMoneyNumerals(value, decimals) {
171
+ function formatMoney(value, decimals) {
172
172
  if (decimals === void 0) {
173
173
  decimals = 2;
174
174
  }
175
175
 
176
+ if (value === null || value === undefined) {
177
+ return '';
178
+ }
179
+
176
180
  var toFormat = value;
177
181
 
178
182
  if (typeof value === 'string') {
@@ -184,22 +188,6 @@ function formatMoneyNumerals(value, decimals) {
184
188
  maximumFractionDigits: decimals
185
189
  });
186
190
  }
187
- /**
188
- * Formats a value nicely
189
- */
190
-
191
- function formatMoney(value, decimals) {
192
- if (decimals === void 0) {
193
- decimals = 2;
194
- }
195
-
196
- if (value === null || value === undefined) {
197
- return '';
198
- }
199
-
200
- return ("$" + formatMoneyNumerals(value, decimals) // If the value is negative, we need to move the negative sign to the front
201
- ).replace('$-', '- $');
202
- }
203
191
  /**
204
192
  * Turns a formatted value in to a float
205
193
  */
@@ -1547,6 +1535,8 @@ function Modal(_ref) {
1547
1535
  isActive = _ref$isActive === void 0 ? false : _ref$isActive,
1548
1536
  onClose = _ref.onClose,
1549
1537
  title = _ref.title,
1538
+ _ref$width = _ref.width,
1539
+ width = _ref$width === void 0 ? '' : _ref$width,
1550
1540
  _ref$className = _ref.className,
1551
1541
  className = _ref$className === void 0 ? '' : _ref$className;
1552
1542
  return React__default.createElement(Transition.Root, {
@@ -1577,7 +1567,7 @@ function Modal(_ref) {
1577
1567
  leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
1578
1568
  leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
1579
1569
  }, React__default.createElement("div", {
1580
- 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"
1570
+ 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
1581
1571
  }, React__default.createElement("div", {
1582
1572
  className: "flex gap-4 mb-4 text-asphalt " + (title ? 'border-b-2 border-asphalt pb-4' : '')
1583
1573
  }, title && React__default.createElement("h3", {
@@ -3137,5 +3127,5 @@ function PageHeader(_ref) {
3137
3127
  })))));
3138
3128
  }
3139
3129
 
3140
- export { Button, Card, DateOfBirthField, ErrorList, FormTester, Modal, MoneyField, PageHeader, Pagination, QuoteRequestFormContext, QuoteRequestFormProvider, QuoteRequestOptionsProvider, RegistrationSearchField, SimplePagination, Table, TableActions, TableBody, TableCell, TableHead, TableHeader, TableRow, ToastItem, ToastProvider, Toasts, addGst, autocomplete, calcMonthlyEnhancementPrice, calcPurchaseOptionPricing, calculateAge, fixRoundingError, formatDate, formatDateForTable, formatDateNice, formatDateTime, formatMoney, formatMoneyNumerals, formatNumber, getAddressData, getGst, gstCalc, initialData, round, sanitiseQuoteRequestFormData, sanitiseVehicleType, subtractGst, useAuth, useClickOutside, useInertiaOptions, useLocalStorage, useQuoteRequestForm, useQuoteRequestOptions, useToast };
3130
+ export { Button, Card, DateOfBirthField, ErrorList, FormTester, Modal, MoneyField, PageHeader, Pagination, QuoteRequestFormContext, QuoteRequestFormProvider, QuoteRequestOptionsProvider, RegistrationSearchField, SimplePagination, Table, TableActions, TableBody, TableCell, TableHead, TableHeader, TableRow, ToastItem, ToastProvider, Toasts, addGst, autocomplete, calcMonthlyEnhancementPrice, calcPurchaseOptionPricing, calculateAge, fixRoundingError, formatDate, formatDateForTable, formatDateNice, formatDateTime, formatMoney, formatNumber, getAddressData, getGst, gstCalc, initialData, round, sanitiseQuoteRequestFormData, sanitiseVehicleType, subtractGst, useAuth, useClickOutside, useInertiaOptions, useLocalStorage, useQuoteRequestForm, useQuoteRequestOptions, useToast };
3141
3131
  //# sourceMappingURL=sdk.esm.js.map