@spark-ui/components 10.22.1 → 11.0.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 (143) hide show
  1. package/package.json +5 -5
  2. package/dist/DialogTrigger-woU7vsJi.d.ts +0 -142
  3. package/dist/Input-N8AWWSmt.d.ts +0 -41
  4. package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +0 -20
  5. package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +0 -19
  6. package/dist/accordion/index.d.ts +0 -73
  7. package/dist/accordion/index.js +0 -325
  8. package/dist/accordion/index.js.map +0 -1
  9. package/dist/alert-dialog/index.d.ts +0 -119
  10. package/dist/alert-dialog/index.js +0 -1554
  11. package/dist/alert-dialog/index.js.map +0 -1
  12. package/dist/avatar/index.d.ts +0 -66
  13. package/dist/avatar/index.js +0 -1303
  14. package/dist/avatar/index.js.map +0 -1
  15. package/dist/badge/index.d.ts +0 -47
  16. package/dist/badge/index.js +0 -122
  17. package/dist/badge/index.js.map +0 -1
  18. package/dist/breadcrumb/index.d.ts +0 -64
  19. package/dist/breadcrumb/index.js +0 -327
  20. package/dist/breadcrumb/index.js.map +0 -1
  21. package/dist/button/index.d.ts +0 -41
  22. package/dist/button/index.js +0 -935
  23. package/dist/button/index.js.map +0 -1
  24. package/dist/card/index.d.ts +0 -61
  25. package/dist/card/index.js +0 -502
  26. package/dist/card/index.js.map +0 -1
  27. package/dist/carousel/index.d.ts +0 -261
  28. package/dist/carousel/index.js +0 -1801
  29. package/dist/carousel/index.js.map +0 -1
  30. package/dist/checkbox/index.d.ts +0 -120
  31. package/dist/checkbox/index.js +0 -511
  32. package/dist/checkbox/index.js.map +0 -1
  33. package/dist/chip/index.d.ts +0 -97
  34. package/dist/chip/index.js +0 -908
  35. package/dist/chip/index.js.map +0 -1
  36. package/dist/collapsible/index.d.ts +0 -43
  37. package/dist/collapsible/index.js +0 -109
  38. package/dist/collapsible/index.js.map +0 -1
  39. package/dist/combobox/index.d.ts +0 -287
  40. package/dist/combobox/index.js +0 -2588
  41. package/dist/combobox/index.js.map +0 -1
  42. package/dist/dialog/index.d.ts +0 -33
  43. package/dist/dialog/index.js +0 -1389
  44. package/dist/dialog/index.js.map +0 -1
  45. package/dist/divider/index.d.ts +0 -61
  46. package/dist/divider/index.js +0 -224
  47. package/dist/divider/index.js.map +0 -1
  48. package/dist/drawer/index.d.ts +0 -152
  49. package/dist/drawer/index.js +0 -1400
  50. package/dist/drawer/index.js.map +0 -1
  51. package/dist/dropdown/index.d.ts +0 -233
  52. package/dist/dropdown/index.js +0 -2051
  53. package/dist/dropdown/index.js.map +0 -1
  54. package/dist/form-field/index.d.ts +0 -186
  55. package/dist/form-field/index.js +0 -553
  56. package/dist/form-field/index.js.map +0 -1
  57. package/dist/icon/index.d.ts +0 -28
  58. package/dist/icon/index.js +0 -127
  59. package/dist/icon/index.js.map +0 -1
  60. package/dist/icon-button/index.d.ts +0 -16
  61. package/dist/icon-button/index.js +0 -980
  62. package/dist/icon-button/index.js.map +0 -1
  63. package/dist/input/index.d.ts +0 -78
  64. package/dist/input/index.js +0 -724
  65. package/dist/input/index.js.map +0 -1
  66. package/dist/kbd/index.d.ts +0 -9
  67. package/dist/kbd/index.js +0 -47
  68. package/dist/kbd/index.js.map +0 -1
  69. package/dist/label/index.d.ts +0 -11
  70. package/dist/label/index.js +0 -78
  71. package/dist/label/index.js.map +0 -1
  72. package/dist/link-box/index.d.ts +0 -34
  73. package/dist/link-box/index.js +0 -92
  74. package/dist/link-box/index.js.map +0 -1
  75. package/dist/pagination/index.d.ts +0 -143
  76. package/dist/pagination/index.js +0 -1353
  77. package/dist/pagination/index.js.map +0 -1
  78. package/dist/popover/index.d.ts +0 -93
  79. package/dist/popover/index.js +0 -1339
  80. package/dist/popover/index.js.map +0 -1
  81. package/dist/portal/index.d.ts +0 -13
  82. package/dist/portal/index.js +0 -37
  83. package/dist/portal/index.js.map +0 -1
  84. package/dist/progress/index.d.ts +0 -48
  85. package/dist/progress/index.js +0 -223
  86. package/dist/progress/index.js.map +0 -1
  87. package/dist/progress-tracker/index.d.ts +0 -80
  88. package/dist/progress-tracker/index.js +0 -571
  89. package/dist/progress-tracker/index.js.map +0 -1
  90. package/dist/radio-group/index.d.ts +0 -100
  91. package/dist/radio-group/index.js +0 -318
  92. package/dist/radio-group/index.js.map +0 -1
  93. package/dist/rating/index.d.ts +0 -78
  94. package/dist/rating/index.js +0 -363
  95. package/dist/rating/index.js.map +0 -1
  96. package/dist/scrolling-list/index.d.ts +0 -118
  97. package/dist/scrolling-list/index.js +0 -1426
  98. package/dist/scrolling-list/index.js.map +0 -1
  99. package/dist/segmented-gauge/index.d.ts +0 -100
  100. package/dist/segmented-gauge/index.js +0 -277
  101. package/dist/segmented-gauge/index.js.map +0 -1
  102. package/dist/select/index.d.ts +0 -167
  103. package/dist/select/index.js +0 -581
  104. package/dist/select/index.js.map +0 -1
  105. package/dist/skeleton/index.d.ts +0 -67
  106. package/dist/skeleton/index.js +0 -206
  107. package/dist/skeleton/index.js.map +0 -1
  108. package/dist/slider/index.d.ts +0 -97
  109. package/dist/slider/index.js +0 -220
  110. package/dist/slider/index.js.map +0 -1
  111. package/dist/slot/index.d.ts +0 -16
  112. package/dist/slot/index.js +0 -51
  113. package/dist/slot/index.js.map +0 -1
  114. package/dist/snackbar/index.d.ts +0 -158
  115. package/dist/snackbar/index.js +0 -1756
  116. package/dist/snackbar/index.js.map +0 -1
  117. package/dist/spinner/index.d.ts +0 -21
  118. package/dist/spinner/index.js +0 -139
  119. package/dist/spinner/index.js.map +0 -1
  120. package/dist/stepper/index.d.ts +0 -81
  121. package/dist/stepper/index.js +0 -1847
  122. package/dist/stepper/index.js.map +0 -1
  123. package/dist/switch/index.d.ts +0 -64
  124. package/dist/switch/index.js +0 -327
  125. package/dist/switch/index.js.map +0 -1
  126. package/dist/tabs/index.d.ts +0 -103
  127. package/dist/tabs/index.js +0 -1376
  128. package/dist/tabs/index.js.map +0 -1
  129. package/dist/tag/index.d.ts +0 -29
  130. package/dist/tag/index.js +0 -283
  131. package/dist/tag/index.js.map +0 -1
  132. package/dist/text-link/index.d.ts +0 -20
  133. package/dist/text-link/index.js +0 -100
  134. package/dist/text-link/index.js.map +0 -1
  135. package/dist/textarea/index.d.ts +0 -57
  136. package/dist/textarea/index.js +0 -797
  137. package/dist/textarea/index.js.map +0 -1
  138. package/dist/toast/index.d.ts +0 -56
  139. package/dist/toast/index.js +0 -1412
  140. package/dist/toast/index.js.map +0 -1
  141. package/dist/visually-hidden/index.d.ts +0 -16
  142. package/dist/visually-hidden/index.js +0 -67
  143. package/dist/visually-hidden/index.js.map +0 -1
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/slot/index.ts
21
- var slot_exports = {};
22
- __export(slot_exports, {
23
- Slot: () => Slot,
24
- Slottable: () => Slottable,
25
- wrapPolymorphicSlot: () => wrapPolymorphicSlot
26
- });
27
- module.exports = __toCommonJS(slot_exports);
28
-
29
- // src/slot/Slot.tsx
30
- var import_radix_ui = require("radix-ui");
31
- var import_react = require("react");
32
- var import_jsx_runtime = require("react/jsx-runtime");
33
- var Slottable = import_radix_ui.Slot.Slottable;
34
- var Slot = ({ ref, ...props }) => {
35
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
36
- };
37
- var wrapPolymorphicSlot = (asChild, children, callback) => {
38
- if (!asChild) return callback(children);
39
- return (0, import_react.isValidElement)(children) ? (0, import_react.cloneElement)(
40
- children,
41
- void 0,
42
- callback(children.props.children)
43
- ) : null;
44
- };
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- Slot,
48
- Slottable,
49
- wrapPolymorphicSlot
50
- });
51
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/slot/index.ts","../../src/slot/Slot.tsx"],"sourcesContent":["export * from './Slot'\n","import { Slot as RadixSlot } from 'radix-ui'\nimport {\n cloneElement,\n HTMLAttributes,\n isValidElement,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react'\n\nexport const Slottable: typeof RadixSlot.Slottable = RadixSlot.Slottable\n\nexport type SlotProps = PropsWithChildren<HTMLAttributes<HTMLElement>> & {\n ref?: Ref<HTMLElement>\n}\n\nexport const Slot = ({ ref, ...props }: SlotProps) => {\n return <RadixSlot.Root ref={ref} {...props} />\n}\n\n/**\n * When using Radix `Slot` component, it will consider its first child to merge its props with.\n * In some cases, you might need to wrap the top child with additional markup without breaking this behaviour.\n */\nexport const wrapPolymorphicSlot = (\n asChild: boolean | undefined,\n children: ReactNode,\n callback: (children: ReactNode) => ReactNode\n) => {\n if (!asChild) return callback(children) // If polymorphic behaviour is not used, we keep the original children\n\n return isValidElement(children)\n ? cloneElement(\n children,\n undefined,\n callback((children.props as { children: ReactNode }).children)\n )\n : null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAkC;AAClC,mBAOO;AASE;AAPF,IAAM,YAAwC,gBAAAA,KAAU;AAMxD,IAAM,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,MAAiB;AACpD,SAAO,4CAAC,gBAAAA,KAAU,MAAV,EAAe,KAAW,GAAG,OAAO;AAC9C;AAMO,IAAM,sBAAsB,CACjC,SACA,UACA,aACG;AACH,MAAI,CAAC,QAAS,QAAO,SAAS,QAAQ;AAEtC,aAAO,6BAAe,QAAQ,QAC1B;AAAA,IACE;AAAA,IACA;AAAA,IACA,SAAU,SAAS,MAAkC,QAAQ;AAAA,EAC/D,IACA;AACN;","names":["RadixSlot"]}
@@ -1,158 +0,0 @@
1
- import { QueuedToast, ToastState, ToastOptions } from '@react-stately/toast';
2
- import { ReactNode, ComponentPropsWithRef, PropsWithChildren, ReactElement, Ref } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import * as class_variance_authority_types from 'class-variance-authority/types';
5
- import { VariantProps } from 'class-variance-authority';
6
- import { AriaToastRegionProps } from '@react-aria/toast';
7
- import { ButtonProps } from '../button/index.js';
8
- import { IconButtonProps } from '../icon-button/index.js';
9
- import { IconProps } from '../icon/index.js';
10
-
11
- declare const snackbarItemVariant: (props?: ({
12
- design?: "filled" | "tinted" | null | undefined;
13
- intent?: "main" | "success" | "alert" | "error" | "info" | "neutral" | "basic" | "support" | "accent" | "inverse" | null | undefined;
14
- } & class_variance_authority_types.ClassProp) | undefined) => string;
15
- declare const snackbarItemVariantContent: (props?: ({
16
- actionOnNewline?: boolean | null | undefined;
17
- } & class_variance_authority_types.ClassProp) | undefined) => string;
18
- type SnackbarItemVariantProps = VariantProps<typeof snackbarItemVariant>;
19
- type SnackbarItemVariantContentProps = VariantProps<typeof snackbarItemVariantContent>;
20
-
21
- interface SnackbarItemValue extends SnackbarItemVariantProps {
22
- /**
23
- * Icon that will be prepended before snackbar message
24
- */
25
- icon?: ReactNode;
26
- message: ReactNode;
27
- /**
28
- * If `true` snackbar will display a close button
29
- * @default false
30
- */
31
- isClosable?: boolean;
32
- /**
33
- * A label for the action button within the toast.
34
- */
35
- actionLabel?: string;
36
- /**
37
- * Handler that is called when the action button is pressed.
38
- */
39
- onAction?: () => void;
40
- /**
41
- * If `true` the action button will be displayed on a new line.
42
- * @default false
43
- */
44
- actionOnNewline?: boolean;
45
- }
46
- interface SnackbarItemProps extends ComponentPropsWithRef<'div'>, SnackbarItemVariantProps, SnackbarItemVariantContentProps {
47
- /**
48
- * Defines a string value that labels the current element.
49
- */
50
- 'aria-label'?: string;
51
- /**
52
- * Identifies the element (or elements) that labels the current element.
53
- */
54
- 'aria-labelledby'?: string;
55
- /**
56
- * Identifies the element (or elements) that describes the object.
57
- */
58
- 'aria-describedby'?: string;
59
- /**
60
- * Identifies the element (or elements) that provide a detailed, extended description for the object.
61
- */
62
- 'aria-details'?: string;
63
- }
64
- declare const SnackbarItem: {
65
- ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-details": ariaDetails, design: designProp, intent: intentProp, actionOnNewline: actionOnNewlineProp, className, children, ref: forwardedRef, ...rest }: PropsWithChildren<SnackbarItemProps>): react_jsx_runtime.JSX.Element;
66
- displayName: string;
67
- };
68
-
69
- interface SnackbarItemState<T = SnackbarItemValue> {
70
- toast: QueuedToast<T>;
71
- state: ToastState<T>;
72
- }
73
-
74
- declare const snackbarRegionVariant: (props?: ({
75
- position?: "top" | "top-right" | "top-left" | "bottom" | "bottom-right" | "bottom-left" | null | undefined;
76
- } & class_variance_authority_types.ClassProp) | undefined) => string;
77
- type SnackbarRegionVariantProps = VariantProps<typeof snackbarRegionVariant>;
78
-
79
- interface SnackbarRegionProps extends ComponentPropsWithRef<'div'>, AriaToastRegionProps, SnackbarRegionVariantProps, Pick<SnackbarItemState, 'state'> {
80
- /**
81
- * An accessibility label for the snackbar region.
82
- * @default 'Notifications'
83
- */
84
- 'aria-label'?: string;
85
- /**
86
- * Identifies the element (or elements) that labels the current element.
87
- */
88
- 'aria-labelledby'?: string;
89
- /**
90
- * Identifies the element (or elements) that describes the object.
91
- */
92
- 'aria-describedby'?: string;
93
- /**
94
- * Identifies the element (or elements) that provide a detailed, extended description for the object.
95
- */
96
- 'aria-details'?: string;
97
- /**
98
- * The component/template used to display each snackbar from the queue
99
- * @default 'Snackbar.Item'
100
- */
101
- children?: ReactElement<SnackbarItemProps, typeof SnackbarItem>;
102
- }
103
-
104
- declare const clearSnackbarQueue: () => void;
105
- type SnackbarProps = Omit<SnackbarRegionProps, 'state'> & {
106
- ref?: Ref<HTMLDivElement>;
107
- };
108
- declare const Snackbar$1: {
109
- ({ ref: forwardedRef, ...props }: SnackbarProps): ReactElement | null;
110
- displayName: string;
111
- };
112
- interface AddSnackbarArgs extends SnackbarItemValue, Omit<ToastOptions, 'timeout'> {
113
- /**
114
- * Handler that is called when the snackbar is closed, either by the user
115
- * or after a timeout.
116
- */
117
- onClose?: () => void;
118
- /**
119
- * A timeout to automatically close the snackbar after, in milliseconds.
120
- * @default 5000
121
- */
122
- timeout?: number | null;
123
- /**
124
- * The priority of the snackbar relative to other snackbars. Larger numbers indicate higher priority.
125
- */
126
- priority?: number;
127
- }
128
- declare const addSnackbar: ({ onClose, timeout, priority, ...content }: AddSnackbarArgs) => void;
129
-
130
- type SnackbarItemActionProps = Omit<ButtonProps, 'size' | 'shape' | 'intent'> & SnackbarItemVariantProps & {
131
- ref?: Ref<HTMLButtonElement>;
132
- };
133
- declare const SnackbarItemAction: {
134
- ({ design: designProp, intent: intentProp, onClick, children, className, ref, ...rest }: SnackbarItemActionProps): react_jsx_runtime.JSX.Element;
135
- displayName: string;
136
- };
137
-
138
- interface SnackbarItemCloseProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'disabled'>, Pick<IconButtonProps, 'aria-label'>, SnackbarItemVariantProps {
139
- }
140
- declare const SnackbarItemClose: {
141
- ({ design: designProp, intent: intentProp, "aria-label": ariaLabel, onClick, className, ref, ...rest }: SnackbarItemCloseProps): react_jsx_runtime.JSX.Element;
142
- displayName: string;
143
- };
144
-
145
- type SnackbarItemIconProps = IconProps;
146
- declare const SnackbarItemIcon: {
147
- ({ children, className, ...rest }: SnackbarItemIconProps): ReactElement;
148
- displayName: string;
149
- };
150
-
151
- declare const Snackbar: typeof Snackbar$1 & {
152
- Item: typeof SnackbarItem;
153
- ItemAction: typeof SnackbarItemAction;
154
- ItemClose: typeof SnackbarItemClose;
155
- ItemIcon: typeof SnackbarItemIcon;
156
- };
157
-
158
- export { type AddSnackbarArgs, Snackbar, type SnackbarItemActionProps, type SnackbarItemCloseProps, type SnackbarItemIconProps, type SnackbarItemProps, type SnackbarProps, addSnackbar, clearSnackbarQueue };