@star-insure/sdk 4.6.0 → 5.0.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.cjs.development.js +18 -18
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +18 -18
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/api/auth.d.ts +1 -1
- package/package.json +3 -1
- package/src/components/common/Button.tsx +1 -1
- package/src/components/common/Modal.tsx +1 -1
- package/src/components/common/ToastItem.tsx +2 -2
- package/src/components/filter/Back.tsx +1 -1
- package/src/components/filter/FilterItem.tsx +2 -2
- package/src/components/filter/PageHeader.tsx +6 -6
- package/src/components/filter/SearchBar.tsx +2 -2
- package/src/components/forms/MoneyField.tsx +1 -1
- package/src/components/forms/RegistrationSearchField.tsx +1 -1
- package/src/components/tables/TableHead.tsx +1 -1
- package/src/components/tables/TableRow.tsx +1 -1
- package/src/tailwind-preset.js +51 -0
- package/src/theme.css +30 -0
- package/src/types/api/auth.ts +1 -0
package/dist/sdk.esm.js
CHANGED
|
@@ -1341,7 +1341,7 @@ function Button(_ref) {
|
|
|
1341
1341
|
_ref$small = _ref.small,
|
|
1342
1342
|
small = _ref$small === void 0 ? false : _ref$small;
|
|
1343
1343
|
var baseClasses = small ? 'font-bold text-sm inline-flex items-center gap-3 justify-center text-white text-center px-3 py-1 rounded min-w-[80px] transition-all hover:brightness-110' : 'font-black inline-flex items-center gap-3 justify-center text-white text-center px-5 py-2 rounded-md min-w-[120px] transition-all hover:brightness-110';
|
|
1344
|
-
var statusClass = status === 'primary' && 'bg-
|
|
1344
|
+
var statusClass = status === 'primary' && 'bg-primary' || status === 'danger' && 'bg-red-500' || status === 'warning' && 'bg-yellow-400' || status === 'info' && 'bg-blue-400' || 'bg-gray-600';
|
|
1345
1345
|
var classes = (className != null ? className : '') + " " + baseClasses + " " + statusClass;
|
|
1346
1346
|
|
|
1347
1347
|
if (_onClick) {
|
|
@@ -1600,7 +1600,7 @@ function ToastItem(_ref) {
|
|
|
1600
1600
|
removeToast = _useToast.removeToast;
|
|
1601
1601
|
|
|
1602
1602
|
var defaultClasses = 'w-full min-w-[250px] p-4 shadow flex justify-between items-center font-black rounded-md not:';
|
|
1603
|
-
var statusClasses = status === 'success' && 'bg-
|
|
1603
|
+
var statusClasses = status === 'success' && 'bg-primary text-white' || status === 'error' && 'bg-red-500 text-white' || status === 'warning' && 'bg-yellow-400 text-white' || 'bg-white text-secondary';
|
|
1604
1604
|
var classes = defaultClasses + " " + statusClasses;
|
|
1605
1605
|
|
|
1606
1606
|
function handleClick() {
|
|
@@ -1689,7 +1689,7 @@ function Modal(_ref) {
|
|
|
1689
1689
|
}, React__default.createElement("div", {
|
|
1690
1690
|
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
|
|
1691
1691
|
}, React__default.createElement("div", {
|
|
1692
|
-
className: "flex gap-4 mb-4 text-
|
|
1692
|
+
className: "flex gap-4 mb-4 text-secondary " + (title ? 'border-b-2 border-secondary pb-4' : '')
|
|
1693
1693
|
}, title && React__default.createElement("h3", {
|
|
1694
1694
|
className: "font-black text-lg"
|
|
1695
1695
|
}, title), React__default.createElement("button", {
|
|
@@ -1767,7 +1767,7 @@ function TableHead(_ref) {
|
|
|
1767
1767
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
1768
1768
|
|
|
1769
1769
|
return React__default.createElement("thead", Object.assign({}, props, {
|
|
1770
|
-
className: cn(className, 'px-3 py-4 text-sm text-white bg-
|
|
1770
|
+
className: cn(className, 'px-3 py-4 text-sm text-white bg-table-header-background')
|
|
1771
1771
|
}), children);
|
|
1772
1772
|
}
|
|
1773
1773
|
|
|
@@ -1834,7 +1834,7 @@ function TableRow(_ref) {
|
|
|
1834
1834
|
_onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
1835
1835
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
1836
1836
|
|
|
1837
|
-
var bgClass = className.includes('bg') ? '' : 'bg-white even:bg-
|
|
1837
|
+
var bgClass = className.includes('bg') ? '' : 'bg-white even:bg-table-row-alternative-background';
|
|
1838
1838
|
return React__default.createElement("tr", Object.assign({}, props, {
|
|
1839
1839
|
className: cn(className, bgClass, 'hover:bg-gray-100'),
|
|
1840
1840
|
onClick: function onClick(e) {
|
|
@@ -1977,7 +1977,7 @@ function MoneyField(_ref) {
|
|
|
1977
1977
|
|
|
1978
1978
|
var displayValue = formatMoney(value, 0);
|
|
1979
1979
|
return React__default.createElement("div", {
|
|
1980
|
-
className: className + " flex items-center gap-2 pl-4 rounded-md border border-gray-300 transition-all focus-within:border-
|
|
1980
|
+
className: className + " flex items-center gap-2 pl-4 rounded-md border border-gray-300 transition-all focus-within:border-primary focus-within:outline-none focus-within:ring focus-within:ring-primary focus-within:ring-opacity-50"
|
|
1981
1981
|
}, React__default.createElement("span", {
|
|
1982
1982
|
className: "font-bold pr-2"
|
|
1983
1983
|
}, "$"), React__default.createElement("input", {
|
|
@@ -2207,7 +2207,7 @@ function RegistrationSearchField(_ref) {
|
|
|
2207
2207
|
type: "button",
|
|
2208
2208
|
onClick: handleSearch,
|
|
2209
2209
|
disabled: status === 'processing',
|
|
2210
|
-
className: cn(searchBtnClassName, "bg-
|
|
2210
|
+
className: cn(searchBtnClassName, "bg-primary px-4 py-3 rounded-md transition-all")
|
|
2211
2211
|
}, React__default.createElement("span", {
|
|
2212
2212
|
className: "sr-only"
|
|
2213
2213
|
}, "Search"), React__default.createElement("svg", {
|
|
@@ -2481,7 +2481,7 @@ function BackButton(_ref) {
|
|
|
2481
2481
|
}, [breadcrumbs]);
|
|
2482
2482
|
return React__default.createElement(Link, {
|
|
2483
2483
|
href: backUrl || '/',
|
|
2484
|
-
className: cn(className, 'flex items-center justify-center hover:text-
|
|
2484
|
+
className: cn(className, 'flex items-center justify-center text-back-button-text hover:text-primary transition-all')
|
|
2485
2485
|
}, React__default.createElement(HiArrowLeft, {
|
|
2486
2486
|
className: "h-5 w-5 stroke-[1.25]"
|
|
2487
2487
|
}));
|
|
@@ -2572,12 +2572,12 @@ function SearchBar(_ref) {
|
|
|
2572
2572
|
onClick: function onClick() {
|
|
2573
2573
|
return onActive(true);
|
|
2574
2574
|
},
|
|
2575
|
-
className: "flex items-center justify-center rounded-full hover:text-
|
|
2575
|
+
className: "flex items-center justify-center rounded-full hover:text-primary p-1 hover:bg-gray-100"
|
|
2576
2576
|
}, React__default.createElement(HiMagnifyingGlass, {
|
|
2577
2577
|
className: "h-5 w-5 stroke-[1.25]"
|
|
2578
2578
|
})), active && React__default.createElement("form", {
|
|
2579
2579
|
onSubmit: handleSearch,
|
|
2580
|
-
className: "group flex items-center gap-2 rounded-full bg-white pr-4 pl-1 shadow transition-all focus-within:outline-none focus-within:ring-1 focus-within:ring-
|
|
2580
|
+
className: "group flex items-center gap-2 rounded-full bg-white pr-4 pl-1 shadow transition-all focus-within:outline-none focus-within:ring-1 focus-within:ring-primary"
|
|
2581
2581
|
}, React__default.createElement("input", {
|
|
2582
2582
|
type: "text",
|
|
2583
2583
|
name: "search",
|
|
@@ -2994,8 +2994,8 @@ function FilterItem(_ref) {
|
|
|
2994
2994
|
onClick: function onClick() {
|
|
2995
2995
|
return handleClick();
|
|
2996
2996
|
},
|
|
2997
|
-
className: cn('flex rounded-2xl border hover:cursor-pointer hover:border-
|
|
2998
|
-
'!bg-
|
|
2997
|
+
className: cn('flex rounded-2xl border hover:cursor-pointer hover:border-primary bg-gray-600 px-2 py-1 items-center justify-between shrink-0 gap-2 text-xs text-white hover:bg-primary transition-colors', {
|
|
2998
|
+
'!bg-primary border-primary': hasFilters
|
|
2999
2999
|
})
|
|
3000
3000
|
}, React__default.createElement("p", {
|
|
3001
3001
|
className: "whitespace-nowrap"
|
|
@@ -3269,17 +3269,17 @@ function PageHeader(_ref) {
|
|
|
3269
3269
|
className: cn('col-span-full flex items-center gap-2 max-w-full rounded-lg bg-white p-2 shadow', className)
|
|
3270
3270
|
}, back && React__default.createElement(BackButton, {
|
|
3271
3271
|
back: back,
|
|
3272
|
-
className: "bg-
|
|
3272
|
+
className: "bg-back-button-background h-[60px] w-[60px] rounded"
|
|
3273
3273
|
}), React__default.createElement("div", {
|
|
3274
|
-
className: cn('w-full grid grid-cols-[auto_1fr_auto_auto] h-[60px] rounded bg-
|
|
3274
|
+
className: cn('w-full grid grid-cols-[auto_1fr_auto_auto] h-[60px] rounded bg-page-header-background p-3 gap-4', innerClassName)
|
|
3275
3275
|
}, React__default.createElement("button", {
|
|
3276
3276
|
type: "button",
|
|
3277
3277
|
disabled: !search,
|
|
3278
3278
|
onClick: function onClick() {
|
|
3279
3279
|
return setSearchActive(true);
|
|
3280
3280
|
},
|
|
3281
|
-
className: cn('mr-auto flex items-center gap-4 transition-colors pr-6 pl-1 disabled:opacity-100', {
|
|
3282
|
-
'hover:text-
|
|
3281
|
+
className: cn('mr-auto flex items-center gap-4 transition-colors pr-6 pl-1 disabled:opacity-100 text-page-header-text', {
|
|
3282
|
+
'hover:text-primary': search && !isSearchActive
|
|
3283
3283
|
})
|
|
3284
3284
|
}, search && React__default.createElement(SearchBar, {
|
|
3285
3285
|
search: search,
|
|
@@ -3288,7 +3288,7 @@ function PageHeader(_ref) {
|
|
|
3288
3288
|
placeholder: "Search " + title + "...",
|
|
3289
3289
|
focusSearchShortcut: focusSearchShortcut
|
|
3290
3290
|
}), !isSearchActive && React__default.createElement("h1", {
|
|
3291
|
-
className: "text-base font-black"
|
|
3291
|
+
className: "text-base text-page-header-text font-black"
|
|
3292
3292
|
}, title)), React__default.createElement("div", {
|
|
3293
3293
|
className: "flex items-center ml-auto gap-2 h-full min-w-0 max-w-full"
|
|
3294
3294
|
}, filterOptions.length > 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement("button", {
|
|
@@ -3311,7 +3311,7 @@ function PageHeader(_ref) {
|
|
|
3311
3311
|
onClick: clickRight,
|
|
3312
3312
|
className: "w-5 h-5 text-gray-400 stroke-[1.25]"
|
|
3313
3313
|
}))), filteredActions.length > 0 && React__default.createElement("div", {
|
|
3314
|
-
className: "flex items-center gap-3 bg-
|
|
3314
|
+
className: "flex items-center gap-3 bg-page-header-background"
|
|
3315
3315
|
}, filterOptions.length > 0 && React__default.createElement("div", {
|
|
3316
3316
|
className: "w-[1px] h-full bg-gray-300"
|
|
3317
3317
|
}), React__default.createElement("nav", {
|