@bspk/ui 1.3.19 → 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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionExample.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC3B,0JAGI,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAA6B;IAC7C;QACI,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE;YACP,KAAK,EAAE;gBACH;oBACI,EAAE,EAAE,GAAG;oBACP,KAAK,EAAE,WAAW;oBAClB,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;iBACjC;gBACD;oBACI,EAAE,EAAE,GAAG;oBACP,KAAK,EAAE,WAAW;oBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;oBAC9B,OAAO,EAAE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAG;oBAC9C,QAAQ,EAAE,sCAAqB;iBAClC;gBACD;oBACI,EAAE,EAAE,GAAG;oBACP,KAAK,EAAE,WAAW;oBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;iBACjC;aACJ;SACJ;KACJ;IACD;QACI,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE;YACP,KAAK,EAAE;gBACH;oBACI,EAAE,EAAE,GAAG;oBACP,KAAK,EAAE,WAAW;oBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;iBACjC;gBACD,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAC,gBAAgB,KAAG,EAAE;gBAC/E,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAC,gBAAgB,KAAG,EAAE;aAClE;SACJ;KACJ;IACD;QACI,KAAK,EAAE,uCAAuC;QAC9C,
|
|
1
|
+
{"version":3,"file":"AccordionExample.js","sourceRoot":"","sources":["../../../src/components/Accordion/AccordionExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC3B,0JAGI,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAA6B;IAC7C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I,EAAE,QAAQ,EAAE,KAAC,gBAAgB,KAAG,EAAE;gBAC7F,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAC,gBAAgB,KAAG,EAAE;aAClE;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAuC,GAAG,EAAE,CAAC,CAAC;IACvE,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE;IAC9C,YAAY,EAAE;QACV,KAAK,EAAE;YACH;gBACI,EAAE,EAAE,GAAG;gBACP,KAAK,EAAE,WAAW;gBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;aACjC;YACD;gBACI,EAAE,EAAE,GAAG;gBACP,KAAK,EAAE,WAAW;gBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;gBAC9B,OAAO,EAAE,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAG;gBAC9C,QAAQ,EAAE,sCAAqB;aAClC;YACD;gBACI,EAAE,EAAE,GAAG;gBACP,KAAK,EAAE,WAAW;gBAClB,QAAQ,EAAE,KAAC,gBAAgB,KAAG;aACjC;SACJ;KACJ;IACD,OAAO;IACP,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -36,6 +36,6 @@ import { Button } from '../Button';
|
|
|
36
36
|
* @phase Stable
|
|
37
37
|
*/
|
|
38
38
|
export function BannerAlert({ variant = 'informational', onClose, header, callToAction, body, elevated = false, }) {
|
|
39
|
-
return (_jsxs("div", { "data-bspk": "banner-alert", "data-elevated": elevated || undefined, "data-variant": variant, role: "alert", children: [_jsxs("div", { "data-icon-bar": true, children: [variant === 'error' && _jsx(SvgErrorFill, {}), variant === 'informational' && _jsx(SvgInfoFill, {}), variant === 'success' && _jsx(SvgCheckCircleFill, {}), variant === 'warning' && _jsx(SvgWarningFill, {})] }), _jsxs("div", { "data-content": true, children: [(header || onClose) && (_jsxs("
|
|
39
|
+
return (_jsxs("div", { "data-bspk": "banner-alert", "data-elevated": elevated || undefined, "data-variant": variant, role: "alert", children: [_jsxs("div", { "data-icon-bar": true, children: [variant === 'error' && _jsx(SvgErrorFill, {}), variant === 'informational' && _jsx(SvgInfoFill, {}), variant === 'success' && _jsx(SvgCheckCircleFill, {}), variant === 'warning' && _jsx(SvgWarningFill, {})] }), _jsxs("div", { "data-content": true, children: [(header || onClose) && (_jsxs("div", { "data-header": true, children: [_jsx("span", { children: header }), typeof onClose === 'function' && (_jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "Close", onClick: onClose, size: "small", variant: "tertiary" }))] })), _jsxs("div", { "data-body": true, children: [_jsx("span", { children: body }), callToAction?.label && callToAction?.onClick && (_jsx(Button, { label: callToAction.label, onClick: callToAction.onClick, size: "small", variant: "tertiary" }))] })] })] }));
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=BannerAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAlert.js","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA2C7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,WAAW,CAAC,EACxB,OAAO,GAAG,eAAe,EACzB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,QAAQ,GAAG,K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AC/C,OAAO,KAAK,SAAS,IAAI,KAAC,cAAc,KAAG,IAC1C,EACN,gDACK,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,CACpB,+CACI,yBAAO,MAAM,GAAQ,EACpB,OAAO,OAAO,KAAK,UAAU,IAAI,CAC9B,KAAC,MAAM,IACH,IAAI,EAAE,KAAC,QAAQ,KAAG,EAClB,QAAQ,QACR,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,UAAU,GACpB,CACL,IACC,CACT,EACD,6CACI,yBAAO,IAAI,GAAQ,EAClB,YAAY,EAAE,KAAK,IAAI,YAAY,EAAE,OAAO,IAAI,CAC7C,KAAC,MAAM,IACH,KAAK,EAAE,YAAY,CAAC,KAAK,EACzB,OAAO,EAAE,YAAY,CAAC,OAAO,EAC7B,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,UAAU,GACpB,CACL,IACC,IACJ,IACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
padding: var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-04);
|
|
41
41
|
}
|
|
42
|
-
[data-bspk=banner-alert] [data-content] header {
|
|
42
|
+
[data-bspk=banner-alert] [data-content] [data-header] {
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: row;
|
|
45
45
|
gap: var(--spacing-sizing-03);
|
|
46
46
|
height: var(--spacing-sizing-12);
|
|
47
47
|
align-items: center;
|
|
48
48
|
}
|
|
49
|
-
[data-bspk=banner-alert] [data-content] header span {
|
|
49
|
+
[data-bspk=banner-alert] [data-content] [data-header] span {
|
|
50
50
|
flex: 1;
|
|
51
51
|
display: flex;
|
|
52
52
|
align-items: center;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
font: var(--heading-h6);
|
|
55
55
|
}
|
|
56
56
|
@media (any-pointer: coarse) {
|
|
57
|
-
[data-bspk=banner-alert] [data-content] header span {
|
|
57
|
+
[data-bspk=banner-alert] [data-content] [data-header] span {
|
|
58
58
|
font: var(--heading-h6);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -42,14 +42,14 @@ style.appendChild(document.createTextNode(`[data-bspk=banner-alert] {
|
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
padding: var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-04);
|
|
44
44
|
}
|
|
45
|
-
[data-bspk=banner-alert] [data-content] header {
|
|
45
|
+
[data-bspk=banner-alert] [data-content] [data-header] {
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-direction: row;
|
|
48
48
|
gap: var(--spacing-sizing-03);
|
|
49
49
|
height: var(--spacing-sizing-12);
|
|
50
50
|
align-items: center;
|
|
51
51
|
}
|
|
52
|
-
[data-bspk=banner-alert] [data-content] header span {
|
|
52
|
+
[data-bspk=banner-alert] [data-content] [data-header] span {
|
|
53
53
|
flex: 1;
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
@@ -57,7 +57,7 @@ style.appendChild(document.createTextNode(`[data-bspk=banner-alert] {
|
|
|
57
57
|
font: var(--heading-h6);
|
|
58
58
|
}
|
|
59
59
|
@media (any-pointer: coarse) {
|
|
60
|
-
[data-bspk=banner-alert] [data-content] header span {
|
|
60
|
+
[data-bspk=banner-alert] [data-content] [data-header] span {
|
|
61
61
|
font: var(--heading-h6);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { CheckboxProps } from '-/components/Checkbox';
|
|
2
|
-
import { ToggleOptionControlProps } from '-/components/ToggleOption';
|
|
3
2
|
import { CommonProps } from '-/types/common';
|
|
4
|
-
export type CheckboxOptionProps = CommonProps<'style'> &
|
|
3
|
+
export type CheckboxOptionProps = CheckboxProps & CommonProps<'style'> & {
|
|
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
|
+
};
|
|
5
17
|
/**
|
|
6
18
|
* A control that allows users to choose one or more items from a list or turn an feature on or off.
|
|
7
19
|
*
|
|
@@ -30,5 +42,5 @@ export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProp
|
|
|
30
42
|
* @name CheckboxOption
|
|
31
43
|
* @phase Stable
|
|
32
44
|
*/
|
|
33
|
-
export declare function CheckboxOption({ label: labelProp, description, disabled, style, ...checkboxProps }: CheckboxOptionProps):
|
|
45
|
+
export declare function CheckboxOption({ label: labelProp, description, disabled, style, ...checkboxProps }: CheckboxOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
34
46
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox } from '../Checkbox';
|
|
3
|
-
import {
|
|
3
|
+
import { ListItem } from '../ListItem';
|
|
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
|
*
|
|
@@ -30,8 +30,7 @@ import { ToggleOption } from '../ToggleOption';
|
|
|
30
30
|
* @phase Stable
|
|
31
31
|
*/
|
|
32
32
|
export function CheckboxOption({ label: labelProp, description, disabled, style, ...checkboxProps }) {
|
|
33
|
-
const label = labelProp || description;
|
|
34
33
|
const ariaLabel = description ? `${labelProp} - ${description}` : labelProp;
|
|
35
|
-
return (
|
|
34
|
+
return (_jsx(ListItem, { "aria-disabled": disabled || undefined, as: "label", label: labelProp, leading: _jsx(Checkbox, { ...checkboxProps, "aria-label": ariaLabel, disabled: disabled }), owner: "checkbox-option", style: style, subText: description, width: "hug" }));
|
|
36
35
|
}
|
|
37
36
|
//# sourceMappingURL=CheckboxOption.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxOption.js","sourceRoot":"","sources":["../../../src/components/CheckboxOption/CheckboxOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CheckboxOption.js","sourceRoot":"","sources":["../../../src/components/CheckboxOption/CheckboxOption.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAmBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,cAAc,CAAC,EAC3B,KAAK,EAAE,SAAS,EAChB,WAAW,EACX,QAAQ,EACR,KAAK,EACL,GAAG,aAAa,EACE;IAClB,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,QAAQ,OAAK,aAAa,gBAAc,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAI,EACnF,KAAK,EAAC,iBAAiB,EACvB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,KAAK,EAAC,KAAK,GACb,CACL,CAAC;AACN,CAAC"}
|
|
@@ -47,11 +47,12 @@ export type DialogProps = CommonProps<'id' | 'owner'> & Pick<PortalProps, 'conta
|
|
|
47
47
|
disableFocusTrap?: boolean;
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
|
-
* Dialogs display important information that users need to acknowledge. They appear over the interface and block
|
|
50
|
+
* Dialogs display important information that users need to acknowledge. They appear over the interface and may block
|
|
51
51
|
* further interactions until an action is selected.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* The Modal component is a higher-level component built on top of Dialog that includes standard dialog UI and behavior.
|
|
54
|
+
*
|
|
55
|
+
* Also known as: Tray, Drawer, Flyout, Sheet
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
57
58
|
* import { Dialog } from '@bspk/ui/Dialog';
|
|
@@ -63,11 +64,20 @@ export type DialogProps = CommonProps<'id' | 'owner'> & Pick<PortalProps, 'conta
|
|
|
63
64
|
* return (
|
|
64
65
|
* <>
|
|
65
66
|
* <Button label="Open Dialog" onClick={() => setOpen(true)} />
|
|
66
|
-
* <Dialog
|
|
67
|
+
* <Dialog onClose={() => setOpen(false)} open={open}>
|
|
67
68
|
* <div style={{ padding: 'var(--spacing-sizing-04)' }}>
|
|
68
|
-
* <
|
|
69
|
+
* <Flex align="center" justify="space-between">
|
|
70
|
+
* <h4>Dialog Title</h4>
|
|
71
|
+
* <Button
|
|
72
|
+
* icon={<SvgClose />}
|
|
73
|
+
* iconOnly
|
|
74
|
+
* label="Close dialog"
|
|
75
|
+
* onClick={() => setOpen(false)}
|
|
76
|
+
* variant="tertiary"
|
|
77
|
+
* />
|
|
78
|
+
* </Flex>
|
|
69
79
|
* <p>This is the content of the dialog.</p>
|
|
70
|
-
* <Button label="Cancel"
|
|
80
|
+
* <Button label="Cancel" onClick={() => setOpen(false)} variant="secondary" />
|
|
71
81
|
* </div>
|
|
72
82
|
* </Dialog>
|
|
73
83
|
* </>
|
|
@@ -75,7 +85,7 @@ export type DialogProps = CommonProps<'id' | 'owner'> & Pick<PortalProps, 'conta
|
|
|
75
85
|
* };
|
|
76
86
|
*
|
|
77
87
|
* @name Dialog
|
|
78
|
-
* @phase
|
|
88
|
+
* @phase Stable
|
|
79
89
|
*/
|
|
80
90
|
export declare function Dialog({ children, innerRef, onClose, open, placement, showScrim, widthFull, id: idProp, owner, container, disableFocusTrap, ...containerProps }: ElementProps<DialogProps, 'div'>): false | import("react/jsx-runtime").JSX.Element;
|
|
81
91
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -6,11 +6,12 @@ import { Portal } from '../Portal';
|
|
|
6
6
|
import { Scrim } from '../Scrim';
|
|
7
7
|
import { useId } from '../../hooks/useId';
|
|
8
8
|
/**
|
|
9
|
-
* Dialogs display important information that users need to acknowledge. They appear over the interface and block
|
|
9
|
+
* Dialogs display important information that users need to acknowledge. They appear over the interface and may block
|
|
10
10
|
* further interactions until an action is selected.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* The Modal component is a higher-level component built on top of Dialog that includes standard dialog UI and behavior.
|
|
13
|
+
*
|
|
14
|
+
* Also known as: Tray, Drawer, Flyout, Sheet
|
|
14
15
|
*
|
|
15
16
|
* @example
|
|
16
17
|
* import { Dialog } from '@bspk/ui/Dialog';
|
|
@@ -22,11 +23,20 @@ import { useId } from '../../hooks/useId';
|
|
|
22
23
|
* return (
|
|
23
24
|
* <>
|
|
24
25
|
* <Button label="Open Dialog" onClick={() => setOpen(true)} />
|
|
25
|
-
* <Dialog
|
|
26
|
+
* <Dialog onClose={() => setOpen(false)} open={open}>
|
|
26
27
|
* <div style={{ padding: 'var(--spacing-sizing-04)' }}>
|
|
27
|
-
* <
|
|
28
|
+
* <Flex align="center" justify="space-between">
|
|
29
|
+
* <h4>Dialog Title</h4>
|
|
30
|
+
* <Button
|
|
31
|
+
* icon={<SvgClose />}
|
|
32
|
+
* iconOnly
|
|
33
|
+
* label="Close dialog"
|
|
34
|
+
* onClick={() => setOpen(false)}
|
|
35
|
+
* variant="tertiary"
|
|
36
|
+
* />
|
|
37
|
+
* </Flex>
|
|
28
38
|
* <p>This is the content of the dialog.</p>
|
|
29
|
-
* <Button label="Cancel"
|
|
39
|
+
* <Button label="Cancel" onClick={() => setOpen(false)} variant="secondary" />
|
|
30
40
|
* </div>
|
|
31
41
|
* </Dialog>
|
|
32
42
|
* </>
|
|
@@ -34,7 +44,7 @@ import { useId } from '../../hooks/useId';
|
|
|
34
44
|
* };
|
|
35
45
|
*
|
|
36
46
|
* @name Dialog
|
|
37
|
-
* @phase
|
|
47
|
+
* @phase Stable
|
|
38
48
|
*/
|
|
39
49
|
export function Dialog({ children, innerRef, onClose, open = false, placement = 'center', showScrim = true, widthFull = false, id: idProp, owner, container, disableFocusTrap, ...containerProps }) {
|
|
40
50
|
const id = useId(idProp);
|
|
@@ -48,13 +58,11 @@ export function Dialog({ children, innerRef, onClose, open = false, placement =
|
|
|
48
58
|
document.removeEventListener('keydown', handleKeyDown);
|
|
49
59
|
};
|
|
50
60
|
}, [handleKeyDown, open]);
|
|
51
|
-
return (open && (_jsxs(Portal, { container: container, children: [_jsx("div", { ...containerProps, "data-bspk": "dialog", "data-bspk-owner": owner || undefined, "data-placement": placement, id: id, ref: innerRef, role: "presentation", children: _jsx(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: {
|
|
61
|
+
return (open && (_jsxs(Portal, { container: container, children: [_jsx("div", { ...containerProps, "data-bspk": "dialog", "data-bspk-owner": owner || undefined, "data-contained": !!container || undefined, "data-placement": placement, id: id, ref: innerRef, role: "presentation", children: _jsx(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: {
|
|
52
62
|
clickOutsideDeactivates: true,
|
|
53
63
|
fallbackFocus: () => boxRef.current,
|
|
54
64
|
}, children: _jsx("div", { "data-dialog-box": true, "data-width-full": widthFull, ref: (node) => {
|
|
55
65
|
boxRef.current = node;
|
|
56
|
-
}, tabIndex: -1, children: children }) }) }), _jsx(Scrim, { onClick: () =>
|
|
57
|
-
onClose();
|
|
58
|
-
}, owner: "dialog", visible: showScrim !== false })] })));
|
|
66
|
+
}, tabIndex: -1, children: children }) }) }), _jsx(Scrim, { contained: !!container || undefined, onClick: () => onClose(), owner: "dialog", visible: showScrim !== false })] })));
|
|
59
67
|
}
|
|
60
68
|
//# sourceMappingURL=Dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAkDtC
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAkDtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,UAAU,MAAM,CAAC,EACnB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,IAAI,GAAG,KAAK,EACZ,SAAS,GAAG,QAAQ,EACpB,SAAS,GAAG,IAAI,EAChB,SAAS,GAAG,KAAK,EACjB,EAAE,EAAE,MAAM,EACV,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,GAAG,cAAc,EACc;IAC/B,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,MAAM,GAAG,MAAM,CAAwB,IAAI,CAA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KAAK,IACF,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS,EACnC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EACxB,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,SAAS,KAAK,KAAK,GAC9B,IACG,CACZ,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DialogProps } from '.';
|
|
2
|
-
import { ComponentExample
|
|
3
|
-
export declare const presets: Preset<DialogProps>[];
|
|
2
|
+
import { ComponentExample } from '-/utils/demo';
|
|
4
3
|
export declare const DialogExample: ComponentExample<DialogProps>;
|
|
4
|
+
export declare const Usage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { SvgClose } from '@bspk/icons/Close';
|
|
3
|
+
import { useRef, useState } from 'react';
|
|
4
|
+
import { Dialog } from '.';
|
|
2
5
|
import { Button } from '../Button';
|
|
3
|
-
|
|
6
|
+
import { Flex } from '../Flex';
|
|
4
7
|
export const DialogExample = {
|
|
5
8
|
render: ({ props, setState, Component }) => {
|
|
6
9
|
const label = 'Open Dialog';
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { label: label, onClick: () => setState({ open: true }) }), _jsx(Component, { "data-example-component": true, ...props, id: "exampleId", onClose: () => setState({ open: false }), children: _jsxs("div", { style: { padding: 'var(--spacing-sizing-04)' }, children: [
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { label: label, onClick: () => setState({ open: true }) }), _jsx(Component, { "data-example-component": true, ...props, id: "exampleId", onClose: () => setState({ open: false }), children: _jsxs("div", { style: { padding: 'var(--spacing-sizing-04)' }, children: [_jsxs(Flex, { align: "center", justify: "space-between", style: {
|
|
11
|
+
width: '100%',
|
|
12
|
+
marginBottom: 'var(--spacing-sizing-04)',
|
|
13
|
+
}, children: [_jsx("h4", { children: "Dialog" }), _jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "Close dialog", onClick: () => setState({ open: false }), variant: "tertiary" })] }), _jsxs("p", { children: ["Hello, I am a (", props.placement, ") dialog!"] })] }) })] }));
|
|
8
14
|
},
|
|
9
15
|
variants: false,
|
|
10
|
-
|
|
16
|
+
sections: [
|
|
17
|
+
{
|
|
18
|
+
title: 'Contained Dialog',
|
|
19
|
+
location: 'beforeDemo',
|
|
20
|
+
content: function ContainedDialog() {
|
|
21
|
+
const [open, setOpen] = useState(false);
|
|
22
|
+
const container = useRef(undefined);
|
|
23
|
+
return (_jsxs("div", { ref: (node) => (container.current = node || undefined), style: {
|
|
24
|
+
border: '1px solid var(--stroke-neutral-base)',
|
|
25
|
+
padding: 'var(--spacing-sizing-04)',
|
|
26
|
+
minHeight: 200,
|
|
27
|
+
position: 'relative',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
}, children: [_jsx(Button, { label: "Open Dialog", onClick: () => setOpen(true) }), _jsx(Dialog, { container: container.current, onClose: () => setOpen(false), open: open, placement: "right", children: _jsxs("div", { style: { padding: 'var(--spacing-sizing-04)' }, children: [_jsxs(Flex, { align: "center", justify: "space-between", style: {
|
|
30
|
+
marginBottom: 'var(--spacing-sizing-04)',
|
|
31
|
+
}, children: [_jsx("h4", { children: "Contained" }), _jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "Close dialog", onClick: () => setOpen(false), variant: "tertiary" })] }), _jsx("p", { children: "Hello, I am a contained dialog!" })] }) })] }));
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
// eslint-disable-next-line react/no-multi-comp
|
|
37
|
+
export const Usage = () => {
|
|
38
|
+
const [open, setOpen] = useState(false);
|
|
39
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { label: "Open Dialog", onClick: () => setOpen(true) }), _jsx(Dialog, { onClose: () => setOpen(false), open: open, children: _jsxs("div", { style: { padding: 'var(--spacing-sizing-04)' }, children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx("h1", { children: "Dialog Title" }), _jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "Close dialog", onClick: () => setOpen(false), variant: "tertiary" })] }), _jsx("p", { children: "This is the content of the dialog." }), _jsx(Button, { label: "Cancel", onClick: () => setOpen(false), variant: "secondary" })] }) })] }));
|
|
11
40
|
};
|
|
12
41
|
//# sourceMappingURL=DialogExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogExample.js","sourceRoot":"","sources":["../../../src/components/Dialog/DialogExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DialogExample.js","sourceRoot":"","sources":["../../../src/components/Dialog/DialogExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAe,MAAM,GAAG,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,MAAM,CAAC,MAAM,aAAa,GAAkC;IACxD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;QACvC,MAAM,KAAK,GAAG,aAAa,CAAC;QAC5B,OAAO,CACH,8BACI,KAAC,MAAM,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAI,EACjE,KAAC,SAAS,uCAA4B,KAAK,EAAE,EAAE,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAA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C,EACP,6DAAyC,EACzC,KAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,EAAC,WAAW,GAAG,IAC1E,GACD,IACV,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -4,21 +4,24 @@
|
|
|
4
4
|
z-index: var(--z-index-dialog);
|
|
5
5
|
display: flex;
|
|
6
6
|
pointer-events: none;
|
|
7
|
+
--height: 100vh;
|
|
8
|
+
--width: 100vw;
|
|
7
9
|
}
|
|
8
10
|
[data-bspk=dialog] [data-dialog-box] {
|
|
9
11
|
pointer-events: all;
|
|
10
12
|
text-align: start;
|
|
11
|
-
position:
|
|
13
|
+
position: absolute;
|
|
12
14
|
box-shadow: var(--drop-shadow-float);
|
|
13
15
|
background: var(--surface-neutral-t1-base);
|
|
14
16
|
color: var(--foreground-neutral-on-surface);
|
|
15
|
-
max-height: calc(
|
|
17
|
+
max-height: calc(var(--height) - var(--spacing-sizing-24));
|
|
16
18
|
z-index: 2;
|
|
17
19
|
width: calc(100% - var(--spacing-sizing-08));
|
|
18
20
|
animation-name: var(--box-animation-name);
|
|
19
21
|
animation-duration: 0.5s;
|
|
20
22
|
animation-iteration-count: 1;
|
|
21
23
|
animation-fill-mode: forwards;
|
|
24
|
+
animation-delay: 0;
|
|
22
25
|
}
|
|
23
26
|
[data-bspk=dialog] [data-dialog-box] > :first-of-type {
|
|
24
27
|
margin-top: 0;
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
[data-bspk=dialog][data-placement=left] [data-dialog-box] {
|
|
80
83
|
max-height: unset;
|
|
81
84
|
width: 280px;
|
|
82
|
-
height:
|
|
85
|
+
height: var(--height);
|
|
83
86
|
border-bottom-right-radius: var(--radius-lg);
|
|
84
87
|
border-top-right-radius: var(--radius-lg);
|
|
85
88
|
}
|
|
@@ -90,12 +93,79 @@
|
|
|
90
93
|
[data-bspk=dialog][data-placement=right] [data-dialog-box] {
|
|
91
94
|
max-height: unset;
|
|
92
95
|
width: 280px;
|
|
93
|
-
height:
|
|
96
|
+
height: var(--height);
|
|
94
97
|
border-bottom-left-radius: var(--radius-lg);
|
|
95
98
|
border-top-left-radius: var(--radius-lg);
|
|
96
99
|
}
|
|
97
100
|
[data-bspk=dialog] [data-width-full=true] {
|
|
98
101
|
width: 100%;
|
|
99
102
|
}
|
|
103
|
+
[data-bspk=dialog][data-contained] {
|
|
104
|
+
position: absolute;
|
|
105
|
+
--height: 100%;
|
|
106
|
+
--width: 100%;
|
|
107
|
+
}
|
|
108
|
+
@keyframes fade-in {
|
|
109
|
+
0% {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
transform: translate(var(--spacing-sizing-01), var(--spacing-sizing-01));
|
|
112
|
+
}
|
|
113
|
+
100% {
|
|
114
|
+
opacity: 1;
|
|
115
|
+
transform: translate(0, 0);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
@keyframes placement-left {
|
|
119
|
+
0% {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
}
|
|
122
|
+
1% {
|
|
123
|
+
transform: translateX(calc(-1 * var(--width, 100vw)));
|
|
124
|
+
opacity: 1;
|
|
125
|
+
}
|
|
126
|
+
100% {
|
|
127
|
+
opacity: 1;
|
|
128
|
+
transform: translateX(0);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
@keyframes placement-right {
|
|
132
|
+
0% {
|
|
133
|
+
opacity: 0;
|
|
134
|
+
}
|
|
135
|
+
1% {
|
|
136
|
+
opacity: 1;
|
|
137
|
+
transform: translateX(var(--width, 100vw));
|
|
138
|
+
}
|
|
139
|
+
100% {
|
|
140
|
+
opacity: 1;
|
|
141
|
+
transform: translateX(0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
@keyframes placement-top {
|
|
145
|
+
0% {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
}
|
|
148
|
+
1% {
|
|
149
|
+
opacity: 1;
|
|
150
|
+
transform: translateY(calc(-1 * var(--height, 100vh)));
|
|
151
|
+
}
|
|
152
|
+
100% {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
transform: translateY(0);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
@keyframes placement-bottom {
|
|
158
|
+
0% {
|
|
159
|
+
opacity: 0;
|
|
160
|
+
}
|
|
161
|
+
1% {
|
|
162
|
+
opacity: 1;
|
|
163
|
+
transform: translateY(var(--height, 100vh));
|
|
164
|
+
}
|
|
165
|
+
100% {
|
|
166
|
+
opacity: 1;
|
|
167
|
+
transform: translateY(0);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
100
170
|
|
|
101
171
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -7,21 +7,24 @@ style.appendChild(document.createTextNode(`[data-bspk=dialog] {
|
|
|
7
7
|
z-index: var(--z-index-dialog);
|
|
8
8
|
display: flex;
|
|
9
9
|
pointer-events: none;
|
|
10
|
+
--height: 100vh;
|
|
11
|
+
--width: 100vw;
|
|
10
12
|
}
|
|
11
13
|
[data-bspk=dialog] [data-dialog-box] {
|
|
12
14
|
pointer-events: all;
|
|
13
15
|
text-align: start;
|
|
14
|
-
position:
|
|
16
|
+
position: absolute;
|
|
15
17
|
box-shadow: var(--drop-shadow-float);
|
|
16
18
|
background: var(--surface-neutral-t1-base);
|
|
17
19
|
color: var(--foreground-neutral-on-surface);
|
|
18
|
-
max-height: calc(
|
|
20
|
+
max-height: calc(var(--height) - var(--spacing-sizing-24));
|
|
19
21
|
z-index: 2;
|
|
20
22
|
width: calc(100% - var(--spacing-sizing-08));
|
|
21
23
|
animation-name: var(--box-animation-name);
|
|
22
24
|
animation-duration: 0.5s;
|
|
23
25
|
animation-iteration-count: 1;
|
|
24
26
|
animation-fill-mode: forwards;
|
|
27
|
+
animation-delay: 0;
|
|
25
28
|
}
|
|
26
29
|
[data-bspk=dialog] [data-dialog-box] > :first-of-type {
|
|
27
30
|
margin-top: 0;
|
|
@@ -82,7 +85,7 @@ style.appendChild(document.createTextNode(`[data-bspk=dialog] {
|
|
|
82
85
|
[data-bspk=dialog][data-placement=left] [data-dialog-box] {
|
|
83
86
|
max-height: unset;
|
|
84
87
|
width: 280px;
|
|
85
|
-
height:
|
|
88
|
+
height: var(--height);
|
|
86
89
|
border-bottom-right-radius: var(--radius-lg);
|
|
87
90
|
border-top-right-radius: var(--radius-lg);
|
|
88
91
|
}
|
|
@@ -93,13 +96,80 @@ style.appendChild(document.createTextNode(`[data-bspk=dialog] {
|
|
|
93
96
|
[data-bspk=dialog][data-placement=right] [data-dialog-box] {
|
|
94
97
|
max-height: unset;
|
|
95
98
|
width: 280px;
|
|
96
|
-
height:
|
|
99
|
+
height: var(--height);
|
|
97
100
|
border-bottom-left-radius: var(--radius-lg);
|
|
98
101
|
border-top-left-radius: var(--radius-lg);
|
|
99
102
|
}
|
|
100
103
|
[data-bspk=dialog] [data-width-full=true] {
|
|
101
104
|
width: 100%;
|
|
102
105
|
}
|
|
106
|
+
[data-bspk=dialog][data-contained] {
|
|
107
|
+
position: absolute;
|
|
108
|
+
--height: 100%;
|
|
109
|
+
--width: 100%;
|
|
110
|
+
}
|
|
111
|
+
@keyframes fade-in {
|
|
112
|
+
0% {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
transform: translate(var(--spacing-sizing-01), var(--spacing-sizing-01));
|
|
115
|
+
}
|
|
116
|
+
100% {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
transform: translate(0, 0);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
@keyframes placement-left {
|
|
122
|
+
0% {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
}
|
|
125
|
+
1% {
|
|
126
|
+
transform: translateX(calc(-1 * var(--width, 100vw)));
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
100% {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
transform: translateX(0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
@keyframes placement-right {
|
|
135
|
+
0% {
|
|
136
|
+
opacity: 0;
|
|
137
|
+
}
|
|
138
|
+
1% {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transform: translateX(var(--width, 100vw));
|
|
141
|
+
}
|
|
142
|
+
100% {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
transform: translateX(0);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
@keyframes placement-top {
|
|
148
|
+
0% {
|
|
149
|
+
opacity: 0;
|
|
150
|
+
}
|
|
151
|
+
1% {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
transform: translateY(calc(-1 * var(--height, 100vh)));
|
|
154
|
+
}
|
|
155
|
+
100% {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
transform: translateY(0);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
@keyframes placement-bottom {
|
|
161
|
+
0% {
|
|
162
|
+
opacity: 0;
|
|
163
|
+
}
|
|
164
|
+
1% {
|
|
165
|
+
opacity: 1;
|
|
166
|
+
transform: translateY(var(--height, 100vh));
|
|
167
|
+
}
|
|
168
|
+
100% {
|
|
169
|
+
opacity: 1;
|
|
170
|
+
transform: translateY(0);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
103
173
|
|
|
104
174
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
105
175
|
`));
|
|
@@ -35,6 +35,8 @@ export type FlexProps<As extends ElementType = ElementType> = {
|
|
|
35
35
|
direction?: 'column-reverse' | 'column' | 'row-reverse' | 'row';
|
|
36
36
|
/** The padding to apply to the Flex. */
|
|
37
37
|
padding?: SizingPixels | SizingPixels[];
|
|
38
|
+
/** If true the Flex will take up the full width of its container. */
|
|
39
|
+
full?: boolean;
|
|
38
40
|
};
|
|
39
41
|
/**
|
|
40
42
|
* Utility component used within other components for layout purposes.
|
|
@@ -27,6 +27,7 @@ export function Flex({ children, gap, style, as, align = 'flex-start', justify =
|
|
|
27
27
|
justifyContent: justify || 'flex-start',
|
|
28
28
|
flexWrap: wrap ? 'wrap' : 'nowrap',
|
|
29
29
|
padding: paddingValue,
|
|
30
|
+
width: props.full ? '100%' : undefined,
|
|
30
31
|
...style,
|
|
31
32
|
}, children: children }));
|
|
32
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAgB,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Flex.js","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAgB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAwC9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,IAAI,CAAuC,EACvD,QAAQ,EACR,GAAG,EACH,KAAK,EACL,EAAE,EACF,KAAK,GAAG,YAAY,EACpB,OAAO,GAAG,YAAY,EACtB,IAAI,EACJ,SAAS,GAAG,KAAK,EACjB,OAAO,EACP,GAAG,KAAK,EACsB;IAC9B,MAAM,EAAE,GAAgB,EAAE,IAAI,KAAK,CAAC;IAEpC,MAAM,UAAU,GAAG,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;IAE3F,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAE9C,OAAO,CACH,KAAC,EAAE,OACK,KAAK,uBACS,MAAM,EACxB,KAAK,EAAE;YACH,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,SAAS;YACxB,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC;YACxB,UAAU;YACV,cAAc,EAAE,OAAO,IAAI,YAAY;YACvC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;YAClC,OAAO,EAAE,YAAY;YACrB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACtC,GAAG,KAAK;SACX,YAEA,QAAQ,GACR,CACR,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,OAAuC;IAC5D,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAE/B,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnG,CAAC"}
|
|
@@ -55,6 +55,10 @@ style.appendChild(document.createTextNode(`[data-bspk=list-item] {
|
|
|
55
55
|
width: fit-content;
|
|
56
56
|
flex: 0 0 auto;
|
|
57
57
|
}
|
|
58
|
+
[data-bspk=list-item] [data-leading]:empty,
|
|
59
|
+
[data-bspk=list-item] [data-trailing]:empty {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
58
62
|
[data-bspk=list-item] [data-item-label] {
|
|
59
63
|
text-align: left;
|
|
60
64
|
}
|