@orcestr/ui 0.0.3 → 0.1.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 (176) hide show
  1. package/dist/components/Alert/Alert.d.ts +5 -4
  2. package/dist/components/Alert/Alert.d.ts.map +1 -1
  3. package/dist/components/Alert/Alert.js +5 -2
  4. package/dist/components/AppShell/AppShell.d.ts +2 -0
  5. package/dist/components/AppShell/AppShell.d.ts.map +1 -1
  6. package/dist/components/AppShell/AppShell.js +9 -6
  7. package/dist/components/AppSidebar/AppSidebar.d.ts +36 -0
  8. package/dist/components/AppSidebar/AppSidebar.d.ts.map +1 -0
  9. package/dist/components/AppSidebar/AppSidebar.js +53 -0
  10. package/dist/components/Badge/Badge.d.ts +8 -6
  11. package/dist/components/Badge/Badge.d.ts.map +1 -1
  12. package/dist/components/Badge/Badge.js +4 -4
  13. package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts +22 -0
  14. package/dist/components/BadgeSelectMenu/BadgeSelectMenu.d.ts.map +1 -0
  15. package/dist/components/BadgeSelectMenu/BadgeSelectMenu.js +50 -0
  16. package/dist/components/Box/Box.d.ts +2 -0
  17. package/dist/components/Box/Box.d.ts.map +1 -1
  18. package/dist/components/Box/Box.js +15 -2
  19. package/dist/components/Button/Button.d.ts +7 -3
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +23 -3
  22. package/dist/components/Card/Card.d.ts +26 -0
  23. package/dist/components/Card/Card.d.ts.map +1 -0
  24. package/dist/components/Card/Card.js +25 -0
  25. package/dist/components/Checkbox/Checkbox.d.ts +6 -2
  26. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  27. package/dist/components/Checkbox/Checkbox.js +13 -4
  28. package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -1
  29. package/dist/components/CommandPalette/CommandPalette.js +10 -9
  30. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  31. package/dist/components/ConfirmDialog/ConfirmDialog.js +5 -2
  32. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  33. package/dist/components/ContextMenu/ContextMenu.js +2 -2
  34. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  35. package/dist/components/DatePicker/DatePicker.js +9 -1
  36. package/dist/components/Dialog/Dialog.d.ts +69 -1
  37. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  38. package/dist/components/Dialog/Dialog.js +48 -1
  39. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  40. package/dist/components/Drawer/Drawer.js +2 -2
  41. package/dist/components/EntityPicker/EntityPicker.d.ts +2 -1
  42. package/dist/components/EntityPicker/EntityPicker.d.ts.map +1 -1
  43. package/dist/components/EntityPicker/EntityPicker.js +2 -2
  44. package/dist/components/Flex/Flex.d.ts +5 -1
  45. package/dist/components/Flex/Flex.d.ts.map +1 -1
  46. package/dist/components/Flex/Flex.js +16 -3
  47. package/dist/components/Grid/Grid.d.ts +9 -2
  48. package/dist/components/Grid/Grid.d.ts.map +1 -1
  49. package/dist/components/Grid/Grid.js +22 -1
  50. package/dist/components/IconButton/IconButton.d.ts +19 -7
  51. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  52. package/dist/components/IconButton/IconButton.js +40 -5
  53. package/dist/components/IconTextButton/IconTextButton.d.ts +20 -0
  54. package/dist/components/IconTextButton/IconTextButton.d.ts.map +1 -0
  55. package/dist/components/IconTextButton/IconTextButton.js +24 -0
  56. package/dist/components/InlineEdit/InlineEdit.d.ts +63 -0
  57. package/dist/components/InlineEdit/InlineEdit.d.ts.map +1 -0
  58. package/dist/components/InlineEdit/InlineEdit.js +98 -0
  59. package/dist/components/LinkButton/LinkButton.d.ts +25 -0
  60. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -0
  61. package/dist/components/LinkButton/LinkButton.js +12 -0
  62. package/dist/components/Modal/Modal.d.ts +29 -6
  63. package/dist/components/Modal/Modal.d.ts.map +1 -1
  64. package/dist/components/Modal/Modal.js +37 -13
  65. package/dist/components/Overlay/OverlayProvider.d.ts +1 -0
  66. package/dist/components/Overlay/OverlayProvider.d.ts.map +1 -1
  67. package/dist/components/Overlay/OverlayProvider.js +18 -1
  68. package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts +2 -1
  69. package/dist/components/PaginatedCombobox/PaginatedCombobox.d.ts.map +1 -1
  70. package/dist/components/PaginatedCombobox/PaginatedCombobox.js +3 -3
  71. package/dist/components/Popover/Popover.d.ts +37 -3
  72. package/dist/components/Popover/Popover.d.ts.map +1 -1
  73. package/dist/components/Popover/Popover.js +56 -9
  74. package/dist/components/ScrollArea/ScrollArea.d.ts +4 -0
  75. package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  76. package/dist/components/ScrollArea/ScrollArea.js +30 -4
  77. package/dist/components/Section/Section.d.ts +2 -0
  78. package/dist/components/Section/Section.d.ts.map +1 -1
  79. package/dist/components/SegmentedControl/SegmentedControl.d.ts +24 -1
  80. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  81. package/dist/components/SegmentedControl/SegmentedControl.js +28 -2
  82. package/dist/components/Select/Select.d.ts +36 -4
  83. package/dist/components/Select/Select.d.ts.map +1 -1
  84. package/dist/components/Select/Select.js +70 -3
  85. package/dist/components/Separator/Separator.d.ts +3 -1
  86. package/dist/components/Separator/Separator.d.ts.map +1 -1
  87. package/dist/components/Separator/Separator.js +4 -2
  88. package/dist/components/SpecialModal/SpecialModal.d.ts +43 -0
  89. package/dist/components/SpecialModal/SpecialModal.d.ts.map +1 -0
  90. package/dist/components/SpecialModal/SpecialModal.js +34 -0
  91. package/dist/components/Spinner/Spinner.d.ts +3 -1
  92. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  93. package/dist/components/Spinner/Spinner.js +2 -2
  94. package/dist/components/State/State.d.ts +8 -1
  95. package/dist/components/State/State.d.ts.map +1 -1
  96. package/dist/components/State/State.js +2 -2
  97. package/dist/components/Switch/Switch.d.ts +2 -0
  98. package/dist/components/Switch/Switch.d.ts.map +1 -1
  99. package/dist/components/Switch/Switch.js +2 -1
  100. package/dist/components/Table/Table.d.ts +64 -0
  101. package/dist/components/Table/Table.d.ts.map +1 -0
  102. package/dist/components/Table/Table.js +38 -0
  103. package/dist/components/Tabs/Tabs.d.ts +33 -2
  104. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  105. package/dist/components/Tabs/Tabs.js +189 -4
  106. package/dist/components/Text/Text.d.ts +13 -3
  107. package/dist/components/Text/Text.d.ts.map +1 -1
  108. package/dist/components/Text/Text.js +16 -3
  109. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  110. package/dist/components/TextArea/TextArea.js +1 -1
  111. package/dist/components/TextField/TextField.d.ts.map +1 -1
  112. package/dist/components/TextField/TextField.js +1 -1
  113. package/dist/components/Toast/Toast.d.ts +1 -0
  114. package/dist/components/Toast/Toast.d.ts.map +1 -1
  115. package/dist/components/Toast/Toast.js +19 -8
  116. package/dist/components/Tooltip/Tooltip.d.ts +11 -3
  117. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  118. package/dist/components/Tooltip/Tooltip.js +58 -9
  119. package/dist/example/CodePreview.d.ts.map +1 -1
  120. package/dist/example/CodePreview.js +3 -3
  121. package/dist/example/ExampleActionsSection.d.ts.map +1 -1
  122. package/dist/example/ExampleActionsSection.js +3 -3
  123. package/dist/example/ExampleApplicationSection.d.ts +7 -0
  124. package/dist/example/ExampleApplicationSection.d.ts.map +1 -0
  125. package/dist/example/ExampleApplicationSection.js +68 -0
  126. package/dist/example/ExampleBasicsSections.d.ts.map +1 -1
  127. package/dist/example/ExampleBasicsSections.js +5 -9
  128. package/dist/example/ExampleDataSection.d.ts.map +1 -1
  129. package/dist/example/ExampleDataSection.js +31 -30
  130. package/dist/example/ExampleFieldsSection.d.ts.map +1 -1
  131. package/dist/example/ExampleFieldsSection.js +51 -3
  132. package/dist/example/ExampleFoundationsSection.js +1 -1
  133. package/dist/example/ExampleOverlays.d.ts.map +1 -1
  134. package/dist/example/ExampleOverlays.js +7 -2
  135. package/dist/example/ExampleOverlaysSection.d.ts.map +1 -1
  136. package/dist/example/ExampleOverlaysSection.js +5 -2
  137. package/dist/example/ExampleSelectionSection.d.ts +3 -1
  138. package/dist/example/ExampleSelectionSection.d.ts.map +1 -1
  139. package/dist/example/ExampleSelectionSection.js +10 -3
  140. package/dist/example/ExampleStateSection.d.ts +3 -0
  141. package/dist/example/ExampleStateSection.d.ts.map +1 -1
  142. package/dist/example/ExampleStateSection.js +58 -3
  143. package/dist/example/ExampleThemePlayground.d.ts +83 -53
  144. package/dist/example/ExampleThemePlayground.d.ts.map +1 -1
  145. package/dist/example/ExampleThemePlayground.js +119 -56
  146. package/dist/example/UiExamplePage.d.ts.map +1 -1
  147. package/dist/example/UiExamplePage.js +39 -10
  148. package/dist/example/codeSamples.d.ts +7 -0
  149. package/dist/example/codeSamples.d.ts.map +1 -1
  150. package/dist/example/codeSamples.js +429 -60
  151. package/dist/example/exampleData.d.ts.map +1 -1
  152. package/dist/example/exampleData.js +16 -2
  153. package/dist/example/styles.css +245 -74
  154. package/dist/hooks/useFloatingPosition.js +1 -1
  155. package/dist/hooks/usePresence.d.ts.map +1 -1
  156. package/dist/hooks/usePresence.js +9 -7
  157. package/dist/index.d.ts +8 -1
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +8 -1
  160. package/dist/styles/orcestr-ui.css +2544 -671
  161. package/dist/theme/ThemeProvider.d.ts.map +1 -1
  162. package/dist/theme/ThemeProvider.js +90 -36
  163. package/dist/theme/defaultTheme.d.ts.map +1 -1
  164. package/dist/theme/defaultTheme.js +322 -194
  165. package/dist/theme/systemProps.d.ts +48 -28
  166. package/dist/theme/systemProps.d.ts.map +1 -1
  167. package/dist/theme/systemProps.js +103 -1
  168. package/dist/theme/themeTypes.d.ts +21 -17
  169. package/dist/theme/themeTypes.d.ts.map +1 -1
  170. package/dist/utils/slot.d.ts +11 -0
  171. package/dist/utils/slot.d.ts.map +1 -0
  172. package/dist/utils/slot.js +18 -0
  173. package/package.json +1 -1
  174. package/dist/components/Workflow/Workflow.d.ts +0 -82
  175. package/dist/components/Workflow/Workflow.d.ts.map +0 -1
  176. package/dist/components/Workflow/Workflow.js +0 -73
@@ -1,18 +1,25 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import type { SystemProps, Tone } from '../../theme/systemProps';
3
+ import { type IconTextProps } from '../IconText/IconText';
4
+ import { type TextProps } from '../Text/Text';
3
5
  export type StateCardTone = Tone;
6
+ export type StateCardVariant = 'soft' | 'surface' | 'outline' | 'ghost';
4
7
  export type StateCardProps = Omit<HTMLAttributes<HTMLDivElement>, 'title'> & {
5
8
  tone?: StateCardTone;
9
+ v?: StateCardVariant;
6
10
  icon?: ReactNode;
11
+ iconTone?: IconTextProps['iconTone'];
7
12
  title?: ReactNode;
13
+ titleTone?: TextProps['tone'];
8
14
  description?: ReactNode;
15
+ descriptionTone?: TextProps['tone'];
9
16
  titleFs?: SystemProps['fs'];
10
17
  descriptionFs?: SystemProps['fs'];
11
18
  action?: ReactNode;
12
19
  compact?: boolean;
13
20
  testId?: string;
14
21
  };
15
- export declare function StateCard({ tone, icon, title, description, titleFs, descriptionFs, action, compact, className, children, testId, ...props }: StateCardProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function StateCard({ tone, v, icon, iconTone, title, titleTone, description, descriptionTone, titleFs, descriptionFs, action, compact, className, children, testId, ...props }: StateCardProps): import("react/jsx-runtime").JSX.Element;
16
23
  export declare function EmptyState({ title, ...props }: Omit<StateCardProps, 'tone'>): import("react/jsx-runtime").JSX.Element;
17
24
  export declare function LoadingState({ title, description, ...props }: Omit<StateCardProps, 'icon' | 'tone'>): import("react/jsx-runtime").JSX.Element;
18
25
  export declare function ErrorState({ title, retryLabel, onRetry, action, ...props }: Omit<StateCardProps, 'tone'> & {
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/components/State/State.tsx"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B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACtB,IAAgB,EAChB,CAAU,EACV,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,OAAO,EACP,aAAsB,EACtB,MAAM,EACN,OAAe,EACf,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACX,EAAE,cAAc,2CAwChB;AAED,wBAAgB,UAAU,CAAC,EAAC,KAAK,EAAE,GAAG,KAAK,EAAC,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,2CAGzE;AAED,wBAAgB,YAAY,CAAC,EACzB,KAAK,EACL,WAAW,EACX,GAAG,KAAK,EACX,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,2CAWvC;AAED,wBAAgB,UAAU,CAAC,EACvB,KAAK,EACL,UAAU,EACV,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACX,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,2CAgBA;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,2CAE7E"}
@@ -8,10 +8,10 @@ import { IconText } from '../IconText/IconText';
8
8
  import { Spinner } from '../Spinner/Spinner';
9
9
  import { Text } from '../Text/Text';
10
10
  import { stateIcon } from './stateIcon';
11
- export function StateCard({ tone = 'neutral', icon, title, description, titleFs, descriptionFs = '13px', action, compact = false, className, children, testId, ...props }) {
11
+ export function StateCard({ tone = 'neutral', v = 'soft', icon, iconTone, title, titleTone, description, descriptionTone, titleFs, descriptionFs = '13px', action, compact = false, className, children, testId, ...props }) {
12
12
  const hasBody = description || children;
13
13
  const actualTitleFs = titleFs ?? (compact ? '14px' : '15px');
14
- return (_jsxs("div", { className: cn('oui-state-card', className), "data-tone": tone, "data-compact": compact ? 'true' : undefined, "data-testid": testId, ...props, children: [_jsxs("div", { className: 'oui-state-card-main', children: [_jsx(IconText, { fw: 760, fs: actualTitleFs, icon: icon ?? stateIcon(tone), iconTone: tone === 'neutral' ? 'muted' : tone, children: title }), hasBody ? (_jsxs("div", { className: 'oui-state-card-body', children: [description ? (_jsx(Text, { className: 'oui-state-card-description', fs: descriptionFs, children: description })) : null, children] })) : null] }), action ? _jsx("div", { className: 'oui-state-card-action', children: action }) : null] }));
14
+ return (_jsxs("div", { className: cn('oui-state-card', className), "data-tone": tone, "data-variant": v, "data-compact": compact ? 'true' : undefined, "data-testid": testId, ...props, children: [_jsxs("div", { className: 'oui-state-card-main', children: [_jsx(IconText, { fw: 760, fs: actualTitleFs, icon: icon ?? stateIcon(tone), iconTone: iconTone ?? (tone === 'neutral' ? 'muted' : tone), tone: titleTone, children: title }), hasBody ? (_jsxs("div", { className: 'oui-state-card-body', children: [description ? (_jsx(Text, { className: 'oui-state-card-description', fs: descriptionFs, tone: descriptionTone, children: description })) : null, children] })) : null] }), action ? _jsx("div", { className: 'oui-state-card-action', children: action }) : null] }));
15
15
  }
16
16
  export function EmptyState({ title, ...props }) {
17
17
  const { copy } = useOrcestrUiLocale();
@@ -1,10 +1,12 @@
1
1
  import { type InputHTMLAttributes, type ReactNode } from 'react';
2
2
  export type SwitchProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> & {
3
3
  label?: ReactNode;
4
+ onCheckedChange?: (checked: boolean) => void;
4
5
  testId?: string;
5
6
  };
6
7
  export declare const Switch: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
7
8
  label?: ReactNode;
9
+ onCheckedChange?: (checked: boolean) => void;
8
10
  testId?: string;
9
11
  } & import("react").RefAttributes<HTMLInputElement>>;
10
12
  //# sourceMappingURL=Switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IAC5E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,MAAM;YAJP,SAAS;aACR,MAAM;oDA6CjB,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IAC5E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,MAAM;YALP,SAAS;sBACC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;aACnC,MAAM;oDAgDjB,CAAC"}
@@ -2,13 +2,14 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef, useState, } from 'react';
4
4
  import { cn } from '../../utils/cn';
5
- export const Switch = forwardRef(function Switch({ className, label, children, checked, defaultChecked, disabled, onChange, testId, ...props }, ref) {
5
+ export const Switch = forwardRef(function Switch({ className, label, children, checked, defaultChecked, disabled, onChange, onCheckedChange, testId, dangerouslySetInnerHTML: _dangerouslySetInnerHTML, ...props }, ref) {
6
6
  const [internalChecked, setInternalChecked] = useState(Boolean(defaultChecked));
7
7
  const actualChecked = checked ?? internalChecked;
8
8
  const handleChange = (event) => {
9
9
  if (checked === undefined)
10
10
  setInternalChecked(event.target.checked);
11
11
  onChange?.(event);
12
+ onCheckedChange?.(event.target.checked);
12
13
  };
13
14
  return (_jsxs("label", { className: cn('oui-switch', className), "data-checked": actualChecked ? 'true' : undefined, "data-disabled": disabled ? 'true' : undefined, "data-testid": testId, children: [_jsx("input", { ref: ref, type: 'checkbox', checked: actualChecked, disabled: disabled, onChange: handleChange, ...props }), _jsx("span", { className: 'oui-switch-track', children: _jsx("span", { className: 'oui-switch-thumb' }) }), label || children ? _jsx("span", { children: label ?? children }) : null] }));
14
15
  });
@@ -0,0 +1,64 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ import { type SystemProps, type UiSize } from '../../theme/systemProps';
3
+ type Align = 'left' | 'center' | 'right';
4
+ export type TableRootProps = ComponentPropsWithoutRef<'table'> & SystemProps & {
5
+ size?: UiSize;
6
+ v?: 'ghost' | 'surface';
7
+ testId?: string;
8
+ };
9
+ export declare const TableRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & SystemProps & {
10
+ size?: UiSize;
11
+ v?: "ghost" | "surface";
12
+ testId?: string;
13
+ } & import("react").RefAttributes<HTMLTableElement>>;
14
+ export declare const TableHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
15
+ export declare const TableBody: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
16
+ export declare const TableRow: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & import("react").RefAttributes<HTMLTableRowElement>>;
17
+ export type TableCellProps = ComponentPropsWithoutRef<'td'> & SystemProps & {
18
+ align?: Align;
19
+ testId?: string;
20
+ };
21
+ export declare const TableCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & SystemProps & {
22
+ align?: Align;
23
+ testId?: string;
24
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
25
+ export type TableHeaderCellProps = ComponentPropsWithoutRef<'th'> & SystemProps & {
26
+ align?: Align;
27
+ testId?: string;
28
+ };
29
+ export declare const TableColumnHeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & SystemProps & {
30
+ align?: Align;
31
+ testId?: string;
32
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
33
+ export declare const TableRowHeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & SystemProps & {
34
+ align?: Align;
35
+ testId?: string;
36
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
37
+ export declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & SystemProps & {
38
+ size?: UiSize;
39
+ v?: "ghost" | "surface";
40
+ testId?: string;
41
+ } & import("react").RefAttributes<HTMLTableElement>> & {
42
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref"> & SystemProps & {
43
+ size?: UiSize;
44
+ v?: "ghost" | "surface";
45
+ testId?: string;
46
+ } & import("react").RefAttributes<HTMLTableElement>>;
47
+ Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
48
+ Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & import("react").RefAttributes<HTMLTableSectionElement>>;
49
+ Row: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & import("react").RefAttributes<HTMLTableRowElement>>;
50
+ Cell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & SystemProps & {
51
+ align?: Align;
52
+ testId?: string;
53
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
54
+ ColumnHeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & SystemProps & {
55
+ align?: Align;
56
+ testId?: string;
57
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
58
+ RowHeaderCell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "ref"> & SystemProps & {
59
+ align?: Align;
60
+ testId?: string;
61
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
62
+ };
63
+ export {};
64
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,wBAAwB,EAAC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAmB,KAAK,WA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iBACJ,MAAM;;CA8CrB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { splitSystemProps } from '../../theme/systemProps';
4
+ import { cn } from '../../utils/cn';
5
+ export const TableRoot = forwardRef(function TableRoot({ className, style, size = 2, v = 'ghost', testId, ...props }, ref) {
6
+ const { systemStyle, restProps } = splitSystemProps(props);
7
+ return (_jsx("table", { ref: ref, className: cn('oui-table', className), "data-size": size, "data-variant": v, "data-testid": testId, style: { ...systemStyle, ...style }, ...restProps }));
8
+ });
9
+ export const TableHeader = forwardRef(function TableHeader({ className, ...props }, ref) {
10
+ return _jsx("thead", { ref: ref, className: cn('oui-table-header', className), ...props });
11
+ });
12
+ export const TableBody = forwardRef(function TableBody({ className, ...props }, ref) {
13
+ return _jsx("tbody", { ref: ref, className: cn('oui-table-body', className), ...props });
14
+ });
15
+ export const TableRow = forwardRef(function TableRow({ className, ...props }, ref) {
16
+ return _jsx("tr", { ref: ref, className: cn('oui-table-row', className), ...props });
17
+ });
18
+ export const TableCell = forwardRef(function TableCell({ className, style, align, testId, ...props }, ref) {
19
+ const { systemStyle, restProps } = splitSystemProps(props);
20
+ return (_jsx("td", { ref: ref, className: cn('oui-table-cell', className), "data-align": align, "data-testid": testId, style: { ...systemStyle, ...style }, ...restProps }));
21
+ });
22
+ export const TableColumnHeaderCell = forwardRef(function TableColumnHeaderCell({ className, style, align, testId, ...props }, ref) {
23
+ const { systemStyle, restProps } = splitSystemProps(props);
24
+ return (_jsx("th", { ref: ref, scope: 'col', className: cn('oui-table-column-header-cell', className), "data-align": align, "data-testid": testId, style: { ...systemStyle, ...style }, ...restProps }));
25
+ });
26
+ export const TableRowHeaderCell = forwardRef(function TableRowHeaderCell({ className, style, align, testId, ...props }, ref) {
27
+ const { systemStyle, restProps } = splitSystemProps(props);
28
+ return (_jsx("th", { ref: ref, scope: 'row', className: cn('oui-table-row-header-cell', className), "data-align": align, "data-testid": testId, style: { ...systemStyle, ...style }, ...restProps }));
29
+ });
30
+ export const Table = Object.assign(TableRoot, {
31
+ Root: TableRoot,
32
+ Header: TableHeader,
33
+ Body: TableBody,
34
+ Row: TableRow,
35
+ Cell: TableCell,
36
+ ColumnHeaderCell: TableColumnHeaderCell,
37
+ RowHeaderCell: TableRowHeaderCell,
38
+ });
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
2
  export type TabItem = {
3
3
  value: string;
4
4
  label: ReactNode;
@@ -6,7 +6,7 @@ export type TabItem = {
6
6
  icon?: ReactNode;
7
7
  badge?: ReactNode;
8
8
  };
9
- export declare function Tabs({ items, value, onValueChange, className, listClassName, contentClassName, testId, }: {
9
+ declare function ItemTabs({ items, value, onValueChange, className, listClassName, contentClassName, testId, }: {
10
10
  items: ReadonlyArray<TabItem>;
11
11
  value: string;
12
12
  onValueChange: (value: string) => void;
@@ -15,4 +15,35 @@ export declare function Tabs({ items, value, onValueChange, className, listClass
15
15
  contentClassName?: string;
16
16
  testId?: string;
17
17
  }): import("react/jsx-runtime").JSX.Element | null;
18
+ type RootProps = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange'> & {
19
+ children: ReactNode;
20
+ value?: string;
21
+ defaultValue?: string;
22
+ onValueChange?: (value: string) => void;
23
+ };
24
+ declare function Root({ value, defaultValue, onValueChange, children, className, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
25
+ type ListProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'onWheel'> & {
26
+ children: ReactNode;
27
+ indicatorPaddingY?: number;
28
+ };
29
+ declare function List({ children, indicatorPaddingY, className, style, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
30
+ type TriggerProps = Omit<ComponentPropsWithoutRef<'button'>, 'value'> & {
31
+ value: string;
32
+ children: ReactNode;
33
+ icon?: ReactNode;
34
+ size?: '2' | '3';
35
+ };
36
+ declare function Trigger({ value, children, icon, size, className, onMouseEnter, onClick, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
37
+ type ContentProps = Omit<ComponentPropsWithoutRef<'div'>, 'value'> & {
38
+ value: string;
39
+ mountOnActive?: boolean;
40
+ };
41
+ declare function Content({ value, children, className, mountOnActive, ...props }: ContentProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare const Tabs: typeof ItemTabs & {
43
+ Root: typeof Root;
44
+ List: typeof List;
45
+ Trigger: typeof Trigger;
46
+ Content: typeof Content;
47
+ };
48
+ export {};
18
49
  //# sourceMappingURL=Tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAMH,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,OAAO,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AASF,wBAAgB,IAAI,CAAC,EACjB,KAAK,EACL,KAAK,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,MAAM,GACT,EAAE;IACC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,kDAgKA"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAEA,O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iB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,iBAAS,IAAI,CAAC,EACV,QAAQ,EACR,iBAAqB,EACrB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACX,EAAE,SAAS,2CAsKX;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,iBAAS,OAAO,CAAC,EACb,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,IAAU,EACV,SAAS,EACT,YAAY,EACZ,OAAO,EACP,GAAG,KAAK,EACX,EAAE,YAAY,2CAwCd;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,iBAAS,OAAO,CAAC,EACb,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAqB,EACrB,GAAG,KAAK,EACX,EAAE,YAAY,2CA4Bd;AAoBD,eAAO,MAAM,IAAI;;;;;CAKf,CAAC"}
@@ -1,9 +1,11 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useLayoutEffect, useRef, useState, } from 'react';
3
+ import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
4
+ import { LuChevronLeft, LuChevronRight } from 'react-icons/lu';
4
5
  import { cn } from '../../utils/cn';
5
6
  import { Collapse } from '../Collapse/Collapse';
6
- export function Tabs({ items, value, onValueChange, className, listClassName, contentClassName, testId, }) {
7
+ import { IconButton } from '../IconButton/IconButton';
8
+ function ItemTabs({ items, value, onValueChange, className, listClassName, contentClassName, testId, }) {
7
9
  const active = items.find((item) => item.value === value) ?? items[0];
8
10
  const listRef = useRef(null);
9
11
  const triggerRefs = useRef(new Map());
@@ -29,8 +31,9 @@ export function Tabs({ items, value, onValueChange, className, listClassName, co
29
31
  };
30
32
  };
31
33
  setActiveRect(readRect(active?.value));
32
- setHoverRect((current) => readRect(hoveredValue) ?? current);
33
- setHoverVisible(Boolean(hoveredValue && readRect(hoveredValue)));
34
+ const nextHoverRect = readRect(hoveredValue);
35
+ setHoverRect((current) => nextHoverRect ?? current);
36
+ setHoverVisible(Boolean(hoveredValue && nextHoverRect && hoveredValue !== active?.value));
34
37
  }, [active?.value, hoveredValue]);
35
38
  const moveFocus = (currentValue, direction) => {
36
39
  const currentIndex = items.findIndex((item) => item.value === currentValue);
@@ -94,6 +97,174 @@ export function Tabs({ items, value, onValueChange, className, listClassName, co
94
97
  return (_jsx(Collapse, { open: open, children: _jsx("div", { role: 'tabpanel', className: 'oui-tabs-panel', "data-active": open ? 'true' : undefined, "data-testid": testId ? `${testId}-${item.value}-panel` : undefined, children: item.content }) }, item.value));
95
98
  }) })] }));
96
99
  }
100
+ const TabsCtx = createContext(null);
101
+ function useTabsCtx() {
102
+ const ctx = useContext(TabsCtx);
103
+ if (!ctx)
104
+ throw new Error('Tabs.* must be used inside <Tabs.Root>.');
105
+ return ctx;
106
+ }
107
+ function Root({ value, defaultValue, onValueChange, children, className, ...props }) {
108
+ const [uncontrolled, setUncontrolled] = useState(defaultValue);
109
+ const isControlled = value !== undefined;
110
+ const currentValue = isControlled ? value : uncontrolled;
111
+ const [hoveredValue, setHoveredValue] = useState(null);
112
+ const triggersRef = useRef(new Map());
113
+ const [, setTriggersVersion] = useState(0);
114
+ const registerTrigger = useCallback((nextValue, element) => {
115
+ const triggers = triggersRef.current;
116
+ if (element) {
117
+ if (triggers.get(nextValue) === element)
118
+ return;
119
+ triggers.set(nextValue, element);
120
+ }
121
+ else {
122
+ if (!triggers.has(nextValue))
123
+ return;
124
+ triggers.delete(nextValue);
125
+ }
126
+ setTriggersVersion((current) => current + 1);
127
+ }, []);
128
+ const handleChange = useCallback((nextValue) => {
129
+ if (!isControlled)
130
+ setUncontrolled(nextValue);
131
+ onValueChange?.(nextValue);
132
+ }, [isControlled, onValueChange]);
133
+ const ctxValue = useMemo(() => ({
134
+ activeValue: currentValue,
135
+ hoveredValue,
136
+ setHoveredValue,
137
+ setActiveValue: handleChange,
138
+ registerTrigger,
139
+ }), [currentValue, handleChange, hoveredValue, registerTrigger]);
140
+ return (_jsx(TabsCtx.Provider, { value: ctxValue, children: _jsx("div", { className: cn('oui-tabs-compound', className), "data-tabs-root": true, "data-value": currentValue, ...props, children: children }) }));
141
+ }
142
+ function List({ children, indicatorPaddingY = 4, className, style, ...props }) {
143
+ const ctx = useTabsCtx();
144
+ const listRef = useRef(null);
145
+ const [hoverRect, setHoverRect] = useState(null);
146
+ const [hoverVisible, setHoverVisible] = useState(false);
147
+ const [activeRect, setActiveRect] = useState(null);
148
+ const [canScrollLeft, setCanScrollLeft] = useState(false);
149
+ const [canScrollRight, setCanScrollRight] = useState(false);
150
+ const measure = useCallback(() => {
151
+ const list = listRef.current;
152
+ if (!list)
153
+ return;
154
+ const triggers = list.querySelectorAll('[data-tabs-trigger]');
155
+ let hover = null;
156
+ let active = null;
157
+ triggers.forEach((element) => {
158
+ const nextValue = element.dataset.tabsTrigger;
159
+ if (!nextValue)
160
+ return;
161
+ const rect = {
162
+ left: element.offsetLeft,
163
+ top: element.offsetTop,
164
+ width: element.offsetWidth,
165
+ height: element.offsetHeight,
166
+ };
167
+ if (nextValue === ctx.hoveredValue)
168
+ hover = rect;
169
+ if (nextValue === ctx.activeValue)
170
+ active = rect;
171
+ });
172
+ setHoverRect((current) => hover ?? current);
173
+ setHoverVisible(Boolean(hover && ctx.hoveredValue !== ctx.activeValue));
174
+ setActiveRect(active);
175
+ setCanScrollLeft(list.scrollLeft > 1);
176
+ setCanScrollRight(list.scrollLeft + list.clientWidth < list.scrollWidth - 1);
177
+ }, [ctx.activeValue, ctx.hoveredValue]);
178
+ useLayoutEffect(() => {
179
+ measure();
180
+ }, [measure]);
181
+ useEffect(() => {
182
+ const list = listRef.current;
183
+ if (!list)
184
+ return;
185
+ const observer = new ResizeObserver(() => measure());
186
+ observer.observe(list);
187
+ list.querySelectorAll('[data-tabs-trigger]').forEach((element) => observer.observe(element));
188
+ list.addEventListener('scroll', measure, { passive: true });
189
+ return () => {
190
+ observer.disconnect();
191
+ list.removeEventListener('scroll', measure);
192
+ };
193
+ }, [children, measure]);
194
+ const scrollList = (direction) => {
195
+ const list = listRef.current;
196
+ if (!list)
197
+ return;
198
+ list.scrollBy({
199
+ left: direction * Math.max(Math.round(list.clientWidth * 0.6), 160),
200
+ behavior: 'smooth',
201
+ });
202
+ };
203
+ const handleWheel = useCallback((event) => {
204
+ if (event.defaultPrevented)
205
+ return;
206
+ const list = listRef.current;
207
+ if (!list || list.scrollWidth <= list.clientWidth + 1)
208
+ return;
209
+ const rawDelta = Math.abs(event.deltaY) >= Math.abs(event.deltaX)
210
+ ? event.deltaY
211
+ : event.deltaX;
212
+ if (rawDelta === 0)
213
+ return;
214
+ const delta = event.deltaMode === 1
215
+ ? rawDelta * 32
216
+ : event.deltaMode === 2
217
+ ? rawDelta * list.clientWidth
218
+ : rawDelta;
219
+ const maxScrollLeft = list.scrollWidth - list.clientWidth;
220
+ const canScroll = delta < 0 ? list.scrollLeft > 1 : list.scrollLeft < maxScrollLeft - 1;
221
+ if (!canScroll)
222
+ return;
223
+ event.preventDefault();
224
+ list.scrollBy({ left: delta, behavior: 'smooth' });
225
+ }, []);
226
+ useEffect(() => {
227
+ const list = listRef.current;
228
+ if (!list)
229
+ return;
230
+ list.addEventListener('wheel', handleWheel, { passive: false });
231
+ return () => list.removeEventListener('wheel', handleWheel);
232
+ }, [handleWheel]);
233
+ const hasOverflowControls = canScrollLeft || canScrollRight;
234
+ return (_jsxs("div", { className: 'oui-tabs-compound-shell', children: [canScrollLeft ? (_jsx("span", { "aria-hidden": true, className: 'oui-tabs-edge oui-tabs-edge-left' })) : null, canScrollRight ? (_jsx("span", { "aria-hidden": true, className: 'oui-tabs-edge oui-tabs-edge-right' })) : null, canScrollLeft ? (_jsx(IconButton, { type: 'button', v: 'soft', tone: 'neutral', round: true, size: 1, onClick: () => scrollList(-1), "aria-label": 'Scroll tabs left', className: 'oui-tabs-scroll-button oui-tabs-scroll-button-left', children: _jsx(LuChevronLeft, { size: 16 }) })) : null, canScrollRight ? (_jsx(IconButton, { type: 'button', v: 'soft', tone: 'neutral', round: true, size: 1, onClick: () => scrollList(1), "aria-label": 'Scroll tabs right', className: 'oui-tabs-scroll-button oui-tabs-scroll-button-right', children: _jsx(LuChevronRight, { size: 16 }) })) : null, _jsxs("div", { ref: listRef, role: 'tablist', onMouseLeave: () => ctx.setHoveredValue(null), className: cn('oui-tabs-list-scroll', className), "data-overflow": hasOverflowControls ? 'true' : undefined, style: style, ...props, children: [activeRect ? (_jsx("span", { "aria-hidden": true, className: 'oui-tabs-compound-active-indicator', style: compoundIndicatorStyle(activeRect, indicatorPaddingY) })) : null, hoverRect ? (_jsx("span", { "aria-hidden": true, className: 'oui-tabs-compound-hover-indicator', "data-visible": hoverVisible ? 'true' : undefined, style: compoundIndicatorStyle(hoverRect, indicatorPaddingY) })) : null, children] })] }));
235
+ }
236
+ function Trigger({ value, children, icon, size = '2', className, onMouseEnter, onClick, ...props }) {
237
+ const ctx = useTabsCtx();
238
+ const ref = useRef(null);
239
+ const isActive = ctx.activeValue === value;
240
+ useEffect(() => {
241
+ ctx.registerTrigger(value, ref.current);
242
+ return () => ctx.registerTrigger(value, null);
243
+ }, [ctx, value]);
244
+ return (_jsxs("button", { ref: ref, type: 'button', role: 'tab', "aria-selected": isActive, className: cn('oui-tabs-trigger', className), "data-active": isActive ? 'true' : undefined, "data-size": size, "data-tabs-trigger": value, onMouseEnter: (event) => {
245
+ ctx.setHoveredValue(value);
246
+ onMouseEnter?.(event);
247
+ }, onClick: (event) => {
248
+ onClick?.(event);
249
+ if (event.defaultPrevented)
250
+ return;
251
+ ctx.setHoveredValue(value);
252
+ ctx.setActiveValue(value);
253
+ }, ...props, children: [icon ? (_jsx("span", { className: 'oui-tabs-trigger-icon', "aria-hidden": true, children: icon })) : null, children] }));
254
+ }
255
+ function Content({ value, children, className, mountOnActive = false, ...props }) {
256
+ const ctx = useTabsCtx();
257
+ const open = ctx.activeValue === value;
258
+ const [mounted, setMounted] = useState(open);
259
+ useEffect(() => {
260
+ if (!open || mounted)
261
+ return;
262
+ const frameId = window.requestAnimationFrame(() => setMounted(true));
263
+ return () => window.cancelAnimationFrame(frameId);
264
+ }, [mounted, open]);
265
+ const shouldRenderChildren = !mountOnActive || mounted || open;
266
+ return (_jsx("div", { role: 'tabpanel', className: cn('oui-tabs-compound-panel', className), "data-tabs-content": value, hidden: !open, ...props, children: _jsx(Collapse, { open: open, children: _jsx("div", { className: 'oui-tabs-compound-panel-inner', children: shouldRenderChildren ? children : null }) }) }));
267
+ }
97
268
  function indicatorStyle(rect) {
98
269
  return {
99
270
  left: rect.left,
@@ -102,3 +273,17 @@ function indicatorStyle(rect) {
102
273
  height: Math.max(0, rect.height - 8),
103
274
  };
104
275
  }
276
+ function compoundIndicatorStyle(rect, paddingY) {
277
+ return {
278
+ left: rect.left,
279
+ top: rect.top + paddingY,
280
+ width: rect.width,
281
+ height: Math.max(0, rect.height - paddingY * 2),
282
+ };
283
+ }
284
+ export const Tabs = Object.assign(ItemTabs, {
285
+ Root,
286
+ List,
287
+ Trigger,
288
+ Content,
289
+ });
@@ -1,13 +1,23 @@
1
1
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
- import { type SystemProps, type Tone } from '../../theme/systemProps';
2
+ import { type SystemProps, type ToneInput } from '../../theme/systemProps';
3
3
  export type TextProps = ComponentPropsWithoutRef<'span'> & SystemProps & {
4
4
  as?: ElementType;
5
- tone?: Tone | 'muted';
5
+ tone?: ToneInput;
6
+ asChild?: boolean;
7
+ href?: string;
8
+ target?: string;
9
+ rel?: string;
10
+ trim?: string;
6
11
  testId?: string;
7
12
  };
8
13
  export declare const Text: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & SystemProps & {
9
14
  as?: ElementType;
10
- tone?: Tone | "muted";
15
+ tone?: ToneInput;
16
+ asChild?: boolean;
17
+ href?: string;
18
+ target?: string;
19
+ rel?: string;
20
+ trim?: string;
11
21
  testId?: string;
12
22
  } & import("react").RefAttributes<HTMLElement>>;
13
23
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EACnB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,IAAI,EAAC,MAAM,yBAAyB,CAAC;AAEtF,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,MAAM,CAAC,GACpD,WAAW,GAAG;IACV,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,IAAI;SALJ,WAAW;WACT,IAAI,GAAG,OAAO;aACZ,MAAM;+CAiBrB,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAEnB,MAAM,OAAO,CAAC;AAGf,OAAO,EAGH,KAAK,WAAW,EAChB,KAAK,SAAS,EACjB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,MAAM,CAAC,GACpD,WAAW,GAAG;IACV,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,IAAI;SAVJ,WAAW;WACT,SAAS;cACN,OAAO;WACV,MAAM;aACJ,MAAM;UACT,MAAM;WACL,MAAM;aACJ,MAAM;+CA2CrB,CAAC"}
@@ -1,8 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, } from 'react';
3
3
  import { cn } from '../../utils/cn';
4
- import { splitSystemProps } from '../../theme/systemProps';
5
- export const Text = forwardRef(function Text({ as: Component = 'span', className, style, tone, testId, ...props }, ref) {
4
+ import { normalizeTone, splitSystemProps, } from '../../theme/systemProps';
5
+ import { renderSlot } from '../../utils/slot';
6
+ export const Text = forwardRef(function Text({ as: Component = 'span', className, style, tone, asChild = false, testId, children, ...props }, ref) {
6
7
  const { systemStyle, restProps } = splitSystemProps(props);
7
- return (_jsx(Component, { ref: ref, className: cn('oui-text', tone && `oui-text-${tone}`, className), "data-testid": testId, style: { ...systemStyle, ...style }, ...restProps }));
8
+ const commonProps = {
9
+ className: cn('oui-text', tone && `oui-text-${tone === 'muted' ? 'muted' : normalizeTone(tone)}`, className),
10
+ 'data-testid': testId,
11
+ style: { ...systemStyle, ...style },
12
+ ...restProps,
13
+ };
14
+ if (asChild) {
15
+ return renderSlot(children, {
16
+ ...commonProps,
17
+ ref: ref,
18
+ });
19
+ }
20
+ return (_jsx(Component, { ref: ref, ...commonProps, children: children }));
8
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,sBAAsB,EAC9B,MAAM,OAAO,CAAC;AAIf,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,MAAM,EACd,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,GACnE,WAAW,GAAG;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,QAAQ;WANN,MAAM;cACH,OAAO;iBACJ,OAAO;aACX,MAAM;uDAwCtB,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,sBAAsB,EAC9B,MAAM,OAAO,CAAC;AAIf,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,MAAM,EACd,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,GACnE,WAAW,GAAG;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,QAAQ;WANN,MAAM;cACH,OAAO;iBACJ,OAAO;aACX,MAAM;uDA0CtB,CAAC"}
@@ -4,7 +4,7 @@ import { forwardRef, useLayoutEffect, useRef, } from 'react';
4
4
  import { cn } from '../../utils/cn';
5
5
  import { composeRefs } from '../../utils/composeRefs';
6
6
  import { splitSystemProps, } from '../../theme/systemProps';
7
- export const TextArea = forwardRef(function TextArea({ className, style, size = 2, invalid = false, autoResize = false, value, testId, ...props }, ref) {
7
+ export const TextArea = forwardRef(function TextArea({ className, style, size = 2, invalid = false, autoResize = false, value, testId, children: _children, dangerouslySetInnerHTML: _dangerouslySetInnerHTML, ...props }, ref) {
8
8
  const localRef = useRef(null);
9
9
  const { systemStyle, restProps } = splitSystemProps(props);
10
10
  useLayoutEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAMH,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAMf,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,MAAM,EACd,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,IAAI,CAC7B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,CACT,GACG,WAAW,GAAG;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,SAAS;WAXP,MAAM;cACH,OAAO;gBACL,OAAO;eACR,SAAS;gBACR,SAAS;gBACT,OAAO;cACT,MAAM,IAAI;iBACP,MAAM;aACV,MAAM;oDA4FtB,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAMH,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AAMf,OAAO,EAEH,KAAK,WAAW,EAChB,KAAK,MAAM,EACd,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,IAAI,CAC7B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,CACT,GACG,WAAW,GAAG;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEN,eAAO,MAAM,SAAS;WAXP,MAAM;cACH,OAAO;gBACL,OAAO;eACR,SAAS;gBACR,SAAS;gBACT,OAAO;cACT,MAAM,IAAI;iBACP,MAAM;aACV,MAAM;oDA8FtB,CAAC"}
@@ -6,7 +6,7 @@ import { useOrcestrUiLocale } from '../../locale/LocaleProvider';
6
6
  import { cn } from '../../utils/cn';
7
7
  import { composeRefs } from '../../utils/composeRefs';
8
8
  import { splitSystemProps, } from '../../theme/systemProps';
9
- export const TextField = forwardRef(function TextField({ className, style, size = 3, invalid = false, fullWidth = true, leftSlot, rightSlot, clearable = false, onClear, clearLabel, testId, value, defaultValue, onChange, disabled, id, ...props }, ref) {
9
+ export const TextField = forwardRef(function TextField({ className, style, size = 3, invalid = false, fullWidth = true, leftSlot, rightSlot, clearable = false, onClear, clearLabel, testId, value, defaultValue, onChange, disabled, id, children: _children, dangerouslySetInnerHTML: _dangerouslySetInnerHTML, ...props }, ref) {
10
10
  const { copy } = useOrcestrUiLocale();
11
11
  const generatedId = useId();
12
12
  const inputId = id ?? generatedId;
@@ -10,6 +10,7 @@ export type ToastOptions = {
10
10
  title: ReactNode;
11
11
  message?: ReactNode;
12
12
  tone?: ToastTone;
13
+ icon?: ReactNode | false;
13
14
  position?: ToastPosition;
14
15
  background?: string;
15
16
  blur?: number | string | false;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EASH,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AASf,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAClE,MAAM,MAAM,aAAa,GACnB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,CAAC;AAU/C,KAAK,iBAAiB,GAAG;IACrB,IAAI,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