@entry-ui/qwik 0.7.0 → 0.9.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.
Files changed (126) hide show
  1. package/lib/_internal/components/collapsible-panel/collapsible-panel.d.ts +13 -0
  2. package/lib/_internal/components/collapsible-panel/collapsible-panel.qwik.mjs +195 -0
  3. package/lib/_internal/components/collapsible-panel/collapsible-panel.types.d.ts +62 -0
  4. package/lib/_internal/components/collapsible-panel/index.d.ts +2 -0
  5. package/lib/_internal/components/index.d.ts +2 -0
  6. package/lib/_internal/components/indicator/index.d.ts +2 -0
  7. package/lib/_internal/components/indicator/indicator.d.ts +11 -0
  8. package/lib/_internal/components/indicator/indicator.qwik.mjs +27 -0
  9. package/lib/_internal/components/indicator/indicator.types.d.ts +15 -0
  10. package/lib/components/accordion/parts/accordion-item-indicator/accordion-item-indicator.qwik.mjs +4 -12
  11. package/lib/components/accordion/parts/accordion-item-panel/accordion-item-panel.qwik.mjs +10 -169
  12. package/lib/components/accordion/parts/accordion-root/accordion-root.qwik.mjs +6 -19
  13. package/lib/components/collapsible/parts/collapsible-indicator/collapsible-indicator.qwik.mjs +4 -12
  14. package/lib/components/collapsible/parts/collapsible-panel/collapsible-panel.qwik.mjs +10 -164
  15. package/lib/components/collapsible/parts/collapsible-root/collapsible-root.qwik.mjs +1 -18
  16. package/lib/components/copy-button/contexts/copy-button-root-context/copy-button-root-context.d.ts +11 -0
  17. package/lib/components/copy-button/contexts/copy-button-root-context/copy-button-root-context.qwik.mjs +10 -0
  18. package/lib/components/copy-button/contexts/copy-button-root-context/copy-button-root-context.types.d.ts +24 -0
  19. package/lib/components/copy-button/contexts/copy-button-root-context/index.d.ts +2 -0
  20. package/lib/components/copy-button/contexts/index.d.ts +1 -0
  21. package/lib/components/copy-button/hooks/index.d.ts +1 -0
  22. package/lib/components/copy-button/hooks/use-copy-button-root-context/index.d.ts +2 -0
  23. package/lib/components/copy-button/hooks/use-copy-button-root-context/use-copy-button-root-context.d.ts +7 -0
  24. package/lib/components/copy-button/hooks/use-copy-button-root-context/use-copy-button-root-context.qwik.mjs +13 -0
  25. package/lib/components/copy-button/hooks/use-copy-button-root-context/use-copy-button-root-context.types.d.ts +24 -0
  26. package/lib/components/copy-button/index.d.ts +2 -0
  27. package/lib/components/copy-button/index.qwik.mjs +6 -0
  28. package/lib/components/copy-button/parts/copy-button-indicator/copy-button-indicator.d.ts +9 -0
  29. package/lib/components/copy-button/parts/copy-button-indicator/copy-button-indicator.qwik.mjs +20 -0
  30. package/lib/components/copy-button/parts/copy-button-indicator/copy-button-indicator.types.d.ts +15 -0
  31. package/lib/components/copy-button/parts/copy-button-indicator/index.d.ts +2 -0
  32. package/lib/components/copy-button/parts/copy-button-root/copy-button-root.d.ts +7 -0
  33. package/lib/components/copy-button/parts/copy-button-root/copy-button-root.qwik.mjs +47 -0
  34. package/lib/components/copy-button/parts/copy-button-root/copy-button-root.types.d.ts +52 -0
  35. package/lib/components/copy-button/parts/copy-button-root/index.d.ts +2 -0
  36. package/lib/components/copy-button/parts/index.d.ts +4 -0
  37. package/lib/components/copy-button/parts/index.qwik.mjs +6 -0
  38. package/lib/components/index.d.ts +3 -0
  39. package/lib/components/roving-focus-group/contexts/index.d.ts +2 -0
  40. package/lib/components/roving-focus-group/contexts/roving-focus-group-item-context/index.d.ts +2 -0
  41. package/lib/components/roving-focus-group/contexts/roving-focus-group-item-context/roving-focus-group-item-context.d.ts +6 -0
  42. package/lib/components/roving-focus-group/contexts/roving-focus-group-item-context/roving-focus-group-item-context.qwik.mjs +5 -0
  43. package/lib/components/roving-focus-group/contexts/roving-focus-group-item-context/roving-focus-group-item-context.types.d.ts +22 -0
  44. package/lib/components/roving-focus-group/contexts/roving-focus-group-root-context/index.d.ts +2 -0
  45. package/lib/components/roving-focus-group/contexts/roving-focus-group-root-context/roving-focus-group-root-context.d.ts +11 -0
  46. package/lib/components/roving-focus-group/contexts/roving-focus-group-root-context/roving-focus-group-root-context.qwik.mjs +10 -0
  47. package/lib/components/roving-focus-group/contexts/roving-focus-group-root-context/roving-focus-group-root-context.types.d.ts +37 -0
  48. package/lib/components/roving-focus-group/hooks/index.d.ts +2 -0
  49. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-item-context/index.d.ts +2 -0
  50. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-item-context/use-roving-focus-group-item-context.d.ts +7 -0
  51. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-item-context/use-roving-focus-group-item-context.qwik.mjs +13 -0
  52. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-item-context/use-roving-focus-group-item-context.types.d.ts +22 -0
  53. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-root-context/index.d.ts +2 -0
  54. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-root-context/use-roving-focus-group-root-context.d.ts +8 -0
  55. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-root-context/use-roving-focus-group-root-context.qwik.mjs +13 -0
  56. package/lib/components/roving-focus-group/hooks/use-roving-focus-group-root-context/use-roving-focus-group-root-context.types.d.ts +22 -0
  57. package/lib/components/roving-focus-group/index.d.ts +2 -0
  58. package/lib/components/roving-focus-group/index.qwik.mjs +8 -0
  59. package/lib/components/roving-focus-group/parts/index.d.ts +4 -0
  60. package/lib/components/roving-focus-group/parts/index.qwik.mjs +6 -0
  61. package/lib/components/roving-focus-group/parts/roving-focus-group-item/index.d.ts +2 -0
  62. package/lib/components/roving-focus-group/parts/roving-focus-group-item/roving-focus-group-item.d.ts +7 -0
  63. package/lib/components/roving-focus-group/parts/roving-focus-group-item/roving-focus-group-item.qwik.mjs +160 -0
  64. package/lib/components/roving-focus-group/parts/roving-focus-group-item/roving-focus-group-item.types.d.ts +29 -0
  65. package/lib/components/roving-focus-group/parts/roving-focus-group-root/index.d.ts +2 -0
  66. package/lib/components/roving-focus-group/parts/roving-focus-group-root/roving-focus-group-root.d.ts +7 -0
  67. package/lib/components/roving-focus-group/parts/roving-focus-group-root/roving-focus-group-root.qwik.mjs +49 -0
  68. package/lib/components/roving-focus-group/parts/roving-focus-group-root/roving-focus-group-root.types.d.ts +59 -0
  69. package/lib/components/tabs/contexts/index.d.ts +4 -0
  70. package/lib/components/tabs/contexts/tabs-list-context/index.d.ts +2 -0
  71. package/lib/components/tabs/contexts/tabs-list-context/tabs-list-context.d.ts +11 -0
  72. package/lib/components/tabs/contexts/tabs-list-context/tabs-list-context.qwik.mjs +10 -0
  73. package/lib/components/tabs/contexts/tabs-list-context/tabs-list-context.types.d.ts +12 -0
  74. package/lib/components/tabs/contexts/tabs-panel-context/index.d.ts +2 -0
  75. package/lib/components/tabs/contexts/tabs-panel-context/tabs-panel-context.d.ts +6 -0
  76. package/lib/components/tabs/contexts/tabs-panel-context/tabs-panel-context.qwik.mjs +5 -0
  77. package/lib/components/tabs/contexts/tabs-panel-context/tabs-panel-context.types.d.ts +12 -0
  78. package/lib/components/tabs/contexts/tabs-root-context/index.d.ts +2 -0
  79. package/lib/components/tabs/contexts/tabs-root-context/tabs-root-context.d.ts +11 -0
  80. package/lib/components/tabs/contexts/tabs-root-context/tabs-root-context.qwik.mjs +10 -0
  81. package/lib/components/tabs/contexts/tabs-root-context/tabs-root-context.types.d.ts +33 -0
  82. package/lib/components/tabs/contexts/tabs-tab-context/index.d.ts +2 -0
  83. package/lib/components/tabs/contexts/tabs-tab-context/tabs-tab-context.d.ts +6 -0
  84. package/lib/components/tabs/contexts/tabs-tab-context/tabs-tab-context.qwik.mjs +5 -0
  85. package/lib/components/tabs/contexts/tabs-tab-context/tabs-tab-context.types.d.ts +22 -0
  86. package/lib/components/tabs/hooks/index.d.ts +3 -0
  87. package/lib/components/tabs/hooks/use-tabs-panel-context/index.d.ts +2 -0
  88. package/lib/components/tabs/hooks/use-tabs-panel-context/use-tabs-panel-context.d.ts +8 -0
  89. package/lib/components/tabs/hooks/use-tabs-panel-context/use-tabs-panel-context.qwik.mjs +11 -0
  90. package/lib/components/tabs/hooks/use-tabs-panel-context/use-tabs-panel-context.types.d.ts +12 -0
  91. package/lib/components/tabs/hooks/use-tabs-root-context/index.d.ts +2 -0
  92. package/lib/components/tabs/hooks/use-tabs-root-context/use-tabs-root-context.d.ts +8 -0
  93. package/lib/components/tabs/hooks/use-tabs-root-context/use-tabs-root-context.qwik.mjs +13 -0
  94. package/lib/components/tabs/hooks/use-tabs-root-context/use-tabs-root-context.types.d.ts +22 -0
  95. package/lib/components/tabs/hooks/use-tabs-tab-context/index.d.ts +2 -0
  96. package/lib/components/tabs/hooks/use-tabs-tab-context/use-tabs-tab-context.d.ts +7 -0
  97. package/lib/components/tabs/hooks/use-tabs-tab-context/use-tabs-tab-context.qwik.mjs +13 -0
  98. package/lib/components/tabs/hooks/use-tabs-tab-context/use-tabs-tab-context.types.d.ts +22 -0
  99. package/lib/components/tabs/index.d.ts +2 -0
  100. package/lib/components/tabs/index.qwik.mjs +10 -0
  101. package/lib/components/tabs/parts/index.d.ts +8 -0
  102. package/lib/components/tabs/parts/index.qwik.mjs +10 -0
  103. package/lib/components/tabs/parts/tabs-list/index.d.ts +2 -0
  104. package/lib/components/tabs/parts/tabs-list/tabs-list.d.ts +7 -0
  105. package/lib/components/tabs/parts/tabs-list/tabs-list.qwik.mjs +37 -0
  106. package/lib/components/tabs/parts/tabs-list/tabs-list.types.d.ts +30 -0
  107. package/lib/components/tabs/parts/tabs-panel/index.d.ts +2 -0
  108. package/lib/components/tabs/parts/tabs-panel/tabs-panel.d.ts +7 -0
  109. package/lib/components/tabs/parts/tabs-panel/tabs-panel.qwik.mjs +39 -0
  110. package/lib/components/tabs/parts/tabs-panel/tabs-panel.types.d.ts +27 -0
  111. package/lib/components/tabs/parts/tabs-root/index.d.ts +2 -0
  112. package/lib/components/tabs/parts/tabs-root/tabs-root.d.ts +7 -0
  113. package/lib/components/tabs/parts/tabs-root/tabs-root.qwik.mjs +34 -0
  114. package/lib/components/tabs/parts/tabs-root/tabs-root.types.d.ts +50 -0
  115. package/lib/components/tabs/parts/tabs-tab/index.d.ts +2 -0
  116. package/lib/components/tabs/parts/tabs-tab/tabs-tab.d.ts +7 -0
  117. package/lib/components/tabs/parts/tabs-tab/tabs-tab.qwik.mjs +87 -0
  118. package/lib/components/tabs/parts/tabs-tab/tabs-tab.types.d.ts +25 -0
  119. package/lib/hooks/index.d.ts +1 -0
  120. package/lib/hooks/use-clipboard/index.d.ts +2 -0
  121. package/lib/hooks/use-clipboard/index.qwik.mjs +4 -0
  122. package/lib/hooks/use-clipboard/use-clipboard.d.ts +19 -0
  123. package/lib/hooks/use-clipboard/use-clipboard.qwik.mjs +93 -0
  124. package/lib/hooks/use-clipboard/use-clipboard.types.d.ts +58 -0
  125. package/lib/index.qwik.mjs +24 -4
  126. package/package.json +18 -2
@@ -0,0 +1,6 @@
1
+ import type { TabsTabContextValue } from './tabs-tab-context.types';
2
+ /**
3
+ * Provides the context for the `Tabs.Tab` component, allowing descendant
4
+ * components to access readonly signals without prop drilling.
5
+ */
6
+ export declare const TabsTabContext: import("@qwik.dev/core").ContextId<TabsTabContextValue>;
@@ -0,0 +1,5 @@
1
+ import { createContextId } from "@qwik.dev/core";
2
+ const TabsTabContext = createContextId("entry-ui-qwik-tabs-tab-context");
3
+ export {
4
+ TabsTabContext
5
+ };
@@ -0,0 +1,22 @@
1
+ import type { ReadonlySignal } from '@qwik.dev/core';
2
+ /**
3
+ * The value provided by the `TabsTabContext` context.
4
+ * Contains the readonly signals shared with descendant components.
5
+ */
6
+ export interface TabsTabContextValue {
7
+ /**
8
+ * A readonly signal containing the unique value associated with the tab.
9
+ * This value connects the tab to its corresponding panel.
10
+ */
11
+ value: ReadonlySignal<string>;
12
+ /**
13
+ * A readonly signal whose value indicates whether the tab is currently active,
14
+ * meaning its associated panel is being displayed.
15
+ */
16
+ active: ReadonlySignal<boolean>;
17
+ /**
18
+ * A readonly signal that indicates whether the tab is disabled.
19
+ * Its value is `true` if the tab is disabled, preventing user interaction.
20
+ */
21
+ disabled: ReadonlySignal<boolean>;
22
+ }
@@ -0,0 +1,3 @@
1
+ export * from './use-tabs-root-context';
2
+ export * from './use-tabs-tab-context';
3
+ export * from './use-tabs-panel-context';
@@ -0,0 +1,2 @@
1
+ export type { UseTabsPanelContextReturnValue } from './use-tabs-panel-context.types';
2
+ export { useTabsPanelContext } from './use-tabs-panel-context';
@@ -0,0 +1,8 @@
1
+ import type { UseTabsPanelContextReturnValue } from './use-tabs-panel-context.types';
2
+ /**
3
+ * A hook that provides access to the `Tabs.Panel` component's internal state.
4
+ * It exposes a readonly signal that allows descendant components to react to
5
+ * the panel's activation state, synchronizing their behavior or styles based
6
+ * on whether the panel is currently visible.
7
+ */
8
+ export declare const useTabsPanelContext: () => UseTabsPanelContextReturnValue;
@@ -0,0 +1,11 @@
1
+ import { useContext } from "@qwik.dev/core";
2
+ import { TabsPanelContext } from "../../contexts/tabs-panel-context/tabs-panel-context.qwik.mjs";
3
+ const useTabsPanelContext = () => {
4
+ const { active } = useContext(TabsPanelContext);
5
+ return {
6
+ active
7
+ };
8
+ };
9
+ export {
10
+ useTabsPanelContext
11
+ };
@@ -0,0 +1,12 @@
1
+ import type { ReadonlySignal } from '@qwik.dev/core';
2
+ /**
3
+ * The value returned by the `useTabsPanelContext` hook.
4
+ * Provides access to the specific tab panel's readonly signal for descendant components.
5
+ */
6
+ export interface UseTabsPanelContextReturnValue {
7
+ /**
8
+ * A readonly signal whose value indicates whether the panel is currently active
9
+ * and visible to the user, based on the selection state of its associated tab.
10
+ */
11
+ active: ReadonlySignal<boolean>;
12
+ }
@@ -0,0 +1,2 @@
1
+ export type { UseTabsRootContextReturnValue } from './use-tabs-root-context.types';
2
+ export { useTabsRootContext } from './use-tabs-root-context';
@@ -0,0 +1,8 @@
1
+ import type { UseTabsRootContextReturnValue } from './use-tabs-root-context.types';
2
+ /**
3
+ * A hook that provides access to the `Tabs.Root` component's internal state.
4
+ * It exposes readonly signals and a `QRL` function to interact with the tabs state,
5
+ * allowing descendant components to synchronize with or programmatically control
6
+ * which tab is currently active, while respecting the defined orientation.
7
+ */
8
+ export declare const useTabsRootContext: () => UseTabsRootContextReturnValue;
@@ -0,0 +1,13 @@
1
+ import { useContext } from "@qwik.dev/core";
2
+ import { TabsRootContext } from "../../contexts/tabs-root-context/tabs-root-context.qwik.mjs";
3
+ const useTabsRootContext = () => {
4
+ const { value, setValue$, orientation } = useContext(TabsRootContext);
5
+ return {
6
+ value,
7
+ setValue$,
8
+ orientation
9
+ };
10
+ };
11
+ export {
12
+ useTabsRootContext
13
+ };
@@ -0,0 +1,22 @@
1
+ import type { ReadonlySignal, QRL } from '@qwik.dev/core';
2
+ /**
3
+ * The value returned by the `useTabsRootContext` hook.
4
+ * Provides access to the tabs readonly signals and `QRL` function for descendant components.
5
+ */
6
+ export interface UseTabsRootContextReturnValue {
7
+ /**
8
+ * A readonly signal whose value represents the unique identifier of the currently active tab.
9
+ * This signal reflects the internal state and determines which tab panel is currently visible.
10
+ */
11
+ value: ReadonlySignal<string>;
12
+ /**
13
+ * A `QRL` function used to programmatically set the active value of the tabs.
14
+ * This function takes a string representing the value of the tab to be activated.
15
+ */
16
+ setValue$: QRL<(value: string) => void>;
17
+ /**
18
+ * A readonly signal whose value represents the orientation of the tabs.
19
+ * This value (either `"horizontal"` or `"vertical"`) determines how keyboard navigation and focus management are handled.
20
+ */
21
+ orientation: ReadonlySignal<'horizontal' | 'vertical'>;
22
+ }
@@ -0,0 +1,2 @@
1
+ export type { UseTabsTabContextReturnValue } from './use-tabs-tab-context.types';
2
+ export { useTabsTabContext } from './use-tabs-tab-context';
@@ -0,0 +1,7 @@
1
+ import type { UseTabsTabContextReturnValue } from './use-tabs-tab-context.types';
2
+ /**
3
+ * A hook that provides access to the `Tabs.Tab` component's internal state.
4
+ * It exposes readonly signals that allow descendant components to react to the tab's
5
+ * unique value, its current activation state, and its disabled status.
6
+ */
7
+ export declare const useTabsTabContext: () => UseTabsTabContextReturnValue;
@@ -0,0 +1,13 @@
1
+ import { useContext } from "@qwik.dev/core";
2
+ import { TabsTabContext } from "../../contexts/tabs-tab-context/tabs-tab-context.qwik.mjs";
3
+ const useTabsTabContext = () => {
4
+ const { value, active, disabled } = useContext(TabsTabContext);
5
+ return {
6
+ value,
7
+ active,
8
+ disabled
9
+ };
10
+ };
11
+ export {
12
+ useTabsTabContext
13
+ };
@@ -0,0 +1,22 @@
1
+ import type { ReadonlySignal } from '@qwik.dev/core';
2
+ /**
3
+ * The value returned by the `useTabsTabContext` hook.
4
+ * Provides access to the specific tab's readonly signals for descendant components.
5
+ */
6
+ export interface UseTabsTabContextReturnValue {
7
+ /**
8
+ * A readonly signal containing the unique value associated with the tab.
9
+ * This value connects the tab to its corresponding panel.
10
+ */
11
+ value: ReadonlySignal<string>;
12
+ /**
13
+ * A readonly signal whose value indicates whether the tab is currently active,
14
+ * meaning its associated panel is being displayed.
15
+ */
16
+ active: ReadonlySignal<boolean>;
17
+ /**
18
+ * A readonly signal that indicates whether the tab is disabled.
19
+ * Its value is `true` if the tab is disabled, preventing user interaction.
20
+ */
21
+ disabled: ReadonlySignal<boolean>;
22
+ }
@@ -0,0 +1,2 @@
1
+ export * as Tabs from './parts';
2
+ export * from './hooks';
@@ -0,0 +1,10 @@
1
+ import * as index from "./parts/index.qwik.mjs";
2
+ import { useTabsRootContext } from "./hooks/use-tabs-root-context/use-tabs-root-context.qwik.mjs";
3
+ import { useTabsTabContext } from "./hooks/use-tabs-tab-context/use-tabs-tab-context.qwik.mjs";
4
+ import { useTabsPanelContext } from "./hooks/use-tabs-panel-context/use-tabs-panel-context.qwik.mjs";
5
+ export {
6
+ index as Tabs,
7
+ useTabsPanelContext,
8
+ useTabsRootContext,
9
+ useTabsTabContext
10
+ };
@@ -0,0 +1,8 @@
1
+ export type { TabsRootProps as RootProps } from './tabs-root';
2
+ export type { TabsListProps as ListProps } from './tabs-list';
3
+ export type { TabsTabProps as TabProps } from './tabs-tab';
4
+ export type { TabsPanelProps as PanelProps } from './tabs-panel';
5
+ export { TabsRoot as Root } from './tabs-root';
6
+ export { TabsList as List } from './tabs-list';
7
+ export { TabsTab as Tab } from './tabs-tab';
8
+ export { TabsPanel as Panel } from './tabs-panel';
@@ -0,0 +1,10 @@
1
+ import { TabsRoot } from "./tabs-root/tabs-root.qwik.mjs";
2
+ import { TabsList } from "./tabs-list/tabs-list.qwik.mjs";
3
+ import { TabsTab } from "./tabs-tab/tabs-tab.qwik.mjs";
4
+ import { TabsPanel } from "./tabs-panel/tabs-panel.qwik.mjs";
5
+ export {
6
+ TabsList as List,
7
+ TabsPanel as Panel,
8
+ TabsRoot as Root,
9
+ TabsTab as Tab
10
+ };
@@ -0,0 +1,2 @@
1
+ export type { TabsListProps } from './tabs-list.types';
2
+ export { TabsList } from './tabs-list';
@@ -0,0 +1,7 @@
1
+ import type { TabsListProps } from './tabs-list.types';
2
+ /**
3
+ * Groups the individual tab buttons.
4
+ *
5
+ * Renders a `<div>` element.
6
+ */
7
+ export declare const TabsList: import("@qwik.dev/core").Component<TabsListProps>;
@@ -0,0 +1,37 @@
1
+ import { jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, useSignal, useComputed$, useTask$, $, useContextProvider, Slot } from "@qwik.dev/core";
3
+ import { useTabsRootContext } from "../../contexts/tabs-root-context/tabs-root-context.qwik.mjs";
4
+ import { TabsListContext } from "../../contexts/tabs-list-context/tabs-list-context.qwik.mjs";
5
+ import { RovingFocusGroupRoot } from "../../../roving-focus-group/parts/roving-focus-group-root/roving-focus-group-root.qwik.mjs";
6
+ const TabsList = component$((props) => {
7
+ const { as = "div", activationMode: _activationMode = "automatic", loopFocus = true, ...others } = props;
8
+ const { value, dir, orientation } = useTabsRootContext();
9
+ const currentTabStopId = useSignal(value.value);
10
+ const activationMode = useComputed$(() => _activationMode);
11
+ useTask$(({ track }) => {
12
+ const activeTabValue = track(() => value.value);
13
+ currentTabStopId.value = activeTabValue;
14
+ });
15
+ const handleCurrentTabStopIdChange$ = $((tabStopId) => {
16
+ currentTabStopId.value = tabStopId;
17
+ });
18
+ useContextProvider(TabsListContext, {
19
+ activationMode
20
+ });
21
+ return /* @__PURE__ */ jsx(RovingFocusGroupRoot, {
22
+ as,
23
+ currentTabStopId,
24
+ onCurrentTabStopIdChange$: handleCurrentTabStopIdChange$,
25
+ loopFocus,
26
+ dir: dir.value,
27
+ orientation: orientation.value,
28
+ role: "tablist",
29
+ "aria-orientation": orientation.value,
30
+ "data-entry-ui-qwik-tabs-list": "",
31
+ ...others,
32
+ children: /* @__PURE__ */ jsx(Slot, {})
33
+ });
34
+ });
35
+ export {
36
+ TabsList
37
+ };
@@ -0,0 +1,30 @@
1
+ import type { Component, PropsOf } from '@qwik.dev/core';
2
+ /**
3
+ * Props for the `Tabs.List` component.
4
+ * Extends the standard HTML attributes for a `div` element.
5
+ */
6
+ export interface TabsListProps extends Omit<PropsOf<'div'>, 'dir'> {
7
+ /**
8
+ * The element or component this component should render as.
9
+ *
10
+ * @see {@link https://github.com/ZAHON/entry-ui/tree/main/packages/qwik/docs/guides/composition.md Composition} guide for more details.
11
+ *
12
+ * @default "div"
13
+ */
14
+ as?: string | Component;
15
+ /**
16
+ * Whether the tabs should be activated automatically on focus or manually on click.
17
+ *
18
+ * - When `"automatic"`, tabs are activated when receiving focus.
19
+ * - When `"manual"`, tabs are activated only when clicked or via keyboard selection (`Enter` or `Space`).
20
+ *
21
+ * @default "automatic"
22
+ */
23
+ activationMode?: 'automatic' | 'manual';
24
+ /**
25
+ * When `true`, keyboard navigation will loop from last tab to first, and vice versa.
26
+ *
27
+ * @default true
28
+ */
29
+ loopFocus?: boolean;
30
+ }
@@ -0,0 +1,2 @@
1
+ export type { TabsPanelProps } from './tabs-panel.types';
2
+ export { TabsPanel } from './tabs-panel';
@@ -0,0 +1,7 @@
1
+ import type { TabsPanelProps } from './tabs-panel.types';
2
+ /**
3
+ * A panel displayed when the corresponding tab is active.
4
+ *
5
+ * Renders a `<div>` element.
6
+ */
7
+ export declare const TabsPanel: import("@qwik.dev/core").Component<TabsPanelProps>;
@@ -0,0 +1,39 @@
1
+ import { jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, useComputed$, useContextProvider, Slot } from "@qwik.dev/core";
3
+ import { mergeStyles } from "../../../../utilities/merge-styles/merge-styles.qwik.mjs";
4
+ import { Primitive } from "../../../../_internal/components/primitive/primitive.qwik.mjs";
5
+ import { useTabsRootContext } from "../../contexts/tabs-root-context/tabs-root-context.qwik.mjs";
6
+ import { TabsPanelContext } from "../../contexts/tabs-panel-context/tabs-panel-context.qwik.mjs";
7
+ const TabsPanel = component$((props) => {
8
+ const { as = "div", value, containsFocusableContent = false, style, ...others } = props;
9
+ const { value: activeTabValue, orientation, id } = useTabsRootContext();
10
+ const tabId = useComputed$(() => `entry-ui-qwik-tabs-${id}-tab-${value}`);
11
+ const panelId = useComputed$(() => `entry-ui-qwik-tabs-${id}-panel-${value}`);
12
+ const active = useComputed$(() => activeTabValue.value === value);
13
+ const mergedStyles = useComputed$(() => mergeStyles([
14
+ {
15
+ display: !active.value ? "none !important" : void 0
16
+ },
17
+ style
18
+ ]));
19
+ useContextProvider(TabsPanelContext, {
20
+ active
21
+ });
22
+ return /* @__PURE__ */ jsx(Primitive.div, {
23
+ as,
24
+ role: "tabpanel",
25
+ id: panelId.value,
26
+ hidden: !active.value,
27
+ tabIndex: !active.value ? -1 : containsFocusableContent ? void 0 : 0,
28
+ "aria-labelledby": tabId.value,
29
+ "data-entry-ui-qwik-tabs-panel": "",
30
+ "data-state": active.value ? "active" : "inactive",
31
+ "data-orientation": orientation.value,
32
+ style: mergedStyles.value,
33
+ ...others,
34
+ children: /* @__PURE__ */ jsx(Slot, {})
35
+ });
36
+ });
37
+ export {
38
+ TabsPanel
39
+ };
@@ -0,0 +1,27 @@
1
+ import type { Component, PropsOf } from '@qwik.dev/core';
2
+ /**
3
+ * Props for the `Tabs.Panel` component.
4
+ * Extends the standard HTML attributes for a `div` element.
5
+ */
6
+ export interface TabsPanelProps extends PropsOf<'div'> {
7
+ /**
8
+ * The element or component this component should render as.
9
+ *
10
+ * @see {@link https://github.com/ZAHON/entry-ui/tree/main/packages/qwik/docs/guides/composition.md Composition} guide for more details.
11
+ *
12
+ * @default "div"
13
+ */
14
+ as?: string | Component;
15
+ /**
16
+ * A unique value that associates the panel with a tab.
17
+ */
18
+ value: string;
19
+ /**
20
+ * When `true`, indicates the panel contains focusable elements (like inputs or links).
21
+ * This removes the panel from the tab order (`tabIndex`) to avoid redundant focus stops,
22
+ * allowing focus to move directly to the internal content.
23
+ *
24
+ * @default false
25
+ */
26
+ containsFocusableContent?: boolean;
27
+ }
@@ -0,0 +1,2 @@
1
+ export type { TabsRootProps } from './tabs-root.types';
2
+ export { TabsRoot } from './tabs-root';
@@ -0,0 +1,7 @@
1
+ import type { TabsRootProps } from './tabs-root.types';
2
+ /**
3
+ * Groups the tabs and the corresponding panels.
4
+ *
5
+ * Renders a `<div>` element.
6
+ */
7
+ export declare const TabsRoot: import("@qwik.dev/core").Component<TabsRootProps>;
@@ -0,0 +1,34 @@
1
+ import { jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, useId, useComputed$, useContextProvider, Slot } from "@qwik.dev/core";
3
+ import { useControllable } from "../../../../hooks/use-controllable/use-controllable.qwik.mjs";
4
+ import { Primitive } from "../../../../_internal/components/primitive/primitive.qwik.mjs";
5
+ import { TabsRootContext } from "../../contexts/tabs-root-context/tabs-root-context.qwik.mjs";
6
+ const TabsRoot = component$((props) => {
7
+ const { as = "div", defaultValue, value: _value, onValueChange$, dir: _dir = "ltr", orientation: _orientation = "horizontal", ...others } = props;
8
+ const { state: value, setState$: setValue$ } = useControllable({
9
+ defaultValue: defaultValue ?? "",
10
+ controlledSignal: _value,
11
+ onChange$: onValueChange$
12
+ });
13
+ const id = useId();
14
+ const dir = useComputed$(() => _dir);
15
+ const orientation = useComputed$(() => _orientation);
16
+ useContextProvider(TabsRootContext, {
17
+ value,
18
+ setValue$,
19
+ id,
20
+ dir,
21
+ orientation
22
+ });
23
+ return /* @__PURE__ */ jsx(Primitive.div, {
24
+ as,
25
+ dir: dir.value,
26
+ "data-entry-ui-qwik-tabs-root": "",
27
+ "data-orientation": orientation.value,
28
+ ...others,
29
+ children: /* @__PURE__ */ jsx(Slot, {})
30
+ });
31
+ });
32
+ export {
33
+ TabsRoot
34
+ };
@@ -0,0 +1,50 @@
1
+ import type { Component, PropsOf, Signal, QRL } from '@qwik.dev/core';
2
+ /**
3
+ * Props for the `Tabs.Root` component.
4
+ * Extends the standard HTML attributes for a `div` element.
5
+ */
6
+ export interface TabsRootProps extends PropsOf<'div'> {
7
+ /**
8
+ * The element or component this component should render as.
9
+ *
10
+ * @see {@link https://github.com/ZAHON/entry-ui/tree/main/packages/qwik/docs/guides/composition.md Composition} guide for more details.
11
+ *
12
+ * @default "div"
13
+ */
14
+ as?: string | Component;
15
+ /**
16
+ * The value of the tab that should be active when initially rendered.
17
+ * Use when you do not need to control the state of the tabs.
18
+ *
19
+ * @default undefined
20
+ */
21
+ defaultValue?: string;
22
+ /**
23
+ * The controlled value of the tab to activate.
24
+ * Should be used in conjunction with `onValueChange$`.
25
+ *
26
+ * @default undefined
27
+ */
28
+ value?: Signal<string>;
29
+ /**
30
+ * A `QRL` callback function that is called when the value changes.
31
+ *
32
+ * @default undefined
33
+ */
34
+ onValueChange$?: QRL<(value: string) => void>;
35
+ /**
36
+ * The reading direction of the tabs.
37
+ * When set to `"rtl"`, keyboard navigation is reversed and visual alignment is adjusted for right-to-left languages.
38
+ *
39
+ * @default "ltr"
40
+ */
41
+ dir?: 'ltr' | 'rtl';
42
+ /**
43
+ * The orientation of the tabs.
44
+ * This value determines whether the tabs are laid out horizontally or vertically,
45
+ * and adjusts keyboard navigation (arrow keys) to match the visual orientation.
46
+ *
47
+ * @default "horizontal"
48
+ */
49
+ orientation?: 'horizontal' | 'vertical';
50
+ }
@@ -0,0 +1,2 @@
1
+ export type { TabsTabProps } from './tabs-tab.types';
2
+ export { TabsTab } from './tabs-tab';
@@ -0,0 +1,7 @@
1
+ import type { TabsTabProps } from './tabs-tab.types';
2
+ /**
3
+ * An individual interactive tab button that toggles the corresponding panel.
4
+ *
5
+ * Renders a `<button>` element.
6
+ */
7
+ export declare const TabsTab: import("@qwik.dev/core").Component<TabsTabProps>;
@@ -0,0 +1,87 @@
1
+ import { jsx } from "@qwik.dev/core/jsx-runtime";
2
+ import { component$, useComputed$, sync$, $, useContextProvider, Slot } from "@qwik.dev/core";
3
+ import { useTabsRootContext } from "../../contexts/tabs-root-context/tabs-root-context.qwik.mjs";
4
+ import { useTabsListContext } from "../../contexts/tabs-list-context/tabs-list-context.qwik.mjs";
5
+ import { TabsTabContext } from "../../contexts/tabs-tab-context/tabs-tab-context.qwik.mjs";
6
+ import { RovingFocusGroupItem } from "../../../roving-focus-group/parts/roving-focus-group-item/roving-focus-group-item.qwik.mjs";
7
+ const TabsTab = component$((props) => {
8
+ const { as = "button", value: _value, disabled: _disabled = false, onMouseDown$, onKeyDown$, onFocus$, ...others } = props;
9
+ const { value: activeTabValue, setValue$: setActiveTabValue$, id } = useTabsRootContext();
10
+ const { activationMode } = useTabsListContext();
11
+ const tabId = useComputed$(() => `entry-ui-qwik-tabs-${id}-tab-${_value}`);
12
+ const panelId = useComputed$(() => `entry-ui-qwik-tabs-${id}-panel-${_value}`);
13
+ const value = useComputed$(() => _value);
14
+ const active = useComputed$(() => activeTabValue.value === _value);
15
+ const disabled = useComputed$(() => _disabled);
16
+ const handleMouseDownSync$ = sync$((event, currentTarget) => {
17
+ const entryUIQwikEvent = event;
18
+ const isDisabled = currentTarget.hasAttribute("disabled") || currentTarget.hasAttribute("data-disabled");
19
+ if (entryUIQwikEvent.entryUIQwikHandlerPrevented) return;
20
+ if (isDisabled || event.button !== 0 || event.ctrlKey !== false) {
21
+ event.preventDefault();
22
+ }
23
+ });
24
+ const handleMouseDown$ = $((event) => {
25
+ const entryUIQwikEvent = event;
26
+ if (entryUIQwikEvent.entryUIQwikHandlerPrevented) return;
27
+ if (!disabled.value && event.button === 0 && event.ctrlKey === false) {
28
+ setActiveTabValue$(value.value);
29
+ }
30
+ });
31
+ const handleKeyDown$ = $((event) => {
32
+ const entryUIQwikEvent = event;
33
+ if (entryUIQwikEvent.entryUIQwikHandlerPrevented) return;
34
+ if (!disabled.value && [
35
+ " ",
36
+ "Enter"
37
+ ].includes(event.key)) {
38
+ setActiveTabValue$(value.value);
39
+ }
40
+ });
41
+ const handleFocus$ = $((event) => {
42
+ const entryUIQwikEvent = event;
43
+ if (entryUIQwikEvent.entryUIQwikHandlerPrevented) return;
44
+ if (!active.value && !disabled.value && activationMode.value === "automatic") {
45
+ setActiveTabValue$(value.value);
46
+ }
47
+ });
48
+ useContextProvider(TabsTabContext, {
49
+ value,
50
+ active,
51
+ disabled
52
+ });
53
+ return /* @__PURE__ */ jsx(RovingFocusGroupItem, {
54
+ as,
55
+ tabStopId: value.value,
56
+ focusable: !disabled.value,
57
+ id: tabId.value,
58
+ role: "tab",
59
+ disabled: disabled.value,
60
+ "aria-selected": active.value,
61
+ "aria-controls": panelId.value,
62
+ "data-entry-ui-qwik-tabs-tab": "",
63
+ "data-state": active.value ? "active" : "inactive",
64
+ "data-active": void 0,
65
+ // @ts-expect-error - The event handler element types differ, but the runtime correctly handles the `as` prop polymorphism.
66
+ onMouseDown$: [
67
+ onMouseDown$,
68
+ handleMouseDownSync$,
69
+ handleMouseDown$
70
+ ],
71
+ // @ts-expect-error - The event handler element types differ, but the runtime correctly handles the `as` prop polymorphism.
72
+ onKeyDown$: [
73
+ onKeyDown$,
74
+ handleKeyDown$
75
+ ],
76
+ // @ts-expect-error - The event handler element types differ, but the runtime correctly handles the `as` prop polymorphism.
77
+ onFocus$: [
78
+ onFocus$,
79
+ handleFocus$
80
+ ],
81
+ ...others,
82
+ children: /* @__PURE__ */ jsx(Slot, {})
83
+ });
84
+ });
85
+ export {
86
+ TabsTab
87
+ };
@@ -0,0 +1,25 @@
1
+ import type { PropsOf, Component } from '@qwik.dev/core';
2
+ /**
3
+ * Props for the `Tabs.Tab` component.
4
+ * Extends the standard HTML attributes for a `button` element.
5
+ */
6
+ export interface TabsTabProps extends PropsOf<'button'> {
7
+ /**
8
+ * The element or component this component should render as.
9
+ *
10
+ * @see {@link https://github.com/ZAHON/entry-ui/tree/main/packages/qwik/docs/guides/composition.md Composition} guide for more details.
11
+ *
12
+ * @default "button"
13
+ */
14
+ as?: string | Component;
15
+ /**
16
+ * A unique value that associates the tab with a panel.
17
+ */
18
+ value: string;
19
+ /**
20
+ * When `true`, prevents the user from interacting with the tab.
21
+ *
22
+ * @default false
23
+ */
24
+ disabled?: boolean;
25
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './use-boolean';
2
+ export * from './use-clipboard';
2
3
  export * from './use-controllable';
3
4
  export * from './use-counter';
4
5
  export * from './use-cycle';
@@ -0,0 +1,2 @@
1
+ export type { UseClipboardParams, UseClipboardReturnValue } from './use-clipboard.types';
2
+ export { useClipboard } from './use-clipboard';
@@ -0,0 +1,4 @@
1
+ import { useClipboard } from "./use-clipboard.qwik.mjs";
2
+ export {
3
+ useClipboard
4
+ };