@bspk/ui 1.3.18 → 1.3.20
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/Accordion/AccordionExample.js +1 -1
- package/dist/components/Accordion/AccordionExample.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.js +1 -1
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BannerAlert/banner-alert.css +3 -3
- package/dist/components/BannerAlert/banner-alert.css.js +3 -3
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +15 -3
- package/dist/components/CheckboxOption/CheckboxOption.js +2 -3
- package/dist/components/CheckboxOption/CheckboxOption.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +17 -7
- package/dist/components/Dialog/Dialog.js +19 -11
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/DialogExample.d.ts +2 -2
- package/dist/components/Dialog/DialogExample.js +32 -3
- package/dist/components/Dialog/DialogExample.js.map +1 -1
- package/dist/components/Dialog/dialog.css +74 -4
- package/dist/components/Dialog/dialog.css.js +74 -4
- package/dist/components/Flex/Flex.d.ts +2 -0
- package/dist/components/Flex/Flex.js +1 -0
- package/dist/components/Flex/Flex.js.map +1 -1
- package/dist/components/ListItem/list-item.css +4 -0
- package/dist/components/ListItem/list-item.css.js +4 -0
- package/dist/components/Modal/Modal.js +1 -2
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/modal.css +4 -0
- package/dist/components/Modal/modal.css.js +4 -0
- package/dist/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.js +1 -1
- package/dist/components/PageHeader/PageHeaderBlockConfigs.d.ts +1 -0
- package/dist/components/PageHeader/PageHeaderBlockConfigs.js +32 -0
- package/dist/components/PageHeader/PageHeaderBlockConfigs.js.map +1 -0
- package/dist/components/PageHeader/PageHeaderExample.d.ts +3 -2
- package/dist/components/PageHeader/PageHeaderExample.js +4 -42
- package/dist/components/PageHeader/PageHeaderExample.js.map +1 -1
- package/dist/components/PageHeader/page-header.css +1 -1
- package/dist/components/PageHeader/page-header.css.js +1 -1
- package/dist/components/Portal/Portal.d.ts +1 -1
- package/dist/components/RadioOption/RadioOption.d.ts +7 -3
- package/dist/components/RadioOption/RadioOption.js +2 -3
- package/dist/components/RadioOption/RadioOption.js.map +1 -1
- package/dist/components/Scrim/Scrim.d.ts +3 -1
- package/dist/components/Scrim/Scrim.js +2 -2
- package/dist/components/Scrim/Scrim.js.map +1 -1
- package/dist/components/Scrim/scrim.css +3 -0
- package/dist/components/Scrim/scrim.css.js +3 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/SwitchOption/SwitchOption.d.ts +16 -3
- package/dist/components/SwitchOption/SwitchOption.js +3 -4
- package/dist/components/SwitchOption/SwitchOption.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +2 -1
- package/dist/components/Tag/Tag.js +2 -2
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/styles/base.css +0 -42
- package/dist/styles/base.css.js +0 -42
- package/dist/types/meta.d.ts +6 -0
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/blocks.d.ts +32 -0
- package/dist/utils/blocks.js +21 -0
- package/dist/utils/blocks.js.map +1 -0
- package/dist/utils/demo.d.ts +33 -9
- package/dist/utils/demo.js +98 -0
- package/dist/utils/demo.js.map +1 -1
- package/meta.ts +39 -1
- package/package.json +1 -3
- package/src/components/Accordion/AccordionExample.tsx +1 -1
- package/src/components/BannerAlert/BannerAlert.tsx +2 -2
- package/src/components/BannerAlert/banner-alert.scss +1 -1
- package/src/components/CheckboxOption/CheckboxOption.tsx +26 -14
- package/src/components/Dialog/Dialog.tsx +20 -10
- package/src/components/Dialog/DialogExample.tsx +104 -6
- package/src/components/Dialog/dialog.scss +91 -4
- package/src/components/Flex/Flex.tsx +3 -0
- package/src/components/ListItem/list-item.scss +4 -0
- package/src/components/Modal/Modal.tsx +1 -4
- package/src/components/Modal/modal.scss +5 -0
- package/src/components/PageHeader/PageHeader.rtl.test.tsx +8 -5
- package/src/components/PageHeader/PageHeader.tsx +1 -1
- package/src/components/PageHeader/PageHeaderBlockConfigs.tsx +152 -0
- package/src/components/PageHeader/PageHeaderExample.tsx +6 -44
- package/src/components/PageHeader/page-header.scss +1 -1
- package/src/components/Portal/Portal.tsx +1 -1
- package/src/components/RadioOption/RadioOption.tsx +16 -8
- package/src/components/Scrim/Scrim.tsx +4 -1
- package/src/components/Scrim/scrim.scss +4 -0
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/SwitchOption/SwitchOption.tsx +28 -9
- package/src/components/Tag/Tag.tsx +9 -2
- package/src/styles/base.scss +0 -52
- package/src/types/meta.ts +7 -0
- package/src/utils/blocks.ts +26 -0
- package/src/utils/demo.ts +141 -18
- package/dist/components/Drawer/Drawer.d.ts +0 -73
- package/dist/components/Drawer/Drawer.js +0 -46
- package/dist/components/Drawer/Drawer.js.map +0 -1
- package/dist/components/Drawer/DrawerExample.d.ts +0 -5
- package/dist/components/Drawer/DrawerExample.js +0 -53
- package/dist/components/Drawer/DrawerExample.js.map +0 -1
- package/dist/components/Drawer/drawer.css +0 -62
- package/dist/components/Drawer/drawer.css.js +0 -67
- package/dist/components/Drawer/index.d.ts +0 -1
- package/dist/components/Drawer/index.js +0 -2
- package/dist/components/Drawer/index.js.map +0 -1
- package/src/components/Drawer/Drawer.rtl.test.tsx +0 -27
- package/src/components/Drawer/Drawer.tsx +0 -127
- package/src/components/Drawer/DrawerExample.tsx +0 -117
- package/src/components/Drawer/drawer.scss +0 -74
- package/src/components/Drawer/index.tsx +0 -1
|
@@ -4,7 +4,6 @@ import { SvgClose } from '@bspk/icons/Close';
|
|
|
4
4
|
import { useMemo, useRef } from 'react';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import { Dialog } from '../Dialog';
|
|
7
|
-
import { Txt } from '../Txt';
|
|
8
7
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
9
8
|
import { useEventListener } from '../../hooks/useEventListener';
|
|
10
9
|
import { useUIContext } from '../../hooks/useUIContext';
|
|
@@ -89,6 +88,6 @@ export function Modal({ header, description, children, callToAction, cancelButto
|
|
|
89
88
|
return nextButtons;
|
|
90
89
|
}, [callToAction, cancelButton, dialogProps.onClose, isMobile]);
|
|
91
90
|
const { setModalRefs } = useDialogHeight();
|
|
92
|
-
return (_jsx(Dialog, { ...dialogProps, "aria-description": description, "aria-label": header, disableFocusTrap: disableFocusTrap, innerRef: setModalRefs, placement: "center", showScrim: true, children: _jsxs("div", { "data-bspk": "modal", ref: (node) => innerRef?.(node), style: { visibility: 'hidden' }, children: [_jsxs("div", { "data-modal-header": true, children: [_jsx(
|
|
91
|
+
return (_jsx(Dialog, { ...dialogProps, "aria-description": description, "aria-label": header, disableFocusTrap: disableFocusTrap, innerRef: setModalRefs, placement: "center", showScrim: true, children: _jsxs("div", { "data-bspk": "modal", ref: (node) => innerRef?.(node), style: { visibility: 'hidden' }, children: [_jsxs("div", { "data-modal-header": true, children: [_jsx("div", { "data-modal-title": true, children: header }), _jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "close", onClick: dialogProps.onClose, variant: "tertiary" })] }), _jsx("div", { "data-modal-main": true, children: children }), Array.isArray(buttons) && buttons.length > 0 && (_jsx("div", { "data-button-format": buttonFormat, "data-modal-footer": true, children: buttons.map((buttonProps, idx) => (_jsx(Button, { ...buttonProps, size: isMobile ? 'medium' : 'small', width: buttonFormat === 'vertical' && isMobile ? 'fill' : 'hug' }, idx))) }))] }) }));
|
|
93
92
|
}
|
|
94
93
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAa,OAAO,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,GACD,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -18,6 +18,10 @@ style.appendChild(document.createTextNode(`[data-bspk=modal] {
|
|
|
18
18
|
align-items: center;
|
|
19
19
|
gap: var(--spacing-sizing-04);
|
|
20
20
|
}
|
|
21
|
+
[data-bspk=modal] > [data-modal-header] [data-modal-title] {
|
|
22
|
+
font: var(--heading-h4);
|
|
23
|
+
flex: 1;
|
|
24
|
+
}
|
|
21
25
|
[data-bspk=modal] [data-modal-main] {
|
|
22
26
|
flex: 1;
|
|
23
27
|
overflow-y: auto;
|
|
@@ -51,7 +51,7 @@ export type PageHeaderProps = {
|
|
|
51
51
|
* />;
|
|
52
52
|
*
|
|
53
53
|
* @name PageHeader
|
|
54
|
-
* @phase
|
|
54
|
+
* @phase UXReview
|
|
55
55
|
*/
|
|
56
56
|
export declare function PageHeader({ actions, breadcrumb, avatar, subHeader, title }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
57
57
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -20,7 +20,7 @@ import './page-header.css.js';
|
|
|
20
20
|
* />;
|
|
21
21
|
*
|
|
22
22
|
* @name PageHeader
|
|
23
|
-
* @phase
|
|
23
|
+
* @phase UXReview
|
|
24
24
|
*/
|
|
25
25
|
export function PageHeader({ actions, breadcrumb, avatar, subHeader, title }) {
|
|
26
26
|
return (_jsxs("span", { "data-bspk": "page-header", children: [breadcrumb && (_jsx("div", { "data-breadcrumb": true, children: _jsx(Breadcrumb, { ...breadcrumb }) })), _jsxs("div", { "data-has-avatar": !!avatar, "data-header": true, children: [_jsxs("div", { "data-title": true, children: [avatar && _jsx(Avatar, { ...avatar, size: "xx-large" }), _jsx("h1", { children: title })] }), actions && _jsx("div", { "data-page-actions": true, children: actions })] }), subHeader && _jsx("div", { "data-subheader": true, children: subHeader })] }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const blockConfigs: import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PageHeader } from './PageHeader';
|
|
3
|
+
import { Avatar } from '../Avatar';
|
|
4
|
+
import { Breadcrumb } from '../Breadcrumb';
|
|
5
|
+
import { Flex } from '../Flex';
|
|
6
|
+
import { Txt } from '../Txt';
|
|
7
|
+
import { BlockExample, Slot } from '../../utils/blocks';
|
|
8
|
+
export const blockConfigs = (_jsxs(_Fragment, { children: [_jsxs(BlockExample, { name: "Slots", children: [_jsx(BlockExample.Component, { children: _jsx(PageHeader, { actions: _jsx(Slot, { height: 32, label: "Page actions slot", width: 372 }), subHeader: _jsxs(_Fragment, { children: [_jsx(Slot, { height: "var(--spacing-sizing-06)", label: "Slot component", width: 200 }), _jsx(Slot, { height: "var(--spacing-sizing-06)", label: "Slot component 2", width: 200 })] }), title: "Dashboard" }) }), _jsx(BlockExample.Pattern, { children: _jsxs(Flex, { direction: "column", padding: ['20', '20', '0'], style: {
|
|
9
|
+
background: 'var(--background-base)',
|
|
10
|
+
width: '100%',
|
|
11
|
+
}, children: [_jsxs(Flex, { align: "center", "data-header": true, gap: "20", justify: "space-between", style: { width: '100%' }, children: [_jsx(Txt, { variant: "heading-h3", children: "Dashboard" }), _jsx("div", { "data-page-actions-slot": true, style: {
|
|
12
|
+
height: 'var(--spacing-sizing-08)',
|
|
13
|
+
width: 'auto',
|
|
14
|
+
}, children: _jsx(Slot, { height: "100%", label: "Page actions slot", width: 372 }) })] }), _jsxs(Flex, { align: "end", "data-subheader": true, justify: "space-between", style: { height: 'var(--spacing-sizing-11)', width: '100%' }, children: [_jsx(Slot, { height: "var(--spacing-sizing-06)", label: "Slot component", width: 200 }), _jsx(Slot, { height: "var(--spacing-sizing-06)", label: "Slot component 2", width: 200 })] })] }) })] }), _jsxs(BlockExample, { name: "No Subheader", children: [_jsx(BlockExample.Component, { children: _jsx(PageHeader, { actions: _jsx(Slot, { height: 32, label: "Page actions slot", width: 372 }), title: "Dashboard" }) }), _jsx(BlockExample.Pattern, { children: _jsxs(Flex, { align: "center", "data-header": true, gap: "20", justify: "space-between", style: {
|
|
15
|
+
background: 'var(--background-base)',
|
|
16
|
+
padding: 'var(--spacing-sizing-05)',
|
|
17
|
+
width: '100%',
|
|
18
|
+
}, children: [_jsx(Txt, { variant: "heading-h3", children: "Dashboard" }), _jsx("div", { "data-page-actions-slot": true, style: { height: 'var(--spacing-sizing-08)', width: 'auto' }, children: _jsx(Slot, { height: "100%", label: "Page actions slot", width: 372 }) })] }) })] }), _jsxs(BlockExample, { name: "With Breadcrumbs", children: [_jsx(BlockExample.Component, { children: _jsx(PageHeader, { actions: _jsx(Slot, { height: 32, label: "Page actions slot", width: 372 }), breadcrumb: {
|
|
19
|
+
items: [
|
|
20
|
+
{ label: 'Home', href: '#' },
|
|
21
|
+
{ label: 'Analytics', href: '#' },
|
|
22
|
+
{ label: 'Dashboard', href: '#' },
|
|
23
|
+
],
|
|
24
|
+
}, title: "Dashboard" }) }), _jsxs(BlockExample.Pattern, { children: [_jsxs(Flex, { direction: "column", style: { background: 'var(--background-base)', width: '100%' }, children: [_jsx("div", { style: { padding: 'var(--spacing-sizing-05) var(--spacing-sizing-05) 0' }, children: _jsx(Breadcrumb, { items: [
|
|
25
|
+
{ label: 'Home', href: '#' },
|
|
26
|
+
{ label: 'Analytics', href: '#' },
|
|
27
|
+
{ label: 'Dashboard', href: '#' },
|
|
28
|
+
] }) }), _jsxs(Flex, { align: "center", "data-header": true, gap: "20", justify: "space-between", padding: "20", style: { width: '100%' }, children: [_jsx(Txt, { variant: "heading-h3", children: "Dashboard" }), _jsx("div", { "data-page-actions-slot": true, style: { height: 'var(--spacing-sizing-08)', width: 'auto' }, children: _jsx(Slot, { height: "100%", label: "Page actions slot", width: 372 }) })] })] }), ";"] })] }), _jsxs(BlockExample, { name: "Profile", children: [_jsx(BlockExample.Component, { children: _jsx(PageHeader, { actions: _jsx(Slot, { height: 32, label: "Page actions slot", width: 372 }), avatar: {
|
|
29
|
+
name: 'Brian Blake',
|
|
30
|
+
size: 'xx-large',
|
|
31
|
+
}, title: "Dashboard" }) }), _jsx(BlockExample.Pattern, { children: _jsxs(Flex, { align: "center", "data-header": true, gap: "20", justify: "space-between", padding: "20", style: { background: 'var(--background-base)', width: '100%' }, children: [_jsxs(Flex, { align: "center", gap: "16", children: [_jsx(Avatar, { name: "Brian Blake", size: "xx-large" }), _jsx(Txt, { variant: "heading-h3", children: "Dashboard" })] }), _jsx("div", { "data-page-actions-slot": true, style: { height: 'var(--spacing-sizing-08)', width: 'auto' }, children: _jsx(Slot, { height: "100%", label: "Page actions slot", width: 372 }) })] }) })] })] }));
|
|
32
|
+
//# sourceMappingURL=PageHeaderBlockConfigs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeaderBlockConfigs.js","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeaderBlockConfigs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG,CACxB,8BACI,MAAC,YAAY,IAAC,IAAI,EAAC,OAAO,aACtB,KAAC,YAAY,CAAC,SAAS,cACnB,KAAC,UAAU,IACP,OAAO,EAAE,KAAC,IAAI,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,GAAG,GAAI,EACnE,SAAS,EACL,8BACI,KAAC,IAAI,IAAC,MAAM,EAAC,0B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E,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,EAAE,aAE9D,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,aACzB,KAAC,MAAM,IAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,UAAU,GAAG,EAC7C,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,0BAAgB,IACtC,EACP,8CAA4B,KAAK,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,EAAE,YACpF,KAAC,IAAI,IAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,GAAG,GAAI,GAC1D,IACH,GACY,IACZ,IAChB,CACN,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { blockConfigs } from './PageHeaderBlockConfigs';
|
|
1
2
|
import { PageHeaderProps } from '.';
|
|
2
|
-
import { ComponentExample
|
|
3
|
-
export declare const presets: Preset<PageHeaderProps>[];
|
|
3
|
+
import { ComponentExample } from '-/utils/demo';
|
|
4
4
|
export declare const PageHeaderExample: ComponentExample<PageHeaderProps>;
|
|
5
|
+
export { blockConfigs };
|
|
@@ -1,56 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { blockConfigs } from './PageHeaderBlockConfigs';
|
|
2
3
|
import { ExamplePlaceholder } from '../ExamplePlaceholder';
|
|
3
|
-
export const presets = [
|
|
4
|
-
{
|
|
5
|
-
label: 'Title Only',
|
|
6
|
-
propState: {
|
|
7
|
-
title: 'Page Title',
|
|
8
|
-
},
|
|
9
|
-
designPattern: true,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
label: 'With Actions',
|
|
13
|
-
propState: {
|
|
14
|
-
title: 'Page Title',
|
|
15
|
-
actions: _jsx(ExamplePlaceholder, { height: 32, label: "Page actions slot", width: 372 }),
|
|
16
|
-
},
|
|
17
|
-
designPattern: true,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
label: 'With Breadcrumb',
|
|
21
|
-
propState: {
|
|
22
|
-
title: 'Page Title',
|
|
23
|
-
breadcrumb: {
|
|
24
|
-
items: [
|
|
25
|
-
{ label: 'Home', href: '#/home' },
|
|
26
|
-
{ label: 'Section', href: '#/section' },
|
|
27
|
-
{ label: 'Page Title', href: '#/page' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
actions: _jsx(ExamplePlaceholder, { height: 32, label: "Page actions slot", width: 372 }),
|
|
31
|
-
},
|
|
32
|
-
designPattern: true,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: 'Profile',
|
|
36
|
-
propState: {
|
|
37
|
-
title: 'Charlie Brown',
|
|
38
|
-
avatar: { image: '/avatar-01.png', name: 'CB' },
|
|
39
|
-
actions: _jsx(ExamplePlaceholder, { height: 32, label: "Page actions slot", width: 372 }),
|
|
40
|
-
},
|
|
41
|
-
designPattern: true,
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
4
|
export const PageHeaderExample = {
|
|
45
5
|
defaultState: {
|
|
46
6
|
title: 'Page Title',
|
|
47
7
|
actions: _jsx(ExamplePlaceholder, { height: 32, label: "Page actions slot", width: 372 }),
|
|
48
8
|
},
|
|
49
9
|
disableProps: [],
|
|
50
|
-
presets,
|
|
51
10
|
render: ({ props, Component }) => _jsx(Component, { ...props }),
|
|
52
11
|
variants: false,
|
|
53
12
|
fullPage: true,
|
|
54
13
|
hideDemo: true,
|
|
14
|
+
hideUsage: true,
|
|
15
|
+
presets: [],
|
|
55
16
|
};
|
|
17
|
+
export { blockConfigs };
|
|
56
18
|
//# sourceMappingURL=PageHeaderExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderExample.js","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeaderExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PageHeaderExample.js","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeaderExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAChE,YAAY,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,KAAC,kBAAkB,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,GAAG,GAAI;KACpF;IACD,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI;IAC1D,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,EAAE;CACd,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -19,7 +19,7 @@ style.appendChild(document.createTextNode(`[data-bspk=page-header] {
|
|
|
19
19
|
[data-bspk=page-header] [data-header] [data-title] {
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
|
-
gap: var(--spacing-sizing-
|
|
22
|
+
gap: var(--spacing-sizing-04);
|
|
23
23
|
}
|
|
24
24
|
[data-bspk=page-header] [data-header] [data-title] h1 {
|
|
25
25
|
margin: 0;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { RadioProps } from '-/components/Radio';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export type RadioOptionProps = RadioProps & {
|
|
3
|
+
/** The label of the option. Also used as the aria-label of the control. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The description of the option. */
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
4
8
|
/**
|
|
5
9
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
6
10
|
*
|
|
@@ -9,5 +13,5 @@ export type RadioOptionProps = ToggleOptionControlProps<RadioProps>;
|
|
|
9
13
|
* @name RadioOption
|
|
10
14
|
* @phase Utility
|
|
11
15
|
*/
|
|
12
|
-
export declare function RadioOption({ label: labelProp, description, disabled, ...radioProps }: RadioOptionProps):
|
|
16
|
+
export declare function RadioOption({ label: labelProp, description, disabled, ...radioProps }: RadioOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ListItem } from '../ListItem';
|
|
2
3
|
import { Radio } from '../Radio';
|
|
3
|
-
import { ToggleOption } from '../ToggleOption';
|
|
4
4
|
/**
|
|
5
5
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
6
6
|
*
|
|
@@ -10,8 +10,7 @@ import { ToggleOption } from '../ToggleOption';
|
|
|
10
10
|
* @phase Utility
|
|
11
11
|
*/
|
|
12
12
|
export function RadioOption({ label: labelProp, description, disabled, ...radioProps }) {
|
|
13
|
-
const label = labelProp || description;
|
|
14
13
|
const ariaLabel = description ? `${labelProp} - ${description}` : labelProp;
|
|
15
|
-
return (
|
|
14
|
+
return (_jsx(ListItem, { "aria-disabled": disabled || undefined, as: "label", label: labelProp, leading: _jsx(Radio, { ...radioProps, "aria-label": ariaLabel, disabled: disabled }), owner: "radio-option", subText: description, width: "hug" }));
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=RadioOption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioOption.js","sourceRoot":"","sources":["../../../src/components/RadioOption/RadioOption.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioOption.js","sourceRoot":"","sources":["../../../src/components/RadioOption/RadioOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAc,KAAK,EAAE,MAAM,oBAAoB,CAAC;AASvD;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAoB;IACpG,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5E,OAAO,CACH,KAAC,QAAQ,qBACU,QAAQ,IAAI,SAAS,EACpC,EAAE,EAAC,OAAO,EACV,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,KAAC,KAAK,OAAK,UAAU,gBAAc,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC7E,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAC,KAAK,GACb,CACL,CAAC;AACN,CAAC"}
|
|
@@ -15,6 +15,8 @@ export type ScrimProps = CommonProps<'owner'> & {
|
|
|
15
15
|
* @required;
|
|
16
16
|
*/
|
|
17
17
|
onClick: () => void;
|
|
18
|
+
/** If the scrim should be contained within a parent element, or fixed to the viewport. */
|
|
19
|
+
contained?: boolean;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* A temporary effect or overlay that can be applied to a user interface to make content less prominent or to draw
|
|
@@ -23,5 +25,5 @@ export type ScrimProps = CommonProps<'owner'> & {
|
|
|
23
25
|
* @name Scrim
|
|
24
26
|
* @phase Utility
|
|
25
27
|
*/
|
|
26
|
-
export declare function Scrim({ visible, owner, ...props }: ScrimProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function Scrim({ visible, owner, contained, ...props }: ScrimProps): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -7,7 +7,7 @@ import './scrim.css.js';
|
|
|
7
7
|
* @name Scrim
|
|
8
8
|
* @phase Utility
|
|
9
9
|
*/
|
|
10
|
-
export function Scrim({ visible = true, owner, ...props }) {
|
|
11
|
-
return (_jsx("div", { ...props, "aria-hidden": "true", "data-bspk": "scrim", "data-bspk-owner": owner || undefined, "data-hidden": !visible || undefined }));
|
|
10
|
+
export function Scrim({ visible = true, owner, contained, ...props }) {
|
|
11
|
+
return (_jsx("div", { ...props, "aria-hidden": "true", "data-bspk": "scrim", "data-bspk-owner": owner || undefined, "data-contained": contained || undefined, "data-hidden": !visible || undefined }));
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=Scrim.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scrim.js","sourceRoot":"","sources":["../../../src/components/Scrim/Scrim.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Scrim.js","sourceRoot":"","sources":["../../../src/components/Scrim/Scrim.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AAsBtB;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc;IAC5E,OAAO,CACH,iBACQ,KAAK,iBACG,MAAM,eACR,OAAO,qBACA,KAAK,IAAI,SAAS,oBACnB,SAAS,IAAI,SAAS,iBACzB,CAAC,OAAO,IAAI,SAAS,GACpC,CACL,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './switch.scss';
|
|
2
2
|
import { ChangeEvent } from 'react';
|
|
3
3
|
import { CommonProps } from '-/types/common';
|
|
4
|
-
export type SwitchProps = CommonProps<'aria-label' | 'disabled' | 'name'> & {
|
|
4
|
+
export type SwitchProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'name'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Marks the control as checked.
|
|
7
7
|
*
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { SwitchProps } from '-/components/Switch';
|
|
2
|
-
import {
|
|
3
|
-
export type SwitchOptionProps =
|
|
2
|
+
import { CommonProps } from '-/types/common';
|
|
3
|
+
export type SwitchOptionProps = CommonProps<'style'> & SwitchProps & {
|
|
4
|
+
/**
|
|
5
|
+
* The label of the option. Also used as the aria-label of the control.
|
|
6
|
+
*
|
|
7
|
+
* @required
|
|
8
|
+
*/
|
|
9
|
+
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* The description of the option.
|
|
12
|
+
*
|
|
13
|
+
* @type multiline
|
|
14
|
+
*/
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
4
17
|
/**
|
|
5
18
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
6
19
|
*
|
|
@@ -9,5 +22,5 @@ export type SwitchOptionProps = ToggleOptionControlProps<SwitchProps>;
|
|
|
9
22
|
* @name SwitchOption
|
|
10
23
|
* @phase Stable
|
|
11
24
|
*/
|
|
12
|
-
export declare function SwitchOption({ label: labelProp, description, ...
|
|
25
|
+
export declare function SwitchOption({ label: labelProp, description, disabled, style, ...switchProps }: SwitchOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
26
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ListItem } from '../ListItem';
|
|
2
3
|
import { Switch } from '../Switch';
|
|
3
|
-
import { ToggleOption } from '../ToggleOption';
|
|
4
4
|
/**
|
|
5
5
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
6
6
|
*
|
|
@@ -9,9 +9,8 @@ import { ToggleOption } from '../ToggleOption';
|
|
|
9
9
|
* @name SwitchOption
|
|
10
10
|
* @phase Stable
|
|
11
11
|
*/
|
|
12
|
-
export function SwitchOption({ label: labelProp, description, ...
|
|
13
|
-
const label = labelProp || description;
|
|
12
|
+
export function SwitchOption({ label: labelProp, description, disabled, style, ...switchProps }) {
|
|
14
13
|
const ariaLabel = description ? `${labelProp} - ${description}` : labelProp;
|
|
15
|
-
return (
|
|
14
|
+
return (_jsx(ListItem, { "aria-disabled": disabled || undefined, as: "label", label: labelProp, leading: _jsx(Switch, { ...switchProps, "aria-label": ariaLabel, disabled: disabled }), owner: "switch-option", style: style, subText: description, width: "hug" }));
|
|
16
15
|
}
|
|
17
16
|
//# sourceMappingURL=SwitchOption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchOption.js","sourceRoot":"","sources":["../../../src/components/SwitchOption/SwitchOption.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SwitchOption.js","sourceRoot":"","sources":["../../../src/components/SwitchOption/SwitchOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAe,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAmB1D;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,EAAqB;IAC9G,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5E,OAAO,CACH,KAAC,QAAQ,qBACU,QAAQ,IAAI,SAAS,EACpC,EAAE,EAAC,OAAO,EACV,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,KAAC,MAAM,OAAK,WAAW,gBAAc,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAC/E,KAAK,EAAC,eAAe,EACrB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,KAAK,EAAC,KAAK,GACb,CACL,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './tag.scss';
|
|
2
|
+
import { ElementProps } from '-/types/common';
|
|
2
3
|
import { ColorVariant } from '-/utils/colorVariants';
|
|
3
4
|
export type TagProps = {
|
|
4
5
|
/**
|
|
@@ -37,5 +38,5 @@ export type TagProps = {
|
|
|
37
38
|
* @name Tag
|
|
38
39
|
* @phase Stable
|
|
39
40
|
*/
|
|
40
|
-
export declare function Tag({ label, color, size, variant }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function Tag({ label, color, size, variant, ...props }: ElementProps<TagProps, 'span'>): import("react/jsx-runtime").JSX.Element;
|
|
41
42
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -12,7 +12,7 @@ import { Truncated } from '../Truncated';
|
|
|
12
12
|
* @name Tag
|
|
13
13
|
* @phase Stable
|
|
14
14
|
*/
|
|
15
|
-
export function Tag({ label, color = '
|
|
16
|
-
return (_jsxs("span", { "data-bspk": "tag", "data-color": color, "data-size": size, "data-variant": variant, children: [label && _jsx(Truncated, { children: label }), variant === 'corner-wrap' && _jsx("div", { "data-triangle": true })] }));
|
|
15
|
+
export function Tag({ label, color = 'grey', size = 'small', variant = 'flat', ...props }) {
|
|
16
|
+
return (_jsxs("span", { ...props, "data-bspk": "tag", "data-color": color, "data-size": size, "data-variant": variant, children: [label && _jsx(Truncated, { children: label }), variant === 'corner-wrap' && _jsx("div", { "data-triangle": true })] }));
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA+BnD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,KAAK,GAAG,MAAM,EACd,IAAI,GAAG,OAAO,EACd,OAAO,GAAG,MAAM,EAChB,GAAG,KAAK,EACqB;IAC7B,OAAO,CACH,mBAAU,KAAK,eAAY,KAAK,gBAAa,KAAK,eAAa,IAAI,kBAAgB,OAAO,aACrF,KAAK,IAAI,KAAC,SAAS,cAAE,KAAK,GAAa,EACvC,OAAO,KAAK,aAAa,IAAI,sCAAqB,IAChD,CACV,CAAC;AACN,CAAC"}
|
package/dist/styles/base.css
CHANGED
|
@@ -354,48 +354,6 @@ body[data-bspk] [data-bspk=link][data-subtle-inverse][disabled] {
|
|
|
354
354
|
z-index: 2;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
@keyframes fade-in {
|
|
358
|
-
0% {
|
|
359
|
-
opacity: 0;
|
|
360
|
-
transform: translate(var(--spacing-sizing-01), var(--spacing-sizing-01));
|
|
361
|
-
}
|
|
362
|
-
100% {
|
|
363
|
-
opacity: 1;
|
|
364
|
-
transform: translate(0, 0);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
@keyframes placement-left {
|
|
368
|
-
0% {
|
|
369
|
-
transform: translateX(-100vw);
|
|
370
|
-
}
|
|
371
|
-
100% {
|
|
372
|
-
transform: translateX(0);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
@keyframes placement-right {
|
|
376
|
-
0% {
|
|
377
|
-
transform: translateX(100vw);
|
|
378
|
-
}
|
|
379
|
-
100% {
|
|
380
|
-
transform: translateX(0);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
@keyframes placement-top {
|
|
384
|
-
0% {
|
|
385
|
-
transform: translateY(-100vh);
|
|
386
|
-
}
|
|
387
|
-
100% {
|
|
388
|
-
transform: translateY(0);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
@keyframes placement-bottom {
|
|
392
|
-
0% {
|
|
393
|
-
transform: translateY(100vh);
|
|
394
|
-
}
|
|
395
|
-
100% {
|
|
396
|
-
transform: translateY(0);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
357
|
[data-hidden] {
|
|
400
358
|
display: none !important;
|
|
401
359
|
}
|
package/dist/styles/base.css.js
CHANGED
|
@@ -357,48 +357,6 @@ body[data-bspk] [data-bspk=link][data-subtle-inverse][disabled] {
|
|
|
357
357
|
z-index: 2;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
@keyframes fade-in {
|
|
361
|
-
0% {
|
|
362
|
-
opacity: 0;
|
|
363
|
-
transform: translate(var(--spacing-sizing-01), var(--spacing-sizing-01));
|
|
364
|
-
}
|
|
365
|
-
100% {
|
|
366
|
-
opacity: 1;
|
|
367
|
-
transform: translate(0, 0);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
@keyframes placement-left {
|
|
371
|
-
0% {
|
|
372
|
-
transform: translateX(-100vw);
|
|
373
|
-
}
|
|
374
|
-
100% {
|
|
375
|
-
transform: translateX(0);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
@keyframes placement-right {
|
|
379
|
-
0% {
|
|
380
|
-
transform: translateX(100vw);
|
|
381
|
-
}
|
|
382
|
-
100% {
|
|
383
|
-
transform: translateX(0);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
@keyframes placement-top {
|
|
387
|
-
0% {
|
|
388
|
-
transform: translateY(-100vh);
|
|
389
|
-
}
|
|
390
|
-
100% {
|
|
391
|
-
transform: translateY(0);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
@keyframes placement-bottom {
|
|
395
|
-
0% {
|
|
396
|
-
transform: translateY(100vh);
|
|
397
|
-
}
|
|
398
|
-
100% {
|
|
399
|
-
transform: translateY(0);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
360
|
[data-hidden] {
|
|
403
361
|
display: none !important;
|
|
404
362
|
}
|
package/dist/types/meta.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export type TypeProperty = {
|
|
|
34
34
|
example?: string;
|
|
35
35
|
arrayType?: string;
|
|
36
36
|
};
|
|
37
|
+
export type BlockConfig = {
|
|
38
|
+
name: string;
|
|
39
|
+
component: string;
|
|
40
|
+
pattern: string;
|
|
41
|
+
};
|
|
37
42
|
export type ComponentMeta = BaseMeta & {
|
|
38
43
|
slug: string;
|
|
39
44
|
dependencies: string[];
|
|
@@ -45,6 +50,7 @@ export type ComponentMeta = BaseMeta & {
|
|
|
45
50
|
};
|
|
46
51
|
phase: ComponentPhase;
|
|
47
52
|
generated?: boolean;
|
|
53
|
+
blockConfigs?: BlockConfig[];
|
|
48
54
|
};
|
|
49
55
|
export type UtilityMeta = BaseMeta & {
|
|
50
56
|
param?: string;
|
package/dist/types/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAOzB;IACA,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EACP,4IAA4I;KACnJ;IACD,GAAG,EAAE;QACD,KAAK,EAAE,aAAa;QACpB,EAAE,EAAE,KAAK;QACT,WAAW,EACP,+JAA+J;KACtK;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,WAAW,EACP,+LAA+L;KACtM;IACD,MAAM,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,EAAE,EAAE,QAAQ;QACZ,WAAW,EACP,sJAAsJ;KAC7J;IACD,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,mEAAmE;KACnF;CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAOzB;IACA,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EACP,4IAA4I;KACnJ;IACD,GAAG,EAAE;QACD,KAAK,EAAE,aAAa;QACpB,EAAE,EAAE,KAAK;QACT,WAAW,EACP,+JAA+J;KACtK;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,WAAW,EACP,+LAA+L;KACtM;IACD,MAAM,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,EAAE,EAAE,QAAQ;QACZ,WAAW,EACP,sJAAsJ;KAC7J;IACD,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,mEAAmE;KACnF;CACJ,CAAC;AA2DF,sDAAsD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ExamplePlaceholder } from '-/components/ExamplePlaceholder';
|
|
3
|
+
export declare const Slot: typeof ExamplePlaceholder;
|
|
4
|
+
declare function BlockExample(props: {
|
|
5
|
+
name: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): {
|
|
8
|
+
type: string;
|
|
9
|
+
props: {};
|
|
10
|
+
key: string;
|
|
11
|
+
name: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
declare namespace BlockExample {
|
|
15
|
+
var Pattern: (props: {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}) => {
|
|
18
|
+
type: string;
|
|
19
|
+
props: {};
|
|
20
|
+
key: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
var Component: (props: {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}) => {
|
|
26
|
+
type: string;
|
|
27
|
+
props: {};
|
|
28
|
+
key: string;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export { BlockExample };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExamplePlaceholder } from '../components/ExamplePlaceholder';
|
|
2
|
+
export const Slot = ExamplePlaceholder;
|
|
3
|
+
function BlockExample(props) {
|
|
4
|
+
return {
|
|
5
|
+
...props,
|
|
6
|
+
type: '',
|
|
7
|
+
props: {},
|
|
8
|
+
key: '',
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
BlockExample.Pattern = (props) => {
|
|
12
|
+
return {
|
|
13
|
+
...props,
|
|
14
|
+
type: '',
|
|
15
|
+
props: {},
|
|
16
|
+
key: '',
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
BlockExample.Component = BlockExample.Pattern;
|
|
20
|
+
export { BlockExample };
|
|
21
|
+
//# sourceMappingURL=blocks.js.map
|