@star-insure/sdk 3.2.12 → 3.2.14
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/components/common/Modal.d.ts +2 -1
- package/dist/sdk.cjs.development.js +6 -4
- 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 +6 -4
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/common/Modal.tsx +5 -4
- package/src/components/filter/FilterItem.tsx +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@star-insure/sdk",
|
|
3
3
|
"description": "The SDK for Star Insure client apps with shared helper functions and TypeScript definitions.",
|
|
4
4
|
"author": "alexclark_nz",
|
|
5
|
-
"version": "3.2.
|
|
5
|
+
"version": "3.2.14",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Fragment } from 'react'
|
|
3
|
-
import { Dialog, Transition } from '@headlessui/react'
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import { Dialog, Transition } from '@headlessui/react';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
title?: string;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export default function Modal({ children, isActive = false, onClose, title }: Props) {
|
|
13
|
+
export default function Modal({ children, isActive = false, onClose, title, className = '' }: Props) {
|
|
13
14
|
return (
|
|
14
15
|
<Transition.Root show={isActive} as={Fragment}>
|
|
15
16
|
<Dialog as="div" className="fixed z-[110] inset-0 overflow-y-auto" onClose={onClose}>
|
|
@@ -35,7 +36,7 @@ export default function Modal({ children, isActive = false, onClose, title }: Pr
|
|
|
35
36
|
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
|
36
37
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
37
38
|
>
|
|
38
|
-
<div className=
|
|
39
|
+
<div 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`}>
|
|
39
40
|
<div className={`flex gap-4 mb-4 text-asphalt ${title ? 'border-b-2 border-asphalt pb-4' : ''}`}>
|
|
40
41
|
{title && <h3 className="font-black text-lg">{title}</h3>}
|
|
41
42
|
<button type="button" onClick={onClose} className="ml-auto transition-all hover:opacity-50">
|
|
@@ -198,7 +198,7 @@ export function FilterItem({ filter }: { filter: FilterOption, path?: string })
|
|
|
198
198
|
</div>
|
|
199
199
|
}>
|
|
200
200
|
<form
|
|
201
|
-
className={`mt-2 flex max-h-[350px] min-w-[200px] flex-col gap-2 rounded-md border border-gray-300 bg-white p-4 shadow-lg ${ filter.type && filter.type === 'select' ? '' : 'overflow-y-scroll'}`}
|
|
201
|
+
className={`mt-2 flex max-h-[350px] min-w-[200px] max-w-[220px] flex-col gap-2 rounded-md border border-gray-300 bg-white p-4 shadow-lg ${ filter.type && filter.type === 'select' ? '' : 'overflow-y-scroll'}`}
|
|
202
202
|
onSubmit={handleApply}
|
|
203
203
|
>
|
|
204
204
|
<div className="flex flex-col items-start gap-1">
|
|
@@ -213,7 +213,7 @@ export function FilterItem({ filter }: { filter: FilterOption, path?: string })
|
|
|
213
213
|
checked={selected.includes(option.value.toString())}
|
|
214
214
|
onChange={handleInput}
|
|
215
215
|
/>
|
|
216
|
-
<label className="
|
|
216
|
+
<label className="leading-tight" htmlFor={option.label}>
|
|
217
217
|
{option.label}
|
|
218
218
|
</label>
|
|
219
219
|
</div>
|