@ttoss/components 2.14.20 → 2.14.21

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 (74) hide show
  1. package/dist/Accordion/index.d.mts +157 -0
  2. package/dist/Accordion/index.mjs +175 -0
  3. package/dist/DatePicker/index.d.mts +26 -0
  4. package/dist/DatePicker/index.mjs +339 -0
  5. package/dist/Drawer/index.d.mts +17 -0
  6. package/dist/{esm/Drawer/index.js → Drawer/index.mjs} +21 -14
  7. package/dist/EnhancedTitle/{index.d.ts → index.d.mts} +57 -47
  8. package/dist/EnhancedTitle/index.mjs +234 -0
  9. package/dist/FileUploader/index.d.mts +77 -0
  10. package/dist/FileUploader/index.mjs +386 -0
  11. package/dist/InstallPwa/index.d.mts +13 -0
  12. package/dist/InstallPwa/index.mjs +64 -0
  13. package/dist/JsonEditor/index.d.mts +3 -0
  14. package/dist/{esm/JsonEditor/index.js → JsonEditor/index.mjs} +0 -3
  15. package/dist/JsonView/index.d.mts +3 -0
  16. package/dist/{esm/JsonView/index.js → JsonView/index.mjs} +0 -3
  17. package/dist/List/{index.d.ts → index.d.mts} +9 -6
  18. package/dist/List/index.mjs +34 -0
  19. package/dist/LockedOverlay/index.d.mts +162 -0
  20. package/dist/LockedOverlay/index.mjs +386 -0
  21. package/dist/Markdown/index.d.mts +16 -0
  22. package/dist/Markdown/index.mjs +26 -0
  23. package/dist/Menu/index.d.mts +16 -0
  24. package/dist/{esm/Menu/index.js → Menu/index.mjs} +56 -51
  25. package/dist/MetricCard/index.d.mts +153 -0
  26. package/dist/MetricCard/index.mjs +408 -0
  27. package/dist/Modal/index.d.mts +11 -0
  28. package/dist/{esm/Modal/index.js → Modal/index.mjs} +11 -12
  29. package/dist/NavList/index.d.mts +64 -0
  30. package/dist/{esm/NavList/index.js → NavList/index.mjs} +79 -73
  31. package/dist/NotificationCard/index.d.mts +22 -0
  32. package/dist/NotificationCard/index.mjs +173 -0
  33. package/dist/NotificationsMenu/index.d.mts +47 -0
  34. package/dist/NotificationsMenu/index.mjs +380 -0
  35. package/dist/Search/index.d.mts +18 -0
  36. package/dist/{esm/Search/index.js → Search/index.mjs} +11 -9
  37. package/dist/SpotlightCard/index.d.mts +36 -0
  38. package/dist/SpotlightCard/index.mjs +219 -0
  39. package/dist/Table/index.d.mts +17 -0
  40. package/dist/Table/index.mjs +64 -0
  41. package/dist/Tabs/index.d.mts +17 -0
  42. package/dist/{esm/Tabs/index.js → Tabs/index.mjs} +24 -12
  43. package/dist/Toast/index.d.mts +8 -0
  44. package/dist/Toast/index.mjs +43 -0
  45. package/package.json +15 -15
  46. package/dist/Accordion/index.d.ts +0 -148
  47. package/dist/DatePicker/index.d.ts +0 -20
  48. package/dist/Drawer/index.d.ts +0 -12
  49. package/dist/LockedOverlay/index.d.ts +0 -151
  50. package/dist/Markdown/index.d.ts +0 -11
  51. package/dist/Menu/index.d.ts +0 -11
  52. package/dist/MetricCard/index.d.ts +0 -148
  53. package/dist/Modal/index.d.ts +0 -10
  54. package/dist/NavList/index.d.ts +0 -55
  55. package/dist/NotificationCard/index.d.ts +0 -21
  56. package/dist/NotificationsMenu/index.d.ts +0 -36
  57. package/dist/Search/index.d.ts +0 -11
  58. package/dist/SpotlightCard/index.d.ts +0 -27
  59. package/dist/Table/index.d.ts +0 -16
  60. package/dist/esm/Accordion/index.js +0 -119
  61. package/dist/esm/DatePicker/index.js +0 -331
  62. package/dist/esm/EnhancedTitle/index.js +0 -190
  63. package/dist/esm/FileUploader/index.js +0 -401
  64. package/dist/esm/InstallPwa/index.js +0 -61
  65. package/dist/esm/List/index.js +0 -30
  66. package/dist/esm/LockedOverlay/index.js +0 -316
  67. package/dist/esm/Markdown/index.js +0 -23
  68. package/dist/esm/MetricCard/index.js +0 -327
  69. package/dist/esm/NotificationCard/index.js +0 -156
  70. package/dist/esm/NotificationsMenu/index.js +0 -359
  71. package/dist/esm/SpotlightCard/index.js +0 -212
  72. package/dist/esm/Table/index.js +0 -63
  73. package/dist/esm/Toast/index.js +0 -38
  74. package/dist/esm/chunk-V4MHYKRI.js +0 -7
@@ -0,0 +1,17 @@
1
+
2
+ import { BoxProps } from "@ttoss/ui";
3
+ import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
4
+
5
+ //#region src/components/Table/Table.d.ts
6
+ declare const Table: {
7
+ (props: BoxProps): import("react/jsx-runtime").JSX.Element;
8
+ Head: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
9
+ Body: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
10
+ Row: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
11
+ Cell: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
12
+ Header: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
13
+ Caption: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
14
+ Footer: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
15
+ };
16
+ //#endregion
17
+ export { Table, createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable };
@@ -0,0 +1,64 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { Box } from "@ttoss/ui";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
5
+
6
+ //#region src/components/Table/Table.tsx
7
+ const Table = props => {
8
+ return /* @__PURE__ */jsx(Box, {
9
+ as: "table",
10
+ ...props
11
+ });
12
+ };
13
+ const TableHead = props => {
14
+ return /* @__PURE__ */jsx(Box, {
15
+ as: "thead",
16
+ ...props
17
+ });
18
+ };
19
+ const TableBody = props => {
20
+ return /* @__PURE__ */jsx(Box, {
21
+ as: "tbody",
22
+ ...props
23
+ });
24
+ };
25
+ const TableRow = props => {
26
+ return /* @__PURE__ */jsx(Box, {
27
+ as: "tr",
28
+ ...props
29
+ });
30
+ };
31
+ const TableCell = props => {
32
+ return /* @__PURE__ */jsx(Box, {
33
+ as: "td",
34
+ ...props
35
+ });
36
+ };
37
+ const TableHeader = props => {
38
+ return /* @__PURE__ */jsx(Box, {
39
+ as: "th",
40
+ ...props
41
+ });
42
+ };
43
+ const TableCaption = props => {
44
+ return /* @__PURE__ */jsx(Box, {
45
+ as: "caption",
46
+ ...props
47
+ });
48
+ };
49
+ const TableFooter = props => {
50
+ return /* @__PURE__ */jsx(Box, {
51
+ as: "tfoot",
52
+ ...props
53
+ });
54
+ };
55
+ Table.Head = TableHead;
56
+ Table.Body = TableBody;
57
+ Table.Row = TableRow;
58
+ Table.Cell = TableCell;
59
+ Table.Header = TableHeader;
60
+ Table.Caption = TableCaption;
61
+ Table.Footer = TableFooter;
62
+
63
+ //#endregion
64
+ export { Table, createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable };
@@ -0,0 +1,17 @@
1
+
2
+ import { BoxProps } from "@ttoss/ui";
3
+ import { TabListProps, TabPanelProps, TabProps, TabsProps } from "react-tabs";
4
+
5
+ //#region src/components/Tabs/Tabs.d.ts
6
+ declare const Tabs: {
7
+ (props: BoxProps & TabsProps): import("react/jsx-runtime").JSX.Element;
8
+ TabList: import("react").FunctionComponent<TabListProps>;
9
+ /**
10
+ * Tab default props
11
+ * https://github.com/reactjs/react-tabs/blob/main/src/components/Tab.js
12
+ */
13
+ Tab: import("react").FunctionComponent<TabProps>;
14
+ TabPanel: import("react").FunctionComponent<TabPanelProps>;
15
+ };
16
+ //#endregion
17
+ export { type TabListProps, type TabPanelProps, type TabProps, Tabs, type TabsProps };
@@ -1,20 +1,22 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import * as React from 'react';
3
- import { __name } from "../chunk-V4MHYKRI.js";
4
-
5
- // src/components/Tabs/Tabs.tsx
6
2
  import { Box } from "@ttoss/ui";
7
- import { Tab, TabList, TabPanel, Tabs as ReactTabs } from "react-tabs";
8
- var Tabs = /* @__PURE__ */__name(props => {
3
+ import { Tab, TabList, TabPanel, Tabs as Tabs$1 } from "react-tabs";
4
+ import { jsx } from "react/jsx-runtime";
5
+
6
+ //#region src/components/Tabs/Tabs.tsx
7
+ const Tabs = props => {
9
8
  const {
10
9
  sx: customSx,
11
10
  ...restProps
12
11
  } = props;
13
- return /* @__PURE__ */React.createElement(Box, {
14
- sx: /* @__PURE__ */__name(({
12
+ return /* @__PURE__ */jsx(Box, {
13
+ sx: ({
15
14
  colors
16
15
  }) => {
17
16
  const themeColors = colors;
17
+ /**
18
+ * https://github.com/reactjs/react-tabs/blob/main/style/react-tabs.css
19
+ */
18
20
  return {
19
21
  /**
20
22
  * Tabs
@@ -65,11 +67,21 @@ var Tabs = /* @__PURE__ */__name(props => {
65
67
  },
66
68
  ...customSx
67
69
  };
68
- }, "sx"),
69
- ...restProps
70
- }, /* @__PURE__ */React.createElement(ReactTabs, restProps, props.children));
71
- }, "Tabs");
70
+ },
71
+ ...restProps,
72
+ children: /* @__PURE__ */jsx(Tabs$1, {
73
+ ...restProps,
74
+ children: props.children
75
+ })
76
+ });
77
+ };
72
78
  Tabs.TabList = TabList;
79
+ /**
80
+ * Tab default props
81
+ * https://github.com/reactjs/react-tabs/blob/main/src/components/Tab.js
82
+ */
73
83
  Tabs.Tab = Tab;
74
84
  Tabs.TabPanel = TabPanel;
85
+
86
+ //#endregion
75
87
  export { Tabs };
@@ -0,0 +1,8 @@
1
+
2
+ import { ToastContainerProps, ToastOptions, toast as toast$1 } from "react-toastify";
3
+
4
+ //#region src/components/Toast/Toast.d.ts
5
+ declare const ToastContainer: (props: ToastContainerProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const toast: typeof toast$1;
7
+ //#endregion
8
+ export { ToastContainer, type ToastContainerProps, type ToastOptions, toast };
@@ -0,0 +1,43 @@
1
+ /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
+ import { Box, useTheme } from "@ttoss/ui";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { css } from "@emotion/css";
5
+ import { css as css$1 } from "@theme-ui/css";
6
+ import * as React from "react";
7
+ import { ToastContainer as ToastContainer$1, toast as toast$1 } from "react-toastify";
8
+
9
+ //#region src/components/Toast/Toast.tsx
10
+ const ToastContainer = props => {
11
+ const {
12
+ theme
13
+ } = useTheme();
14
+ const className = React.useMemo(() => {
15
+ return css(css$1({
16
+ ".Toastify__toast-container": {}
17
+ })(theme));
18
+ }, [theme]);
19
+ return /* @__PURE__ */jsx(Box, {
20
+ className,
21
+ sx: ({
22
+ colors,
23
+ fonts
24
+ }) => {
25
+ const themeColors = colors;
26
+ /**
27
+ * https://fkhadra.github.io/react-toastify/how-to-style#override-css-variables
28
+ */
29
+ return {
30
+ "--toastify-font-family": fonts?.body,
31
+ "--toastify-color-light": themeColors?.feedback?.background?.primary?.default
32
+ };
33
+ },
34
+ children: /* @__PURE__ */jsx(ToastContainer$1, {
35
+ className,
36
+ ...props
37
+ })
38
+ });
39
+ };
40
+ const toast = toast$1;
41
+
42
+ //#endregion
43
+ export { ToastContainer, toast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.14.20",
3
+ "version": "2.14.21",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "keywords": [
6
6
  "React",
@@ -131,23 +131,23 @@
131
131
  "@types/jest": "^30.0.0",
132
132
  "@types/react": "^19.2.14",
133
133
  "jest": "^30.3.0",
134
- "react": "^19.2.4",
135
- "tsup": "^8.5.1",
134
+ "react": "^19.2.6",
135
+ "tsdown": "^0.22.0",
136
136
  "tsx": "^4.21.0",
137
- "@ttoss/config": "^1.37.12",
138
- "@ttoss/i18n-cli": "^0.8.12",
139
- "@ttoss/react-hooks": "^2.3.12",
140
- "@ttoss/react-i18n": "^2.2.13",
141
- "@ttoss/react-icons": "^0.7.13",
142
- "@ttoss/test-utils": "^4.2.12",
143
- "@ttoss/ui": "^6.9.19"
137
+ "@ttoss/config": "^1.37.13",
138
+ "@ttoss/i18n-cli": "^0.8.13",
139
+ "@ttoss/react-hooks": "^2.3.13",
140
+ "@ttoss/react-icons": "^0.7.14",
141
+ "@ttoss/test-utils": "^4.2.13",
142
+ "@ttoss/ui": "^6.9.20",
143
+ "@ttoss/react-i18n": "^2.2.14"
144
144
  },
145
145
  "peerDependencies": {
146
146
  "react": ">=16.8.0",
147
- "@ttoss/react-hooks": "^2.3.12",
148
- "@ttoss/react-icons": "^0.7.13",
149
- "@ttoss/ui": "^6.9.19",
150
- "@ttoss/react-i18n": "^2.2.13"
147
+ "@ttoss/react-i18n": "^2.2.14",
148
+ "@ttoss/react-hooks": "^2.3.13",
149
+ "@ttoss/react-icons": "^0.7.14",
150
+ "@ttoss/ui": "^6.9.20"
151
151
  },
152
152
  "publishConfig": {
153
153
  "access": "public",
@@ -155,7 +155,7 @@
155
155
  },
156
156
  "gitHead": "e2b509ee8717f07f7365191b651dcbb5f080e05a",
157
157
  "scripts": {
158
- "build": "tsup",
158
+ "build": "tsdown",
159
159
  "postbuild": "pnpm run update-package-json-exports",
160
160
  "dev": "pnpm -r --filter=@docs/storybook run dev",
161
161
  "i18n": "ttoss-i18n",
@@ -1,148 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { BoxProps } from '@ttoss/ui';
3
- import * as React from 'react';
4
-
5
- /**
6
- * Individual item for the Accordion component.
7
- */
8
- type AccordionItem = {
9
- /**
10
- * Unique identifier for the accordion item.
11
- * If not provided, will use the index as the key.
12
- */
13
- id?: string;
14
- /**
15
- * Title displayed in the accordion header.
16
- */
17
- title: React.ReactNode;
18
- /**
19
- * Content displayed when the accordion item is expanded.
20
- */
21
- content: React.ReactNode;
22
- /**
23
- * Whether the item is disabled.
24
- * @default false
25
- */
26
- disabled?: boolean;
27
- };
28
- /**
29
- * Render props for custom accordion item rendering.
30
- */
31
- type AccordionRenderItemProps = {
32
- /**
33
- * The accordion item data.
34
- */
35
- item: AccordionItem;
36
- /**
37
- * Index of the item in the items array.
38
- */
39
- index: number;
40
- /**
41
- * Whether the item is currently expanded.
42
- */
43
- isExpanded: boolean;
44
- /**
45
- * Function to toggle the item's expanded state.
46
- */
47
- toggle: () => void;
48
- /**
49
- * Generated IDs for accessibility.
50
- */
51
- ids: {
52
- itemId: string;
53
- headingId: string;
54
- panelId: string;
55
- };
56
- };
57
- /**
58
- * Props for the Accordion component.
59
- */
60
- type AccordionProps = BoxProps & {
61
- /**
62
- * Array of accordion items to render.
63
- */
64
- items: AccordionItem[];
65
- /**
66
- * Whether multiple items can be expanded at once.
67
- * @default false
68
- */
69
- multiple?: boolean;
70
- /**
71
- * Index or array of indices for initially expanded items.
72
- */
73
- defaultExpanded?: number | number[];
74
- /**
75
- * Callback invoked when items are expanded or collapsed.
76
- * Receives array of currently expanded indices.
77
- */
78
- onAccordionChange?: (expandedIndices: number[]) => void;
79
- /**
80
- * Custom render function for accordion items.
81
- * Provides full control over item rendering while maintaining accessibility.
82
- */
83
- renderItem?: (props: AccordionRenderItemProps) => React.ReactNode;
84
- };
85
- /**
86
- * Accessible accordion component with collapsible content sections.
87
- *
88
- * This component provides a simplified API for creating expandable/collapsible
89
- * content sections. It uses design tokens from @ttoss/theme for consistent styling
90
- * and follows WAI-ARIA accordion pattern for accessibility.
91
- *
92
- * @example
93
- * ```tsx
94
- * <Accordion
95
- * items={[
96
- * {
97
- * title: 'Section 1',
98
- * content: 'Content for section 1',
99
- * },
100
- * {
101
- * title: 'Section 2',
102
- * content: 'Content for section 2',
103
- * },
104
- * ]}
105
- * />
106
- * ```
107
- *
108
- * @example
109
- * ```tsx
110
- * <Accordion
111
- * multiple
112
- * defaultExpanded={[0, 1]}
113
- * items={[
114
- * {
115
- * id: 'item-1',
116
- * title: 'Pre-expanded Section 1',
117
- * content: <div>Rich content</div>,
118
- * },
119
- * {
120
- * id: 'item-2',
121
- * title: 'Pre-expanded Section 2',
122
- * content: <p>More content</p>,
123
- * },
124
- * ]}
125
- * onAccordionChange={(expanded) => console.log('Expanded items:', expanded)}
126
- * />
127
- * ```
128
- *
129
- * @example
130
- * ```tsx
131
- * // Custom rendering with renderItem
132
- * <Accordion
133
- * items={items}
134
- * renderItem={({ item, isExpanded, toggle, ids }) => (
135
- * <CustomAccordionItem
136
- * item={item}
137
- * isExpanded={isExpanded}
138
- * onToggle={toggle}
139
- * headingId={ids.headingId}
140
- * panelId={ids.panelId}
141
- * />
142
- * )}
143
- * />
144
- * ```
145
- */
146
- declare const Accordion: ({ items, multiple, defaultExpanded, onAccordionChange, renderItem, sx, ...boxProps }: AccordionProps) => react_jsx_runtime.JSX.Element;
147
-
148
- export { Accordion, type AccordionItem, type AccordionProps, type AccordionRenderItemProps };
@@ -1,20 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- interface DateRange {
4
- from: Date | undefined;
5
- to: Date | undefined;
6
- }
7
- interface DateRangePreset {
8
- label: string;
9
- getValue: () => DateRange;
10
- }
11
- interface DatePickerProps {
12
- label?: string;
13
- value?: DateRange;
14
- presets?: DateRangePreset[];
15
- onChange?: (range: DateRange | undefined) => void;
16
- disabled?: boolean;
17
- }
18
- declare const DatePicker: ({ label, value, presets, onChange, disabled, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
19
-
20
- export { DatePicker, type DateRange };
@@ -1,12 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { BoxProps } from '@ttoss/ui';
3
- import * as React from 'react';
4
- import DrawerUi from 'react-modern-drawer';
5
-
6
- type DrawerUiProps = React.ComponentProps<typeof DrawerUi>;
7
- type DrawerProps = DrawerUiProps & {
8
- sx?: BoxProps['sx'];
9
- };
10
- declare const Drawer: ({ children, sx, ...props }: DrawerProps) => react_jsx_runtime.JSX.Element;
11
-
12
- export { Drawer, type DrawerProps };
@@ -1,151 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ButtonProps, ThemeUIStyleObject, Theme } from '@ttoss/ui';
3
- import * as React from 'react';
4
-
5
- type LockedOverlayAction = {
6
- /**
7
- * Label text for the button
8
- */
9
- label: string;
10
- /**
11
- * Icon identifier from @ttoss/react-icons
12
- */
13
- icon?: string;
14
- /**
15
- * Button variant
16
- */
17
- variant: 'primary' | 'accent' | 'secondary';
18
- /**
19
- * Click handler for the button
20
- */
21
- onClick: () => void;
22
- };
23
- type LockedOverlayProps = {
24
- /**
25
- * Controls the overlay visibility
26
- */
27
- isOpen: boolean;
28
- /**
29
- * Optional close handler. If not provided, overlay cannot be closed by user interaction
30
- */
31
- onRequestClose?: () => void;
32
- /**
33
- * Header configuration for the SpotlightCard
34
- */
35
- header: {
36
- /**
37
- * Icon identifier from @ttoss/react-icons
38
- */
39
- icon: string;
40
- /**
41
- * Title text for the header
42
- */
43
- title: string;
44
- /**
45
- * Description text for the header
46
- */
47
- description: string;
48
- /**
49
- * Visual variant for the SpotlightCard
50
- * @default 'primary'
51
- */
52
- variant?: 'primary' | 'accent';
53
- };
54
- /**
55
- * Optional first button to display in the SpotlightCard header
56
- */
57
- firstButton?: ButtonProps | React.ReactNode;
58
- /**
59
- * Optional second button to display in the SpotlightCard header
60
- */
61
- secondButton?: ButtonProps | React.ReactNode;
62
- /**
63
- * Content to be rendered in the overlay body
64
- */
65
- children: React.ReactNode;
66
- /**
67
- * Optional list of actions to render as buttons in the footer
68
- */
69
- actions?: LockedOverlayAction[];
70
- /**
71
- * Optional style overrides for the overlay and content container
72
- */
73
- sx?: ThemeUIStyleObject<Theme<object>>;
74
- /**
75
- * Optional z-index value to control overlay stacking order.
76
- * The overlay will appear above the parent container content.
77
- * @default 1
78
- *
79
- * zIndex hierarchy reference:
80
- * - modal: 1400
81
- * - overlay: 1300 (sidebar layouts use this value)
82
- * - dropdown: 1000
83
- * - sticky: 1100
84
- * - banner: 1200
85
- */
86
- zIndex?: string | number;
87
- };
88
- /**
89
- * LockedOverlay is a component for blocking and displaying locked features or restricted content
90
- * within a specific container.
91
- *
92
- * This component renders as an absolutely positioned overlay that blocks the parent container's content.
93
- * The parent container must have `position: relative` for proper positioning.
94
- *
95
- * Unlike a modal, this component blocks only its parent container, not the entire viewport,
96
- * making it ideal for blocking specific sections like Layout.Main, Layout.Main.Body, etc.
97
- *
98
- * @example
99
- * ```tsx
100
- * // Parent container must have position: relative
101
- * <Layout.Main sx={{ position: 'relative' }}>
102
- * <LockedOverlay
103
- * isOpen={isOpen}
104
- * onRequestClose={() => setIsOpen(false)}
105
- * header={{
106
- * icon: "fluent:lock-closed-24-filled",
107
- * title: "Premium Feature",
108
- * description: "Available in Pro plan only",
109
- * variant: "primary"
110
- * }}
111
- * actions={[
112
- * {
113
- * label: "Upgrade Now",
114
- * icon: "fluent-emoji-high-contrast:sparkles",
115
- * variant: "primary",
116
- * onClick: handleUpgrade
117
- * },
118
- * {
119
- * label: "Learn More",
120
- * icon: "fluent:arrow-right-16-regular",
121
- * variant: "accent",
122
- * onClick: handleLearnMore
123
- * }
124
- * ]}
125
- * >
126
- * <Text>This feature is only available for Pro users.</Text>
127
- * </LockedOverlay>
128
- * </Layout.Main>
129
- * ```
130
- *
131
- * @example
132
- * ```tsx
133
- * // Blocking a specific section with custom zIndex
134
- * <Box sx={{ position: 'relative' }}>
135
- * <LockedOverlay
136
- * isOpen={isOpen}
137
- * zIndex={10}
138
- * header={{
139
- * icon: "fluent:lock-closed-24-filled",
140
- * title: "Feature Locked",
141
- * description: "Unlock this feature"
142
- * }}
143
- * >
144
- * <Text>Content here</Text>
145
- * </LockedOverlay>
146
- * </Box>
147
- * ```
148
- */
149
- declare const LockedOverlay: ({ isOpen, onRequestClose, header, firstButton, secondButton, children, actions, sx, zIndex, }: LockedOverlayProps) => react_jsx_runtime.JSX.Element | null;
150
-
151
- export { LockedOverlay };
@@ -1,11 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FlexProps } from '@ttoss/ui';
3
- import { Options } from 'react-markdown';
4
-
5
- type MarkdownProps = Options & {
6
- children: string;
7
- sx?: FlexProps['sx'];
8
- };
9
- declare const Markdown: ({ children, sx, ...props }: MarkdownProps) => react_jsx_runtime.JSX.Element;
10
-
11
- export { Markdown, type MarkdownProps };
@@ -1,11 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
-
4
- type MenuProps = {
5
- children: React.ReactNode;
6
- sx?: Record<string, unknown>;
7
- menuIcon?: string;
8
- };
9
- declare const Menu: ({ children, sx, menuIcon }: MenuProps) => react_jsx_runtime.JSX.Element;
10
-
11
- export { Menu, type MenuProps };