@solostylist/ui-kit 1.0.79 → 1.0.80

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 (136) hide show
  1. package/dist/{Box-reWd7MO-.js → Box-Bfkq7uIw.js} +23 -21
  2. package/dist/{Close-CVFQMMUW.js → Close-C1lLcTQu.js} +1 -1
  3. package/dist/{Menu-CGTDGEoX.js → Menu-DbldWmqB.js} +94 -93
  4. package/dist/{MenuItem-Bdna3McP.js → MenuItem-BHTJlag0.js} +8 -7
  5. package/dist/{Select-D54ugORZ.js → Select-CT0Hpudx.js} +14 -13
  6. package/dist/{Stack-ISlVeD89.js → Stack-W0weBtf9.js} +29 -28
  7. package/dist/{TransitionGroup-DuMpOHcM.js → TransitionGroup-q306siJs.js} +1 -1
  8. package/dist/{Typography-D38zoHJr.js → Typography-CeAbQ9LX.js} +17 -17
  9. package/dist/{buttonBaseClasses-CF7RfAgE.js → buttonBaseClasses-CR6HkqQ3.js} +2 -2
  10. package/dist/colorManipulator-CPZHCebU.js +178 -0
  11. package/dist/{createSvgIcon-DN-sh_sr.js → createSvgIcon-9XY7lJan.js} +129 -131
  12. package/dist/createTheme-wt8sY36y.js +2837 -0
  13. package/dist/{defaultTheme-BDQAWvCM.js → defaultTheme-YL2LZ-0U.js} +7 -7
  14. package/dist/emotion-serialize.esm-lgBmL_7o.js +195 -0
  15. package/dist/{extendSxProp-KtEeHd8h.js → extendSxProp-B1pEE-ot.js} +1 -1
  16. package/dist/generateUtilityClasses-D-O3RBPF.js +10 -0
  17. package/dist/hooks/use-dialog.d.ts +21 -0
  18. package/dist/hooks/use-dialog.js +10 -2
  19. package/dist/hooks/use-popover.d.ts +24 -0
  20. package/dist/hooks/use-popover.js +7 -1
  21. package/dist/{iconButtonClasses-DMst1jJO.js → iconButtonClasses-WmsPyI4v.js} +2 -2
  22. package/dist/index-B6k9mhKf.js +30 -0
  23. package/dist/{index-x815ub0T.js → index-DAXzX0k9.js} +5 -5
  24. package/dist/main.d.ts +5 -1
  25. package/dist/main.js +109 -104
  26. package/dist/{outlinedInputClasses-E4FwVkZh.js → outlinedInputClasses-Cor6Mcxo.js} +2 -2
  27. package/dist/s-autocomplete/s-autocomplete.d.ts +31 -0
  28. package/dist/s-autocomplete/s-autocomplete.js +23 -20
  29. package/dist/s-button/index.d.ts +2 -0
  30. package/dist/s-button/index.js +4 -0
  31. package/dist/s-button/package.json +5 -0
  32. package/dist/s-button/s-button.d.ts +6 -0
  33. package/dist/s-button/s-button.js +7 -0
  34. package/dist/s-button-link/s-button-link.d.ts +37 -1
  35. package/dist/s-checkbox/s-checkbox.d.ts +21 -0
  36. package/dist/s-checkbox/s-checkbox.js +9 -9
  37. package/dist/s-chip/index.d.ts +2 -0
  38. package/dist/s-chip/index.js +4 -0
  39. package/dist/s-chip/package.json +5 -0
  40. package/dist/s-chip/s-chip.d.ts +6 -0
  41. package/dist/s-chip/s-chip.js +7 -0
  42. package/dist/s-chips/s-chips.d.ts +26 -1
  43. package/dist/s-chips/s-chips.js +28 -23
  44. package/dist/s-copilot-kit-provider/s-copilot-kit-provider.d.ts +28 -0
  45. package/dist/s-copyable-text/s-copyable-text.d.ts +43 -2
  46. package/dist/s-copyable-text/s-copyable-text.js +30 -22
  47. package/dist/s-data-table/s-data-table.d.ts +87 -0
  48. package/dist/s-data-table/s-data-table.js +33 -22
  49. package/dist/s-date-picker/s-date-picker.d.ts +25 -0
  50. package/dist/s-date-picker/s-date-picker.js +109 -92
  51. package/dist/s-datetime-picker/s-datetime-picker.d.ts +26 -0
  52. package/dist/s-datetime-picker/s-datetime-picker.js +209 -192
  53. package/dist/s-dialog/s-dialog.d.ts +27 -0
  54. package/dist/s-dialog/s-dialog.js +1 -1
  55. package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +54 -0
  56. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  57. package/dist/s-dialog-message/s-dialog-message.d.ts +51 -0
  58. package/dist/s-dialog-message/s-dialog-message.js +3 -2
  59. package/dist/s-empty/s-empty.d.ts +25 -1
  60. package/dist/s-error/s-error.d.ts +19 -0
  61. package/dist/s-file-dropzone/s-file-dropzone.d.ts +67 -0
  62. package/dist/s-file-dropzone/s-file-dropzone.js +6 -4
  63. package/dist/s-file-icon/s-file-icon.d.ts +28 -0
  64. package/dist/s-file-icon/s-file-icon.js +5 -2
  65. package/dist/s-form/s-form.d.ts +22 -0
  66. package/dist/s-form/s-form.js +9 -10
  67. package/dist/s-glow-button/index.d.ts +1 -1
  68. package/dist/s-glow-button/s-glow-button.d.ts +39 -3
  69. package/dist/s-glow-button/s-glow-button.js +11 -2
  70. package/dist/s-gradient-icon/s-gradient-icon.d.ts +43 -0
  71. package/dist/s-gradient-icon/s-gradient-icon.js +6 -1
  72. package/dist/s-i18n-provider/s-i18n-provider.d.ts +37 -0
  73. package/dist/s-i18n-provider/s-i18n-provider.js +8 -1
  74. package/dist/s-icon-button/s-icon-button.d.ts +23 -0
  75. package/dist/s-interactive-gallery/s-interactive-gallery.d.ts +96 -0
  76. package/dist/s-interactive-gallery/s-interactive-gallery.js +10 -4
  77. package/dist/s-label/s-label.d.ts +30 -2
  78. package/dist/s-label/s-label.js +8 -18
  79. package/dist/s-lazy-image/s-lazy-image.d.ts +28 -1
  80. package/dist/s-localization-provider/s-localization-provider.d.ts +30 -0
  81. package/dist/s-localization-provider/s-localization-provider.js +5 -2
  82. package/dist/s-moving-border/s-moving-border.d.ts +41 -0
  83. package/dist/s-moving-border/s-moving-border.js +5 -1
  84. package/dist/s-multi-select/s-multi-select.d.ts +23 -0
  85. package/dist/s-multi-select/s-multi-select.js +3 -3
  86. package/dist/s-no-ssr/s-no-ssr.d.ts +38 -0
  87. package/dist/s-pagination/s-pagination.d.ts +29 -0
  88. package/dist/s-select/s-select.d.ts +35 -0
  89. package/dist/s-select/s-select.js +41 -37
  90. package/dist/s-skeleton/s-skeleton.d.ts +31 -1
  91. package/dist/s-smart-text-field/s-smart-text-field.d.ts +28 -0
  92. package/dist/s-smart-text-field/s-smart-text-field.js +1425 -1399
  93. package/dist/s-snackbar-message/s-snackbar-message.d.ts +56 -2
  94. package/dist/s-stripe/s-stripe.d.ts +93 -0
  95. package/dist/s-stripe/s-stripe.js +3 -0
  96. package/dist/s-stripe/stripe-input.d.ts +23 -0
  97. package/dist/s-stripe/stripe-input.js +1 -0
  98. package/dist/s-text-editor/index.d.ts +2 -0
  99. package/dist/s-text-editor/index.js +4 -2
  100. package/dist/s-text-editor/s-text-editor-toolbar.d.ts +33 -0
  101. package/dist/s-text-editor/s-text-editor-toolbar.js +4 -4
  102. package/dist/s-text-editor/s-text-editor.js +1 -1
  103. package/dist/s-text-field/s-text-field.d.ts +23 -0
  104. package/dist/s-text-truncation/s-text-truncation.d.ts +30 -0
  105. package/dist/s-theme-provider/s-theme-provider.d.ts +24 -3
  106. package/dist/s-theme-provider/s-theme-provider.js +9 -2
  107. package/dist/s-tip/s-tip.d.ts +27 -0
  108. package/dist/s-tip/s-tip.js +5 -3
  109. package/dist/svgIconClasses-BYFQaEQ7.js +10 -0
  110. package/dist/{tabClasses-LXCeUS4i.js → tabClasses-CXQXD3XZ.js} +2 -2
  111. package/dist/theme/components/avatar.js +1 -1
  112. package/dist/theme/components/button.d.ts +5834 -0
  113. package/dist/theme/components/button.js +186 -0
  114. package/dist/theme/components/chip.d.ts +117 -0
  115. package/dist/theme/components/chip.js +168 -0
  116. package/dist/theme/components/components.d.ts +5944 -0
  117. package/dist/theme/components/components.js +16 -12
  118. package/dist/theme/customizations/data-display.d.ts +0 -5
  119. package/dist/theme/customizations/data-display.js +15 -144
  120. package/dist/theme/customizations/feedback.js +1 -1
  121. package/dist/theme/customizations/inputs.js +29 -226
  122. package/dist/theme/customizations/navigation.js +26 -12
  123. package/dist/theme/customizations/surfaces.js +5 -5
  124. package/dist/theme/theme-primitives.d.ts +24 -0
  125. package/dist/theme/theme-primitives.js +73 -48
  126. package/dist/{typographyClasses-QAKcrTAX.js → typographyClasses-DTwotNbm.js} +2 -2
  127. package/dist/{useMobilePicker-DlmTFHhN.js → useMobilePicker-CYRSYIKP.js} +1852 -1848
  128. package/dist/{useSlot-CiHsL61G.js → useSlot-B_4ipGBP.js} +6 -6
  129. package/dist/{useTheme-Dy5JmnOe.js → useTheme-D1MJ3g_i.js} +1 -1
  130. package/dist/{useThemeProps-BGjjVPlJ.js → useThemeProps-CTcSO3lC.js} +2 -2
  131. package/dist/{warning-DWsjz4u6.js → warning-DyDdgu8-.js} +3 -3
  132. package/package.json +6 -4
  133. package/dist/HelpOutlineOutlined-Dw_XSjYK.js +0 -8
  134. package/dist/chipClasses-WFcUH6gU.js +0 -10
  135. package/dist/createTheme-DuP3DZSF.js +0 -3005
  136. package/dist/generateUtilityClasses-BpNk3DNr.js +0 -230
@@ -1,5 +1,5 @@
1
- import { g as n } from "./generateUtilityClasses-BpNk3DNr.js";
2
- import { g as e } from "./createTheme-DuP3DZSF.js";
1
+ import { g as n } from "./generateUtilityClasses-D-O3RBPF.js";
2
+ import { g as e } from "./colorManipulator-CPZHCebU.js";
3
3
  function l(t) {
4
4
  return e("MuiInputBase", t);
5
5
  }
@@ -1,11 +1,42 @@
1
1
  import { default as React } from 'react';
2
2
  import { AutocompleteProps } from '@mui/material';
3
+ /**
4
+ * Props interface for SAutocomplete component - extends Material-UI AutocompleteProps
5
+ * with form integration capabilities. Uses complex generic types to maintain
6
+ * Material-UI's type safety for different autocomplete configurations.
7
+ *
8
+ * @template T - Type of the option values
9
+ * @template Multiple - Whether multiple selection is enabled
10
+ * @template DisableClearable - Whether the clear button is disabled
11
+ * @template FreeSolo - Whether free text input is allowed
12
+ */
3
13
  export interface SAutocompleteProps<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined = undefined> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, 'renderInput'> {
14
+ /** Optional custom renderInput function for advanced input customization */
4
15
  renderInput?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>['renderInput'];
16
+ /** Field label displayed above the autocomplete */
5
17
  label?: string | React.ReactNode;
18
+ /** Whether the field is required (shows asterisk in label) */
6
19
  required?: boolean;
20
+ /** Error message to display below the field */
7
21
  error?: string;
22
+ /** HTML id attribute for the input element */
8
23
  htmlFor?: string;
9
24
  }
25
+ /**
26
+ * SAutocomplete - A standardized autocomplete/combobox component that wraps Material-UI Autocomplete
27
+ * with consistent form labeling, validation, and help text patterns.
28
+ *
29
+ * Key features:
30
+ * - Maintains full Material-UI Autocomplete API and type safety
31
+ * - Integrates with SForm for consistent label and error handling
32
+ * - Supports all autocomplete modes: single/multiple selection, free solo, etc.
33
+ * - Provides accessible form labeling with htmlFor/id association
34
+ * - Uses forwardRef for proper ref forwarding to underlying components
35
+ * - Disables portal by default for better layout predictability
36
+ *
37
+ * @param props - SAutocompleteProps with form integration and Material-UI Autocomplete props
38
+ * @param ref - Forward ref to the underlying Autocomplete component
39
+ * @returns JSX.Element - Wrapped Autocomplete with form labeling and validation
40
+ */
10
41
  declare const SAutocomplete: React.ForwardRefExoticComponent<Omit<SAutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined>, "ref"> & React.RefAttributes<unknown>>;
11
42
  export default SAutocomplete;
@@ -1,26 +1,29 @@
1
- import { j as r } from "../jsx-runtime-DywqP_6a.js";
2
- import { forwardRef as l } from "react";
3
- import { Autocomplete as p, TextField as u } from "@mui/material";
4
- import d from "../s-form/s-form.js";
5
- const c = l(
1
+ import { j as t } from "../jsx-runtime-DywqP_6a.js";
2
+ import { forwardRef as i, useId as p } from "react";
3
+ import { Autocomplete as a, TextField as n } from "@mui/material";
4
+ import c from "../s-form/s-form.js";
5
+ const F = i(
6
6
  ({
7
7
  label: e = "",
8
- required: o = !1,
8
+ required: r = !1,
9
9
  error: m,
10
- htmlFor: t,
11
- ...i
12
- }, s) => /* @__PURE__ */ r.jsx(d, { error: m, label: e, required: o, htmlFor: t, children: /* @__PURE__ */ r.jsx(
13
- p,
14
- {
15
- disablePortal: !0,
16
- fullWidth: !0,
17
- renderInput: (f) => /* @__PURE__ */ r.jsx(u, { ...f }),
18
- id: t,
19
- ...i,
20
- ref: s
21
- }
22
- ) })
10
+ htmlFor: l,
11
+ ...s
12
+ }, d) => {
13
+ const u = p(), o = l ?? u;
14
+ return /* @__PURE__ */ t.jsx(c, { error: m, label: e, required: r, htmlFor: o, children: /* @__PURE__ */ t.jsx(
15
+ a,
16
+ {
17
+ disablePortal: !0,
18
+ fullWidth: !0,
19
+ renderInput: (f) => /* @__PURE__ */ t.jsx(n, { ...f }),
20
+ id: o,
21
+ ...s,
22
+ ref: d
23
+ }
24
+ ) });
25
+ }
23
26
  );
24
27
  export {
25
- c as default
28
+ F as default
26
29
  };
@@ -0,0 +1,2 @@
1
+ export { default } from './s-button';
2
+ export type { SButtonProps } from './s-button';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./s-button.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '@mui/material';
3
+ export interface SButtonProps extends ButtonProps {
4
+ }
5
+ declare const SButton: React.ForwardRefExoticComponent<Omit<SButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ export default SButton;
@@ -0,0 +1,7 @@
1
+ import { j as r } from "../jsx-runtime-DywqP_6a.js";
2
+ import { forwardRef as m } from "react";
3
+ import { Button as f } from "@mui/material";
4
+ const p = m((t, o) => /* @__PURE__ */ r.jsx(f, { ref: o, ...t }));
5
+ export {
6
+ p as default
7
+ };
@@ -1,15 +1,51 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Props interface for SButtonLink component
4
+ */
1
5
  export interface SButtonLinkProps {
6
+ /** Text or element displayed before the main link */
2
7
  beforeText?: string | React.ReactNode;
8
+ /** Text or element displayed after the main link */
3
9
  afterText?: string | React.ReactNode;
10
+ /** The main clickable link text or element */
4
11
  mainText?: string | React.ReactNode;
12
+ /** URL for the link (defaults to '#') */
5
13
  href?: string;
14
+ /** Component to render the link as (e.g., RouterLink for client-side routing) */
6
15
  component?: any;
16
+ /** Target attribute for the link (e.g., '_blank' for new tab) */
7
17
  target?: string;
18
+ /** Color of the surrounding text */
8
19
  color?: string;
20
+ /** Color of the link itself (overrides default link color) */
9
21
  linkColor?: string;
22
+ /** Line height for the typography */
10
23
  lineHeight?: string;
24
+ /** Typography variant for the container text */
11
25
  variant?: 'body1' | 'body2' | 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'overline' | 'subtitle1' | 'subtitle2';
26
+ /** Click handler for the link */
12
27
  onClick?: () => void;
13
28
  }
14
- declare const SButtonLink: ({ onClick, beforeText, afterText, mainText, href, component, target, color, linkColor, variant, lineHeight, }: SButtonLinkProps) => import("react/jsx-runtime").JSX.Element;
29
+ /**
30
+ * SButtonLink - A flexible link component that combines text and a clickable link element.
31
+ * Useful for creating contextual links within text content, such as "Don't have an account? Sign up here."
32
+ *
33
+ * Key features:
34
+ * - Supports text before and after the main link
35
+ * - Configurable typography variant and colors
36
+ * - Component prop for integration with routing libraries (e.g., React Router)
37
+ * - Target attribute support for controlling link behavior
38
+ * - Consistent cursor and font size inheritance
39
+ * - Default fallback values for common use cases
40
+ *
41
+ * Common use cases:
42
+ * - Authentication flows ("Already have an account? Sign in")
43
+ * - Call-to-action text with embedded links
44
+ * - Help text with contextual links
45
+ * - Navigation breadcrumbs with text context
46
+ *
47
+ * @param props - SButtonLinkProps with text content, link configuration, and styling
48
+ * @returns JSX.Element - Typography containing text with embedded link
49
+ */
50
+ declare const SButtonLink: ({ onClick, beforeText, afterText, mainText, href, component, target, color, linkColor, variant, lineHeight, }: SButtonLinkProps) => React.JSX.Element;
15
51
  export default SButtonLink;
@@ -1,7 +1,28 @@
1
1
  import { default as React } from 'react';
2
2
  import { CheckboxProps } from '@mui/material';
3
+ /**
4
+ * Props interface for SCheckbox component - extends Material-UI CheckboxProps
5
+ * but removes 'content' to avoid conflicts with our custom content prop
6
+ */
3
7
  export interface SCheckboxProps extends Omit<CheckboxProps, 'content'> {
8
+ /** Content displayed as a clickable label next to the checkbox */
4
9
  content?: string | React.ReactNode;
5
10
  }
11
+ /**
12
+ * SCheckbox - A checkbox component with integrated label support that maintains
13
+ * proper accessibility and consistent styling with the design system.
14
+ *
15
+ * Key features:
16
+ * - Automatic ID generation for accessibility when no ID is provided
17
+ * - Clickable label that toggles the checkbox state
18
+ * - Horizontal layout with proper spacing between checkbox and label
19
+ * - Full Material-UI Checkbox API compatibility
20
+ * - Forward ref support for form libraries and external control
21
+ * - Typography integration for consistent text styling
22
+ *
23
+ * @param props - SCheckboxProps with content and Material-UI Checkbox props
24
+ * @param ref - Forward ref to the underlying Checkbox component
25
+ * @returns JSX.Element - Checkbox with optional integrated label
26
+ */
6
27
  declare const SCheckbox: React.ForwardRefExoticComponent<Omit<SCheckboxProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
28
  export default SCheckbox;
@@ -1,15 +1,15 @@
1
1
  import { j as r } from "../jsx-runtime-DywqP_6a.js";
2
- import { forwardRef as a, useId as d } from "react";
3
- import { Stack as s, Checkbox as l, Typography as n } from "@mui/material";
4
- const m = a(
5
- ({ content: e, ...t }, o) => {
6
- const i = d();
7
- return /* @__PURE__ */ r.jsxs(s, { alignItems: "center", direction: "row", display: "flex", gap: 1, justifyContent: "start", children: [
8
- /* @__PURE__ */ r.jsx(l, { ref: o, ...t, id: t.id ?? i }),
9
- e && /* @__PURE__ */ r.jsx("label", { htmlFor: t.id ?? i, children: /* @__PURE__ */ r.jsx(n, { variant: "body2", children: e }) })
2
+ import { forwardRef as d, useId as a } from "react";
3
+ import { Stack as c, Checkbox as n, Typography as l } from "@mui/material";
4
+ const h = d(
5
+ ({ content: t, ...e }, s) => {
6
+ const i = a(), o = e.id ?? i;
7
+ return /* @__PURE__ */ r.jsxs(c, { alignItems: "center", direction: "row", display: "flex", justifyContent: "start", children: [
8
+ /* @__PURE__ */ r.jsx(n, { ref: s, ...e, id: o }),
9
+ t && /* @__PURE__ */ r.jsx("label", { htmlFor: o, children: /* @__PURE__ */ r.jsx(l, { variant: "body2", children: t }) })
10
10
  ] });
11
11
  }
12
12
  );
13
13
  export {
14
- m as default
14
+ h as default
15
15
  };
@@ -0,0 +1,2 @@
1
+ export { default } from './s-chip';
2
+ export type { SChipProps } from './s-chip';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./s-chip.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "./index.js",
3
+ "types": "./index.d.ts",
4
+ "sideEffects": false
5
+ }
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { ChipProps } from '@mui/material';
3
+ export interface SChipProps extends ChipProps {
4
+ }
5
+ declare const SChip: React.ForwardRefExoticComponent<Omit<SChipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export default SChip;
@@ -0,0 +1,7 @@
1
+ import { j as t } from "../jsx-runtime-DywqP_6a.js";
2
+ import { forwardRef as m } from "react";
3
+ import { Chip as p } from "@mui/material";
4
+ const e = m((r, o) => /* @__PURE__ */ t.jsx(p, { ref: o, ...r }));
5
+ export {
6
+ e as default
7
+ };
@@ -1,8 +1,33 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Props interface for SChips component
4
+ */
1
5
  export interface SChipsProps {
6
+ /** Array of strings to display as chips */
2
7
  chips: string[];
8
+ /** Whether to handle overflow with '+N more' chip (default: true) */
3
9
  overflow?: boolean;
10
+ /** Callback fired when a chip is clicked */
4
11
  onClick?: (tag: string) => void;
12
+ /** Text used in overflow chip (default: 'keywords') */
5
13
  overflowText?: string;
6
14
  }
7
- declare const SChips: ({ chips, overflow, onClick, overflowText }: SChipsProps) => import("react/jsx-runtime").JSX.Element;
15
+ /**
16
+ * SChips - A smart chip display component that handles overflow with intelligent truncation.
17
+ *
18
+ * Key features:
19
+ * - Responsive overflow handling that shows '+N more' when chips exceed container width
20
+ * - Dynamic width calculation using DOM measurement
21
+ * - Tooltip display of hidden chips on hover
22
+ * - Click handling for individual chips
23
+ * - Automatic recalculation on window resize
24
+ * - Configurable overflow text for different use cases
25
+ *
26
+ * The component uses real DOM measurement to accurately calculate chip widths
27
+ * and determines how many chips can fit in the available space.
28
+ *
29
+ * @param props - SChipsProps with chips array and configuration options
30
+ * @returns JSX.Element - Responsive chip display with overflow handling
31
+ */
32
+ declare const SChips: ({ chips, overflow, onClick, overflowText }: SChipsProps) => React.JSX.Element;
8
33
  export default SChips;
@@ -1,38 +1,43 @@
1
1
  import { j as s } from "../jsx-runtime-DywqP_6a.js";
2
- import { useRef as S, useState as m, useEffect as E } from "react";
3
- import { Box as o, Chip as h, Tooltip as R } from "@mui/material";
4
- const P = ({ chips: n, overflow: l = !0, onClick: r, overflowText: c = "keywords" }) => {
5
- const u = S(null), [w, C] = m([]), [j, y] = m([]), [x, W] = m(0), a = () => {
2
+ import { useRef as S, useState as m, useEffect as v } from "react";
3
+ import { Box as a, Chip as h, Tooltip as E } from "@mui/material";
4
+ const L = ({ chips: n, overflow: r = !0, onClick: l, overflowText: c = "keywords" }) => {
5
+ const u = S(null), [C, w] = m([]), [W, j] = m([]), [x, y] = m(0), p = () => {
6
6
  var f;
7
7
  const t = ((f = u.current) == null ? void 0 : f.offsetWidth) || 0;
8
8
  let e = 0, i = 0;
9
- for (let p = 0; p < n.length; p++) {
10
- const b = d(n[p]);
9
+ for (let o = 0; o < n.length; o++) {
10
+ const b = d(n[o]);
11
11
  if (e + b <= t)
12
12
  e += b, i++;
13
13
  else
14
14
  break;
15
15
  }
16
- const g = d(`+${n.length - i} ${c}`);
17
- for (; e + g > t && i > 0; )
18
- i--, e -= d(n[i]);
19
- C(n.slice(0, i)), y(n.slice(i)), W(n.length - i);
16
+ if (i < n.length) {
17
+ const o = d(`+${n.length - i} ${c}`);
18
+ for (; e + o > t && i > 0; )
19
+ i--, e -= d(n[i]);
20
+ }
21
+ w(n.slice(0, i)), j(n.slice(i)), y(n.length - i);
20
22
  }, d = (t) => {
21
23
  const e = document.createElement("span");
22
24
  e.style.visibility = "hidden", e.style.position = "absolute", e.style.whiteSpace = "nowrap", e.textContent = t.trim(), document.body.appendChild(e);
23
25
  const i = e.offsetWidth;
24
26
  return document.body.removeChild(e), i + 16;
25
- }, v = l ? { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" } : {};
26
- return E(() => (a(), window.addEventListener("resize", a), () => {
27
- window.removeEventListener("resize", a);
28
- }), [n]), /* @__PURE__ */ s.jsxs(o, { ref: u, display: "flex", maxWidth: "100%", ...v, children: [
29
- (l ? w : n).map((t) => /* @__PURE__ */ s.jsx(
30
- o,
27
+ }, g = r ? { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" } : {};
28
+ return v(() => {
29
+ if (r)
30
+ return p(), window.addEventListener("resize", p), () => {
31
+ window.removeEventListener("resize", p);
32
+ };
33
+ }, [n, r]), /* @__PURE__ */ s.jsxs(a, { ref: u, display: "flex", maxWidth: "100%", flexWrap: r ? "nowrap" : "wrap", ...g, children: [
34
+ (r ? C : n).map((t) => /* @__PURE__ */ s.jsx(
35
+ a,
31
36
  {
32
37
  component: "span",
33
38
  textTransform: "lowercase",
34
39
  onClick: () => {
35
- r == null || r(t);
40
+ l == null || l(t);
36
41
  },
37
42
  children: /* @__PURE__ */ s.jsx(
38
43
  h,
@@ -42,21 +47,21 @@ const P = ({ chips: n, overflow: l = !0, onClick: r, overflowText: c = "keywords
42
47
  mr: 1,
43
48
  mb: 1,
44
49
  userSelect: "none",
45
- cursor: r ? "pointer" : "default"
50
+ cursor: l ? "pointer" : "default"
46
51
  }
47
52
  }
48
53
  )
49
54
  },
50
55
  t
51
56
  )),
52
- l && x > 0 && /* @__PURE__ */ s.jsx(
53
- R,
57
+ r && x > 0 && /* @__PURE__ */ s.jsx(
58
+ E,
54
59
  {
55
60
  slotProps: {
56
61
  tooltip: { style: { padding: "0.5rem" } }
57
62
  },
58
- title: /* @__PURE__ */ s.jsx(o, { display: "flex", gap: 1, maxWidth: "240px", flexWrap: "wrap", children: j.map((t) => /* @__PURE__ */ s.jsx(h, { label: t.trim() }, t)) }),
59
- children: /* @__PURE__ */ s.jsx(o, { component: "span", textTransform: "lowercase", children: /* @__PURE__ */ s.jsx(
63
+ title: /* @__PURE__ */ s.jsx(a, { display: "flex", gap: 1, maxWidth: "240px", flexWrap: "wrap", children: W.map((t) => /* @__PURE__ */ s.jsx(h, { label: t.trim() }, t)) }),
64
+ children: /* @__PURE__ */ s.jsx(a, { component: "span", textTransform: "lowercase", children: /* @__PURE__ */ s.jsx(
60
65
  h,
61
66
  {
62
67
  label: `+${x} ${c}`,
@@ -69,5 +74,5 @@ const P = ({ chips: n, overflow: l = !0, onClick: r, overflowText: c = "keywords
69
74
  ] });
70
75
  };
71
76
  export {
72
- P as default
77
+ L as default
73
78
  };
@@ -1,7 +1,35 @@
1
1
  import { default as React } from 'react';
2
2
  import { CopilotKitProps } from '@copilotkit/react-core';
3
+ /**
4
+ * Props for the SCopilotKitProvider component
5
+ * Extends CopilotKit props but ensures children is always ReactNode type
6
+ */
3
7
  export type SCopilotKitProviderProps = Omit<CopilotKitProps, 'children'> & {
8
+ /** Child components that will have access to CopilotKit functionality */
4
9
  children: React.ReactNode;
5
10
  };
11
+ /**
12
+ * Enhanced CopilotKit provider wrapper with default configurations
13
+ *
14
+ * Provides a configured CopilotKit context to child components with sensible defaults.
15
+ * The dev console is disabled by default for cleaner production experience.
16
+ *
17
+ * CopilotKit enables AI-powered features like:
18
+ * - Chatbots and conversational interfaces
19
+ * - AI-assisted text editing and completion
20
+ * - Context-aware AI actions and responses
21
+ * - Integration with various AI models and services
22
+ *
23
+ * @param children - Child components that will have access to CopilotKit
24
+ * @param copilotKitProps - All other CopilotKit configuration props
25
+ * @returns JSX element wrapping children with CopilotKit context
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * <SCopilotKitProvider publicApiKey="your-api-key">
30
+ * <YourApp />
31
+ * </SCopilotKitProvider>
32
+ * ```
33
+ */
6
34
  export declare function SCopilotKitProvider({ children, ...copilotKitProps }: SCopilotKitProviderProps): import("react/jsx-runtime").JSX.Element;
7
35
  export default SCopilotKitProvider;
@@ -1,8 +1,49 @@
1
- import { TypographyProps } from '@mui/material';
1
+ import { PaperProps, TypographyProps } from '@mui/material';
2
+ /**
3
+ * Props for the SCopyableText component
4
+ */
2
5
  export interface SCopyableTextProps {
6
+ /** The text content to display and copy */
3
7
  text?: string;
8
+ /** Additional props to pass to the Typography component */
4
9
  typographyProps?: TypographyProps;
10
+ /** Callback function called when text is successfully copied */
5
11
  onCopied?: () => void;
12
+ /** Additional props to pass to the Paper component */
13
+ paperProps?: PaperProps;
6
14
  }
7
- declare const SCopyableText: ({ text, typographyProps, onCopied }: SCopyableTextProps) => import("react/jsx-runtime").JSX.Element | null;
15
+ /**
16
+ * Text display component with built-in copy-to-clipboard functionality
17
+ *
18
+ * Displays text content in a styled container with a copy button overlay.
19
+ * Features visual feedback when copying is successful and handles copy
20
+ * errors gracefully.
21
+ *
22
+ * Features:
23
+ * - One-click copy to clipboard using modern Clipboard API
24
+ * - Visual feedback with icon change and color indication
25
+ * - Automatic reset of copied state after 2 seconds
26
+ * - Styled text container with border and proper spacing
27
+ * - Word wrapping and break-word handling for long content
28
+ * - Customizable typography through props
29
+ * - Optional callback for copy success events
30
+ *
31
+ * @param text - The text content to display and enable copying for
32
+ * @param typographyProps - Additional Material-UI Typography props for styling
33
+ * @param onCopied - Optional callback function triggered when copy succeeds
34
+ * @returns JSX element containing styled text with copy button, or null if no text
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <SCopyableText
39
+ * text="const apiKey = 'sk-1234567890abcdef';"
40
+ * onCopied={() => console.log('API key copied!')}
41
+ * typographyProps={{
42
+ * variant: 'code',
43
+ * color: 'primary'
44
+ * }}
45
+ * />
46
+ * ```
47
+ */
48
+ declare const SCopyableText: ({ text, typographyProps, onCopied, paperProps }: SCopyableTextProps) => import("react/jsx-runtime").JSX.Element | null;
8
49
  export default SCopyableText;
@@ -1,56 +1,64 @@
1
1
  import { j as e } from "../jsx-runtime-DywqP_6a.js";
2
2
  import { useState as l } from "react";
3
- import { Box as d, IconButton as m, Typography as x } from "@mui/material";
4
- import { c as i } from "../createSvgIcon-DN-sh_sr.js";
5
- const u = i(/* @__PURE__ */ e.jsx("path", {
3
+ import { Paper as x, Box as m, IconButton as h, Typography as u } from "@mui/material";
4
+ import { c } from "../createSvgIcon-9XY7lJan.js";
5
+ const p = c(/* @__PURE__ */ e.jsx("path", {
6
6
  d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
7
- }), "Check"), h = i(/* @__PURE__ */ e.jsx("path", {
7
+ }), "Check"), f = c(/* @__PURE__ */ e.jsx("path", {
8
8
  d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
9
- }), "ContentCopy"), b = ({ text: t, typographyProps: o, onCopied: r }) => {
10
- const [s, c] = l(!1), a = async () => {
11
- if (t)
9
+ }), "ContentCopy"), w = ({ text: r, typographyProps: t, onCopied: o, paperProps: i }) => {
10
+ const [s, a] = l(!1), n = async () => {
11
+ if (r)
12
12
  try {
13
- await navigator.clipboard.writeText(t), c(!0), setTimeout(() => c(!1), 2e3), r == null || r();
14
- } catch (n) {
15
- console.error("Failed to copy text:", n);
13
+ await navigator.clipboard.writeText(r), a(!0), setTimeout(() => a(!1), 2e3), o == null || o();
14
+ } catch (d) {
15
+ console.error("Failed to copy text:", d);
16
16
  }
17
17
  };
18
- return t ? /* @__PURE__ */ e.jsxs(d, { sx: { position: "relative" }, children: [
18
+ return r ? /* @__PURE__ */ e.jsx(x, { sx: { p: 2, border: "1px dashed", borderColor: "divider" }, ...i, children: /* @__PURE__ */ e.jsxs(m, { sx: { position: "relative" }, children: [
19
19
  /* @__PURE__ */ e.jsx(
20
- m,
20
+ h,
21
21
  {
22
- onClick: a,
22
+ onClick: n,
23
23
  size: "small",
24
24
  sx: {
25
25
  position: "absolute",
26
- top: 8,
27
- right: 8,
26
+ top: "50%",
27
+ transform: "translateY(-50%)",
28
+ right: 0,
28
29
  zIndex: 1,
30
+ // Ensure button appears above text
29
31
  color: s ? "success.main" : "inherit"
32
+ // Green when copied
30
33
  },
31
- children: s ? /* @__PURE__ */ e.jsx(u, { fontSize: "small" }) : /* @__PURE__ */ e.jsx(h, { fontSize: "small" })
34
+ children: s ? /* @__PURE__ */ e.jsx(p, {}) : /* @__PURE__ */ e.jsx(f, {})
32
35
  }
33
36
  ),
34
37
  /* @__PURE__ */ e.jsx(
35
- x,
38
+ u,
36
39
  {
37
40
  variant: "body1",
38
41
  sx: {
39
42
  marginBottom: 0,
40
43
  whiteSpace: "pre-wrap",
44
+ // Preserve whitespace and line breaks
41
45
  padding: 2,
46
+ // Inner spacing
42
47
  borderRadius: 1,
43
48
  border: "1px solid var(--s-palette-divider)",
49
+ // Theme-aware border
44
50
  wordBreak: "break-word",
45
- ...o == null ? void 0 : o.sx
51
+ // Handle long words gracefully
52
+ ...t == null ? void 0 : t.sx
53
+ // Allow custom styling override
46
54
  },
47
55
  color: "text.secondary",
48
- ...o,
49
- children: t
56
+ ...t,
57
+ children: r
50
58
  }
51
59
  )
52
- ] }) : null;
60
+ ] }) }) : null;
53
61
  };
54
62
  export {
55
- b as default
63
+ w as default
56
64
  };