@obosbbl/grunnmuren-react 2.0.0-canary.26 → 2.0.0-canary.28
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.mjs +15 -14
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -286,7 +286,7 @@ const formField = cx('group flex flex-col gap-2');
|
|
|
286
286
|
const formFieldError = cx('w-fit rounded-sm bg-red-light px-2 py-1 text-sm leading-6 text-red');
|
|
287
287
|
const input = cva({
|
|
288
288
|
base: [
|
|
289
|
-
'rounded-md py-2.5 text-
|
|
289
|
+
'rounded-md py-2.5 text-base font-normal leading-6 placeholder-[#727070] outline-none ring-1 ring-black',
|
|
290
290
|
// invalid styles
|
|
291
291
|
'group-data-[invalid]:ring-2 group-data-[invalid]:ring-red',
|
|
292
292
|
// Fix invisible ring on safari: https://github.com/tailwindlabs/tailwindcss.com/issues/1135
|
|
@@ -309,14 +309,12 @@ const input = cva({
|
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
311
|
const inputGroup = cx([
|
|
312
|
-
'inline-flex items-center gap-3 overflow-hidden rounded-md bg-white px-3 text-
|
|
313
|
-
'group-data-[invalid]:ring-2 group-data-[invalid]:ring-red group-data-[invalid]:focus-within:ring'
|
|
314
|
-
// Make sure icons are the correct size
|
|
315
|
-
'[&_svg]:text-base'
|
|
312
|
+
'inline-flex items-center gap-3 overflow-hidden rounded-md bg-white px-3 text-base ring-1 ring-black focus-within:ring-2',
|
|
313
|
+
'group-data-[invalid]:ring-2 group-data-[invalid]:ring-red group-data-[invalid]:focus-within:ring'
|
|
316
314
|
]);
|
|
317
315
|
const dropdown = {
|
|
318
|
-
popover: cx('min-w-[--trigger-width]
|
|
319
|
-
listbox: cx('text-sm outline-none'),
|
|
316
|
+
popover: cx('min-w-[--trigger-width] rounded-md bg-white shadow data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in data-[exiting]:fade-out'),
|
|
317
|
+
listbox: cx('max-h-[25rem] overflow-y-scroll rounded-md border border-black text-sm outline-none'),
|
|
320
318
|
chevronIcon: cx('text-base transition-transform duration-150 group-data-[open]:rotate-180 motion-reduce:transition-none')
|
|
321
319
|
};
|
|
322
320
|
|
|
@@ -330,11 +328,12 @@ function ErrorMessage(props) {
|
|
|
330
328
|
});
|
|
331
329
|
}
|
|
332
330
|
|
|
331
|
+
const descriptionClasses = 'text-sm font-light leading-6';
|
|
333
332
|
function Description(props) {
|
|
334
333
|
const { className, ...restProps } = props;
|
|
335
334
|
return /*#__PURE__*/ jsx(Text, {
|
|
336
335
|
...restProps,
|
|
337
|
-
className: cx(className,
|
|
336
|
+
className: cx(className, descriptionClasses),
|
|
338
337
|
slot: "description"
|
|
339
338
|
});
|
|
340
339
|
}
|
|
@@ -394,12 +393,12 @@ function Checkbox(props, ref) {
|
|
|
394
393
|
children
|
|
395
394
|
]
|
|
396
395
|
}),
|
|
397
|
-
description &&
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
396
|
+
description && // {/* Use a div instead of the Description component to avoid infinite re-render loops in React until this bug in RAC is fixed: https://github.com/adobe/react-spectrum/issues/6229 */}
|
|
397
|
+
/*#__PURE__*/ jsx("div", {
|
|
398
|
+
id: descriptionId,
|
|
399
|
+
slot: "description",
|
|
400
|
+
className: cx('block', descriptionClasses),
|
|
401
|
+
children: description
|
|
403
402
|
}),
|
|
404
403
|
errorMessage && /*#__PURE__*/ jsx(ErrorMessage, {
|
|
405
404
|
className: "mt-2 block",
|
|
@@ -533,6 +532,7 @@ function Combobox(props, ref) {
|
|
|
533
532
|
className: cx(dropdown.popover, 'min-w-[calc(var(--trigger-width)+26px)]'),
|
|
534
533
|
crossOffset: -13,
|
|
535
534
|
children: /*#__PURE__*/ jsx(ListBox, {
|
|
535
|
+
className: dropdown.listbox,
|
|
536
536
|
children: children
|
|
537
537
|
})
|
|
538
538
|
})
|
|
@@ -645,6 +645,7 @@ function Select(props, ref) {
|
|
|
645
645
|
/*#__PURE__*/ jsx(Popover, {
|
|
646
646
|
className: dropdown.popover,
|
|
647
647
|
children: /*#__PURE__*/ jsx(ListBox, {
|
|
648
|
+
className: dropdown.listbox,
|
|
648
649
|
children: children
|
|
649
650
|
})
|
|
650
651
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.28",
|
|
4
4
|
"description": "Grunnmuren components in React",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/code-obos/grunnmuren"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@obosbbl/grunnmuren-icons-react": "^2.0.0-canary.1",
|
|
22
|
-
"@react-aria/utils": "^3.
|
|
22
|
+
"@react-aria/utils": "^3.24.0",
|
|
23
23
|
"@types/node": "^20.11.19",
|
|
24
24
|
"cva": "1.0.0-beta.1",
|
|
25
|
-
"react-aria-components": "^1.
|
|
25
|
+
"react-aria-components": "^1.2.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^18"
|