@obosbbl/grunnmuren-react 3.4.4 → 3.4.5
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/__stories__/form-validation.stories.cjs +28 -16
- package/dist/__stories__/form-validation.stories.js +14 -2
- package/dist/__stories__/layout.stories.cjs +10 -8
- package/dist/__stories__/layout.stories.js +3 -1
- package/dist/index.d.mts +34 -8
- package/dist/index.mjs +51 -11
- package/package.json +4 -9
|
@@ -2,10 +2,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
|
-
var
|
|
5
|
+
var Form$1 = require('react-aria-components/Form');
|
|
6
6
|
var grunnmurenIconsReact = require('@obosbbl/grunnmuren-icons-react');
|
|
7
7
|
var cva = require('cva');
|
|
8
|
-
var
|
|
8
|
+
var Button$1 = require('react-aria-components/Button');
|
|
9
|
+
var Link = require('react-aria-components/Link');
|
|
10
|
+
var slots = require('react-aria-components/slots');
|
|
11
|
+
var useProgressBar = require('react-aria/useProgressBar');
|
|
12
|
+
var I18nProvider = require('react-aria-components/I18nProvider');
|
|
13
|
+
var Group = require('react-aria-components/Group');
|
|
14
|
+
var Input = require('react-aria-components/Input');
|
|
15
|
+
var TextField$1 = require('react-aria-components/TextField');
|
|
16
|
+
require('react-aria-components/Header');
|
|
17
|
+
require('react-aria-components/ListBox');
|
|
18
|
+
var Text = require('react-aria-components/Text');
|
|
19
|
+
var FieldError = require('react-aria-components/FieldError');
|
|
20
|
+
var Label$1 = require('react-aria-components/Label');
|
|
9
21
|
|
|
10
22
|
const formField = cva.cx('group flex flex-col gap-2');
|
|
11
23
|
const formFieldError = cva.cx('bg-red-light text-red w-fit px-2 py-1 text-sm/6', 'group-data-[slot=file-upload]:rounded-lg');
|
|
@@ -73,7 +85,7 @@ const translations = {
|
|
|
73
85
|
* Returns the locale set in `<GrunnmurenProvider />`
|
|
74
86
|
*/ function _useLocale() {
|
|
75
87
|
// a small wrapper around react-arias useLocale with a simpler return type with only the locales that we actually support
|
|
76
|
-
const locale =
|
|
88
|
+
const locale = I18nProvider.useLocale();
|
|
77
89
|
return locale.locale;
|
|
78
90
|
}
|
|
79
91
|
|
|
@@ -175,7 +187,7 @@ function isLinkProps(props) {
|
|
|
175
187
|
return !!props.href;
|
|
176
188
|
}
|
|
177
189
|
function Button({ ref = null, ...props }) {
|
|
178
|
-
[props, ref] =
|
|
190
|
+
[props, ref] = slots.useContextProps(props, ref, ButtonContext);
|
|
179
191
|
const { animateIcon, children: _children, color, isIconOnly, variant, isPending, ...restProps } = props;
|
|
180
192
|
const className = buttonVariants({
|
|
181
193
|
// Don't animate the icon when we're pending, as it affects the loading spinner
|
|
@@ -187,7 +199,7 @@ function Button({ ref = null, ...props }) {
|
|
|
187
199
|
isPending
|
|
188
200
|
});
|
|
189
201
|
const locale = _useLocale();
|
|
190
|
-
const { progressBarProps } =
|
|
202
|
+
const { progressBarProps } = useProgressBar.useProgressBar({
|
|
191
203
|
isIndeterminate: true,
|
|
192
204
|
'aria-label': translations.pending[locale]
|
|
193
205
|
});
|
|
@@ -200,12 +212,12 @@ function Button({ ref = null, ...props }) {
|
|
|
200
212
|
})
|
|
201
213
|
]
|
|
202
214
|
}) : _children;
|
|
203
|
-
return isLinkProps(restProps) ? /*#__PURE__*/ jsxRuntime.jsx(
|
|
215
|
+
return isLinkProps(restProps) ? /*#__PURE__*/ jsxRuntime.jsx(Link.Link, {
|
|
204
216
|
...restProps,
|
|
205
217
|
className: className,
|
|
206
218
|
ref: ref,
|
|
207
219
|
children: children
|
|
208
|
-
}) : /*#__PURE__*/ jsxRuntime.jsx(
|
|
220
|
+
}) : /*#__PURE__*/ jsxRuntime.jsx(Button$1.Button, {
|
|
209
221
|
...restProps,
|
|
210
222
|
className: className,
|
|
211
223
|
isPending: isPending,
|
|
@@ -222,7 +234,7 @@ function InputAddonDivider() {
|
|
|
222
234
|
|
|
223
235
|
function Description(props) {
|
|
224
236
|
const { className, ...restProps } = props;
|
|
225
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
237
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Text.Text, {
|
|
226
238
|
...restProps,
|
|
227
239
|
className: cva.cx(className, 'description'),
|
|
228
240
|
slot: "description"
|
|
@@ -231,7 +243,7 @@ function Description(props) {
|
|
|
231
243
|
|
|
232
244
|
function ErrorMessage(props) {
|
|
233
245
|
const { children, className, ...restProps } = props;
|
|
234
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
246
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Text.Text, {
|
|
235
247
|
...restProps,
|
|
236
248
|
className: cva.cx(className, formFieldError),
|
|
237
249
|
slot: "errorMessage",
|
|
@@ -245,14 +257,14 @@ function ErrorMessage(props) {
|
|
|
245
257
|
*/ function ErrorMessageOrFieldError({ errorMessage }) {
|
|
246
258
|
return errorMessage ? /*#__PURE__*/ jsxRuntime.jsx(ErrorMessage, {
|
|
247
259
|
children: errorMessage
|
|
248
|
-
}) : /*#__PURE__*/ jsxRuntime.jsx(
|
|
260
|
+
}) : /*#__PURE__*/ jsxRuntime.jsx(FieldError.FieldError, {
|
|
249
261
|
className: formFieldError
|
|
250
262
|
});
|
|
251
263
|
}
|
|
252
264
|
|
|
253
265
|
function Label(props) {
|
|
254
266
|
const { children, className, ...restProps } = props;
|
|
255
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
267
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Label$1.Label, {
|
|
256
268
|
className: cva.cx(className, 'leading-7 font-medium'),
|
|
257
269
|
...restProps,
|
|
258
270
|
children: children
|
|
@@ -277,7 +289,7 @@ function TextField(props) {
|
|
|
277
289
|
// the order of the conditions matter here, because providing a value for isInvalid makes the validation state "controlled",
|
|
278
290
|
// which will override any built in validation
|
|
279
291
|
const isInvalid = !!errorMessage || _isInvalid;
|
|
280
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
292
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(TextField$1.TextField, {
|
|
281
293
|
...restProps,
|
|
282
294
|
className: cva.cx(className, formField),
|
|
283
295
|
isInvalid: isInvalid,
|
|
@@ -288,14 +300,14 @@ function TextField(props) {
|
|
|
288
300
|
description && /*#__PURE__*/ jsxRuntime.jsx(Description, {
|
|
289
301
|
children: description
|
|
290
302
|
}),
|
|
291
|
-
leftAddon || rightAddon ? /*#__PURE__*/ jsxRuntime.jsxs(
|
|
303
|
+
leftAddon || rightAddon ? /*#__PURE__*/ jsxRuntime.jsxs(Group.Group, {
|
|
292
304
|
className: cva.cx(inputGroup, {
|
|
293
305
|
'w-fit': !!size
|
|
294
306
|
}),
|
|
295
307
|
children: [
|
|
296
308
|
leftAddon,
|
|
297
309
|
withAddonDivider && leftAddon && /*#__PURE__*/ jsxRuntime.jsx(InputAddonDivider, {}),
|
|
298
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
310
|
+
/*#__PURE__*/ jsxRuntime.jsx(Input.Input, {
|
|
299
311
|
className: inputVariants({
|
|
300
312
|
textAlign,
|
|
301
313
|
isGrouped: true,
|
|
@@ -307,7 +319,7 @@ function TextField(props) {
|
|
|
307
319
|
withAddonDivider && rightAddon && /*#__PURE__*/ jsxRuntime.jsx(InputAddonDivider, {}),
|
|
308
320
|
rightAddon
|
|
309
321
|
]
|
|
310
|
-
}) : /*#__PURE__*/ jsxRuntime.jsx(
|
|
322
|
+
}) : /*#__PURE__*/ jsxRuntime.jsx(Input.Input, {
|
|
311
323
|
className: inputVariants({
|
|
312
324
|
textAlign,
|
|
313
325
|
autoWidth: !!size
|
|
@@ -353,7 +365,7 @@ const Form = (props)=>{
|
|
|
353
365
|
}, 0);
|
|
354
366
|
}
|
|
355
367
|
};
|
|
356
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
368
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(Form$1.Form, {
|
|
357
369
|
onSubmit: handleSubmit,
|
|
358
370
|
className: "container-prose flex flex-col items-start gap-4",
|
|
359
371
|
validationErrors: errors,
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { createContext, useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Form as Form$1 } from 'react-aria-components/Form';
|
|
4
4
|
import { LoadingSpinner } from '@obosbbl/grunnmuren-icons-react';
|
|
5
5
|
import { cx, cva, compose } from 'cva';
|
|
6
|
-
import {
|
|
6
|
+
import { Button as Button$1 } from 'react-aria-components/Button';
|
|
7
|
+
import { Link } from 'react-aria-components/Link';
|
|
8
|
+
import { useContextProps } from 'react-aria-components/slots';
|
|
9
|
+
import { useProgressBar } from 'react-aria/useProgressBar';
|
|
10
|
+
import { useLocale } from 'react-aria-components/I18nProvider';
|
|
11
|
+
import { Group } from 'react-aria-components/Group';
|
|
12
|
+
import { Input } from 'react-aria-components/Input';
|
|
13
|
+
import { TextField as TextField$1 } from 'react-aria-components/TextField';
|
|
14
|
+
import 'react-aria-components/Header';
|
|
15
|
+
import 'react-aria-components/ListBox';
|
|
16
|
+
import { Text } from 'react-aria-components/Text';
|
|
17
|
+
import { FieldError } from 'react-aria-components/FieldError';
|
|
18
|
+
import { Label as Label$1 } from 'react-aria-components/Label';
|
|
7
19
|
|
|
8
20
|
const formField = cx('group flex flex-col gap-2');
|
|
9
21
|
const formFieldError = cx('bg-red-light text-red w-fit px-2 py-1 text-sm/6', 'group-data-[slot=file-upload]:rounded-lg');
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var grunnmurenIconsReact = require('@obosbbl/grunnmuren-icons-react');
|
|
5
5
|
var cva = require('cva');
|
|
6
|
-
var
|
|
6
|
+
var Link = require('react-aria-components/Link');
|
|
7
|
+
var slots = require('react-aria-components/slots');
|
|
7
8
|
var react = require('react');
|
|
9
|
+
var Group = require('react-aria-components/Group');
|
|
8
10
|
|
|
9
11
|
const HeadingContext = /*#__PURE__*/ react.createContext({});
|
|
10
12
|
const headingVariants = cva.cva({
|
|
@@ -19,7 +21,7 @@ const headingVariants = cva.cva({
|
|
|
19
21
|
}
|
|
20
22
|
});
|
|
21
23
|
const Heading = ({ ref = null, ...props })=>{
|
|
22
|
-
[props, ref] =
|
|
24
|
+
[props, ref] = slots.useContextProps(props, ref, HeadingContext);
|
|
23
25
|
const { children, level, size, className, _innerWrapper: innerWrapper, _outerWrapper: outerWrapper, ...restProps } = props;
|
|
24
26
|
const _className = headingVariants({
|
|
25
27
|
size
|
|
@@ -35,7 +37,7 @@ const Heading = ({ ref = null, ...props })=>{
|
|
|
35
37
|
};
|
|
36
38
|
const ContentContext = /*#__PURE__*/ react.createContext({});
|
|
37
39
|
const Content = ({ ref = null, ...props })=>{
|
|
38
|
-
[props, ref] =
|
|
40
|
+
[props, ref] = slots.useContextProps(props, ref, ContentContext);
|
|
39
41
|
const { _outerWrapper: outerWrapper, ...restProps } = props;
|
|
40
42
|
const content = /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
41
43
|
...restProps,
|
|
@@ -57,7 +59,7 @@ const mediaVariant = cva.cva({
|
|
|
57
59
|
});
|
|
58
60
|
const MediaContext = /*#__PURE__*/ react.createContext({});
|
|
59
61
|
const Media = ({ ref = null, ...props })=>{
|
|
60
|
-
[props, ref] =
|
|
62
|
+
[props, ref] = slots.useContextProps(props, ref, MediaContext);
|
|
61
63
|
const { className, fit, ...restProps } = props;
|
|
62
64
|
const _className = mediaVariant({
|
|
63
65
|
fit
|
|
@@ -203,7 +205,7 @@ const Card = ({ children, className, variant, layout, ...restProps })=>{
|
|
|
203
205
|
className: cva.cx(className, '@container rounded-2xl'),
|
|
204
206
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
205
207
|
className: cardClassName,
|
|
206
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
208
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(slots.Provider, {
|
|
207
209
|
values: [
|
|
208
210
|
[
|
|
209
211
|
HeadingContext,
|
|
@@ -283,7 +285,7 @@ const cardLinkVariants = cva.cva({
|
|
|
283
285
|
className: _className,
|
|
284
286
|
withHref: !!href
|
|
285
287
|
});
|
|
286
|
-
return href ? /*#__PURE__*/ jsxRuntime.jsx(
|
|
288
|
+
return href ? /*#__PURE__*/ jsxRuntime.jsx(Link.Link, {
|
|
287
289
|
"data-slot": "card-link",
|
|
288
290
|
...restProps,
|
|
289
291
|
href: href,
|
|
@@ -394,7 +396,7 @@ const Hero = ({ variant, className, children, ...rest })=>{
|
|
|
394
396
|
variant,
|
|
395
397
|
className
|
|
396
398
|
});
|
|
397
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
399
|
+
return /*#__PURE__*/ jsxRuntime.jsx(slots.Provider, {
|
|
398
400
|
values: [
|
|
399
401
|
[
|
|
400
402
|
HeroContext,
|
|
@@ -412,7 +414,7 @@ const Hero = ({ variant, className, children, ...rest })=>{
|
|
|
412
414
|
}
|
|
413
415
|
],
|
|
414
416
|
[
|
|
415
|
-
|
|
417
|
+
Group.GroupContext,
|
|
416
418
|
{
|
|
417
419
|
// Prevents the group from being announced as a group by screen readers
|
|
418
420
|
// The Group component is used to group the Hero's CTA buttons together visually, and has no semantic meaning
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { ArrowRight } from '@obosbbl/grunnmuren-icons-react';
|
|
3
3
|
import { cva, cx } from 'cva';
|
|
4
|
-
import {
|
|
4
|
+
import { Link } from 'react-aria-components/Link';
|
|
5
|
+
import { useContextProps, Provider } from 'react-aria-components/slots';
|
|
5
6
|
import { createContext } from 'react';
|
|
7
|
+
import { GroupContext } from 'react-aria-components/Group';
|
|
6
8
|
|
|
7
9
|
const HeadingContext = /*#__PURE__*/ createContext({});
|
|
8
10
|
const headingVariants = cva({
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { RouterProvider } from 'react-aria-components';
|
|
2
|
+
export { Form, Group } from 'react-aria-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { RefAttributes, HTMLAttributes, HTMLProps, ComponentProps, Ref, ReactNode, RefObject, Dispatch, SetStateAction, JSX } from 'react';
|
|
6
6
|
import * as cva from 'cva';
|
|
7
7
|
import { VariantProps } from 'cva';
|
|
8
|
-
import {
|
|
8
|
+
import { ButtonProps as ButtonProps$1 } from 'react-aria-components/Button';
|
|
9
|
+
import { DisclosureProps as DisclosureProps$1 } from 'react-aria-components/DisclosureGroup';
|
|
10
|
+
export { DisclosureGroup, DisclosureGroupProps } from 'react-aria-components/DisclosureGroup';
|
|
11
|
+
import { DisclosureState } from 'react-stately/useDisclosureState';
|
|
12
|
+
import { LinkProps as LinkProps$1 } from 'react-aria-components/Link';
|
|
13
|
+
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1 } from 'react-aria-components/Breadcrumbs';
|
|
14
|
+
import { ContextValue } from 'react-aria-components/slots';
|
|
9
15
|
import { EmblaViewportRefType } from 'embla-carousel-react';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
16
|
+
import { CheckboxProps as CheckboxProps$1 } from 'react-aria-components/Checkbox';
|
|
17
|
+
import { CheckboxGroupProps as CheckboxGroupProps$1 } from 'react-aria-components/CheckboxGroup';
|
|
18
|
+
import { ComboBoxProps } from 'react-aria-components/ComboBox';
|
|
19
|
+
import { DateFormatterOptions } from 'react-aria/useDateFormatter';
|
|
20
|
+
import { FileTriggerProps as FileTriggerProps$1 } from 'react-aria-components/FileTrigger';
|
|
21
|
+
import { useFormValidationState } from 'react-stately/private/form/useFormValidationState';
|
|
22
|
+
import { TextProps } from 'react-aria-components/Text';
|
|
23
|
+
import { LabelProps } from 'react-aria-components/Label';
|
|
24
|
+
export { LabelProps } from 'react-aria-components/Label';
|
|
25
|
+
import { DialogProps as DialogProps$1, DialogTriggerProps as DialogTriggerProps$1 } from 'react-aria-components/Dialog';
|
|
26
|
+
import { ModalOverlayProps as ModalOverlayProps$1 } from 'react-aria-components/Modal';
|
|
27
|
+
import { NumberFieldProps as NumberFieldProps$1 } from 'react-aria-components/NumberField';
|
|
28
|
+
import { RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1 } from 'react-aria-components/RadioGroup';
|
|
29
|
+
import { SelectProps as SelectProps$1 } from 'react-aria-components/Select';
|
|
30
|
+
import { ColumnResizerProps, TableProps as TableProps$1, TableBodyProps as TableBodyProps$1, CellProps, ColumnProps, ResizableTableContainerProps, TableHeaderProps as TableHeaderProps$1, RowProps } from 'react-aria-components/Table';
|
|
31
|
+
import { TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1 } from 'react-aria-components/Tabs';
|
|
32
|
+
import { TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1 } from 'react-aria-components/TagGroup';
|
|
33
|
+
import { TextFieldProps as TextFieldProps$1 } from 'react-aria-components/TextField';
|
|
34
|
+
import { HeaderProps } from 'react-aria-components/Header';
|
|
35
|
+
import { ListBoxItemProps, ListBoxSectionProps } from 'react-aria-components/ListBox';
|
|
36
|
+
export { ListBoxItemProps as ComboboxItemProps, ListBoxItemProps as SelectItemProps } from 'react-aria-components/ListBox';
|
|
12
37
|
|
|
13
38
|
declare const disclosureButtonVariants: (props?: ({
|
|
14
39
|
withChevron?: boolean | undefined;
|
|
@@ -228,7 +253,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
228
253
|
};
|
|
229
254
|
declare const cardVariants: (props?: ({
|
|
230
255
|
variant?: "subtle" | "outlined" | undefined;
|
|
231
|
-
layout?: "
|
|
256
|
+
layout?: "vertical" | "horizontal" | undefined;
|
|
232
257
|
} & ({
|
|
233
258
|
class?: cva.ClassValue;
|
|
234
259
|
className?: never;
|
|
@@ -366,7 +391,7 @@ declare const ListBoxSection: <T extends object>({ className, ...restProps }: Li
|
|
|
366
391
|
/**
|
|
367
392
|
* This component can be used to label grouped items in a `ListBoxSection` with a heading
|
|
368
393
|
*/
|
|
369
|
-
declare const ListBoxHeader: (props:
|
|
394
|
+
declare const ListBoxHeader: (props: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
370
395
|
|
|
371
396
|
type ComboboxProps<T extends object> = {
|
|
372
397
|
children: React.ReactNode;
|
|
@@ -461,7 +486,8 @@ type DateFormatterProps = {
|
|
|
461
486
|
*/
|
|
462
487
|
declare const DateFormatter: ({ options: _options, value, children: render }: DateFormatterProps) => ReactNode;
|
|
463
488
|
|
|
464
|
-
type
|
|
489
|
+
type FormValidationProps<T> = Parameters<typeof useFormValidationState<T>>[0];
|
|
490
|
+
type FileTriggerProps = Partial<Omit<FormValidationProps<File>, 'value'>> & FileTriggerProps$1 & Omit<HTMLAttributes<HTMLInputElement>, 'onSelect' | 'onChange' | 'required' | 'className'> & {
|
|
465
491
|
ref?: RefObject<HTMLInputElement | null>;
|
|
466
492
|
isInvalid?: boolean;
|
|
467
493
|
isRequired?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,60 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { RouterProvider } from 'react-aria-components';
|
|
3
|
+
export { Form, Group } from 'react-aria-components';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { cva, cx, compose } from 'cva';
|
|
6
6
|
import { createContext, useContext, useId, useRef, Children, useState, useEffect, useMemo, useCallback, isValidElement, cloneElement, use } from 'react';
|
|
7
|
+
import { useContextProps, Provider, DEFAULT_SLOT, useSlottedContext } from 'react-aria-components/slots';
|
|
7
8
|
import { ChevronDown, Error, Warning, CheckCircle, InfoCircle, Close, User, ChevronLeft, ChevronRight, LoadingSpinner, Check, Trash, Download, LinkExternal, ArrowRight, Edit, PlayerPause, PlayerPlay } from '@obosbbl/grunnmuren-icons-react';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { ButtonContext as ButtonContext$1, Button as Button$1 } from 'react-aria-components/Button';
|
|
10
|
+
import { DisclosureContext, DisclosureGroupStateContext } from 'react-aria-components/DisclosureGroup';
|
|
11
|
+
export { DisclosureGroup } from 'react-aria-components/DisclosureGroup';
|
|
12
|
+
import { filterDOMProps } from 'react-aria/filterDOMProps';
|
|
13
|
+
import { mergeProps } from 'react-aria/mergeProps';
|
|
14
|
+
import { mergeRefs } from 'react-aria/mergeRefs';
|
|
15
|
+
import { useDisclosure } from 'react-aria/useDisclosure';
|
|
16
|
+
import { useFocusRing } from 'react-aria/useFocusRing';
|
|
17
|
+
import { useDisclosureState } from 'react-stately/useDisclosureState';
|
|
18
|
+
import { useLocale, I18nProvider } from 'react-aria-components/I18nProvider';
|
|
19
|
+
import { Link as Link$1, LinkContext } from 'react-aria-components/Link';
|
|
20
|
+
import { Breadcrumb as Breadcrumb$1, Breadcrumbs as Breadcrumbs$1 } from 'react-aria-components/Breadcrumbs';
|
|
21
|
+
import { useProgressBar } from 'react-aria/useProgressBar';
|
|
11
22
|
import Autoplay from 'embla-carousel-autoplay';
|
|
12
23
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
13
24
|
import { WheelGesturesPlugin } from 'embla-carousel-wheel-gestures';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
25
|
+
import { GroupContext, Group } from 'react-aria-components/Group';
|
|
26
|
+
import { CheckboxContext, Checkbox as Checkbox$1 } from 'react-aria-components/Checkbox';
|
|
27
|
+
import { Text } from 'react-aria-components/Text';
|
|
28
|
+
import { CheckboxGroup as CheckboxGroup$1 } from 'react-aria-components/CheckboxGroup';
|
|
29
|
+
import { FieldError, FieldErrorContext } from 'react-aria-components/FieldError';
|
|
30
|
+
import { Label as Label$1, LabelContext } from 'react-aria-components/Label';
|
|
31
|
+
import { ComboBox } from 'react-aria-components/ComboBox';
|
|
32
|
+
import { Input, InputContext } from 'react-aria-components/Input';
|
|
33
|
+
import { Popover } from 'react-aria-components/Popover';
|
|
34
|
+
import { Header } from 'react-aria-components/Header';
|
|
35
|
+
import { ListBoxItem as ListBoxItem$1, ListBoxSection as ListBoxSection$1, ListBox as ListBox$1 } from 'react-aria-components/ListBox';
|
|
36
|
+
import { useDateFormatter } from 'react-aria/useDateFormatter';
|
|
37
|
+
import { FormContext } from 'react-aria-components/Form';
|
|
38
|
+
import { useFormValidation } from 'react-aria/private/form/useFormValidation';
|
|
39
|
+
import { useFormReset } from 'react-aria/private/utils/useFormReset';
|
|
40
|
+
import { useUpdateEffect } from 'react-aria/private/utils/useUpdateEffect';
|
|
41
|
+
import { useField } from 'react-aria/useField';
|
|
42
|
+
import { useFormValidationState } from 'react-stately/private/form/useFormValidationState';
|
|
43
|
+
import { useControlledState } from 'react-stately/useControlledState';
|
|
44
|
+
import { PressResponder } from 'react-aria/private/interactions/PressResponder';
|
|
45
|
+
import { useObjectRef } from 'react-aria/useObjectRef';
|
|
46
|
+
import { Dialog as Dialog$1, DialogTrigger as DialogTrigger$1 } from 'react-aria-components/Dialog';
|
|
47
|
+
import { Modal as Modal$1, ModalOverlay } from 'react-aria-components/Modal';
|
|
48
|
+
import { NumberField as NumberField$1 } from 'react-aria-components/NumberField';
|
|
49
|
+
import { Radio as Radio$1, RadioGroup as RadioGroup$1 } from 'react-aria-components/RadioGroup';
|
|
50
|
+
import { Select as Select$1, SelectValue } from 'react-aria-components/Select';
|
|
51
|
+
import { ProgressBar as ProgressBar$1 } from 'react-aria-components/ProgressBar';
|
|
18
52
|
import { useDebouncedCallback } from 'use-debounce';
|
|
53
|
+
import { ColumnResizer, Table as Table$1, TableBody as TableBody$1, Cell, Column, ResizableTableContainer, TableHeader as TableHeader$1, Row } from 'react-aria-components/Table';
|
|
54
|
+
import { Tab as Tab$1, TabListStateContext, TabList as TabList$1, TabPanel as TabPanel$1, Tabs as Tabs$1 } from 'react-aria-components/Tabs';
|
|
55
|
+
import { TagGroup as TagGroup$1, TagList as TagList$1, Tag as Tag$1 } from 'react-aria-components/TagGroup';
|
|
56
|
+
import { TextArea as TextArea$1 } from 'react-aria-components/TextArea';
|
|
57
|
+
import { TextField as TextField$1 } from 'react-aria-components/TextField';
|
|
19
58
|
|
|
20
59
|
const HeadingContext = /*#__PURE__*/ createContext({});
|
|
21
60
|
const headingVariants = cva({
|
|
@@ -1802,8 +1841,9 @@ function Combobox(props) {
|
|
|
1802
1841
|
onChange: (e)=>onSelect?.(e.target.files),
|
|
1803
1842
|
capture: defaultCamera,
|
|
1804
1843
|
multiple: allowsMultiple,
|
|
1805
|
-
|
|
1806
|
-
|
|
1844
|
+
...acceptDirectory ? {
|
|
1845
|
+
webkitdirectory: ''
|
|
1846
|
+
} : {},
|
|
1807
1847
|
// This is a work around to prevent error in the console when attempting to submit a form with a required and empty file input
|
|
1808
1848
|
// RAC uses display: none, which prevents the file input from being focused.
|
|
1809
1849
|
// What we do instead is to hide it visually using custom CSS, so that the native HTML validation messages are still hidden. Which is why
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
4
4
|
"description": "Grunnmuren components in React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,18 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@obosbbl/grunnmuren-icons-react": "^2.1.2",
|
|
22
|
-
"@react-aria/form": "^3.0.18",
|
|
23
|
-
"@react-aria/interactions": "^3.25.3",
|
|
24
|
-
"@react-aria/utils": "^3.29.1",
|
|
25
|
-
"@react-stately/form": "^3.1.5",
|
|
26
|
-
"@react-stately/utils": "^3.10.7",
|
|
27
22
|
"cva": "^1.0.0-0",
|
|
28
23
|
"embla-carousel-autoplay": "^8.6.0",
|
|
29
24
|
"embla-carousel-react": "^8.6.0",
|
|
30
25
|
"embla-carousel-wheel-gestures": "^8.1.0",
|
|
31
|
-
"react-aria": "^3.
|
|
32
|
-
"react-aria-components": "^1.
|
|
33
|
-
"react-stately": "^3.
|
|
26
|
+
"react-aria": "^3.48.0",
|
|
27
|
+
"react-aria-components": "^1.17.0",
|
|
28
|
+
"react-stately": "^3.46.0",
|
|
34
29
|
"use-debounce": "^10.0.4"
|
|
35
30
|
},
|
|
36
31
|
"devDependencies": {
|