@stealthscale/component-disclosure 0.2.3 → 0.2.4
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/cyclonedx/bom.json +1 -1
- package/dist/index.js +1 -5423
- package/dist/pages/accordion/accordion.js +512 -0
- package/dist/pages/accordion/accordion.props.js +3 -0
- package/dist/pages/collapsible/collapsible.js +173 -0
- package/dist/pages/collapsible/collapsible.props.js +3 -0
- package/dist/pages/details/details.js +281 -0
- package/dist/pages/details/details.props.js +3 -0
- package/dist/pages/hover-card/hover-card.js +552 -0
- package/dist/pages/hover-card/hover-card.props.js +3 -0
- package/dist/pages/menu/menu.js +1103 -0
- package/dist/pages/menu/menu.props.js +3 -0
- package/dist/pages/menubar/menubar.js +1181 -0
- package/dist/pages/menubar/menubar.props.js +3 -0
- package/dist/pages/pages.json +138 -0
- package/dist/pages/popover/popover.js +161 -0
- package/dist/pages/popover/popover.props.js +3 -0
- package/dist/pages/steps/steps.js +660 -0
- package/dist/pages/steps/steps.props.js +3 -0
- package/dist/pages/tabs/tabs.js +815 -0
- package/dist/pages/tabs/tabs.props.js +3 -0
- package/dist/pages/toggle-tip/toggle-tip.js +344 -0
- package/dist/pages/toggle-tip/toggle-tip.props.js +3 -0
- package/dist/pages/tooltip/tooltip.js +112 -0
- package/dist/pages/tooltip/tooltip.props.js +3 -0
- package/dist/pages/truncate/truncate.js +235 -0
- package/dist/pages/truncate/truncate.props.js +3 -0
- package/dist/shared-Cfsikh3X.js +5424 -0
- package/dist/theme.js +1 -1
- package/locales/en/specimen/accordion.json +130 -0
- package/locales/en/specimen/collapsible.json +27 -0
- package/locales/en/specimen/details.json +48 -0
- package/locales/en/specimen/hover-card.json +58 -0
- package/locales/en/specimen/menu.json +81 -0
- package/locales/en/specimen/menubar.json +108 -0
- package/locales/en/specimen/popover.json +16 -0
- package/locales/en/specimen/steps.json +86 -0
- package/locales/en/specimen/tabs.json +108 -0
- package/locales/en/specimen/toggle-tip.json +47 -0
- package/locales/en/specimen/tooltip.json +14 -0
- package/locales/en/specimen/truncate.json +31 -0
- package/package.json +9 -8
- /package/dist/{recipe-95yCB2V3.js → recipes-95yCB2V3.js} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"ContentProps": {"conditions": 284, "foreign": 1040}, "MenuProps": {"conditions": 284, "foreign": 1036}, "RootProps": {"conditions": 284, "foreign": 1037}, "TriggerProps": {"conditions": 0, "foreign": 0}};
|
|
2
|
+
export const parts = {"ContentProps": [], "MenuProps": [{"accepts": "Point | null", "fallback": "", "kind": "option", "name": "anchorPoint", "refers": ["rect-utils.Point"], "required": false, "says": "The positioning point for the menu. Can be set by the context menu trigger or the button trigger."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "aria-label", "refers": [], "required": false, "says": "The accessibility label for the menu"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "closeOnSelect", "refers": [], "required": false, "says": "Whether to close the menu when an option is selected"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "composite", "refers": [], "required": false, "says": "Whether the menu is a composed with other composite widgets like a combobox or tabs"}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "defaultHighlightedValue", "refers": [], "required": false, "says": "The initial highlighted value of the menu item when rendered. Use when you don't need to control the highlighted value of the menu item."}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "defaultTriggerValue", "refers": [], "required": false, "says": "The initial trigger value when rendered. Use when you don't need to control the trigger value."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "Highlight", "fallback": "", "kind": "variant", "name": "highlight", "refers": ["kit.Highlight"], "required": false, "says": "Look of the highlighted row."}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "highlightedValue", "refers": [], "required": false, "says": "The controlled highlighted value of the menu item."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ElementIds", "fallback": "", "kind": "option", "name": "ids", "refers": ["menu.ElementIds"], "required": false, "says": "The ids of the elements in the menu. Useful for composition."}, {"accepts": "boolean", "fallback": "", "kind": "variant", "name": "inset", "refers": [], "required": false, "says": "Whether a row without a leading icon or mark starts its text after the gutter an icon takes, for a menu where some rows lead with an icon."}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "lazyMount", "refers": [], "required": false, "says": "When true, the overlay renders no content until it first opens."}, {"accepts": "boolean", "fallback": "false", "kind": "option", "name": "loopFocus", "refers": [], "required": false, "says": "Whether to loop the keyboard navigation."}, {"accepts": "((details: NavigateDetails) => void) | null", "fallback": "", "kind": "option", "name": "navigate", "refers": ["menu.NavigateDetails"], "required": false, "says": "Function to navigate to the selected item if it's an anchor element"}, {"accepts": "((event: KeyboardEvent) => void)", "fallback": "", "kind": "option", "name": "onEscapeKeyDown", "refers": [], "required": false, "says": "Function called when the escape key is pressed"}, {"accepts": "(() => void)", "fallback": "", "kind": "option", "name": "onExitComplete", "refers": [], "required": false, "says": "Runs once the content's exit animation ends."}, {"accepts": "((event: FocusOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onFocusOutside", "refers": ["interact-outside.EventDetails", "interact-outside.FocusOutsideEvent"], "required": false, "says": "Function called when the focus is moved outside the component"}, {"accepts": "((details: HighlightChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onHighlightChange", "refers": ["menu.HighlightChangeDetails"], "required": false, "says": "Function called when the highlighted menu item changes."}, {"accepts": "((event: InteractOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onInteractOutside", "refers": ["interact-outside.EventDetails", "interact-outside.FocusOutsideEvent", "interact-outside.InteractOutsideEvent", "interact-outside.PointerDownOutsideEvent"], "required": false, "says": "Function called when an interaction happens outside the component"}, {"accepts": "((event: PointerDownOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onPointerDownOutside", "refers": ["interact-outside.EventDetails", "interact-outside.PointerDownOutsideEvent"], "required": false, "says": "Function called when the pointer is pressed down outside the component"}, {"accepts": "((event: LayerDismissEvent) => void)", "fallback": "", "kind": "option", "name": "onRequestDismiss", "refers": ["dismissable.LayerDismissEvent", "dismissable.LayerDismissEventDetail"], "required": false, "says": "Function called when this layer is closed due to a parent layer being closed"}, {"accepts": "((details: SelectionDetails) => void)", "fallback": "", "kind": "option", "name": "onSelect", "refers": ["menu.SelectionDetails"], "required": false, "says": "Function called when a menu item is selected."}, {"accepts": "((details: TriggerValueChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onTriggerValueChange", "refers": ["menu.TriggerValueChangeDetails"], "required": false, "says": "Function called when the trigger value changes."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of the rows and the highlight, set on the panel, which a portalled panel keeps."}, {"accepts": "PositioningOptions", "fallback": "", "kind": "option", "name": "positioning", "refers": ["core.ComputePositionReturn", "dom.AutoUpdateOptions", "dom.VirtualElement", "popper.PositioningOptions", "utils.Placement"], "required": false, "says": "The options used to dynamically position the menu"}, {"accepts": "Scale", "fallback": "", "kind": "variant", "name": "size", "refers": ["kit.Scale"], "required": false, "says": "Size of the panel's padding, the rows, the marks and the keys."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "skipAnimationOnMount", "refers": [], "required": false, "says": "When true, content that is open on mount plays no entry animation."}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "triggerValue", "refers": [], "required": false, "says": "The controlled trigger value"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "typeahead", "refers": [], "required": false, "says": "Whether the pressing printable characters should trigger typeahead navigation"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "unmountOnExit", "refers": [], "required": false, "says": "When true, the overlay removes its content once the exit animation ends."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "value", "refers": [], "required": true, "says": "Value of the menu, which the bar reports while the menu is open."}, {"accepts": "\"elevated\" | \"glass\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": "Surface of the panel: the popover surface inside a hairline edge, the panel surface with a large shadow, or the glass layer style."}], "RootProps": [{"accepts": "string", "fallback": "", "kind": "option", "name": "aria-label", "refers": [], "required": true, "says": "Name of the bar, which a screen reader announces on reaching it."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "children", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Menus of the bar, each a `Menubar.Menu`."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "defaultValue", "refers": [], "required": false, "says": "Value of the menu open at mount."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "Writing direction of the bar and its menus. In `rtl` the bar runs from the right, the arrows along it swap, and a submenu opens to the left."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "fold", "refers": [], "required": false, "says": "Words of the trigger a crowded bar folds into. Defaults to `Menu`."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "foldIcon", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Glyph before the fold trigger's words."}, {"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "foldIndicator", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Glyph after the words of a row of the folded menu that opens a menu of the bar."}, {"accepts": "Highlight", "fallback": "", "kind": "variant", "name": "highlight", "refers": ["kit.Highlight"], "required": false, "says": "Look of the highlighted row."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "loop", "refers": [], "required": false, "says": "Whether a step past one end of the bar continues at the other. Defaults to true."}, {"accepts": "((details: ValueChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onValueChange", "refers": ["kit.ValueChangeDetails"], "required": false, "says": "Runs when another menu opens or every menu closes."}, {"accepts": "\"accent\" | \"error\" | \"info\" | \"neutral\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"", "fallback": "", "kind": "variant", "name": "palette", "refers": [], "required": false, "says": "Palette of the rows and the highlight, set on the panel, which a portalled panel keeps."}, {"accepts": "\"lg\" | \"md\" | \"sm\"", "fallback": "", "kind": "variant", "name": "size", "refers": [], "required": false, "says": "Padding and text of the names and the fold trigger, and the gap between the names."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "value", "refers": [], "required": false, "says": "Value of the open menu, where the caller keeps it. An empty string closes every menu."}, {"accepts": "\"elevated\" | \"glass\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": "Surface of the panel: the popover surface inside a hairline edge, the panel surface with a large shadow, or the glass layer style."}], "TriggerProps": [{"accepts": "ReactNode", "fallback": "", "kind": "option", "name": "children", "refers": ["react.ReactElement", "react.ReactPortal"], "required": false, "says": "Words of the name, after a leading icon where it has one."}]};
|
|
3
|
+
export const shapes = {"interact-outside.EventDetails": [{"accepts": "PointerEvent", "name": "originalEvent", "says": ""}, {"accepts": "boolean", "name": "contextmenu", "says": ""}, {"accepts": "boolean", "name": "focusable", "says": ""}, {"accepts": "EventTarget", "name": "target", "says": ""}], "interact-outside.PointerDownOutsideEvent": [{"accepts": "EventDetails<PointerEvent>", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: EventDetails<PointerEvent>) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "interact-outside.FocusOutsideEvent": [{"accepts": "EventDetails<FocusEvent>", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: EventDetails<FocusEvent>) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "interact-outside.InteractOutsideEvent": [{"accepts": "", "name": "FocusOutsideEvent", "says": ""}, {"accepts": "", "name": "PointerDownOutsideEvent", "says": ""}], "dismissable.LayerDismissEventDetail": [{"accepts": "HTMLElement", "name": "originalLayer", "says": ""}, {"accepts": "HTMLElement", "name": "targetLayer", "says": ""}, {"accepts": "number", "name": "originalIndex", "says": ""}, {"accepts": "number", "name": "targetIndex", "says": ""}], "dismissable.LayerDismissEvent": [{"accepts": "LayerDismissEventDetail", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: LayerDismissEventDetail) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "kit.Highlight": [{"accepts": "", "name": "\"bar\"", "says": ""}, {"accepts": "", "name": "\"fill\"", "says": ""}, {"accepts": "", "name": "\"tint\"", "says": ""}], "kit.Scale": [{"accepts": "", "name": "\"2xl\"", "says": ""}, {"accepts": "", "name": "\"3xl\"", "says": ""}, {"accepts": "", "name": "\"4xl\"", "says": ""}, {"accepts": "", "name": "\"lg\"", "says": ""}, {"accepts": "", "name": "\"md\"", "says": ""}, {"accepts": "", "name": "\"sm\"", "says": ""}, {"accepts": "", "name": "\"xl\"", "says": ""}, {"accepts": "", "name": "\"xs\"", "says": ""}], "menu.ElementIds": [{"accepts": "string | ((value?: string) => string)", "name": "trigger", "says": ""}, {"accepts": "string | ((value?: string) => string)", "name": "contextTrigger", "says": ""}, {"accepts": "string", "name": "content", "says": ""}, {"accepts": "((id: string) => string)", "name": "groupLabel", "says": ""}, {"accepts": "((id: string) => string)", "name": "group", "says": ""}, {"accepts": "string", "name": "positioner", "says": ""}, {"accepts": "string", "name": "arrow", "says": ""}], "menu.HighlightChangeDetails": [{"accepts": "string | null", "name": "highlightedValue", "says": "The value of the highlighted menu item"}], "menu.SelectionDetails": [{"accepts": "string", "name": "value", "says": "The value of the selected menu item"}], "rect-utils.Point": [{"accepts": "number", "name": "x", "says": ""}, {"accepts": "number", "name": "y", "says": ""}], "popper.PositioningOptions": [{"accepts": "boolean", "name": "restoreStyles", "says": "Whether styles applied by the positioning utility should be restored on cleanup."}, {"accepts": "boolean", "name": "applyStyles", "says": "Whether to apply computed position styles (`--x`, `--y`, `--z-index`, `z-index`) to the floating element. Set to `false` when the consumer applies these from context (e.g. for exit animations)."}, {"accepts": "boolean", "name": "hideWhenDetached", "says": "Whether the popover should be hidden when the reference element is detached"}, {"accepts": "\"absolute\" | \"fixed\"", "name": "strategy", "says": "The strategy to use for positioning"}, {"accepts": "Placement", "name": "placement", "says": "The initial placement of the floating element"}, {"accepts": "{ mainAxis?: number; crossAxis?: number; }", "name": "offset", "says": "The offset of the floating element"}, {"accepts": "number", "name": "gutter", "says": "The main axis offset or gap between the reference and floating elements"}, {"accepts": "number", "name": "shift", "says": "The secondary axis offset or gap between the reference and floating elements"}, {"accepts": "number", "name": "overflowPadding", "says": "The virtual padding around the viewport edges to check for overflow"}, {"accepts": "number", "name": "arrowPadding", "says": "The minimum padding between the arrow and the floating element's corner."}, {"accepts": "boolean | Placement[]", "name": "flip", "says": "Whether to flip the placement"}, {"accepts": "boolean", "name": "slide", "says": "Whether the popover should slide when it overflows."}, {"accepts": "boolean", "name": "overlap", "says": "Whether the floating element can overlap the reference element"}, {"accepts": "boolean", "name": "sameWidth", "says": "Whether to make the floating element same width as the reference element"}, {"accepts": "boolean", "name": "fitViewport", "says": "Whether the popover should fit the viewport."}, {"accepts": "boolean", "name": "sizeMiddleware", "says": "Whether to use the size middleware from Floating UI. It computes and sets CSS variables (`--reference-width`, `--reference-height`, `--available-width`, `--available-height`) used by `sameWidth` and `fitViewport`."}, {"accepts": "\"clipping-ancestors\" | (() => Boundary) | Boundary", "name": "boundary", "says": "The overflow boundary of the reference element Accepts a function returning a Boundary, a Boundary directly, or the shorthand string 'clipping-ancestors' which maps to Floating UI's 'clippingAncestors'."}, {"accepts": "boolean | AutoUpdateOptions", "name": "listeners", "says": "Options to activate auto-update listeners"}, {"accepts": "((data: ComputePositionReturn) => void)", "name": "onComplete", "says": "Function called when the placement is computed"}, {"accepts": "((data: { placed: boolean; }) => void)", "name": "onPositioned", "says": "Function called when the floating element is positioned or not"}, {"accepts": "(() => HTMLElement | VirtualElement | null)", "name": "getAnchorElement", "says": "Function that returns the anchor element. Useful when you want to use a different element as the anchor."}, {"accepts": "((element: HTMLElement | VirtualElement | null) => AnchorRect | null)", "name": "getAnchorRect", "says": "Function that returns the anchor rect"}, {"accepts": "((data: { updatePosition: () => Promise<void>; floatingElement: HTMLElement | null; }) => void | Promise<void>)", "name": "updatePosition", "says": "A callback that will be called when the popover needs to calculate its position."}], "utils.Placement": [{"accepts": "", "name": "\"bottom\"", "says": ""}, {"accepts": "", "name": "\"bottom-end\"", "says": ""}, {"accepts": "", "name": "\"bottom-start\"", "says": ""}, {"accepts": "", "name": "\"left\"", "says": ""}, {"accepts": "", "name": "\"left-end\"", "says": ""}, {"accepts": "", "name": "\"left-start\"", "says": ""}, {"accepts": "", "name": "\"right\"", "says": ""}, {"accepts": "", "name": "\"right-end\"", "says": ""}, {"accepts": "", "name": "\"right-start\"", "says": ""}, {"accepts": "", "name": "\"top\"", "says": ""}, {"accepts": "", "name": "\"top-end\"", "says": ""}, {"accepts": "", "name": "\"top-start\"", "says": ""}], "dom.AutoUpdateOptions": [{"accepts": "boolean", "name": "ancestorScroll", "says": "Whether to update the position when an overflow ancestor is scrolled."}, {"accepts": "boolean", "name": "ancestorResize", "says": "Whether to update the position when an overflow ancestor is resized. This\r uses the native `resize` event."}, {"accepts": "boolean", "name": "elementResize", "says": "Whether to update the position when either the reference or floating\r elements resized. This uses a `ResizeObserver`."}, {"accepts": "boolean", "name": "layoutShift", "says": "Whether to update the position when the reference relocated on the screen\r due to layout shift."}, {"accepts": "boolean", "name": "animationFrame", "says": "Whether to update on every animation frame if necessary. Only use if you\r need to update the position in response to an animation using transforms."}], "core.ComputePositionReturn": [{"accepts": "Placement", "name": "placement", "says": "The final chosen placement of the floating element."}, {"accepts": "Strategy", "name": "strategy", "says": "The strategy used to position the floating element."}, {"accepts": "MiddlewareData", "name": "middlewareData", "says": "Object containing data returned from all middleware, keyed by their name."}, {"accepts": "number", "name": "x", "says": ""}, {"accepts": "number", "name": "y", "says": ""}], "dom.VirtualElement": [{"accepts": "() => { bottom: number; height: number; left: number; right: number; top: number; width: number; x: number; y: number; }", "name": "getBoundingClientRect", "says": ""}, {"accepts": "(() => { bottom: number; height: number; left: number; right: number; top: number; width: number; x: number; y: number; }[] | DOMRectList)", "name": "getClientRects", "says": ""}, {"accepts": "Element", "name": "contextElement", "says": ""}], "menu.NavigateDetails": [{"accepts": "string", "name": "value", "says": ""}, {"accepts": "HTMLAnchorElement", "name": "node", "says": ""}, {"accepts": "string", "name": "href", "says": ""}], "menu.TriggerValueChangeDetails": [{"accepts": "string | null", "name": "value", "says": "The value of the trigger"}, {"accepts": "HTMLElement | null", "name": "triggerElement", "says": "The trigger element"}], "react.ReactElement": [{"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "react.ReactPortal": [{"accepts": "ReactNode", "name": "children", "says": ""}, {"accepts": "string | JSXElementConstructor<any>", "name": "type", "says": ""}, {"accepts": "unknown", "name": "props", "says": ""}, {"accepts": "string | null", "name": "key", "says": ""}], "kit.ValueChangeDetails": [{"accepts": "string", "name": "value", "says": "Value of the open menu, or an empty string."}]};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 1,
|
|
3
|
+
"pages": [
|
|
4
|
+
{
|
|
5
|
+
"about": "accordion.about",
|
|
6
|
+
"group": "",
|
|
7
|
+
"id": "components/disclosure/accordion",
|
|
8
|
+
"module": "accordion/accordion.js",
|
|
9
|
+
"namespace": "",
|
|
10
|
+
"props": "accordion/accordion.props.js",
|
|
11
|
+
"specimen": "src/accordion/accordion.specimen.tsx",
|
|
12
|
+
"title": "accordion.title"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"about": "collapsible.about",
|
|
16
|
+
"group": "",
|
|
17
|
+
"id": "components/disclosure/collapsible",
|
|
18
|
+
"module": "collapsible/collapsible.js",
|
|
19
|
+
"namespace": "",
|
|
20
|
+
"props": "collapsible/collapsible.props.js",
|
|
21
|
+
"specimen": "src/collapsible/collapsible.specimen.tsx",
|
|
22
|
+
"title": "collapsible.title"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"about": "details.about",
|
|
26
|
+
"group": "",
|
|
27
|
+
"id": "components/disclosure/details",
|
|
28
|
+
"module": "details/details.js",
|
|
29
|
+
"namespace": "",
|
|
30
|
+
"props": "details/details.props.js",
|
|
31
|
+
"specimen": "src/details/details.specimen.tsx",
|
|
32
|
+
"title": "details.title"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"about": "hover-card.about",
|
|
36
|
+
"group": "",
|
|
37
|
+
"id": "components/disclosure/hover-card",
|
|
38
|
+
"module": "hover-card/hover-card.js",
|
|
39
|
+
"namespace": "",
|
|
40
|
+
"props": "hover-card/hover-card.props.js",
|
|
41
|
+
"specimen": "src/hover-card/hover-card.specimen.tsx",
|
|
42
|
+
"title": "hover-card.title"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"about": "menu.about",
|
|
46
|
+
"group": "",
|
|
47
|
+
"id": "components/disclosure/menu",
|
|
48
|
+
"module": "menu/menu.js",
|
|
49
|
+
"namespace": "",
|
|
50
|
+
"props": "menu/menu.props.js",
|
|
51
|
+
"specimen": "src/menu/menu.specimen.tsx",
|
|
52
|
+
"title": "menu.title"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"about": "menubar.about",
|
|
56
|
+
"group": "",
|
|
57
|
+
"id": "components/disclosure/menubar",
|
|
58
|
+
"module": "menubar/menubar.js",
|
|
59
|
+
"namespace": "",
|
|
60
|
+
"props": "menubar/menubar.props.js",
|
|
61
|
+
"specimen": "src/menubar/menubar.specimen.tsx",
|
|
62
|
+
"title": "menubar.title"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"about": "popover.about",
|
|
66
|
+
"group": "",
|
|
67
|
+
"id": "components/disclosure/popover",
|
|
68
|
+
"module": "popover/popover.js",
|
|
69
|
+
"namespace": "",
|
|
70
|
+
"props": "popover/popover.props.js",
|
|
71
|
+
"specimen": "src/popover/popover.specimen.tsx",
|
|
72
|
+
"title": "popover.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"about": "steps.about",
|
|
76
|
+
"group": "",
|
|
77
|
+
"id": "components/disclosure/steps",
|
|
78
|
+
"module": "steps/steps.js",
|
|
79
|
+
"namespace": "",
|
|
80
|
+
"props": "steps/steps.props.js",
|
|
81
|
+
"specimen": "src/steps/steps.specimen.tsx",
|
|
82
|
+
"title": "steps.title"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"about": "tabs.about",
|
|
86
|
+
"group": "",
|
|
87
|
+
"id": "components/disclosure/tabs",
|
|
88
|
+
"module": "tabs/tabs.js",
|
|
89
|
+
"namespace": "",
|
|
90
|
+
"props": "tabs/tabs.props.js",
|
|
91
|
+
"specimen": "src/tabs/tabs.specimen.tsx",
|
|
92
|
+
"title": "tabs.title"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"about": "toggle-tip.about",
|
|
96
|
+
"group": "",
|
|
97
|
+
"id": "components/disclosure/toggle-tip",
|
|
98
|
+
"module": "toggle-tip/toggle-tip.js",
|
|
99
|
+
"namespace": "",
|
|
100
|
+
"props": "toggle-tip/toggle-tip.props.js",
|
|
101
|
+
"specimen": "src/toggle-tip/toggle-tip.specimen.tsx",
|
|
102
|
+
"title": "toggle-tip.title"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"about": "tooltip.about",
|
|
106
|
+
"group": "",
|
|
107
|
+
"id": "components/disclosure/tooltip",
|
|
108
|
+
"module": "tooltip/tooltip.js",
|
|
109
|
+
"namespace": "",
|
|
110
|
+
"props": "tooltip/tooltip.props.js",
|
|
111
|
+
"specimen": "src/tooltip/tooltip.specimen.tsx",
|
|
112
|
+
"title": "tooltip.title"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"about": "truncate.about",
|
|
116
|
+
"group": "",
|
|
117
|
+
"id": "components/disclosure/truncate",
|
|
118
|
+
"module": "truncate/truncate.js",
|
|
119
|
+
"namespace": "",
|
|
120
|
+
"props": "truncate/truncate.props.js",
|
|
121
|
+
"specimen": "src/truncate/truncate.specimen.tsx",
|
|
122
|
+
"title": "truncate.title"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"requires": {
|
|
126
|
+
"@stealthscale/component-actions": "^0.2.0",
|
|
127
|
+
"@stealthscale/component-collections": "^0.1.0",
|
|
128
|
+
"@stealthscale/component-data": "^0.2.0",
|
|
129
|
+
"@stealthscale/component-feedback": "^0.2.0",
|
|
130
|
+
"@stealthscale/component-forms": "^0.3.0",
|
|
131
|
+
"@stealthscale/component-layout": "^0.2.0",
|
|
132
|
+
"@stealthscale/component-media": "^0.2.0",
|
|
133
|
+
"@stealthscale/component-typography": "^0.3.0",
|
|
134
|
+
"@stealthscale/specimen": "^0.3.0",
|
|
135
|
+
"lucide-react": "^1.52.0",
|
|
136
|
+
"react-dom": "^19.3.0"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { o as recipe } from "../../recipes-95yCB2V3.js";
|
|
3
|
+
import { B as Title, G as Content, H as Positioner, J as ArrowTip, K as CloseTrigger, U as Indicator, V as Root, W as Description, q as Arrow, z as Trigger } from "../../shared-Cfsikh3X.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Portal } from "@stealthscale/component-primitives";
|
|
7
|
+
import { Matrix, scenesOf, specimen, useWords } from "@stealthscale/specimen";
|
|
8
|
+
import { ChevronDownIcon, XIcon } from "lucide-react";
|
|
9
|
+
//#region src/popover/examples/filters.example.tsx
|
|
10
|
+
var filters_example_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
Filters: () => Filters,
|
|
12
|
+
source: () => source
|
|
13
|
+
});
|
|
14
|
+
function Filters(props) {
|
|
15
|
+
const $ = c(27);
|
|
16
|
+
const { t } = useWords("popover");
|
|
17
|
+
let t0;
|
|
18
|
+
if ($[0] !== t) {
|
|
19
|
+
t0 = t("filters");
|
|
20
|
+
$[0] = t;
|
|
21
|
+
$[1] = t0;
|
|
22
|
+
} else t0 = $[1];
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
|
+
t1 = /* @__PURE__ */ jsx(Indicator, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: "1em" }) });
|
|
26
|
+
$[2] = t1;
|
|
27
|
+
} else t1 = $[2];
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[3] !== t0) {
|
|
30
|
+
t2 = /* @__PURE__ */ jsxs(Trigger, { children: [t0, t1] });
|
|
31
|
+
$[3] = t0;
|
|
32
|
+
$[4] = t2;
|
|
33
|
+
} else t2 = $[4];
|
|
34
|
+
let t3;
|
|
35
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
36
|
+
t3 = /* @__PURE__ */ jsx(Arrow, { children: /* @__PURE__ */ jsx(ArrowTip, {}) });
|
|
37
|
+
$[5] = t3;
|
|
38
|
+
} else t3 = $[5];
|
|
39
|
+
let t4;
|
|
40
|
+
if ($[6] !== t) {
|
|
41
|
+
t4 = t("filter");
|
|
42
|
+
$[6] = t;
|
|
43
|
+
$[7] = t4;
|
|
44
|
+
} else t4 = $[7];
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[8] !== t4) {
|
|
47
|
+
t5 = /* @__PURE__ */ jsx(Title, {
|
|
48
|
+
as: "h3",
|
|
49
|
+
children: t4
|
|
50
|
+
});
|
|
51
|
+
$[8] = t4;
|
|
52
|
+
$[9] = t5;
|
|
53
|
+
} else t5 = $[9];
|
|
54
|
+
let t6;
|
|
55
|
+
if ($[10] !== t) {
|
|
56
|
+
t6 = t("only");
|
|
57
|
+
$[10] = t;
|
|
58
|
+
$[11] = t6;
|
|
59
|
+
} else t6 = $[11];
|
|
60
|
+
let t7;
|
|
61
|
+
if ($[12] !== t6) {
|
|
62
|
+
t7 = /* @__PURE__ */ jsx(Description, { children: t6 });
|
|
63
|
+
$[12] = t6;
|
|
64
|
+
$[13] = t7;
|
|
65
|
+
} else t7 = $[13];
|
|
66
|
+
let t8;
|
|
67
|
+
if ($[14] !== t) {
|
|
68
|
+
t8 = t("close");
|
|
69
|
+
$[14] = t;
|
|
70
|
+
$[15] = t8;
|
|
71
|
+
} else t8 = $[15];
|
|
72
|
+
let t9;
|
|
73
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
74
|
+
t9 = /* @__PURE__ */ jsx(XIcon, {});
|
|
75
|
+
$[16] = t9;
|
|
76
|
+
} else t9 = $[16];
|
|
77
|
+
let t10;
|
|
78
|
+
if ($[17] !== t8) {
|
|
79
|
+
t10 = /* @__PURE__ */ jsx(CloseTrigger, {
|
|
80
|
+
"aria-label": t8,
|
|
81
|
+
children: t9
|
|
82
|
+
});
|
|
83
|
+
$[17] = t8;
|
|
84
|
+
$[18] = t10;
|
|
85
|
+
} else t10 = $[18];
|
|
86
|
+
let t11;
|
|
87
|
+
if ($[19] !== t10 || $[20] !== t5 || $[21] !== t7) {
|
|
88
|
+
t11 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, { children: [
|
|
89
|
+
t3,
|
|
90
|
+
t5,
|
|
91
|
+
t7,
|
|
92
|
+
t10
|
|
93
|
+
] }) }) });
|
|
94
|
+
$[19] = t10;
|
|
95
|
+
$[20] = t5;
|
|
96
|
+
$[21] = t7;
|
|
97
|
+
$[22] = t11;
|
|
98
|
+
} else t11 = $[22];
|
|
99
|
+
let t12;
|
|
100
|
+
if ($[23] !== props || $[24] !== t11 || $[25] !== t2) {
|
|
101
|
+
t12 = /* @__PURE__ */ jsxs(Root, {
|
|
102
|
+
...props,
|
|
103
|
+
children: [t2, t11]
|
|
104
|
+
});
|
|
105
|
+
$[23] = props;
|
|
106
|
+
$[24] = t11;
|
|
107
|
+
$[25] = t2;
|
|
108
|
+
$[26] = t12;
|
|
109
|
+
} else t12 = $[26];
|
|
110
|
+
return t12;
|
|
111
|
+
}
|
|
112
|
+
const source = "import { type ReactElement } from \"react\";\n\nimport { ChevronDownIcon, XIcon } from \"lucide-react\";\n\nimport { Portal } from \"@stealthscale/component-primitives\";\nimport { useWords } from \"@stealthscale/specimen\";\n\nimport { Popover } from \"@stealthscale/component-disclosure\";\n\nexport function Filters(props: Popover.RootProps): ReactElement {\n const { t } = useWords(\"popover\");\n\n return (\n <Popover.Root {...props}>\n <Popover.Trigger>\n {t(\"filters\")}\n <Popover.Indicator>\n <ChevronDownIcon size=\"1em\" />\n </Popover.Indicator>\n </Popover.Trigger>\n <Portal>\n <Popover.Positioner>\n <Popover.Content>\n <Popover.Arrow>\n <Popover.ArrowTip />\n </Popover.Arrow>\n <Popover.Title as=\"h3\">{t(\"filter\")}</Popover.Title>\n <Popover.Description>{t(\"only\")}</Popover.Description>\n <Popover.CloseTrigger aria-label={t(\"close\")}>\n <XIcon />\n </Popover.CloseTrigger>\n </Popover.Content>\n </Popover.Positioner>\n </Portal>\n </Popover.Root>\n );\n}\n";
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/popover/popover.specimen.tsx
|
|
115
|
+
/**
|
|
116
|
+
* Catalogue page for the popover.
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* `scenesOf` generates the looks by sizes from the filters example. The placement scene is
|
|
120
|
+
* hand-written, because the placement is the machine's `positioning` option and not an axis.
|
|
121
|
+
* Every popover renders closed and portals its panel to the document body, so an opened panel
|
|
122
|
+
* renders over the page and a scene is as tall as its triggers. The words are keys under
|
|
123
|
+
* `popover` in `locales/en/specimen/popover.json`.
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* Sides of the placement scene.
|
|
127
|
+
*/
|
|
128
|
+
const SIDES = [
|
|
129
|
+
"top",
|
|
130
|
+
"right",
|
|
131
|
+
"bottom",
|
|
132
|
+
"left"
|
|
133
|
+
];
|
|
134
|
+
/**
|
|
135
|
+
* Hand-written scene for the four placements.
|
|
136
|
+
*/
|
|
137
|
+
const placement = {
|
|
138
|
+
about: "popover.placement.about",
|
|
139
|
+
draw: () => /* @__PURE__ */ jsx(Matrix, {
|
|
140
|
+
knob: "placement",
|
|
141
|
+
of: SIDES,
|
|
142
|
+
children: (side) => /* @__PURE__ */ jsx(Filters, { positioning: { placement: side } })
|
|
143
|
+
}),
|
|
144
|
+
example: filters_example_exports,
|
|
145
|
+
props: { positioning: { placement: "top" } },
|
|
146
|
+
title: "popover.placement.title"
|
|
147
|
+
};
|
|
148
|
+
var popover_specimen_default = specimen({
|
|
149
|
+
about: "popover.about",
|
|
150
|
+
id: "components/disclosure/popover",
|
|
151
|
+
imports: "import { Popover } from \"@stealthscale/component-disclosure\";",
|
|
152
|
+
scenes: [...scenesOf(recipe, {
|
|
153
|
+
axes: { variant: { across: "size" } },
|
|
154
|
+
draw: (props) => /* @__PURE__ */ jsx(Filters, { ...props }),
|
|
155
|
+
example: filters_example_exports,
|
|
156
|
+
namespace: "popover"
|
|
157
|
+
}), placement],
|
|
158
|
+
title: "popover.title"
|
|
159
|
+
});
|
|
160
|
+
//#endregion
|
|
161
|
+
export { popover_specimen_default as default, placement };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const dropped = {"AnchorProps": {"conditions": 284, "foreign": 1041}, "ArrowTipProps": {"conditions": 284, "foreign": 1041}, "ArrowProps": {"conditions": 284, "foreign": 1041}, "CloseTriggerProps": {"conditions": 284, "foreign": 1051}, "ContentProps": {"conditions": 284, "foreign": 1040}, "DescriptionProps": {"conditions": 284, "foreign": 1041}, "IndicatorProps": {"conditions": 284, "foreign": 1041}, "PositionerProps": {"conditions": 284, "foreign": 1041}, "RootProps": {"conditions": 284, "foreign": 1039}, "TitleProps": {"conditions": 284, "foreign": 1041}, "TriggerProps": {"conditions": 284, "foreign": 1051}};
|
|
2
|
+
export const parts = {"AnchorProps": [], "ArrowTipProps": [], "ArrowProps": [], "CloseTriggerProps": [], "ContentProps": [], "DescriptionProps": [], "IndicatorProps": [], "PositionerProps": [], "RootProps": [{"accepts": "boolean", "fallback": "true", "kind": "option", "name": "closeOnEscape", "refers": [], "required": false, "says": "Whether to close the popover when the escape key is pressed."}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "closeOnInteractOutside", "refers": [], "required": false, "says": "Whether to close the popover when the user clicks outside of the popover."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "defaultOpen", "refers": [], "required": false, "says": "The initial open state of the popover when rendered. Use when you don't need to control the open state of the popover."}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "defaultTriggerValue", "refers": [], "required": false, "says": "The initial trigger value when rendered. Use when you don't need to control the trigger value."}, {"accepts": "\"ltr\" | \"rtl\"", "fallback": "\"ltr\"", "kind": "option", "name": "dir", "refers": [], "required": false, "says": "The document's text/writing direction."}, {"accepts": "(() => MaybeElement)", "fallback": "", "kind": "option", "name": "finalFocusEl", "refers": [], "required": false, "says": "Element to receive focus when the popover is closed."}, {"accepts": "(() => Document | Node | ShadowRoot)", "fallback": "", "kind": "option", "name": "getRootNode", "refers": [], "required": false, "says": "A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron."}, {"accepts": "string", "fallback": "", "kind": "option", "name": "id", "refers": [], "required": false, "says": "The unique identifier of the machine."}, {"accepts": "ElementIds", "fallback": "", "kind": "option", "name": "ids", "refers": ["popover.ElementIds"], "required": false, "says": "The ids of the elements in the popover. Useful for composition."}, {"accepts": "(() => false | HTMLElement | null)", "fallback": "", "kind": "option", "name": "initialFocusEl", "refers": [], "required": false, "says": "The element to focus on when the popover is opened. Return `false` to skip moving focus, or `null` to use the default."}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "lazyMount", "refers": [], "required": false, "says": "When true, the overlay renders no content until it first opens."}, {"accepts": "boolean", "fallback": "false", "kind": "option", "name": "modal", "refers": [], "required": false, "says": "Whether the popover should be modal. When set to `true`: - interaction with outside elements will be disabled - only popover content will be visible to screen readers - scrolling is blocked - focus is trapped within the popover"}, {"accepts": "((event: KeyboardEvent) => void)", "fallback": "", "kind": "option", "name": "onEscapeKeyDown", "refers": [], "required": false, "says": "Function called when the escape key is pressed"}, {"accepts": "(() => void)", "fallback": "", "kind": "option", "name": "onExitComplete", "refers": [], "required": false, "says": "Runs once the content's exit animation ends."}, {"accepts": "((event: FocusOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onFocusOutside", "refers": ["interact-outside.EventDetails", "interact-outside.FocusOutsideEvent"], "required": false, "says": "Function called when the focus is moved outside the component"}, {"accepts": "((event: InteractOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onInteractOutside", "refers": ["interact-outside.EventDetails", "interact-outside.FocusOutsideEvent", "interact-outside.InteractOutsideEvent", "interact-outside.PointerDownOutsideEvent"], "required": false, "says": "Function called when an interaction happens outside the component"}, {"accepts": "((details: OpenChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onOpenChange", "refers": ["popover.OpenChangeDetails"], "required": false, "says": "Function invoked when the popover opens or closes"}, {"accepts": "((event: PointerDownOutsideEvent) => void)", "fallback": "", "kind": "option", "name": "onPointerDownOutside", "refers": ["interact-outside.EventDetails", "interact-outside.PointerDownOutsideEvent"], "required": false, "says": "Function called when the pointer is pressed down outside the component"}, {"accepts": "((event: LayerDismissEvent) => void)", "fallback": "", "kind": "option", "name": "onRequestDismiss", "refers": ["dismissable.LayerDismissEvent", "dismissable.LayerDismissEventDetail"], "required": false, "says": "Function called when this layer is closed due to a parent layer being closed"}, {"accepts": "((details: TriggerValueChangeDetails) => void)", "fallback": "", "kind": "option", "name": "onTriggerValueChange", "refers": ["popover.TriggerValueChangeDetails"], "required": false, "says": "Function called when the trigger value changes."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "open", "refers": [], "required": false, "says": "The controlled open state of the popover"}, {"accepts": "(() => Element | null)[]", "fallback": "", "kind": "option", "name": "persistentElements", "refers": [], "required": false, "says": "Returns the persistent elements that: - should not have pointer-events disabled - should not trigger the dismiss event"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "portalled", "refers": [], "required": false, "says": "Whether the popover is portalled. This will proxy the tabbing behavior regardless of the DOM position of the popover content."}, {"accepts": "PositioningOptions", "fallback": "", "kind": "option", "name": "positioning", "refers": ["core.ComputePositionReturn", "dom.AutoUpdateOptions", "dom.VirtualElement", "popper.PositioningOptions", "utils.Placement"], "required": false, "says": "The user provided options used to position the popover content"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "restoreFocus", "refers": [], "required": false, "says": "Whether to restore focus to the element that had focus before the popover was opened."}, {"accepts": "\"lg\" | \"md\" | \"sm\" | \"xl\" | \"xs\"", "fallback": "", "kind": "variant", "name": "size", "refers": [], "required": false, "says": "Padding of the panel, text of the title and the description, and size of the close trigger."}, {"accepts": "boolean", "fallback": "", "kind": "option", "name": "skipAnimationOnMount", "refers": [], "required": false, "says": "When true, content that is open on mount plays no entry animation."}, {"accepts": "string | null", "fallback": "", "kind": "option", "name": "triggerValue", "refers": [], "required": false, "says": "The controlled trigger value"}, {"accepts": "boolean", "fallback": "true", "kind": "option", "name": "unmountOnExit", "refers": [], "required": false, "says": "When true, the overlay removes its content once the exit animation ends."}, {"accepts": "\"elevated\" | \"glass\" | \"surface\"", "fallback": "", "kind": "variant", "name": "variant", "refers": [], "required": false, "says": "Surface of the panel: the popover surface inside a hairline edge, the panel surface with a large shadow, or the glass layer style."}], "TitleProps": [], "TriggerProps": []};
|
|
3
|
+
export const shapes = {"interact-outside.EventDetails": [{"accepts": "PointerEvent", "name": "originalEvent", "says": ""}, {"accepts": "boolean", "name": "contextmenu", "says": ""}, {"accepts": "boolean", "name": "focusable", "says": ""}, {"accepts": "EventTarget", "name": "target", "says": ""}], "interact-outside.PointerDownOutsideEvent": [{"accepts": "EventDetails<PointerEvent>", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: EventDetails<PointerEvent>) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "interact-outside.FocusOutsideEvent": [{"accepts": "EventDetails<FocusEvent>", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: EventDetails<FocusEvent>) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "interact-outside.InteractOutsideEvent": [{"accepts": "", "name": "FocusOutsideEvent", "says": ""}, {"accepts": "", "name": "PointerDownOutsideEvent", "says": ""}], "dismissable.LayerDismissEventDetail": [{"accepts": "HTMLElement", "name": "originalLayer", "says": ""}, {"accepts": "HTMLElement", "name": "targetLayer", "says": ""}, {"accepts": "number", "name": "originalIndex", "says": ""}, {"accepts": "number", "name": "targetIndex", "says": ""}], "dismissable.LayerDismissEvent": [{"accepts": "LayerDismissEventDetail", "name": "detail", "says": "The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean, detail?: LayerDismissEventDetail) => void", "name": "initCustomEvent", "says": "The **`CustomEvent.initCustomEvent()`** method initializes a CustomEvent object. If the event has already been dispatched, this method does nothing."}, {"accepts": "boolean", "name": "bubbles", "says": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not."}, {"accepts": "boolean", "name": "cancelBubble", "says": "The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details."}, {"accepts": "boolean", "name": "cancelable", "says": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened."}, {"accepts": "boolean", "name": "composed", "says": "The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM."}, {"accepts": "EventTarget | null", "name": "currentTarget", "says": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached."}, {"accepts": "boolean", "name": "defaultPrevented", "says": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event."}, {"accepts": "number", "name": "eventPhase", "says": "The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated."}, {"accepts": "boolean", "name": "isTrusted", "says": "The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents."}, {"accepts": "boolean", "name": "returnValue", "says": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not."}, {"accepts": "EventTarget | null", "name": "srcElement", "says": "The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead."}, {"accepts": "EventTarget | null", "name": "target", "says": "The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event."}, {"accepts": "number", "name": "timeStamp", "says": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created."}, {"accepts": "string", "name": "type", "says": "The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error."}, {"accepts": "() => EventTarget[]", "name": "composedPath", "says": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed."}, {"accepts": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", "name": "initEvent", "says": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent()."}, {"accepts": "() => void", "name": "preventDefault", "says": "The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken."}, {"accepts": "() => void", "name": "stopImmediatePropagation", "says": "The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called."}, {"accepts": "() => void", "name": "stopPropagation", "says": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation()."}, {"accepts": "0", "name": "NONE", "says": ""}, {"accepts": "1", "name": "CAPTURING_PHASE", "says": ""}, {"accepts": "2", "name": "AT_TARGET", "says": ""}, {"accepts": "3", "name": "BUBBLING_PHASE", "says": ""}], "popover.ElementIds": [{"accepts": "string", "name": "anchor", "says": ""}, {"accepts": "string | ((value?: string) => string)", "name": "trigger", "says": ""}, {"accepts": "string", "name": "content", "says": ""}, {"accepts": "string", "name": "title", "says": ""}, {"accepts": "string", "name": "description", "says": ""}, {"accepts": "string", "name": "closeTrigger", "says": ""}, {"accepts": "string", "name": "positioner", "says": ""}, {"accepts": "string", "name": "arrow", "says": ""}], "popover.OpenChangeDetails": [{"accepts": "boolean", "name": "open", "says": ""}], "popper.PositioningOptions": [{"accepts": "boolean", "name": "restoreStyles", "says": "Whether styles applied by the positioning utility should be restored on cleanup."}, {"accepts": "boolean", "name": "applyStyles", "says": "Whether to apply computed position styles (`--x`, `--y`, `--z-index`, `z-index`) to the floating element. Set to `false` when the consumer applies these from context (e.g. for exit animations)."}, {"accepts": "boolean", "name": "hideWhenDetached", "says": "Whether the popover should be hidden when the reference element is detached"}, {"accepts": "\"absolute\" | \"fixed\"", "name": "strategy", "says": "The strategy to use for positioning"}, {"accepts": "Placement", "name": "placement", "says": "The initial placement of the floating element"}, {"accepts": "{ mainAxis?: number; crossAxis?: number; }", "name": "offset", "says": "The offset of the floating element"}, {"accepts": "number", "name": "gutter", "says": "The main axis offset or gap between the reference and floating elements"}, {"accepts": "number", "name": "shift", "says": "The secondary axis offset or gap between the reference and floating elements"}, {"accepts": "number", "name": "overflowPadding", "says": "The virtual padding around the viewport edges to check for overflow"}, {"accepts": "number", "name": "arrowPadding", "says": "The minimum padding between the arrow and the floating element's corner."}, {"accepts": "boolean | Placement[]", "name": "flip", "says": "Whether to flip the placement"}, {"accepts": "boolean", "name": "slide", "says": "Whether the popover should slide when it overflows."}, {"accepts": "boolean", "name": "overlap", "says": "Whether the floating element can overlap the reference element"}, {"accepts": "boolean", "name": "sameWidth", "says": "Whether to make the floating element same width as the reference element"}, {"accepts": "boolean", "name": "fitViewport", "says": "Whether the popover should fit the viewport."}, {"accepts": "boolean", "name": "sizeMiddleware", "says": "Whether to use the size middleware from Floating UI. It computes and sets CSS variables (`--reference-width`, `--reference-height`, `--available-width`, `--available-height`) used by `sameWidth` and `fitViewport`."}, {"accepts": "\"clipping-ancestors\" | (() => Boundary) | Boundary", "name": "boundary", "says": "The overflow boundary of the reference element Accepts a function returning a Boundary, a Boundary directly, or the shorthand string 'clipping-ancestors' which maps to Floating UI's 'clippingAncestors'."}, {"accepts": "boolean | AutoUpdateOptions", "name": "listeners", "says": "Options to activate auto-update listeners"}, {"accepts": "((data: ComputePositionReturn) => void)", "name": "onComplete", "says": "Function called when the placement is computed"}, {"accepts": "((data: { placed: boolean; }) => void)", "name": "onPositioned", "says": "Function called when the floating element is positioned or not"}, {"accepts": "(() => HTMLElement | VirtualElement | null)", "name": "getAnchorElement", "says": "Function that returns the anchor element. Useful when you want to use a different element as the anchor."}, {"accepts": "((element: HTMLElement | VirtualElement | null) => AnchorRect | null)", "name": "getAnchorRect", "says": "Function that returns the anchor rect"}, {"accepts": "((data: { updatePosition: () => Promise<void>; floatingElement: HTMLElement | null; }) => void | Promise<void>)", "name": "updatePosition", "says": "A callback that will be called when the popover needs to calculate its position."}], "utils.Placement": [{"accepts": "", "name": "\"bottom\"", "says": ""}, {"accepts": "", "name": "\"bottom-end\"", "says": ""}, {"accepts": "", "name": "\"bottom-start\"", "says": ""}, {"accepts": "", "name": "\"left\"", "says": ""}, {"accepts": "", "name": "\"left-end\"", "says": ""}, {"accepts": "", "name": "\"left-start\"", "says": ""}, {"accepts": "", "name": "\"right\"", "says": ""}, {"accepts": "", "name": "\"right-end\"", "says": ""}, {"accepts": "", "name": "\"right-start\"", "says": ""}, {"accepts": "", "name": "\"top\"", "says": ""}, {"accepts": "", "name": "\"top-end\"", "says": ""}, {"accepts": "", "name": "\"top-start\"", "says": ""}], "dom.AutoUpdateOptions": [{"accepts": "boolean", "name": "ancestorScroll", "says": "Whether to update the position when an overflow ancestor is scrolled."}, {"accepts": "boolean", "name": "ancestorResize", "says": "Whether to update the position when an overflow ancestor is resized. This\r uses the native `resize` event."}, {"accepts": "boolean", "name": "elementResize", "says": "Whether to update the position when either the reference or floating\r elements resized. This uses a `ResizeObserver`."}, {"accepts": "boolean", "name": "layoutShift", "says": "Whether to update the position when the reference relocated on the screen\r due to layout shift."}, {"accepts": "boolean", "name": "animationFrame", "says": "Whether to update on every animation frame if necessary. Only use if you\r need to update the position in response to an animation using transforms."}], "core.ComputePositionReturn": [{"accepts": "Placement", "name": "placement", "says": "The final chosen placement of the floating element."}, {"accepts": "Strategy", "name": "strategy", "says": "The strategy used to position the floating element."}, {"accepts": "MiddlewareData", "name": "middlewareData", "says": "Object containing data returned from all middleware, keyed by their name."}, {"accepts": "number", "name": "x", "says": ""}, {"accepts": "number", "name": "y", "says": ""}], "dom.VirtualElement": [{"accepts": "() => { bottom: number; height: number; left: number; right: number; top: number; width: number; x: number; y: number; }", "name": "getBoundingClientRect", "says": ""}, {"accepts": "(() => { bottom: number; height: number; left: number; right: number; top: number; width: number; x: number; y: number; }[] | DOMRectList)", "name": "getClientRects", "says": ""}, {"accepts": "Element", "name": "contextElement", "says": ""}], "popover.TriggerValueChangeDetails": [{"accepts": "string | null", "name": "value", "says": "The value of the trigger"}, {"accepts": "HTMLElement | null", "name": "triggerElement", "says": "The trigger element"}]};
|