colibri-ui 0.8.80 → 0.8.82
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/Modal/index.js +15 -13
- package/Sheet/Sheet.d.ts +3 -0
- package/Sheet/Sheet.js +276 -0
- package/Sheet/Sheet.module.css +153 -0
- package/Sheet/index.d.ts +2 -0
- package/Sheet/index.js +7 -0
- package/Sheet/index.props.d.ts +26 -0
- package/Sheet/package.json +9 -0
- package/Theme/index.d.ts +60 -0
- package/Theme/themes/buenos_aires.d.ts +30 -0
- package/Theme/themes/buenos_aires.js +30 -0
- package/Theme/themes/jaipur.d.ts +30 -0
- package/Theme/themes/jaipur.js +30 -0
- package/esm/Modal/index.js +4 -2
- package/esm/Sheet/Sheet.d.ts +3 -0
- package/esm/Sheet/Sheet.js +266 -0
- package/esm/Sheet/Sheet.module.css +153 -0
- package/esm/Sheet/index.d.ts +2 -0
- package/esm/Sheet/index.js +1 -0
- package/esm/Sheet/index.props.d.ts +26 -0
- package/esm/Theme/index.d.ts +60 -0
- package/esm/Theme/themes/buenos_aires.d.ts +30 -0
- package/esm/Theme/themes/buenos_aires.js +30 -0
- package/esm/Theme/themes/jaipur.d.ts +30 -0
- package/esm/Theme/themes/jaipur.js +30 -0
- package/esm/hooks/useModalStack/index.d.ts +6 -0
- package/esm/hooks/useModalStack/index.js +24 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -0
- package/esm/theme_ba_variables.css +30 -0
- package/esm/theme_jaipur_variables.css +30 -0
- package/hooks/useModalStack/index.d.ts +6 -0
- package/hooks/useModalStack/index.js +26 -0
- package/index.d.ts +2 -0
- package/index.js +3 -0
- package/package.json +1 -1
- package/theme_ba_variables.css +30 -0
- package/theme_jaipur_variables.css +30 -0
- package/Modal/useModalStack.d.ts +0 -2
- package/Modal/useModalStack.js +0 -20
- package/esm/Modal/useModalStack.d.ts +0 -2
- package/esm/Modal/useModalStack.js +0 -18
|
@@ -518,6 +518,36 @@ declare const _default: {
|
|
|
518
518
|
"component-avatar-font-size-xxxl": string;
|
|
519
519
|
"component-accordion-text": string;
|
|
520
520
|
"component-accordion-line": string;
|
|
521
|
+
"component-sheet-bg": string;
|
|
522
|
+
"component-sheet-text": string;
|
|
523
|
+
"component-sheet-secondary": string;
|
|
524
|
+
"component-sheet-overlay": string;
|
|
525
|
+
"component-sheet-radius": string;
|
|
526
|
+
"component-sheet-shadow": string;
|
|
527
|
+
"component-sheet-z-index": string;
|
|
528
|
+
"component-sheet-max-height": string;
|
|
529
|
+
"component-sheet-overlay-blur": string;
|
|
530
|
+
"component-sheet-motion-duration": string;
|
|
531
|
+
"component-sheet-resize-duration": string;
|
|
532
|
+
"component-sheet-motion-easing": string;
|
|
533
|
+
"component-sheet-reduced-motion-duration": string;
|
|
534
|
+
"component-sheet-drag-area-height": string;
|
|
535
|
+
"component-sheet-handle-width": string;
|
|
536
|
+
"component-sheet-handle-height": string;
|
|
537
|
+
"component-sheet-handle-radius": string;
|
|
538
|
+
"component-sheet-handle-opacity": string;
|
|
539
|
+
"component-sheet-header-gap": string;
|
|
540
|
+
"component-sheet-header-padding": string;
|
|
541
|
+
"component-sheet-border-width": string;
|
|
542
|
+
"component-sheet-border-color": string;
|
|
543
|
+
"component-sheet-title-font-size": string;
|
|
544
|
+
"component-sheet-title-line-height": string;
|
|
545
|
+
"component-sheet-title-font-weight": string;
|
|
546
|
+
"component-sheet-description-offset": string;
|
|
547
|
+
"component-sheet-description-font-size": string;
|
|
548
|
+
"component-sheet-body-padding": string;
|
|
549
|
+
"component-sheet-footer-padding-block": string;
|
|
550
|
+
"component-sheet-footer-padding-inline": string;
|
|
521
551
|
"component-modal-bg": string;
|
|
522
552
|
"component-modal-border": string;
|
|
523
553
|
"component-modal-overlay": string;
|
|
@@ -520,6 +520,36 @@ var THEME_BA = {
|
|
|
520
520
|
"component-avatar-font-size-xxxl": "9rem",
|
|
521
521
|
"component-accordion-text": Color.BRAND_BA_FOREST,
|
|
522
522
|
"component-accordion-line": Color.NEUTRAL_BA_300,
|
|
523
|
+
"component-sheet-bg": "var(--color-bg-surface)",
|
|
524
|
+
"component-sheet-text": "var(--color-text-primary)",
|
|
525
|
+
"component-sheet-secondary": "var(--color-text-secondary)",
|
|
526
|
+
"component-sheet-overlay": "var(--component-modal-overlay)",
|
|
527
|
+
"component-sheet-radius": "var(--radius-xl)",
|
|
528
|
+
"component-sheet-shadow": "var(--shadow-raised)",
|
|
529
|
+
"component-sheet-z-index": "1000",
|
|
530
|
+
"component-sheet-max-height": "96dvh",
|
|
531
|
+
"component-sheet-overlay-blur": "var(--space-3)",
|
|
532
|
+
"component-sheet-motion-duration": "220ms",
|
|
533
|
+
"component-sheet-resize-duration": "200ms",
|
|
534
|
+
"component-sheet-motion-easing": "cubic-bezier(0.2, 0.8, 0.2, 1)",
|
|
535
|
+
"component-sheet-reduced-motion-duration": "0.001ms",
|
|
536
|
+
"component-sheet-drag-area-height": "var(--space-6)",
|
|
537
|
+
"component-sheet-handle-width": "calc(var(--space-10) + var(--space-1))",
|
|
538
|
+
"component-sheet-handle-height": "var(--space-1)",
|
|
539
|
+
"component-sheet-handle-radius": "var(--radius-full)",
|
|
540
|
+
"component-sheet-handle-opacity": "0.45",
|
|
541
|
+
"component-sheet-header-gap": "var(--space-4)",
|
|
542
|
+
"component-sheet-header-padding": "var(--space-3) var(--space-5) var(--space-4)",
|
|
543
|
+
"component-sheet-border-width": "var(--border-width-hairline)",
|
|
544
|
+
"component-sheet-border-color": "var(--color-border-subtle)",
|
|
545
|
+
"component-sheet-title-font-size": "var(--font-size-heading-sm)",
|
|
546
|
+
"component-sheet-title-line-height": "var(--line-height-heading-sm)",
|
|
547
|
+
"component-sheet-title-font-weight": "var(--font-weight-semibold)",
|
|
548
|
+
"component-sheet-description-offset": "var(--space-1)",
|
|
549
|
+
"component-sheet-description-font-size": "var(--font-size-text-sm)",
|
|
550
|
+
"component-sheet-body-padding": "var(--space-5)",
|
|
551
|
+
"component-sheet-footer-padding-block": "var(--space-4)",
|
|
552
|
+
"component-sheet-footer-padding-inline": "var(--space-5)",
|
|
523
553
|
"component-modal-bg": Color.NEUTRAL_BA_0,
|
|
524
554
|
"component-modal-border": Color.NEUTRAL_BA_200,
|
|
525
555
|
"component-modal-overlay": "rgb(22 51 0 / 28%)",
|
|
@@ -518,6 +518,36 @@ declare const _default: {
|
|
|
518
518
|
"component-avatar-font-size-xxxl": string;
|
|
519
519
|
"component-accordion-text": string;
|
|
520
520
|
"component-accordion-line": string;
|
|
521
|
+
"component-sheet-bg": string;
|
|
522
|
+
"component-sheet-text": string;
|
|
523
|
+
"component-sheet-secondary": string;
|
|
524
|
+
"component-sheet-overlay": string;
|
|
525
|
+
"component-sheet-radius": string;
|
|
526
|
+
"component-sheet-shadow": string;
|
|
527
|
+
"component-sheet-z-index": string;
|
|
528
|
+
"component-sheet-max-height": string;
|
|
529
|
+
"component-sheet-overlay-blur": string;
|
|
530
|
+
"component-sheet-motion-duration": string;
|
|
531
|
+
"component-sheet-resize-duration": string;
|
|
532
|
+
"component-sheet-motion-easing": string;
|
|
533
|
+
"component-sheet-reduced-motion-duration": string;
|
|
534
|
+
"component-sheet-drag-area-height": string;
|
|
535
|
+
"component-sheet-handle-width": string;
|
|
536
|
+
"component-sheet-handle-height": string;
|
|
537
|
+
"component-sheet-handle-radius": string;
|
|
538
|
+
"component-sheet-handle-opacity": string;
|
|
539
|
+
"component-sheet-header-gap": string;
|
|
540
|
+
"component-sheet-header-padding": string;
|
|
541
|
+
"component-sheet-border-width": string;
|
|
542
|
+
"component-sheet-border-color": string;
|
|
543
|
+
"component-sheet-title-font-size": string;
|
|
544
|
+
"component-sheet-title-line-height": string;
|
|
545
|
+
"component-sheet-title-font-weight": string;
|
|
546
|
+
"component-sheet-description-offset": string;
|
|
547
|
+
"component-sheet-description-font-size": string;
|
|
548
|
+
"component-sheet-body-padding": string;
|
|
549
|
+
"component-sheet-footer-padding-block": string;
|
|
550
|
+
"component-sheet-footer-padding-inline": string;
|
|
521
551
|
"component-modal-bg": string;
|
|
522
552
|
"component-modal-border": string;
|
|
523
553
|
"component-modal-overlay": string;
|
|
@@ -520,6 +520,36 @@ var theme_jaipur = {
|
|
|
520
520
|
"component-avatar-font-size-xxxl": "9rem",
|
|
521
521
|
"component-accordion-text": Color.BRAND_JP_EGGPLANT,
|
|
522
522
|
"component-accordion-line": Color.NEUTRAL_JP_300,
|
|
523
|
+
"component-sheet-bg": "var(--color-bg-surface)",
|
|
524
|
+
"component-sheet-text": "var(--color-text-primary)",
|
|
525
|
+
"component-sheet-secondary": "var(--color-text-secondary)",
|
|
526
|
+
"component-sheet-overlay": "var(--component-modal-overlay)",
|
|
527
|
+
"component-sheet-radius": "var(--radius-xl)",
|
|
528
|
+
"component-sheet-shadow": "var(--shadow-raised)",
|
|
529
|
+
"component-sheet-z-index": "1000",
|
|
530
|
+
"component-sheet-max-height": "96dvh",
|
|
531
|
+
"component-sheet-overlay-blur": "var(--space-3)",
|
|
532
|
+
"component-sheet-motion-duration": "220ms",
|
|
533
|
+
"component-sheet-resize-duration": "200ms",
|
|
534
|
+
"component-sheet-motion-easing": "cubic-bezier(0.2, 0.8, 0.2, 1)",
|
|
535
|
+
"component-sheet-reduced-motion-duration": "0.001ms",
|
|
536
|
+
"component-sheet-drag-area-height": "var(--space-6)",
|
|
537
|
+
"component-sheet-handle-width": "calc(var(--space-10) + var(--space-1))",
|
|
538
|
+
"component-sheet-handle-height": "var(--space-1)",
|
|
539
|
+
"component-sheet-handle-radius": "var(--radius-full)",
|
|
540
|
+
"component-sheet-handle-opacity": "0.45",
|
|
541
|
+
"component-sheet-header-gap": "var(--space-4)",
|
|
542
|
+
"component-sheet-header-padding": "var(--space-3) var(--space-5) var(--space-4)",
|
|
543
|
+
"component-sheet-border-width": "var(--border-width-hairline)",
|
|
544
|
+
"component-sheet-border-color": "var(--color-border-subtle)",
|
|
545
|
+
"component-sheet-title-font-size": "var(--font-size-heading-sm)",
|
|
546
|
+
"component-sheet-title-line-height": "var(--line-height-heading-sm)",
|
|
547
|
+
"component-sheet-title-font-weight": "var(--font-weight-semibold)",
|
|
548
|
+
"component-sheet-description-offset": "var(--space-1)",
|
|
549
|
+
"component-sheet-description-font-size": "var(--font-size-text-sm)",
|
|
550
|
+
"component-sheet-body-padding": "var(--space-5)",
|
|
551
|
+
"component-sheet-footer-padding-block": "var(--space-4)",
|
|
552
|
+
"component-sheet-footer-padding-inline": "var(--space-5)",
|
|
523
553
|
"component-modal-bg": Color.NEUTRAL_JP_0,
|
|
524
554
|
"component-modal-border": Color.NEUTRAL_JP_200,
|
|
525
555
|
"component-modal-overlay": "color-mix(in srgb, var(--palette-black) 25%, transparent)",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
var stack = [];
|
|
4
|
+
/**
|
|
5
|
+
* Tracks open modals so only the topmost one reacts to Escape and Tab.
|
|
6
|
+
* An inactive entry is not registered and counts as topmost only while no
|
|
7
|
+
* modal is open.
|
|
8
|
+
*/
|
|
9
|
+
var useModalStack = function useModalStack(id) {
|
|
10
|
+
var active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
11
|
+
useEffect(function () {
|
|
12
|
+
if (!active) return;
|
|
13
|
+
stack.push(id);
|
|
14
|
+
return function () {
|
|
15
|
+
var index = stack.lastIndexOf(id);
|
|
16
|
+
if (index !== -1) stack.splice(index, 1);
|
|
17
|
+
};
|
|
18
|
+
}, [id, active]);
|
|
19
|
+
return useCallback(function () {
|
|
20
|
+
return stack.length ? stack[stack.length - 1] === id : !active;
|
|
21
|
+
}, [id, active]);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { useModalStack };
|
package/esm/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export { Select } from "./Select";
|
|
|
64
64
|
export type { SelectProps } from "./Select/index.props";
|
|
65
65
|
export { Separator } from "./Separator";
|
|
66
66
|
export type { SeparatorProps } from "./Separator/index.props";
|
|
67
|
+
export { Sheet } from "./Sheet";
|
|
68
|
+
export type { SheetProps, SheetSnapPoint, SheetCloseReason } from "./Sheet";
|
|
67
69
|
export { SkeletonRect, SkeletonText } from "./Skeleton";
|
|
68
70
|
export type { RectProps as SkeletonRectProps, TextProps as SkeletonTextProps, } from "./Skeleton/index.props";
|
|
69
71
|
export { Slider } from "./Slider";
|
package/esm/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export { RadioGroup } from './RadioGroup/index.js';
|
|
|
31
31
|
export { Rating } from './Rating/Rating.js';
|
|
32
32
|
export { Select } from './Select/index.js';
|
|
33
33
|
export { Separator } from './Separator/index.js';
|
|
34
|
+
export { Sheet } from './Sheet/Sheet.js';
|
|
34
35
|
export { SkeletonRect, SkeletonText } from './Skeleton/index.js';
|
|
35
36
|
export { Slider } from './Slider/Slider.js';
|
|
36
37
|
export { Status } from './Status/index.js';
|
|
@@ -518,6 +518,36 @@
|
|
|
518
518
|
--component-avatar-font-size-xxxl: 9rem;
|
|
519
519
|
--component-accordion-text: #163300;
|
|
520
520
|
--component-accordion-line: #CBD2C8;
|
|
521
|
+
--component-sheet-bg: var(--color-bg-surface);
|
|
522
|
+
--component-sheet-text: var(--color-text-primary);
|
|
523
|
+
--component-sheet-secondary: var(--color-text-secondary);
|
|
524
|
+
--component-sheet-overlay: var(--component-modal-overlay);
|
|
525
|
+
--component-sheet-radius: var(--radius-xl);
|
|
526
|
+
--component-sheet-shadow: var(--shadow-raised);
|
|
527
|
+
--component-sheet-z-index: 1000;
|
|
528
|
+
--component-sheet-max-height: 96dvh;
|
|
529
|
+
--component-sheet-overlay-blur: var(--space-3);
|
|
530
|
+
--component-sheet-motion-duration: 220ms;
|
|
531
|
+
--component-sheet-resize-duration: 200ms;
|
|
532
|
+
--component-sheet-motion-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
533
|
+
--component-sheet-reduced-motion-duration: 0.001ms;
|
|
534
|
+
--component-sheet-drag-area-height: var(--space-6);
|
|
535
|
+
--component-sheet-handle-width: calc(var(--space-10) + var(--space-1));
|
|
536
|
+
--component-sheet-handle-height: var(--space-1);
|
|
537
|
+
--component-sheet-handle-radius: var(--radius-full);
|
|
538
|
+
--component-sheet-handle-opacity: 0.45;
|
|
539
|
+
--component-sheet-header-gap: var(--space-4);
|
|
540
|
+
--component-sheet-header-padding: var(--space-3) var(--space-5) var(--space-4);
|
|
541
|
+
--component-sheet-border-width: var(--border-width-hairline);
|
|
542
|
+
--component-sheet-border-color: var(--color-border-subtle);
|
|
543
|
+
--component-sheet-title-font-size: var(--font-size-heading-sm);
|
|
544
|
+
--component-sheet-title-line-height: var(--line-height-heading-sm);
|
|
545
|
+
--component-sheet-title-font-weight: var(--font-weight-semibold);
|
|
546
|
+
--component-sheet-description-offset: var(--space-1);
|
|
547
|
+
--component-sheet-description-font-size: var(--font-size-text-sm);
|
|
548
|
+
--component-sheet-body-padding: var(--space-5);
|
|
549
|
+
--component-sheet-footer-padding-block: var(--space-4);
|
|
550
|
+
--component-sheet-footer-padding-inline: var(--space-5);
|
|
521
551
|
--component-modal-bg: #FFFFFF;
|
|
522
552
|
--component-modal-border: #E2E7DF;
|
|
523
553
|
--component-modal-overlay: rgb(22 51 0 / 28%);
|
|
@@ -518,6 +518,36 @@
|
|
|
518
518
|
--component-avatar-font-size-xxxl: 9rem;
|
|
519
519
|
--component-accordion-text: #2C2242;
|
|
520
520
|
--component-accordion-line: #D0CECC;
|
|
521
|
+
--component-sheet-bg: var(--color-bg-surface);
|
|
522
|
+
--component-sheet-text: var(--color-text-primary);
|
|
523
|
+
--component-sheet-secondary: var(--color-text-secondary);
|
|
524
|
+
--component-sheet-overlay: var(--component-modal-overlay);
|
|
525
|
+
--component-sheet-radius: var(--radius-xl);
|
|
526
|
+
--component-sheet-shadow: var(--shadow-raised);
|
|
527
|
+
--component-sheet-z-index: 1000;
|
|
528
|
+
--component-sheet-max-height: 96dvh;
|
|
529
|
+
--component-sheet-overlay-blur: var(--space-3);
|
|
530
|
+
--component-sheet-motion-duration: 220ms;
|
|
531
|
+
--component-sheet-resize-duration: 200ms;
|
|
532
|
+
--component-sheet-motion-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
533
|
+
--component-sheet-reduced-motion-duration: 0.001ms;
|
|
534
|
+
--component-sheet-drag-area-height: var(--space-6);
|
|
535
|
+
--component-sheet-handle-width: calc(var(--space-10) + var(--space-1));
|
|
536
|
+
--component-sheet-handle-height: var(--space-1);
|
|
537
|
+
--component-sheet-handle-radius: var(--radius-full);
|
|
538
|
+
--component-sheet-handle-opacity: 0.45;
|
|
539
|
+
--component-sheet-header-gap: var(--space-4);
|
|
540
|
+
--component-sheet-header-padding: var(--space-3) var(--space-5) var(--space-4);
|
|
541
|
+
--component-sheet-border-width: var(--border-width-hairline);
|
|
542
|
+
--component-sheet-border-color: var(--color-border-subtle);
|
|
543
|
+
--component-sheet-title-font-size: var(--font-size-heading-sm);
|
|
544
|
+
--component-sheet-title-line-height: var(--line-height-heading-sm);
|
|
545
|
+
--component-sheet-title-font-weight: var(--font-weight-semibold);
|
|
546
|
+
--component-sheet-description-offset: var(--space-1);
|
|
547
|
+
--component-sheet-description-font-size: var(--font-size-text-sm);
|
|
548
|
+
--component-sheet-body-padding: var(--space-5);
|
|
549
|
+
--component-sheet-footer-padding-block: var(--space-4);
|
|
550
|
+
--component-sheet-footer-padding-inline: var(--space-5);
|
|
521
551
|
--component-modal-bg: #FFFFFF;
|
|
522
552
|
--component-modal-border: #E4E3DF;
|
|
523
553
|
--component-modal-overlay: color-mix(in srgb, var(--palette-black) 25%, transparent);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
var stack = [];
|
|
6
|
+
/**
|
|
7
|
+
* Tracks open modals so only the topmost one reacts to Escape and Tab.
|
|
8
|
+
* An inactive entry is not registered and counts as topmost only while no
|
|
9
|
+
* modal is open.
|
|
10
|
+
*/
|
|
11
|
+
var useModalStack = function useModalStack(id) {
|
|
12
|
+
var active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
13
|
+
React.useEffect(function () {
|
|
14
|
+
if (!active) return;
|
|
15
|
+
stack.push(id);
|
|
16
|
+
return function () {
|
|
17
|
+
var index = stack.lastIndexOf(id);
|
|
18
|
+
if (index !== -1) stack.splice(index, 1);
|
|
19
|
+
};
|
|
20
|
+
}, [id, active]);
|
|
21
|
+
return React.useCallback(function () {
|
|
22
|
+
return stack.length ? stack[stack.length - 1] === id : !active;
|
|
23
|
+
}, [id, active]);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.useModalStack = useModalStack;
|
package/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export { Select } from "./Select";
|
|
|
64
64
|
export type { SelectProps } from "./Select/index.props";
|
|
65
65
|
export { Separator } from "./Separator";
|
|
66
66
|
export type { SeparatorProps } from "./Separator/index.props";
|
|
67
|
+
export { Sheet } from "./Sheet";
|
|
68
|
+
export type { SheetProps, SheetSnapPoint, SheetCloseReason } from "./Sheet";
|
|
67
69
|
export { SkeletonRect, SkeletonText } from "./Skeleton";
|
|
68
70
|
export type { RectProps as SkeletonRectProps, TextProps as SkeletonTextProps, } from "./Skeleton/index.props";
|
|
69
71
|
export { Slider } from "./Slider";
|
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var index$n = require('./RadioGroup/index.js');
|
|
|
33
33
|
require('./Rating/index.js');
|
|
34
34
|
var index$o = require('./Select/index.js');
|
|
35
35
|
var index$p = require('./Separator/index.js');
|
|
36
|
+
require('./Sheet/index.js');
|
|
36
37
|
var index$q = require('./Skeleton/index.js');
|
|
37
38
|
require('./Slider/index.js');
|
|
38
39
|
var index$r = require('./Status/index.js');
|
|
@@ -81,6 +82,7 @@ var Plus = require('./Icons/Plus.js');
|
|
|
81
82
|
var Progress = require('./Progress/Progress.js');
|
|
82
83
|
var Rating = require('./Rating/Rating.js');
|
|
83
84
|
var Setting = require('./Icons/Setting.js');
|
|
85
|
+
var Sheet = require('./Sheet/Sheet.js');
|
|
84
86
|
var Shield = require('./Icons/Shield.js');
|
|
85
87
|
var Slider = require('./Slider/Slider.js');
|
|
86
88
|
var Trash = require('./Icons/Trash.js');
|
|
@@ -168,6 +170,7 @@ exports.Plus = Plus.Plus;
|
|
|
168
170
|
exports.Progress = Progress.Progress;
|
|
169
171
|
exports.Rating = Rating.Rating;
|
|
170
172
|
exports.Setting = Setting.Setting;
|
|
173
|
+
exports.Sheet = Sheet.Sheet;
|
|
171
174
|
exports.Shield = Shield.Shield;
|
|
172
175
|
exports.Slider = Slider.Slider;
|
|
173
176
|
exports.Trash = Trash.Trash;
|
package/package.json
CHANGED
package/theme_ba_variables.css
CHANGED
|
@@ -518,6 +518,36 @@
|
|
|
518
518
|
--component-avatar-font-size-xxxl: 9rem;
|
|
519
519
|
--component-accordion-text: #163300;
|
|
520
520
|
--component-accordion-line: #CBD2C8;
|
|
521
|
+
--component-sheet-bg: var(--color-bg-surface);
|
|
522
|
+
--component-sheet-text: var(--color-text-primary);
|
|
523
|
+
--component-sheet-secondary: var(--color-text-secondary);
|
|
524
|
+
--component-sheet-overlay: var(--component-modal-overlay);
|
|
525
|
+
--component-sheet-radius: var(--radius-xl);
|
|
526
|
+
--component-sheet-shadow: var(--shadow-raised);
|
|
527
|
+
--component-sheet-z-index: 1000;
|
|
528
|
+
--component-sheet-max-height: 96dvh;
|
|
529
|
+
--component-sheet-overlay-blur: var(--space-3);
|
|
530
|
+
--component-sheet-motion-duration: 220ms;
|
|
531
|
+
--component-sheet-resize-duration: 200ms;
|
|
532
|
+
--component-sheet-motion-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
533
|
+
--component-sheet-reduced-motion-duration: 0.001ms;
|
|
534
|
+
--component-sheet-drag-area-height: var(--space-6);
|
|
535
|
+
--component-sheet-handle-width: calc(var(--space-10) + var(--space-1));
|
|
536
|
+
--component-sheet-handle-height: var(--space-1);
|
|
537
|
+
--component-sheet-handle-radius: var(--radius-full);
|
|
538
|
+
--component-sheet-handle-opacity: 0.45;
|
|
539
|
+
--component-sheet-header-gap: var(--space-4);
|
|
540
|
+
--component-sheet-header-padding: var(--space-3) var(--space-5) var(--space-4);
|
|
541
|
+
--component-sheet-border-width: var(--border-width-hairline);
|
|
542
|
+
--component-sheet-border-color: var(--color-border-subtle);
|
|
543
|
+
--component-sheet-title-font-size: var(--font-size-heading-sm);
|
|
544
|
+
--component-sheet-title-line-height: var(--line-height-heading-sm);
|
|
545
|
+
--component-sheet-title-font-weight: var(--font-weight-semibold);
|
|
546
|
+
--component-sheet-description-offset: var(--space-1);
|
|
547
|
+
--component-sheet-description-font-size: var(--font-size-text-sm);
|
|
548
|
+
--component-sheet-body-padding: var(--space-5);
|
|
549
|
+
--component-sheet-footer-padding-block: var(--space-4);
|
|
550
|
+
--component-sheet-footer-padding-inline: var(--space-5);
|
|
521
551
|
--component-modal-bg: #FFFFFF;
|
|
522
552
|
--component-modal-border: #E2E7DF;
|
|
523
553
|
--component-modal-overlay: rgb(22 51 0 / 28%);
|
|
@@ -518,6 +518,36 @@
|
|
|
518
518
|
--component-avatar-font-size-xxxl: 9rem;
|
|
519
519
|
--component-accordion-text: #2C2242;
|
|
520
520
|
--component-accordion-line: #D0CECC;
|
|
521
|
+
--component-sheet-bg: var(--color-bg-surface);
|
|
522
|
+
--component-sheet-text: var(--color-text-primary);
|
|
523
|
+
--component-sheet-secondary: var(--color-text-secondary);
|
|
524
|
+
--component-sheet-overlay: var(--component-modal-overlay);
|
|
525
|
+
--component-sheet-radius: var(--radius-xl);
|
|
526
|
+
--component-sheet-shadow: var(--shadow-raised);
|
|
527
|
+
--component-sheet-z-index: 1000;
|
|
528
|
+
--component-sheet-max-height: 96dvh;
|
|
529
|
+
--component-sheet-overlay-blur: var(--space-3);
|
|
530
|
+
--component-sheet-motion-duration: 220ms;
|
|
531
|
+
--component-sheet-resize-duration: 200ms;
|
|
532
|
+
--component-sheet-motion-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
533
|
+
--component-sheet-reduced-motion-duration: 0.001ms;
|
|
534
|
+
--component-sheet-drag-area-height: var(--space-6);
|
|
535
|
+
--component-sheet-handle-width: calc(var(--space-10) + var(--space-1));
|
|
536
|
+
--component-sheet-handle-height: var(--space-1);
|
|
537
|
+
--component-sheet-handle-radius: var(--radius-full);
|
|
538
|
+
--component-sheet-handle-opacity: 0.45;
|
|
539
|
+
--component-sheet-header-gap: var(--space-4);
|
|
540
|
+
--component-sheet-header-padding: var(--space-3) var(--space-5) var(--space-4);
|
|
541
|
+
--component-sheet-border-width: var(--border-width-hairline);
|
|
542
|
+
--component-sheet-border-color: var(--color-border-subtle);
|
|
543
|
+
--component-sheet-title-font-size: var(--font-size-heading-sm);
|
|
544
|
+
--component-sheet-title-line-height: var(--line-height-heading-sm);
|
|
545
|
+
--component-sheet-title-font-weight: var(--font-weight-semibold);
|
|
546
|
+
--component-sheet-description-offset: var(--space-1);
|
|
547
|
+
--component-sheet-description-font-size: var(--font-size-text-sm);
|
|
548
|
+
--component-sheet-body-padding: var(--space-5);
|
|
549
|
+
--component-sheet-footer-padding-block: var(--space-4);
|
|
550
|
+
--component-sheet-footer-padding-inline: var(--space-5);
|
|
521
551
|
--component-modal-bg: #FFFFFF;
|
|
522
552
|
--component-modal-border: #E4E3DF;
|
|
523
553
|
--component-modal-overlay: color-mix(in srgb, var(--palette-black) 25%, transparent);
|
package/Modal/useModalStack.d.ts
DELETED
package/Modal/useModalStack.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
var stack = [];
|
|
6
|
-
/** Tracks open modals so only the topmost one reacts to Escape and Tab. */
|
|
7
|
-
var useModalStack = function useModalStack(id) {
|
|
8
|
-
React.useEffect(function () {
|
|
9
|
-
stack.push(id);
|
|
10
|
-
return function () {
|
|
11
|
-
var index = stack.lastIndexOf(id);
|
|
12
|
-
if (index !== -1) stack.splice(index, 1);
|
|
13
|
-
};
|
|
14
|
-
}, [id]);
|
|
15
|
-
return React.useCallback(function () {
|
|
16
|
-
return stack[stack.length - 1] === id;
|
|
17
|
-
}, [id]);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
exports.useModalStack = useModalStack;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useEffect, useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
var stack = [];
|
|
4
|
-
/** Tracks open modals so only the topmost one reacts to Escape and Tab. */
|
|
5
|
-
var useModalStack = function useModalStack(id) {
|
|
6
|
-
useEffect(function () {
|
|
7
|
-
stack.push(id);
|
|
8
|
-
return function () {
|
|
9
|
-
var index = stack.lastIndexOf(id);
|
|
10
|
-
if (index !== -1) stack.splice(index, 1);
|
|
11
|
-
};
|
|
12
|
-
}, [id]);
|
|
13
|
-
return useCallback(function () {
|
|
14
|
-
return stack[stack.length - 1] === id;
|
|
15
|
-
}, [id]);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { useModalStack };
|