@persona/design-system 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{Breadcrumbs-ClKHNIr-.mjs → Breadcrumbs-CR-xdruP.mjs} +3 -3
- package/dist/{Breadcrumbs-ClKHNIr-.mjs.map → Breadcrumbs-CR-xdruP.mjs.map} +1 -1
- package/dist/Card2.d.mts +2 -2
- package/dist/{CardV2-CFTjYWoO.mjs → CardV2-CBjhsfrn.mjs} +5 -5
- package/dist/{CardV2-CFTjYWoO.mjs.map → CardV2-CBjhsfrn.mjs.map} +1 -1
- package/dist/{Checkbox-CyeitZ5q.mjs → Checkbox-BHZ7c7_6.mjs} +2 -2
- package/dist/{Checkbox-CyeitZ5q.mjs.map → Checkbox-BHZ7c7_6.mjs.map} +1 -1
- package/dist/{Combobox-Ddas5FN-.mjs → Combobox-BCYLeZDP.mjs} +6 -6
- package/dist/{Combobox-Ddas5FN-.mjs.map → Combobox-BCYLeZDP.mjs.map} +1 -1
- package/dist/{Combobox-DX4DLe1b.d.mts → Combobox-DMN3nc7E.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-Ds_i3K2m.d.mts → ComboboxBase-DBLJYQrh.d.mts} +2 -2
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-S6oFJcOS.d.mts → ComboboxMultiSelect-CZRLyM_y.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-DFzCwW1Y.d.mts → ComboboxSingleSelect-BS6pZpU_.d.mts} +3 -3
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{ConfigFormGroup-DcsM-u8o.mjs → ConfigFormGroup-BnRDAs0j.mjs} +2 -2
- package/dist/{ConfigFormGroup-DcsM-u8o.mjs.map → ConfigFormGroup-BnRDAs0j.mjs.map} +1 -1
- package/dist/{DatePicker-DTT-mJ8r.mjs → DatePicker-BcjrAr7o.mjs} +6 -6
- package/dist/{DatePicker-DTT-mJ8r.mjs.map → DatePicker-BcjrAr7o.mjs.map} +1 -1
- package/dist/{DropdownButton-DV5if_uG.mjs → DropdownButton-l-fzkb5_.mjs} +2 -2
- package/dist/{DropdownButton-DV5if_uG.mjs.map → DropdownButton-l-fzkb5_.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +1 -1
- package/dist/{DropdownMenu-CbhEzWy1.d.mts → DropdownMenu-Bg68vvxx.d.mts} +2 -2
- package/dist/{DropdownMenu-DovtBJBs.mjs → DropdownMenu-C0WK4bM0.mjs} +2 -2
- package/dist/{DropdownMenu-DovtBJBs.mjs.map → DropdownMenu-C0WK4bM0.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{FormControl-BvRzRknE.mjs → FormControl-BzMbbgr0.mjs} +3 -3
- package/dist/{FormControl-BvRzRknE.mjs.map → FormControl-BzMbbgr0.mjs.map} +1 -1
- package/dist/{FormField-BDJ6zNE6.mjs → FormField-2sNS5PzN.mjs} +14 -14
- package/dist/{FormField-BDJ6zNE6.mjs.map → FormField-2sNS5PzN.mjs.map} +1 -1
- package/dist/{HoverCopyableField-WP6DPjy1.mjs → HoverCopyableField-CeJ0UP87.mjs} +2 -2
- package/dist/{HoverCopyableField-WP6DPjy1.mjs.map → HoverCopyableField-CeJ0UP87.mjs.map} +1 -1
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DbfwNzS_.mjs → Input-DGWThZlt.mjs} +2 -2
- package/dist/{Input-DbfwNzS_.mjs.map → Input-DGWThZlt.mjs.map} +1 -1
- package/dist/{ListBox-P1eTecdo.d.mts → ListBox-Awtw7Xy_.d.mts} +2 -2
- package/dist/{ListBox-CXh9Jfb-.mjs → ListBox-DqII8giL.mjs} +6 -6
- package/dist/{ListBox-CXh9Jfb-.mjs.map → ListBox-DqII8giL.mjs.map} +1 -1
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +2 -2
- package/dist/{LoadingShimmer-DeVCDCjT.mjs → LoadingShimmer-ZyzJs5Vi.mjs} +1 -1
- package/dist/{LoadingShimmer-DeVCDCjT.mjs.map → LoadingShimmer-ZyzJs5Vi.mjs.map} +1 -1
- package/dist/{LogicRow-DtZYOzQ8.d.mts → LogicRow-DIn0gLEq.d.mts} +2 -2
- package/dist/LogicRow.d.mts +1 -1
- package/dist/{Menu-CAGTCBqj.mjs → Menu-CeV3lL2g.mjs} +1 -1
- package/dist/{Menu-CAGTCBqj.mjs.map → Menu-CeV3lL2g.mjs.map} +1 -1
- package/dist/{Menu-_loh8pe3.d.mts → Menu-DdHN-drQ.d.mts} +2 -2
- package/dist/Menu.d.mts +1 -1
- package/dist/{PageHeader-wpvRRTaa.mjs → PageHeader-UI_6yImi.mjs} +2 -2
- package/dist/{PageHeader-wpvRRTaa.mjs.map → PageHeader-UI_6yImi.mjs.map} +1 -1
- package/dist/{Pagination-wjr3W3xf.mjs → Pagination-DgA0U1fa.mjs} +3 -3
- package/dist/{Pagination-wjr3W3xf.mjs.map → Pagination-DgA0U1fa.mjs.map} +1 -1
- package/dist/{Pii-Bm-qkweh.mjs → Pii-bxG0qu3t.mjs} +1 -1
- package/dist/{Pii-Bm-qkweh.mjs.map → Pii-bxG0qu3t.mjs.map} +1 -1
- package/dist/{Popover-DUyzmq3e.mjs → Popover-UiOUt5up.mjs} +1 -1
- package/dist/{Popover-DUyzmq3e.mjs.map → Popover-UiOUt5up.mjs.map} +1 -1
- package/dist/{Radio-CkugnL91.mjs → Radio-BrQzZhwP.mjs} +2 -2
- package/dist/{Radio-CkugnL91.mjs.map → Radio-BrQzZhwP.mjs.map} +1 -1
- package/dist/{RadioGroup-8dI8gljw.mjs → RadioGroup-Bl9oXPIo.mjs} +2 -2
- package/dist/{RadioGroup-8dI8gljw.mjs.map → RadioGroup-Bl9oXPIo.mjs.map} +1 -1
- package/dist/{SegmentedControl-DQE0hN57.mjs → SegmentedControl-BozydMtT.mjs} +2 -2
- package/dist/{SegmentedControl-DQE0hN57.mjs.map → SegmentedControl-BozydMtT.mjs.map} +1 -1
- package/dist/{Select-D9OVjzPR.mjs → Select-CktsIrzf.mjs} +4 -4
- package/dist/{Select-D9OVjzPR.mjs.map → Select-CktsIrzf.mjs.map} +1 -1
- package/dist/{Select-wnr46ROZ.d.mts → Select-yPqzqe5k.d.mts} +2 -2
- package/dist/Select.d.mts +1 -1
- package/dist/{Spinner-gBNWIwOn.mjs → Spinner-Dpw3-3JS.mjs} +1 -1
- package/dist/{Spinner-gBNWIwOn.mjs.map → Spinner-Dpw3-3JS.mjs.map} +1 -1
- package/dist/{TabBar-B__54oO3.mjs → TabBar-Dw3xE_B-.mjs} +1 -1
- package/dist/{TabBar-B__54oO3.mjs.map → TabBar-Dw3xE_B-.mjs.map} +1 -1
- package/dist/{Table-CqIi5mVF.mjs → Table-ELLvSvH4.mjs} +2 -2
- package/dist/{Table-CqIi5mVF.mjs.map → Table-ELLvSvH4.mjs.map} +1 -1
- package/dist/{TableBox-C-8RxZT4.mjs → TableBox-CCfha6G2.mjs} +7 -7
- package/dist/{TableBox-C-8RxZT4.mjs.map → TableBox-CCfha6G2.mjs.map} +1 -1
- package/dist/TableBox.d.mts +1 -1
- package/dist/{TableBoxCell-CQ3zT1jG.d.mts → TableBoxCell-xnzuHPV1.d.mts} +4 -4
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +3 -3
- package/dist/{TableBoxRow-ClK2pceY.d.mts → TableBoxRow-BBDMh5xl.d.mts} +2 -2
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-CoF3DuUQ.d.mts → TableBoxRowActions-DCfol4GC.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableControls-DplArh-9.mjs → TableControls-C-yb5EYU.mjs} +11 -11
- package/dist/{TableControls-DplArh-9.mjs.map → TableControls-C-yb5EYU.mjs.map} +1 -1
- package/dist/{TechnicalSticker-D6MO_IfT.mjs → TechnicalSticker-CLbNA0kp.mjs} +1 -1
- package/dist/{TechnicalSticker-D6MO_IfT.mjs.map → TechnicalSticker-CLbNA0kp.mjs.map} +1 -1
- package/dist/{TextArea-CYirq-B2.mjs → TextArea-oAK1DKId.mjs} +2 -2
- package/dist/{TextArea-CYirq-B2.mjs.map → TextArea-oAK1DKId.mjs.map} +1 -1
- package/dist/{Toggle-CqgFNIYS.mjs → Toggle-DZzirZ8p.mjs} +2 -2
- package/dist/{Toggle-CqgFNIYS.mjs.map → Toggle-DZzirZ8p.mjs.map} +1 -1
- package/dist/components/BottomPanel/index.mjs +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +7 -7
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +3 -3
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.mjs +3 -65
- package/dist/components/Modal/index.mjs.map +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RightPanel/index.mjs +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Slider/index.mjs +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/grammar.pegjs +219 -0
- package/dist/components/SmartTextInput/parser/smart-text/grammar.pegjs +154 -0
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +1 -1
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/fieldPickerOptions.d.mts +1 -1
- package/dist/{index-BJr_obTf.d.mts → index-CBWvk6Ch.d.mts} +3 -3
- package/dist/inputFields.d.mts +3 -3
- package/dist/{intersperse-CRUnXmnu.mjs → intersperse-vOYvFOfF.mjs} +1 -1
- package/dist/{intersperse-CRUnXmnu.mjs.map → intersperse-vOYvFOfF.mjs.map} +1 -1
- package/dist/lib/useModalInsetRight.mjs +69 -0
- package/dist/lib/useModalInsetRight.mjs.map +1 -0
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFormField-C-K1lgmv.mjs → useFormField-DhYd6bNn.mjs} +2 -2
- package/dist/{useFormField-C-K1lgmv.mjs.map → useFormField-DhYd6bNn.mjs.map} +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs → useFormGroup-DWVW7A9f.mjs} +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs.map → useFormGroup-DWVW7A9f.mjs.map} +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/llms.txt +1 -0
- package/package.json +3 -1
- package/skills/design-system-component-authoring/SKILL.md +79 -0
- package/skills/design-system-component-authoring/clarifying-scope.md +18 -0
- package/skills/design-system-component-authoring/component-conventions.md +70 -0
- package/skills/design-system-component-authoring/prop-interface-patterns.md +30 -0
- /package/dist/{useModalInsetRight.d.mts → lib/useModalInsetRight.d.mts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PageHeaderContainer, t as PageHeader } from "../../PageHeader-
|
|
1
|
+
import { n as PageHeaderContainer, t as PageHeader } from "../../PageHeader-UI_6yImi.mjs";
|
|
2
2
|
export { PageHeaderContainer, PageHeader as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MIN_PAGE_SIZE, i as DEFAULT_PAGE_SIZE_OPTIONS, n as PAGE_LIMIT_BEFORE_SCROLL_MODE, r as PageSelector, t as Pagination_default } from "../../Pagination-
|
|
1
|
+
import { a as MIN_PAGE_SIZE, i as DEFAULT_PAGE_SIZE_OPTIONS, n as PAGE_LIMIT_BEFORE_SCROLL_MODE, r as PageSelector, t as Pagination_default } from "../../Pagination-DgA0U1fa.mjs";
|
|
2
2
|
export { DEFAULT_PAGE_SIZE_OPTIONS, MIN_PAGE_SIZE, PAGE_LIMIT_BEFORE_SCROLL_MODE, PageSelector, Pagination_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Pii_default } from "../../Pii-
|
|
1
|
+
import { t as Pii_default } from "../../Pii-bxG0qu3t.mjs";
|
|
2
2
|
export { Pii_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PopoverPortal, i as PopoverContent, n as PopoverCard, o as PopoverTrigger, r as PopoverClose, s as Popover_default, t as PopoverAnchor } from "../../Popover-
|
|
1
|
+
import { a as PopoverPortal, i as PopoverContent, n as PopoverCard, o as PopoverTrigger, r as PopoverClose, s as Popover_default, t as PopoverAnchor } from "../../Popover-UiOUt5up.mjs";
|
|
2
2
|
export { PopoverAnchor, PopoverCard, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Popover_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Radio } from "../../Radio-
|
|
1
|
+
import { t as Radio } from "../../Radio-BrQzZhwP.mjs";
|
|
2
2
|
export { Radio, Radio as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as RadioGroup } from "../../RadioGroup-
|
|
1
|
+
import { t as RadioGroup } from "../../RadioGroup-Bl9oXPIo.mjs";
|
|
2
2
|
export { RadioGroup, RadioGroup as default };
|
|
@@ -2,7 +2,7 @@ import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
|
2
2
|
import { i as Paragraph } from "../../Text-Dn_p7ZvT.mjs";
|
|
3
3
|
import { n as Stack, t as HStack } from "../../Stack-BqQndGI9.mjs";
|
|
4
4
|
import { t as IconButton } from "../../IconButton-CnJNIJVQ.mjs";
|
|
5
|
-
import { t as LoadingShimmer } from "../../LoadingShimmer-
|
|
5
|
+
import { t as LoadingShimmer } from "../../LoadingShimmer-ZyzJs5Vi.mjs";
|
|
6
6
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SegmentedControlItem, t as SegmentedControl } from "../../SegmentedControl-
|
|
1
|
+
import { n as SegmentedControlItem, t as SegmentedControl } from "../../SegmentedControl-BozydMtT.mjs";
|
|
2
2
|
export { SegmentedControl, SegmentedControl as default, SegmentedControlItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as SelectProps, n as Select, r as SelectHeader, t as Option } from "../../Select-
|
|
1
|
+
import { i as SelectProps, n as Select, r as SelectHeader, t as Option } from "../../Select-yPqzqe5k.mjs";
|
|
2
2
|
export { Option, Select, Select as default, SelectHeader, SelectProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Select, r as SelectHeader, t as Option } from "../../Select-
|
|
1
|
+
import { n as Select, r as SelectHeader, t as Option } from "../../Select-CktsIrzf.mjs";
|
|
2
2
|
export { Option, Select, Select as default, SelectHeader };
|
|
@@ -9,9 +9,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { debounce } from "lodash-es";
|
|
10
10
|
import { mergeProps } from "@react-aria/utils";
|
|
11
11
|
import { useNumberFormatter } from "@react-aria/i18n";
|
|
12
|
+
import { autoUpdate, flip, offset, shift, useDismiss, useFloating, useInteractions, useRole } from "@floating-ui/react";
|
|
12
13
|
import { useSlider, useSliderThumb } from "@react-aria/slider";
|
|
13
14
|
import { useSliderState } from "@react-stately/slider";
|
|
14
|
-
import { autoUpdate, flip, offset, shift, useDismiss, useFloating, useInteractions, useRole } from "@floating-ui/react";
|
|
15
15
|
import { useFocusRing } from "@react-aria/focus";
|
|
16
16
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
17
17
|
import { useController } from "react-hook-form";
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ===========================================================================
|
|
3
|
+
* Run bin/method_chain_parser/generate.sh after making change
|
|
4
|
+
* See parser.js in this directory for generated output
|
|
5
|
+
* ===========================================================================
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
{{
|
|
9
|
+
function mkError(start, end, kind, extra) {
|
|
10
|
+
return { type: 'error', start, end, ...(kind ? { kind } : {}), ...(extra || {}) };
|
|
11
|
+
}
|
|
12
|
+
function hasErrors(node) {
|
|
13
|
+
if (!node || typeof node !== 'object') return false;
|
|
14
|
+
if (node.type === 'error') return true;
|
|
15
|
+
const children = node.children || [];
|
|
16
|
+
return children.some(hasErrors);
|
|
17
|
+
}
|
|
18
|
+
}}
|
|
19
|
+
|
|
20
|
+
Chain
|
|
21
|
+
= first:(SymbolIdentifier / InvalidChainStart)
|
|
22
|
+
rest:(Link / ErrorLink)*
|
|
23
|
+
{
|
|
24
|
+
const chain = { type: 'chain', children: [first, ...rest.flat()],
|
|
25
|
+
start: location().start.offset, end: location().end.offset };
|
|
26
|
+
if (options.strict === true && hasErrors(chain)) { error('Invalid chain'); }
|
|
27
|
+
return chain;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Matches a non-identifier chain start. Excludes }, ,, ) to avoid consuming
|
|
31
|
+
// delimiters in Handlebars / param contexts. Also excludes . so trailing-dot
|
|
32
|
+
// ErrorLink handles dot-after-dot rather than producing two separate errors.
|
|
33
|
+
InvalidChainStart
|
|
34
|
+
= !"}" !"," !")" !SymbolIdentifier c:. {
|
|
35
|
+
const s = location().start.offset;
|
|
36
|
+
const e = location().end.offset;
|
|
37
|
+
return mkError(s, e, 'invalidMethodChainSyntax');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ErrorLink
|
|
41
|
+
= d:DotNode !. {
|
|
42
|
+
// Dot at absolute end of input — user is still typing (wip).
|
|
43
|
+
const e = location().end.offset;
|
|
44
|
+
return [d, mkError(e, e, 'trailingDot', { wip: true })];
|
|
45
|
+
}
|
|
46
|
+
/ d:DotNode &("}" / "$" / "{") {
|
|
47
|
+
// Dot immediately before a Handlebars/Code delimiter — user is still
|
|
48
|
+
// typing the identifier that will follow (wip).
|
|
49
|
+
const e = location().end.offset;
|
|
50
|
+
return [d, mkError(e, e, 'trailingDot', { wip: true })];
|
|
51
|
+
}
|
|
52
|
+
/ d:DotNode "@" (!. / &("}" / "$" / "{")) {
|
|
53
|
+
// '@' at end of input or before a delimiter — user starting a custom function name (wip).
|
|
54
|
+
const e = location().end.offset;
|
|
55
|
+
return [d, mkError(e, e, 'trailingAtSign', { wip: true })];
|
|
56
|
+
}
|
|
57
|
+
/ d:DotNode !(SymbolIdentifier / "@" / "[") c:. {
|
|
58
|
+
// Dot followed by a character that is not a valid link start — consume
|
|
59
|
+
// the bad character and report it as a syntax error (not wip).
|
|
60
|
+
const s = d.end;
|
|
61
|
+
const e = location().end.offset;
|
|
62
|
+
return [d, mkError(s, e, 'invalidMethodChainSyntax')];
|
|
63
|
+
}
|
|
64
|
+
/ [ \t]+ (!("}" / "$" / "{") .)* {
|
|
65
|
+
return mkError(location().start.offset, location().end.offset, 'invalidMethodChainSyntax');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
Link
|
|
69
|
+
= (d:DotNode link:(CustomFunction / Function / SymbolIdentifier) { return [d, link] })
|
|
70
|
+
/ @LiteralIdentifier
|
|
71
|
+
|
|
72
|
+
DotNode
|
|
73
|
+
= '.' { return { type: 'dot', start: location().start.offset, end: location().end.offset } }
|
|
74
|
+
|
|
75
|
+
CustomFunction
|
|
76
|
+
= '@' name:[a-z0-9_-]i+ po:ParenOpen _ params:Parameters? _ pc:ParenClose
|
|
77
|
+
{ return { type: 'custom_function', name: name.join(''),
|
|
78
|
+
children: [po, ...(params || []), pc],
|
|
79
|
+
start: location().start.offset, end: location().end.offset } }
|
|
80
|
+
/ '@' name:[a-z0-9_-]i+ po:ParenOpen _ params:Parameters _ &{ return options.strict !== true; }
|
|
81
|
+
{
|
|
82
|
+
const s = location().start.offset;
|
|
83
|
+
const e = location().end.offset;
|
|
84
|
+
return { type: 'custom_function', name: name.join(''), start: s, end: e,
|
|
85
|
+
children: [po, ...params.map(p => ({ ...p, end: e })),
|
|
86
|
+
mkError(e, e, 'unclosedFunctionParen', { wip: true })] };
|
|
87
|
+
}
|
|
88
|
+
/ '@' name:[a-z0-9_-]i+ po:ParenOpen _ &{ return options.strict !== true; }
|
|
89
|
+
{
|
|
90
|
+
const e = location().end.offset;
|
|
91
|
+
return { type: 'custom_function', name: name.join(''),
|
|
92
|
+
start: location().start.offset, end: e,
|
|
93
|
+
children: [po, mkError(e, e, 'unclosedFunctionParen', { wip: true })] };
|
|
94
|
+
}
|
|
95
|
+
/ '@' name:[a-z0-9_-]i+
|
|
96
|
+
{ return { type: 'custom_function', name: name.join(''), children: [],
|
|
97
|
+
start: location().start.offset, end: location().end.offset } }
|
|
98
|
+
|
|
99
|
+
Function
|
|
100
|
+
= id:SymbolIdentifier po:ParenOpen _ params:Parameters? _ pc:ParenClose
|
|
101
|
+
{ return { type: 'function', name: id.name,
|
|
102
|
+
children: [po, ...(params || []), pc],
|
|
103
|
+
start: location().start.offset, end: location().end.offset } }
|
|
104
|
+
/ id:SymbolIdentifier po:ParenOpen _ params:Parameters _ "," _ &{ return options.strict !== true; }
|
|
105
|
+
{
|
|
106
|
+
const s = location().start.offset;
|
|
107
|
+
const e = location().end.offset;
|
|
108
|
+
if (params.length === 0) {
|
|
109
|
+
return { type: 'function', name: id.name, start: s, end: e,
|
|
110
|
+
children: [po, mkError(po.end, e, 'emptyFunctionParam')] };
|
|
111
|
+
}
|
|
112
|
+
return { type: 'function', name: id.name, start: s, end: e,
|
|
113
|
+
children: [po, ...params.map(p => ({ ...p, end: e })),
|
|
114
|
+
mkError(po.end, e, 'trailingFunctionComma', { wip: true })] };
|
|
115
|
+
}
|
|
116
|
+
/ id:SymbolIdentifier po:ParenOpen _ ic:InvalidParamContent _ pc:ParenClose &{ return options.strict !== true; }
|
|
117
|
+
{
|
|
118
|
+
return { type: 'function', name: id.name,
|
|
119
|
+
start: location().start.offset, end: location().end.offset,
|
|
120
|
+
children: [po, ic, pc] };
|
|
121
|
+
}
|
|
122
|
+
/ id:SymbolIdentifier po:ParenOpen !. &{ return options.strict !== true; }
|
|
123
|
+
{
|
|
124
|
+
return { type: 'function', name: id.name,
|
|
125
|
+
start: location().start.offset, end: location().end.offset,
|
|
126
|
+
children: [po, mkError(po.end, po.end, 'unclosedFunctionParen', { wip: true })] };
|
|
127
|
+
}
|
|
128
|
+
/ id:SymbolIdentifier po:ParenOpen _ params:Parameters _ &{ return options.strict !== true; }
|
|
129
|
+
{
|
|
130
|
+
const s = location().start.offset;
|
|
131
|
+
const e = location().end.offset;
|
|
132
|
+
return { type: 'function', name: id.name, start: s, end: e,
|
|
133
|
+
children: [po, ...params.map(p => ({ ...p, end: e })),
|
|
134
|
+
mkError(e, e, 'unclosedFunctionParen', { wip: true })] };
|
|
135
|
+
}
|
|
136
|
+
/ id:SymbolIdentifier po:ParenOpen _ &{ return options.strict !== true; }
|
|
137
|
+
{
|
|
138
|
+
const e = location().end.offset;
|
|
139
|
+
return { type: 'function', name: id.name,
|
|
140
|
+
start: location().start.offset, end: e,
|
|
141
|
+
children: [po, mkError(e, e, 'unclosedFunctionParen', { wip: true })] };
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
InvalidParamContent
|
|
145
|
+
= (!ParenClose .)+ {
|
|
146
|
+
return mkError(location().start.offset, location().end.offset, 'invalidMethodChainSyntax');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
ParenOpen
|
|
150
|
+
= '(' { return { type: 'paren_open', start: location().start.offset, end: location().end.offset } }
|
|
151
|
+
|
|
152
|
+
ParenClose
|
|
153
|
+
= ')' { return { type: 'paren_close', start: location().start.offset, end: location().end.offset } }
|
|
154
|
+
|
|
155
|
+
Parameters
|
|
156
|
+
= Parameter|.., _ ',' _|
|
|
157
|
+
|
|
158
|
+
// Chain is only attempted when the input starts with a valid chain character
|
|
159
|
+
// (SymbolIdentifier first char, @, or [). This ensures non-identifier content
|
|
160
|
+
// (e.g. bare digits) falls through to InvalidParamContent rather than being
|
|
161
|
+
// wrapped in a Chain containing an error node.
|
|
162
|
+
Parameter
|
|
163
|
+
= (str:String { return { type: 'string', value: str, start: location().start.offset, end: location().end.offset}})
|
|
164
|
+
/ (num:Number { return { type: 'number', value: num, start: location().start.offset, end: location().end.offset}})
|
|
165
|
+
/ Array
|
|
166
|
+
/ &(SymbolIdentifier / "@" / LiteralIdentifier) chain:Chain { return chain; }
|
|
167
|
+
|
|
168
|
+
LiteralIdentifier
|
|
169
|
+
= '[' id:NonEmptyString ']' { return { type: 'identifier', name: id,
|
|
170
|
+
start: location().start.offset, end: location().end.offset } }
|
|
171
|
+
|
|
172
|
+
SymbolIdentifier
|
|
173
|
+
= first:[a-zA-Z0-9_] rest:[a-zA-Z0-9_-]* { return { type: 'identifier', name: first + rest.join(''),
|
|
174
|
+
start: location().start.offset, end: location().end.offset } }
|
|
175
|
+
|
|
176
|
+
NonEmptyString
|
|
177
|
+
= "'" chars:StringChar+ "'" { return chars.join('') }
|
|
178
|
+
|
|
179
|
+
String
|
|
180
|
+
= "'" chars:StringChar* "'" { return chars.join('') }
|
|
181
|
+
|
|
182
|
+
Array
|
|
183
|
+
= '[' _ items:ArrayItems? _ ']' {
|
|
184
|
+
return {
|
|
185
|
+
type: 'array',
|
|
186
|
+
children: items || [],
|
|
187
|
+
start: location().start.offset,
|
|
188
|
+
end: location().end.offset
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
ArrayItems
|
|
193
|
+
= ArrayItem|.., _ ',' _|
|
|
194
|
+
|
|
195
|
+
ArrayItem
|
|
196
|
+
= (str:String { return { type: 'string', value: str}})
|
|
197
|
+
/ (num:Number { return { type: 'number', value: num}})
|
|
198
|
+
|
|
199
|
+
StringChar
|
|
200
|
+
= !(Quote / "\\") char:. { return char }
|
|
201
|
+
/ "\\" char:Escapables { return char }
|
|
202
|
+
|
|
203
|
+
Number
|
|
204
|
+
= _ '#'[0-9]+(Dot[0-9]+)? { return parseFloat(text().substr(1)) }
|
|
205
|
+
|
|
206
|
+
Escapables
|
|
207
|
+
= Escape / Quote
|
|
208
|
+
|
|
209
|
+
Escape
|
|
210
|
+
= '\\'
|
|
211
|
+
|
|
212
|
+
Dot
|
|
213
|
+
= '.'
|
|
214
|
+
|
|
215
|
+
Quote
|
|
216
|
+
= "'"
|
|
217
|
+
|
|
218
|
+
_ "whitespace"
|
|
219
|
+
= [ \t\n\r]*
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ===========================================================================
|
|
3
|
+
* Run bin/smart_text_input_parser/generate.sh after making change
|
|
4
|
+
* See parser.js in this directory for generated output
|
|
5
|
+
* ===========================================================================
|
|
6
|
+
*
|
|
7
|
+
* SmartTextInput grammar — superset of the method chain grammar.
|
|
8
|
+
*
|
|
9
|
+
* Imports the method chain parser's Chain rule and adds:
|
|
10
|
+
* - {{...}} Handlebars delimiter handling
|
|
11
|
+
* - ${...} Code delimiter handling
|
|
12
|
+
* - Top-level text handling (catch-all Text rule)
|
|
13
|
+
*
|
|
14
|
+
* Two start rules:
|
|
15
|
+
* - Root (default) — for interpolation mode: value may contain {{...}}, ${...}, and text
|
|
16
|
+
* - ChainRoot — for method-chain mode: the entire value is one Chain expression
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import Chain from "../method-chain/parser.js"
|
|
20
|
+
|
|
21
|
+
{{
|
|
22
|
+
function mkNode(type, start, end, children) {
|
|
23
|
+
return { type, start, end, children: children || [] };
|
|
24
|
+
}
|
|
25
|
+
function mkError(start, end, kind, extra) {
|
|
26
|
+
return { type: 'error', start, end, ...(kind ? { kind } : {}), ...(extra || {}) };
|
|
27
|
+
}
|
|
28
|
+
function hasErrors(node) {
|
|
29
|
+
if (!node || typeof node !== 'object') return false;
|
|
30
|
+
if (node.type === 'error') return true;
|
|
31
|
+
const children = node.children || [];
|
|
32
|
+
return children.some(hasErrors);
|
|
33
|
+
}
|
|
34
|
+
}}
|
|
35
|
+
|
|
36
|
+
// Default start rule: interpolation mode.
|
|
37
|
+
Root
|
|
38
|
+
= children:TopLevel* {
|
|
39
|
+
const node = mkNode('root', 0, input.length, children);
|
|
40
|
+
if (options.strict === true && hasErrors(node)) { error('Invalid expression'); }
|
|
41
|
+
return node;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Method-chain start rule: the entire value is a Chain expression.
|
|
45
|
+
// Chain (with strict:false option) returns an AST with error nodes for invalid input.
|
|
46
|
+
ChainRoot
|
|
47
|
+
= chain:Chain {
|
|
48
|
+
return mkNode('root', 0, input.length, [chain]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
TopLevel
|
|
52
|
+
= &{ return !!options.allowHandlebars } node:Handlebars { return node; }
|
|
53
|
+
/ &{ return !!options.allowCode } node:Code { return node; }
|
|
54
|
+
/ Text
|
|
55
|
+
|
|
56
|
+
// ---- Handlebars: {{chain}} ----
|
|
57
|
+
// Uses imported Chain (full workflow syntax with functions/params) inside delimiters.
|
|
58
|
+
// Chain with strict:false returns error-node ASTs instead of throwing, so both
|
|
59
|
+
// the closed and unclosed forms just need two alternatives.
|
|
60
|
+
|
|
61
|
+
Handlebars
|
|
62
|
+
= "{{" chain:Chain "}}" {
|
|
63
|
+
const s = location().start.offset;
|
|
64
|
+
const e = location().end.offset;
|
|
65
|
+
return mkNode('handlebars', s, e, [
|
|
66
|
+
mkNode('hb_open', s, s + 2),
|
|
67
|
+
chain,
|
|
68
|
+
mkNode('hb_close', e - 2, e),
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
/ "{{" chain:Chain {
|
|
72
|
+
const s = location().start.offset;
|
|
73
|
+
const e = location().end.offset;
|
|
74
|
+
return mkNode('handlebars', s, e, [
|
|
75
|
+
mkNode('hb_open', s, s + 2),
|
|
76
|
+
chain,
|
|
77
|
+
mkError(e, e, 'unclosedHandlebars'),
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
/ "{{" "}}" {
|
|
81
|
+
const s = location().start.offset;
|
|
82
|
+
const e = location().end.offset;
|
|
83
|
+
return mkNode('handlebars', s, e, [
|
|
84
|
+
mkNode('hb_open', s, s + 2),
|
|
85
|
+
mkError(s + 2, s + 2, 'emptyHandlebars'),
|
|
86
|
+
mkNode('hb_close', e - 2, e),
|
|
87
|
+
]);
|
|
88
|
+
}
|
|
89
|
+
/ "{{" {
|
|
90
|
+
const s = location().start.offset;
|
|
91
|
+
const e = location().end.offset;
|
|
92
|
+
return mkNode('handlebars', s, e, [
|
|
93
|
+
mkNode('hb_open', s, s + 2),
|
|
94
|
+
mkError(e, e, 'unclosedHandlebars'),
|
|
95
|
+
]);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ---- Code: ${...} ----
|
|
99
|
+
// Treats content inside ${...} as opaque text rather than a chain expression.
|
|
100
|
+
// The inner content is emitted as a single code node regardless of what is typed.
|
|
101
|
+
// Closed form (with matching close brace) and open-ended form (unclosed) are both handled.
|
|
102
|
+
|
|
103
|
+
Code
|
|
104
|
+
= "${" CodeContent "}" {
|
|
105
|
+
const s = location().start.offset;
|
|
106
|
+
const e = location().end.offset;
|
|
107
|
+
return mkNode('code', s, e, [
|
|
108
|
+
mkNode('code_open', s, s + 2),
|
|
109
|
+
{ type: 'code', start: s + 2, end: e - 1 },
|
|
110
|
+
mkNode('code_close', e - 1, e),
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
/ "${" CodeContent {
|
|
114
|
+
const s = location().start.offset;
|
|
115
|
+
const e = location().end.offset;
|
|
116
|
+
return mkNode('code', s, e, [
|
|
117
|
+
mkNode('code_open', s, s + 2),
|
|
118
|
+
{ type: 'code', start: s + 2, end: e },
|
|
119
|
+
]);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Content inside ${...}: any characters that are not a new delimiter start or the closing brace.
|
|
123
|
+
CodeContent = (!("${" / "}" / "{{") .)*
|
|
124
|
+
|
|
125
|
+
// ---- Primitives ----
|
|
126
|
+
|
|
127
|
+
DotNode
|
|
128
|
+
= "." {
|
|
129
|
+
return { type: 'dot', start: location().start.offset, end: location().end.offset };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Optional whitespace (spaces and tabs only).
|
|
133
|
+
_ = [ \t]*
|
|
134
|
+
|
|
135
|
+
// Plain text: any run of characters. Stops at {{...}} or ${...} only when the
|
|
136
|
+
// corresponding expression type is enabled (allowHandlebars / allowCode options).
|
|
137
|
+
Text
|
|
138
|
+
= chars:TextChar+ {
|
|
139
|
+
const s = location().start.offset;
|
|
140
|
+
const e = location().end.offset;
|
|
141
|
+
return mkNode('text', s, e);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// A single character that is not the start of an enabled expression delimiter.
|
|
145
|
+
TextChar
|
|
146
|
+
= !(EnabledHandlebarsStart / EnabledCodeStart) .
|
|
147
|
+
|
|
148
|
+
// Matches "{{" only when handlebars expressions are enabled.
|
|
149
|
+
EnabledHandlebarsStart
|
|
150
|
+
= &{ return !!options.allowHandlebars } "{{"
|
|
151
|
+
|
|
152
|
+
// Matches "${" only when code expressions are enabled.
|
|
153
|
+
EnabledCodeStart
|
|
154
|
+
= &{ return !!options.allowCode } "${"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Spinner } from "../../Spinner-
|
|
1
|
+
import { t as Spinner } from "../../Spinner-Dpw3-3JS.mjs";
|
|
2
2
|
export { Spinner, Spinner as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TabContainer, i as TabBar, n as StyledTab, r as Tab, t as TabBarIconButton_default } from "../../TabBar-
|
|
1
|
+
import { a as TabContainer, i as TabBar, n as StyledTab, r as Tab, t as TabBarIconButton_default } from "../../TabBar-Dw3xE_B-.mjs";
|
|
2
2
|
export { StyledTab, Tab, TabBar, TabBar as default, TabBarIconButton_default as TabBarIconButton, TabContainer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as StickyTH, c as TableCellTitle, d as TableTR, f as TableTH, h as Table, i as StickyTD, l as TableIconTD, m as TableHeaderCell, n as TableBody, o as TableActionTD, p as TableRow, r as TableHead, s as TableCell, t as TableLayout, u as TableTD } from "../../Table-
|
|
1
|
+
import { a as StickyTH, c as TableCellTitle, d as TableTR, f as TableTH, h as Table, i as StickyTD, l as TableIconTD, m as TableHeaderCell, n as TableBody, o as TableActionTD, p as TableRow, r as TableHead, s as TableCell, t as TableLayout, u as TableTD } from "../../Table-ELLvSvH4.mjs";
|
|
2
2
|
export { StickyTD, StickyTH, Table, Table as default, TableActionTD, TableBody, TableCell, TableCellTitle, TableHead, TableHeaderCell, TableIconTD, TableLayout, TableRow, TableTD, TableTH, TableTR };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as DragDirection } from "../../useTableBoxDragAndDrop-DkCxC7Mi.mjs";
|
|
2
|
-
import { a as TableBox, o as TableBoxContext, r as InlineEditConfig, s as TableBoxProps } from "../../TableBoxCell-
|
|
2
|
+
import { a as TableBox, o as TableBoxContext, r as InlineEditConfig, s as TableBoxProps } from "../../TableBoxCell-xnzuHPV1.mjs";
|
|
3
3
|
export { DragDirection, InlineEditConfig, TableBoxContext, TableBoxProps, TableBox as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TableBoxContext, t as TableBox } from "../../TableBox-
|
|
1
|
+
import { n as TableBoxContext, t as TableBox } from "../../TableBox-CCfha6G2.mjs";
|
|
2
2
|
export { TableBoxContext, TableBox as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TechnicalSticker } from "../../TechnicalSticker-
|
|
1
|
+
import { t as TechnicalSticker } from "../../TechnicalSticker-CLbNA0kp.mjs";
|
|
2
2
|
export { TechnicalSticker, TechnicalSticker as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextAreaWithStyle } from "../../TextArea-
|
|
1
|
+
import { t as TextAreaWithStyle } from "../../TextArea-oAK1DKId.mjs";
|
|
2
2
|
export { TextAreaWithStyle as TextArea, TextAreaWithStyle as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Toggle } from "../../Toggle-
|
|
1
|
+
import { t as Toggle } from "../../Toggle-DZzirZ8p.mjs";
|
|
2
2
|
export { Toggle, Toggle as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as ComboboxOptionsOrGroups } from "./ComboboxBase-
|
|
1
|
+
import { o as ComboboxOptionsOrGroups } from "./ComboboxBase-DBLJYQrh.mjs";
|
|
2
2
|
import { t as FieldRegistry } from "./FieldRegistry-BslyuPZw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region components/DataTable/TableControls/FiltersV2/fieldPickerOptions.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ListBoxItemProps, r as ListBoxProps } from "./ListBox-
|
|
2
|
-
import { n as LogicRowProps } from "./LogicRow-
|
|
1
|
+
import { n as ListBoxItemProps, r as ListBoxProps } from "./ListBox-Awtw7Xy_.mjs";
|
|
2
|
+
import { n as LogicRowProps } from "./LogicRow-DIn0gLEq.mjs";
|
|
3
3
|
import * as _$react from "react";
|
|
4
4
|
import * as _$react_aria_components0 from "react-aria-components";
|
|
5
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -52,4 +52,4 @@ declare const ListBox: {
|
|
|
52
52
|
};
|
|
53
53
|
//#endregion
|
|
54
54
|
export { ListBox as t };
|
|
55
|
-
//# sourceMappingURL=index-
|
|
55
|
+
//# sourceMappingURL=index-CBWvk6Ch.d.mts.map
|
package/dist/inputFields.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as CheckboxProps } from "./Checkbox-DRJXDs2T.mjs";
|
|
2
|
-
import { n as ComboboxMultiSelectProps } from "./ComboboxMultiSelect-
|
|
3
|
-
import { n as ComboboxSingleSelectProps } from "./ComboboxSingleSelect-
|
|
2
|
+
import { n as ComboboxMultiSelectProps } from "./ComboboxMultiSelect-CZRLyM_y.mjs";
|
|
3
|
+
import { n as ComboboxSingleSelectProps } from "./ComboboxSingleSelect-BS6pZpU_.mjs";
|
|
4
4
|
import { n as FormFieldBaseProps } from "./FormField-CZXKvCGt.mjs";
|
|
5
5
|
import { a as InputProps } from "./Input-Diztxhle.mjs";
|
|
6
6
|
import { n as RadioGroupProps } from "./RadioGroup-Dg_gydUp.mjs";
|
|
7
7
|
import { i as SegmentedControlProps } from "./SegmentedControl-BBIHKcvo.mjs";
|
|
8
|
-
import { i as SelectProps } from "./Select-
|
|
8
|
+
import { i as SelectProps } from "./Select-yPqzqe5k.mjs";
|
|
9
9
|
import { t as TextAreaProps } from "./TextArea-BxxXQSwP.mjs";
|
|
10
10
|
import { n as ToggleProps } from "./Toggle-BmUl78kH.mjs";
|
|
11
11
|
import * as _$react from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intersperse-
|
|
1
|
+
{"version":3,"file":"intersperse-vOYvFOfF.mjs","names":[],"sources":["../lib/intersperse.ts"],"sourcesContent":["/**\n * @name intersperse\n *\n * Inserts an element between array items using a separator function. The\n * separator function is passed the previous index, the previous element, and\n * the next element.\n *\n * ```typescript\n * const nodeList: React.ReactNode[] = [...]\n * const commaSeparatedList = intersperse(nodeList, () => ', ')\n * const advancedSeparatedList = intersperse(nodeList, i => <Separator key={i}/>)\n * ```\n */\nexport function intersperse<T>(arr: T[], separator: (n: number, prev: T, curr: T) => T): T[] {\n return arr.flatMap((a, i) => (i > 0 ? [separator(i - 1, arr[i - 1], a), a] : [a]));\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,YAAe,KAAU,WAAoD;AAC3F,QAAO,IAAI,SAAS,GAAG,MAAO,IAAI,IAAI,CAAC,UAAU,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
//#region lib/useModalInsetRight.ts
|
|
3
|
+
const CSS_VAR = "--modal-inset-right";
|
|
4
|
+
const SIDEBAR_OPEN_TRANSITION_MS = 425;
|
|
5
|
+
const SIDEBAR_CLOSE_TRANSITION_MS = 200;
|
|
6
|
+
const getModalInsetRight = () => getComputedStyle(document.documentElement).getPropertyValue(CSS_VAR).trim() || "0px";
|
|
7
|
+
const prefersReducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the current value of --modal-inset-right from :root, reactively updating
|
|
10
|
+
* as the agents side panel animates open/closed or is resized. Also tracks whether
|
|
11
|
+
* the panel is opening, open, closing, or closed.
|
|
12
|
+
*
|
|
13
|
+
* panelState stays 'opening'/'closing' for the full transition duration so that
|
|
14
|
+
* CSS transitions on consumers have time to animate.
|
|
15
|
+
*/
|
|
16
|
+
const useModalInsetRight = () => {
|
|
17
|
+
const [insetRight, setInsetRight] = useState(getModalInsetRight);
|
|
18
|
+
const [panelState, setPanelState] = useState(() => getModalInsetRight() !== "0px" ? "open" : "closed");
|
|
19
|
+
const prevInsetRight = useRef(getModalInsetRight());
|
|
20
|
+
const transitionTimerRef = useRef(null);
|
|
21
|
+
const rafRef = useRef(null);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const observer = new MutationObserver(() => {
|
|
24
|
+
const prev = prevInsetRight.current;
|
|
25
|
+
const next = getModalInsetRight();
|
|
26
|
+
prevInsetRight.current = next;
|
|
27
|
+
if (prev === "0px" && next !== "0px") if (prefersReducedMotion()) {
|
|
28
|
+
setInsetRight(next);
|
|
29
|
+
setPanelState("open");
|
|
30
|
+
} else {
|
|
31
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
32
|
+
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
33
|
+
setInsetRight("0px");
|
|
34
|
+
setPanelState("opening");
|
|
35
|
+
rafRef.current = requestAnimationFrame(() => setInsetRight(next));
|
|
36
|
+
transitionTimerRef.current = setTimeout(() => setPanelState("open"), 425);
|
|
37
|
+
}
|
|
38
|
+
else if (prev !== "0px" && next === "0px") if (prefersReducedMotion()) {
|
|
39
|
+
setInsetRight("0px");
|
|
40
|
+
setPanelState("closed");
|
|
41
|
+
} else {
|
|
42
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
43
|
+
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
44
|
+
setInsetRight(prev);
|
|
45
|
+
setPanelState("closing");
|
|
46
|
+
rafRef.current = requestAnimationFrame(() => setInsetRight("0px"));
|
|
47
|
+
transitionTimerRef.current = setTimeout(() => setPanelState("closed"), 200);
|
|
48
|
+
}
|
|
49
|
+
else setInsetRight(next);
|
|
50
|
+
});
|
|
51
|
+
observer.observe(document.documentElement, {
|
|
52
|
+
attributes: true,
|
|
53
|
+
attributeFilter: ["style"]
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
observer.disconnect();
|
|
57
|
+
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
58
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
59
|
+
};
|
|
60
|
+
}, []);
|
|
61
|
+
return {
|
|
62
|
+
insetRight,
|
|
63
|
+
panelState
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { SIDEBAR_CLOSE_TRANSITION_MS, SIDEBAR_OPEN_TRANSITION_MS, useModalInsetRight as default };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=useModalInsetRight.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModalInsetRight.mjs","names":[],"sources":["../../lib/useModalInsetRight.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nconst CSS_VAR = '--modal-inset-right';\n\n// Match AgentsPanel sidebar transition durations\nexport const SIDEBAR_OPEN_TRANSITION_MS = 425;\nexport const SIDEBAR_CLOSE_TRANSITION_MS = 200;\n\nconst getModalInsetRight = () =>\n getComputedStyle(document.documentElement).getPropertyValue(CSS_VAR).trim() || '0px';\n\nconst prefersReducedMotion = () =>\n typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\nexport type PanelInsetState = 'closed' | 'opening' | 'open' | 'closing';\n\nexport interface ModalInsetRight {\n /** Animated inset value — starts at 0px on panel open so CSS transition fires */\n insetRight: string;\n panelState: PanelInsetState;\n}\n\n/**\n * Returns the current value of --modal-inset-right from :root, reactively updating\n * as the agents side panel animates open/closed or is resized. Also tracks whether\n * the panel is opening, open, closing, or closed.\n *\n * panelState stays 'opening'/'closing' for the full transition duration so that\n * CSS transitions on consumers have time to animate.\n */\nconst useModalInsetRight = (): ModalInsetRight => {\n const [insetRight, setInsetRight] = useState(getModalInsetRight);\n const [panelState, setPanelState] = useState<PanelInsetState>(() =>\n getModalInsetRight() !== '0px' ? 'open' : 'closed',\n );\n const prevInsetRight = useRef(getModalInsetRight());\n const transitionTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const rafRef = useRef<number | null>(null);\n\n useEffect(() => {\n const observer = new MutationObserver(() => {\n const prev = prevInsetRight.current;\n const next = getModalInsetRight();\n prevInsetRight.current = next;\n\n if (prev === '0px' && next !== '0px') {\n if (prefersReducedMotion()) {\n setInsetRight(next);\n setPanelState('open');\n } else {\n if (rafRef.current) {\n cancelAnimationFrame(rafRef.current);\n }\n if (transitionTimerRef.current) {\n clearTimeout(transitionTimerRef.current);\n }\n setInsetRight('0px');\n setPanelState('opening');\n rafRef.current = requestAnimationFrame(() => setInsetRight(next));\n transitionTimerRef.current = setTimeout(\n () => setPanelState('open'),\n SIDEBAR_OPEN_TRANSITION_MS,\n );\n }\n } else if (prev !== '0px' && next === '0px') {\n if (prefersReducedMotion()) {\n setInsetRight('0px');\n setPanelState('closed');\n } else {\n if (rafRef.current) {\n cancelAnimationFrame(rafRef.current);\n }\n if (transitionTimerRef.current) {\n clearTimeout(transitionTimerRef.current);\n }\n setInsetRight(prev);\n setPanelState('closing');\n rafRef.current = requestAnimationFrame(() => setInsetRight('0px'));\n transitionTimerRef.current = setTimeout(\n () => setPanelState('closed'),\n SIDEBAR_CLOSE_TRANSITION_MS,\n );\n }\n } else {\n setInsetRight(next);\n }\n });\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['style'],\n });\n\n return () => {\n observer.disconnect();\n if (transitionTimerRef.current) {\n clearTimeout(transitionTimerRef.current);\n }\n if (rafRef.current) {\n cancelAnimationFrame(rafRef.current);\n }\n };\n }, []);\n\n return { insetRight, panelState };\n};\n\nexport default useModalInsetRight;\n"],"mappings":";;AAEA,MAAM,UAAU;AAGhB,MAAa,6BAA6B;AAC1C,MAAa,8BAA8B;AAE3C,MAAM,2BACJ,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,QAAQ,CAAC,MAAM,IAAI;AAEjF,MAAM,6BACJ,OAAO,WAAW,eAAe,OAAO,WAAW,mCAAmC,CAAC;;;;;;;;;AAkBzF,MAAM,2BAA4C;CAChD,MAAM,CAAC,YAAY,iBAAiB,SAAS,mBAAmB;CAChE,MAAM,CAAC,YAAY,iBAAiB,eAClC,oBAAoB,KAAK,QAAQ,SAAS,SAC3C;CACD,MAAM,iBAAiB,OAAO,oBAAoB,CAAC;CACnD,MAAM,qBAAqB,OAA6C,KAAK;CAC7E,MAAM,SAAS,OAAsB,KAAK;AAE1C,iBAAgB;EACd,MAAM,WAAW,IAAI,uBAAuB;GAC1C,MAAM,OAAO,eAAe;GAC5B,MAAM,OAAO,oBAAoB;AACjC,kBAAe,UAAU;AAEzB,OAAI,SAAS,SAAS,SAAS,MAC7B,KAAI,sBAAsB,EAAE;AAC1B,kBAAc,KAAK;AACnB,kBAAc,OAAO;UAChB;AACL,QAAI,OAAO,QACT,sBAAqB,OAAO,QAAQ;AAEtC,QAAI,mBAAmB,QACrB,cAAa,mBAAmB,QAAQ;AAE1C,kBAAc,MAAM;AACpB,kBAAc,UAAU;AACxB,WAAO,UAAU,4BAA4B,cAAc,KAAK,CAAC;AACjE,uBAAmB,UAAU,iBACrB,cAAc,OAAO,EAAA,IAE5B;;YAEM,SAAS,SAAS,SAAS,MACpC,KAAI,sBAAsB,EAAE;AAC1B,kBAAc,MAAM;AACpB,kBAAc,SAAS;UAClB;AACL,QAAI,OAAO,QACT,sBAAqB,OAAO,QAAQ;AAEtC,QAAI,mBAAmB,QACrB,cAAa,mBAAmB,QAAQ;AAE1C,kBAAc,KAAK;AACnB,kBAAc,UAAU;AACxB,WAAO,UAAU,4BAA4B,cAAc,MAAM,CAAC;AAClE,uBAAmB,UAAU,iBACrB,cAAc,SAAS,EAAA,IAE9B;;OAGH,eAAc,KAAK;IAErB;AAEF,WAAS,QAAQ,SAAS,iBAAiB;GACzC,YAAY;GACZ,iBAAiB,CAAC,QAAQ;GAC3B,CAAC;AAEF,eAAa;AACX,YAAS,YAAY;AACrB,OAAI,mBAAmB,QACrB,cAAa,mBAAmB,QAAQ;AAE1C,OAAI,OAAO,QACT,sBAAqB,OAAO,QAAQ;;IAGvC,EAAE,CAAC;AAEN,QAAO;EAAE;EAAY;EAAY"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
2
|
import { n as Stack, t as HStack } from "../../Stack-BqQndGI9.mjs";
|
|
3
|
-
import { t as LoadingShimmer } from "../../LoadingShimmer-
|
|
4
|
-
import { t as Card_default } from "../../CardV2-
|
|
5
|
-
import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-
|
|
6
|
-
import { n as PageHeaderContainer } from "../../PageHeader-
|
|
3
|
+
import { t as LoadingShimmer } from "../../LoadingShimmer-ZyzJs5Vi.mjs";
|
|
4
|
+
import { t as Card_default } from "../../CardV2-CBjhsfrn.mjs";
|
|
5
|
+
import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-ELLvSvH4.mjs";
|
|
6
|
+
import { n as PageHeaderContainer } from "../../PageHeader-UI_6yImi.mjs";
|
|
7
7
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region patterns/containers.tsx
|