@obosbbl/grunnmuren-react 1.0.1 → 1.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/Campaign/Campaign.d.ts +25 -0
- package/dist/Campaign/index.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts +3 -1
- package/dist/StepList/StepList.d.ts +13 -0
- package/dist/StepList/index.d.ts +1 -0
- package/dist/grunnmuren.es.js +102 -24
- package/dist/index.d.ts +2 -1
- package/package.json +4 -4
- package/dist/Stepper/Stepper.d.ts +0 -13
- package/dist/Stepper/index.d.ts +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface CampaignProps<T extends React.ElementType> {
|
|
3
|
+
/** @default div */
|
|
4
|
+
as?: T;
|
|
5
|
+
body: React.ReactElement;
|
|
6
|
+
/** Use the `body` and `image` props. */
|
|
7
|
+
children?: never;
|
|
8
|
+
image: React.ReactElement;
|
|
9
|
+
/**
|
|
10
|
+
* Setting this to false changes the ordering of the body and the image on >= medium sceens.
|
|
11
|
+
* Use this to alternate the image's positon with lists of Campaigns.
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
rightAlignBody?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Campaign: {
|
|
17
|
+
<T extends import("react").ElementType<any> = "div">(props: CampaignProps<T> & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<T>>, keyof CampaignProps<T>>): JSX.Element;
|
|
18
|
+
Body: (props: CampaignBodyProps) => JSX.Element;
|
|
19
|
+
Image: (props: CampaignImageProps) => JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
interface CampaignBodyProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
22
|
+
}
|
|
23
|
+
interface CampaignImageProps extends React.ComponentPropsWithoutRef<'img'> {
|
|
24
|
+
}
|
|
25
|
+
export { Campaign };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Campaign';
|
|
@@ -5,5 +5,7 @@
|
|
|
5
5
|
export interface CheckboxProps extends React.ComponentPropsWithRef<'input'> {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
+
/** Error message for the form control */
|
|
9
|
+
error?: string;
|
|
8
10
|
}
|
|
9
|
-
export declare const Checkbox: import("react").ForwardRefExoticComponent<Pick<CheckboxProps, "className" | "children" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "role" | "key" | "alt" | "crossOrigin" | "height" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "maxLength" | "minLength" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Pick<CheckboxProps, "className" | "children" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "role" | "error" | "key" | "alt" | "crossOrigin" | "height" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "maxLength" | "minLength" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface StepListProps extends React.ComponentPropsWithoutRef<'ol'> {
|
|
3
|
+
}
|
|
4
|
+
declare const StepList: {
|
|
5
|
+
(props: StepListProps): JSX.Element;
|
|
6
|
+
Item: (props: StepListItemProps) => JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
interface StepListItemProps extends React.ComponentPropsWithoutRef<'li'> {
|
|
9
|
+
/** Content for the StepListItem's bullet */
|
|
10
|
+
bullet: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const StepListItem: (props: StepListItemProps) => JSX.Element;
|
|
13
|
+
export { StepList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StepList';
|
package/dist/grunnmuren.es.js
CHANGED
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import classNames from "clsx";
|
|
33
33
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
34
|
-
import { useCallback, useState, useEffect, useId, forwardRef, useContext, createContext, useMemo, useRef } from "react";
|
|
34
|
+
import { useCallback, useState, useEffect, useId, forwardRef, useContext, createContext, isValidElement, Children, cloneElement, useMemo, useRef } from "react";
|
|
35
35
|
var __defProp2 = Object.defineProperty;
|
|
36
36
|
var __defProps2 = Object.defineProperties;
|
|
37
37
|
var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
|
|
@@ -325,6 +325,62 @@ const Button = forwardRef((props, ref) => {
|
|
|
325
325
|
});
|
|
326
326
|
});
|
|
327
327
|
const ButtonColorContext = createContext("standard");
|
|
328
|
+
const CampaignContext = createContext(true);
|
|
329
|
+
const Campaign = (props) => {
|
|
330
|
+
const _a = props, {
|
|
331
|
+
as: Component = "div",
|
|
332
|
+
body: Body,
|
|
333
|
+
className,
|
|
334
|
+
image: Image,
|
|
335
|
+
rightAlignBody = true
|
|
336
|
+
} = _a, rest = __objRest(_a, [
|
|
337
|
+
"as",
|
|
338
|
+
"body",
|
|
339
|
+
"className",
|
|
340
|
+
"image",
|
|
341
|
+
"rightAlignBody"
|
|
342
|
+
]);
|
|
343
|
+
return /* @__PURE__ */ jsxs(Component, __spreadProps(__spreadValues({
|
|
344
|
+
className: classNames(className, "grid gap-8 md:grid-flow-col md:grid-cols-[50%,50%] md:gap-0")
|
|
345
|
+
}, rest), {
|
|
346
|
+
children: [/* @__PURE__ */ jsx(CampaignContext.Provider, {
|
|
347
|
+
value: rightAlignBody,
|
|
348
|
+
children: Image
|
|
349
|
+
}), Body]
|
|
350
|
+
}));
|
|
351
|
+
};
|
|
352
|
+
const CampaignBody = (props) => {
|
|
353
|
+
const _a = props, {
|
|
354
|
+
className
|
|
355
|
+
} = _a, rest = __objRest(_a, [
|
|
356
|
+
"className"
|
|
357
|
+
]);
|
|
358
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
359
|
+
className: classNames(className, "md:mx-18 self-center")
|
|
360
|
+
}, rest));
|
|
361
|
+
};
|
|
362
|
+
const CampaignImage = (props) => {
|
|
363
|
+
const _a = props, {
|
|
364
|
+
className: classNameProp,
|
|
365
|
+
children
|
|
366
|
+
} = _a, rest = __objRest(_a, [
|
|
367
|
+
"className",
|
|
368
|
+
"children"
|
|
369
|
+
]);
|
|
370
|
+
const bodyIsRightAligned = useContext(CampaignContext);
|
|
371
|
+
const className = classNames(classNameProp, "<md:rounded-b-3xl w-full", bodyIsRightAligned ? "md:rounded-r-3xl" : "md:rounded-l-3xl md:order-1");
|
|
372
|
+
if (isValidElement(children)) {
|
|
373
|
+
const child = Children.only(children);
|
|
374
|
+
return cloneElement(child, __spreadValues({
|
|
375
|
+
className
|
|
376
|
+
}, rest));
|
|
377
|
+
}
|
|
378
|
+
return /* @__PURE__ */ jsx("img", __spreadValues({
|
|
379
|
+
className
|
|
380
|
+
}, rest));
|
|
381
|
+
};
|
|
382
|
+
Campaign.Body = CampaignBody;
|
|
383
|
+
Campaign.Image = CampaignImage;
|
|
328
384
|
const Card = (props) => {
|
|
329
385
|
const _a = props, {
|
|
330
386
|
as: Component = "div",
|
|
@@ -380,26 +436,52 @@ const CardContent = (props) => {
|
|
|
380
436
|
}, rest));
|
|
381
437
|
};
|
|
382
438
|
const CardLinkOverlay = forwardRef((props, ref) => {
|
|
439
|
+
const _a = props, {
|
|
440
|
+
className
|
|
441
|
+
} = _a, rest = __objRest(_a, [
|
|
442
|
+
"className"
|
|
443
|
+
]);
|
|
383
444
|
return /* @__PURE__ */ jsx("a", __spreadValues({
|
|
384
|
-
className: "no-underline before:absolute before:top-0 before:left-0 before:block before:h-full before:w-full
|
|
445
|
+
className: classNames(className, "no-underline before:absolute before:top-0 before:left-0 before:block before:h-full before:w-full hover:underline"),
|
|
385
446
|
ref
|
|
386
|
-
},
|
|
447
|
+
}, rest));
|
|
387
448
|
});
|
|
388
449
|
const Checkbox = forwardRef((props, ref) => {
|
|
389
450
|
const _a = props, {
|
|
390
451
|
children,
|
|
391
|
-
className
|
|
452
|
+
className,
|
|
453
|
+
error,
|
|
454
|
+
id: idProp
|
|
392
455
|
} = _a, rest = __objRest(_a, [
|
|
393
456
|
"children",
|
|
394
|
-
"className"
|
|
457
|
+
"className",
|
|
458
|
+
"error",
|
|
459
|
+
"id"
|
|
395
460
|
]);
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
461
|
+
const id = useFallbackId(idProp);
|
|
462
|
+
const errorMsgId = id + "err";
|
|
463
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
464
|
+
className: "grid gap-2",
|
|
465
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
466
|
+
className: classNames(className, "inline-flex cursor-pointer items-center"),
|
|
467
|
+
children: [/* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({
|
|
468
|
+
id,
|
|
469
|
+
className: classNames("checkbox checked:bg-green checked:border-green bg-whit mr-3 grid h-[1.25em] w-[1.25em] flex-none cursor-pointer appearance-none place-content-center rounded border-2 border-solid text-white focus:outline-none focus:ring-2", {
|
|
470
|
+
"border-gray-dark focus:ring-black": !error,
|
|
471
|
+
"border-red focus:ring-red": !!error
|
|
472
|
+
}),
|
|
473
|
+
ref,
|
|
474
|
+
type: "checkbox"
|
|
475
|
+
}, rest), {
|
|
476
|
+
"aria-describedby": classNames({
|
|
477
|
+
[errorMsgId]: !!error
|
|
478
|
+
}),
|
|
479
|
+
"aria-invalid": !!error
|
|
480
|
+
})), children]
|
|
481
|
+
}), !!error && /* @__PURE__ */ jsx(FormErrorMessage, {
|
|
482
|
+
id: errorMsgId,
|
|
483
|
+
children: error
|
|
484
|
+
})]
|
|
403
485
|
});
|
|
404
486
|
});
|
|
405
487
|
const Footer = (props) => {
|
|
@@ -926,10 +1008,10 @@ const SnackbarContent = (props) => {
|
|
|
926
1008
|
children: props.children
|
|
927
1009
|
}));
|
|
928
1010
|
};
|
|
929
|
-
const
|
|
1011
|
+
const StepList = (props) => {
|
|
930
1012
|
return /* @__PURE__ */ jsx("ol", __spreadValues({}, props));
|
|
931
1013
|
};
|
|
932
|
-
const
|
|
1014
|
+
const StepListItem = (props) => {
|
|
933
1015
|
const _a = props, {
|
|
934
1016
|
className,
|
|
935
1017
|
children,
|
|
@@ -942,22 +1024,18 @@ const Step = (props) => {
|
|
|
942
1024
|
return /* @__PURE__ */ jsxs("li", __spreadProps(__spreadValues({
|
|
943
1025
|
className: classNames(className, "group relative flex gap-4 pb-8 text-sm last:pb-0 md:gap-8 md:pb-12 md:text-base")
|
|
944
1026
|
}, rest), {
|
|
945
|
-
children: [/* @__PURE__ */ jsx(
|
|
1027
|
+
children: [/* @__PURE__ */ jsx(StepListBullet, {
|
|
946
1028
|
children: bullet
|
|
947
1029
|
}), children]
|
|
948
1030
|
}));
|
|
949
1031
|
};
|
|
950
|
-
const
|
|
951
|
-
const _a = props, {
|
|
952
|
-
className
|
|
953
|
-
} = _a, rest = __objRest(_a, [
|
|
954
|
-
"className"
|
|
955
|
-
]);
|
|
1032
|
+
const StepListBullet = (props) => {
|
|
956
1033
|
return /* @__PURE__ */ jsx("span", __spreadValues({
|
|
957
1034
|
"aria-hidden": true,
|
|
958
|
-
className:
|
|
959
|
-
},
|
|
1035
|
+
className: "text-green border-gray-light after:bg-gray-light grid h-10 w-10 flex-none place-content-center rounded-full border-2 text-sm font-bold after:absolute after:left-5 after:top-10 after:bottom-0 after:w-0.5 group-last:after:hidden md:h-20 md:w-20 md:text-xl md:after:left-10 md:after:top-20"
|
|
1036
|
+
}, props));
|
|
960
1037
|
};
|
|
1038
|
+
StepList.Item = StepListItem;
|
|
961
1039
|
const TextArea = forwardRef((props, ref) => {
|
|
962
1040
|
const _a = props, {
|
|
963
1041
|
description,
|
|
@@ -1062,4 +1140,4 @@ const TextField = forwardRef((props, ref) => {
|
|
|
1062
1140
|
})]
|
|
1063
1141
|
});
|
|
1064
1142
|
});
|
|
1065
|
-
export { Alert, Banner, BannerImage, Button, ButtonColorContext, Card, CardContent, CardImage, CardLinkOverlay, CardList, Checkbox, Footer, Form, FormError, FormErrorMessage, FormHeading, FormHelperText, FormLabel, FormSuccess, Hero, HeroActions, HeroContent, HeroContext, HeroImage, Input, Link, Navbar, NavbarCollapsible, NavbarContent, NavbarExpandedMobileContent, NavbarItem, NavbarItems, Snackbar, SnackbarButton, SnackbarContent,
|
|
1143
|
+
export { Alert, Banner, BannerImage, Button, ButtonColorContext, Campaign, Card, CardContent, CardImage, CardLinkOverlay, CardList, Checkbox, Footer, Form, FormError, FormErrorMessage, FormHeading, FormHelperText, FormLabel, FormSuccess, Hero, HeroActions, HeroContent, HeroContext, HeroImage, Input, Link, Navbar, NavbarCollapsible, NavbarContent, NavbarExpandedMobileContent, NavbarItem, NavbarItems, Snackbar, SnackbarButton, SnackbarContent, StepList, StepListItem, TextArea, TextField, assignRef, useBlockBackgroundColor, useComposedRefs, useFallbackId, useFormControlValidity, useMedia, usePrefersReducedMotion, useScreenMaxWidthMd };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './Alert';
|
|
2
2
|
export * from './Banner';
|
|
3
3
|
export * from './Button';
|
|
4
|
+
export * from './Campaign';
|
|
4
5
|
export * from './Card';
|
|
5
6
|
export * from './Checkbox';
|
|
6
7
|
export * from './Footer';
|
|
@@ -10,7 +11,7 @@ export * from './Input';
|
|
|
10
11
|
export * from './Link';
|
|
11
12
|
export * from './Navbar';
|
|
12
13
|
export * from './Snackbar';
|
|
13
|
-
export * from './
|
|
14
|
+
export * from './StepList';
|
|
14
15
|
export * from './TextArea';
|
|
15
16
|
export * from './TextField';
|
|
16
17
|
export * from './hooks';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "OBOS Grunnmuren design system React components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "7.18.
|
|
20
|
+
"@babel/core": "7.18.6",
|
|
21
21
|
"@obosbbl/grunnmuren-tailwind": "^0.4.1",
|
|
22
22
|
"@storybook/addon-controls": "6.5.9",
|
|
23
23
|
"@storybook/addon-docs": "6.5.9",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"react-dom": "18.2.0",
|
|
34
34
|
"require-from-string": "2.0.2",
|
|
35
35
|
"tailwindcss": "3.1.4",
|
|
36
|
-
"vite": "2.9.
|
|
36
|
+
"vite": "2.9.13",
|
|
37
37
|
"webpack": "5.73.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@obosbbl/grunnmuren-icons": "^0.3.0",
|
|
41
|
-
"clsx": "1.
|
|
41
|
+
"clsx": "1.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^18",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface StepperProps extends React.ComponentPropsWithoutRef<'ol'> {
|
|
3
|
-
}
|
|
4
|
-
export declare const Stepper: (props: StepperProps) => JSX.Element;
|
|
5
|
-
interface StepProps extends React.ComponentPropsWithoutRef<'li'> {
|
|
6
|
-
/** Content for the Step item's bullet */
|
|
7
|
-
bullet: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare const Step: (props: StepProps) => JSX.Element;
|
|
10
|
-
interface StepBulletProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
11
|
-
}
|
|
12
|
-
export declare const StepBullet: (props: StepBulletProps) => JSX.Element;
|
|
13
|
-
export {};
|
package/dist/Stepper/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Stepper';
|