@zayne-labs/ui-react 0.8.11 → 0.8.12

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.
package/dist/style.css ADDED
@@ -0,0 +1,467 @@
1
+ /*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
7
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
8
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
9
+ "Courier New", monospace;
10
+ --spacing: 0.25rem;
11
+ --text-sm: 0.875rem;
12
+ --text-sm--line-height: calc(1.25 / 0.875);
13
+ --font-weight-semibold: 600;
14
+ --default-transition-duration: 150ms;
15
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
16
+ --default-font-family: var(--font-sans);
17
+ --default-mono-font-family: var(--font-mono);
18
+ --color-shadcn-muted-foreground: hsl(215.4, 16.3%, 46.9%);
19
+ }
20
+ }
21
+ @layer base {
22
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
23
+ box-sizing: border-box;
24
+ margin: 0;
25
+ padding: 0;
26
+ border: 0 solid;
27
+ }
28
+ html, :host {
29
+ line-height: 1.5;
30
+ -webkit-text-size-adjust: 100%;
31
+ tab-size: 4;
32
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
33
+ font-feature-settings: var(--default-font-feature-settings, normal);
34
+ font-variation-settings: var(--default-font-variation-settings, normal);
35
+ -webkit-tap-highlight-color: transparent;
36
+ }
37
+ hr {
38
+ height: 0;
39
+ color: inherit;
40
+ border-top-width: 1px;
41
+ }
42
+ abbr:where([title]) {
43
+ -webkit-text-decoration: underline dotted;
44
+ text-decoration: underline dotted;
45
+ }
46
+ h1, h2, h3, h4, h5, h6 {
47
+ font-size: inherit;
48
+ font-weight: inherit;
49
+ }
50
+ a {
51
+ color: inherit;
52
+ -webkit-text-decoration: inherit;
53
+ text-decoration: inherit;
54
+ }
55
+ b, strong {
56
+ font-weight: bolder;
57
+ }
58
+ code, kbd, samp, pre {
59
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
60
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
61
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
62
+ font-size: 1em;
63
+ }
64
+ small {
65
+ font-size: 80%;
66
+ }
67
+ sub, sup {
68
+ font-size: 75%;
69
+ line-height: 0;
70
+ position: relative;
71
+ vertical-align: baseline;
72
+ }
73
+ sub {
74
+ bottom: -0.25em;
75
+ }
76
+ sup {
77
+ top: -0.5em;
78
+ }
79
+ table {
80
+ text-indent: 0;
81
+ border-color: inherit;
82
+ border-collapse: collapse;
83
+ }
84
+ :-moz-focusring {
85
+ outline: auto;
86
+ }
87
+ progress {
88
+ vertical-align: baseline;
89
+ }
90
+ summary {
91
+ display: list-item;
92
+ }
93
+ ol, ul, menu {
94
+ list-style: none;
95
+ }
96
+ img, svg, video, canvas, audio, iframe, embed, object {
97
+ display: block;
98
+ vertical-align: middle;
99
+ }
100
+ img, video {
101
+ max-width: 100%;
102
+ height: auto;
103
+ }
104
+ button, input, select, optgroup, textarea, ::file-selector-button {
105
+ font: inherit;
106
+ font-feature-settings: inherit;
107
+ font-variation-settings: inherit;
108
+ letter-spacing: inherit;
109
+ color: inherit;
110
+ border-radius: 0;
111
+ background-color: transparent;
112
+ opacity: 1;
113
+ }
114
+ :where(select:is([multiple], [size])) optgroup {
115
+ font-weight: bolder;
116
+ }
117
+ :where(select:is([multiple], [size])) optgroup option {
118
+ padding-inline-start: 20px;
119
+ }
120
+ ::file-selector-button {
121
+ margin-inline-end: 4px;
122
+ }
123
+ ::placeholder {
124
+ opacity: 1;
125
+ }
126
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
127
+ ::placeholder {
128
+ color: currentcolor;
129
+ @supports (color: color-mix(in lab, red, red)) {
130
+ color: color-mix(in oklab, currentcolor 50%, transparent);
131
+ }
132
+ }
133
+ }
134
+ textarea {
135
+ resize: vertical;
136
+ }
137
+ ::-webkit-search-decoration {
138
+ -webkit-appearance: none;
139
+ }
140
+ ::-webkit-date-and-time-value {
141
+ min-height: 1lh;
142
+ text-align: inherit;
143
+ }
144
+ ::-webkit-datetime-edit {
145
+ display: inline-flex;
146
+ }
147
+ ::-webkit-datetime-edit-fields-wrapper {
148
+ padding: 0;
149
+ }
150
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
151
+ padding-block: 0;
152
+ }
153
+ :-moz-ui-invalid {
154
+ box-shadow: none;
155
+ }
156
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
157
+ appearance: button;
158
+ }
159
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
160
+ height: auto;
161
+ }
162
+ [hidden]:where(:not([hidden="until-found"])) {
163
+ display: none !important;
164
+ }
165
+ }
166
+ @layer utilities {
167
+ .absolute {
168
+ position: absolute;
169
+ }
170
+ .relative {
171
+ position: relative;
172
+ }
173
+ .static {
174
+ position: static;
175
+ }
176
+ .inset-0 {
177
+ inset: calc(var(--spacing) * 0);
178
+ }
179
+ .bottom-\[25px\] {
180
+ bottom: 25px;
181
+ }
182
+ .isolate {
183
+ isolation: isolate;
184
+ }
185
+ .z-10 {
186
+ z-index: 10;
187
+ }
188
+ .z-30 {
189
+ z-index: 30;
190
+ }
191
+ .z-\[2\] {
192
+ z-index: 2;
193
+ }
194
+ .z-\[100\] {
195
+ z-index: 100;
196
+ }
197
+ .container {
198
+ width: 100%;
199
+ @media (width >= 40rem) {
200
+ max-width: 40rem;
201
+ }
202
+ @media (width >= 48rem) {
203
+ max-width: 48rem;
204
+ }
205
+ @media (width >= 64rem) {
206
+ max-width: 64rem;
207
+ }
208
+ @media (width >= 80rem) {
209
+ max-width: 80rem;
210
+ }
211
+ @media (width >= 96rem) {
212
+ max-width: 96rem;
213
+ }
214
+ }
215
+ .scrollbar-hidden {
216
+ scrollbar-width: none;
217
+ &::-webkit-scrollbar {
218
+ display: none;
219
+ }
220
+ }
221
+ .block {
222
+ display: block;
223
+ }
224
+ .contents {
225
+ display: contents;
226
+ }
227
+ .flex {
228
+ display: flex;
229
+ }
230
+ .inline-flex {
231
+ display: inline-flex;
232
+ }
233
+ .size-5 {
234
+ width: calc(var(--spacing) * 5);
235
+ height: calc(var(--spacing) * 5);
236
+ }
237
+ .size-\[6px\] {
238
+ width: 6px;
239
+ height: 6px;
240
+ }
241
+ .size-full {
242
+ width: 100%;
243
+ height: 100%;
244
+ }
245
+ .h-full {
246
+ height: 100%;
247
+ }
248
+ .w-\[35px\] {
249
+ width: 35px;
250
+ }
251
+ .w-fit {
252
+ width: fit-content;
253
+ }
254
+ .w-full {
255
+ width: 100%;
256
+ }
257
+ .shrink-0 {
258
+ flex-shrink: 0;
259
+ }
260
+ .rotate-180 {
261
+ rotate: 180deg;
262
+ }
263
+ .\[transform\:translate3d\(var\(--translate-distance\)\,0\,0\)\] {
264
+ transform: translate3d(var(--translate-distance),0,0);
265
+ }
266
+ .cursor-grab {
267
+ cursor: grab;
268
+ }
269
+ .cursor-pointer {
270
+ cursor: pointer;
271
+ }
272
+ .snap-x {
273
+ scroll-snap-type: x var(--tw-scroll-snap-strictness);
274
+ }
275
+ .snap-mandatory {
276
+ --tw-scroll-snap-strictness: mandatory;
277
+ }
278
+ .snap-center {
279
+ scroll-snap-align: center;
280
+ }
281
+ .snap-always {
282
+ scroll-snap-stop: always;
283
+ }
284
+ .flex-col {
285
+ flex-direction: column;
286
+ }
287
+ .flex-row {
288
+ flex-direction: row;
289
+ }
290
+ .items-center {
291
+ align-items: center;
292
+ }
293
+ .justify-between {
294
+ justify-content: space-between;
295
+ }
296
+ .justify-center {
297
+ justify-content: center;
298
+ }
299
+ .justify-end {
300
+ justify-content: flex-end;
301
+ }
302
+ .justify-start {
303
+ justify-content: flex-start;
304
+ }
305
+ .gap-2 {
306
+ gap: calc(var(--spacing) * 2);
307
+ }
308
+ .gap-\[15px\] {
309
+ gap: 15px;
310
+ }
311
+ .overflow-x-scroll {
312
+ overflow-x: scroll;
313
+ }
314
+ .overflow-y-hidden {
315
+ overflow-y: hidden;
316
+ }
317
+ .rounded-\[5px\] {
318
+ border-radius: 5px;
319
+ }
320
+ .rounded-\[50\%\] {
321
+ border-radius: 50%;
322
+ }
323
+ .bg-transparent {
324
+ background-color: transparent;
325
+ }
326
+ .text-sm {
327
+ font-size: var(--text-sm);
328
+ line-height: var(--tw-leading, var(--text-sm--line-height));
329
+ }
330
+ .text-\[12px\] {
331
+ font-size: 12px;
332
+ }
333
+ .text-\[13px\] {
334
+ font-size: 13px;
335
+ }
336
+ .font-semibold {
337
+ --tw-font-weight: var(--font-weight-semibold);
338
+ font-weight: var(--font-weight-semibold);
339
+ }
340
+ .text-shadcn-muted-foreground {
341
+ color: var(--color-shadcn-muted-foreground);
342
+ }
343
+ .lowercase {
344
+ text-transform: lowercase;
345
+ }
346
+ .opacity-0 {
347
+ opacity: 0%;
348
+ }
349
+ .opacity-60 {
350
+ opacity: 60%;
351
+ }
352
+ .transition-transform {
353
+ transition-property: transform, translate, scale, rotate;
354
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
355
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
356
+ }
357
+ .select-none {
358
+ -webkit-user-select: none;
359
+ user-select: none;
360
+ }
361
+ .\[scrollbar-width\:none\] {
362
+ scrollbar-width: none;
363
+ }
364
+ .\[transition\:transform_800ms_ease\] {
365
+ transition: transform 800ms ease;
366
+ }
367
+ .file\:border-0 {
368
+ &::file-selector-button {
369
+ border-style: var(--tw-border-style);
370
+ border-width: 0px;
371
+ }
372
+ }
373
+ .file\:bg-transparent {
374
+ &::file-selector-button {
375
+ background-color: transparent;
376
+ }
377
+ }
378
+ .placeholder\:text-shadcn-muted-foreground {
379
+ &::placeholder {
380
+ color: var(--color-shadcn-muted-foreground);
381
+ }
382
+ }
383
+ .focus-visible\:outline-hidden {
384
+ &:focus-visible {
385
+ --tw-outline-style: none;
386
+ outline-style: none;
387
+ @media (forced-colors: active) {
388
+ outline: 2px solid transparent;
389
+ outline-offset: 2px;
390
+ }
391
+ }
392
+ }
393
+ .active\:scale-\[1\.06\] {
394
+ &:active {
395
+ scale: 1.06;
396
+ }
397
+ }
398
+ .disabled\:cursor-not-allowed {
399
+ &:disabled {
400
+ cursor: not-allowed;
401
+ }
402
+ }
403
+ .disabled\:opacity-50 {
404
+ &:disabled {
405
+ opacity: 50%;
406
+ }
407
+ }
408
+ .data-\[index\=0\]\:mt-1 {
409
+ &[data-index="0"] {
410
+ margin-top: calc(var(--spacing) * 1);
411
+ }
412
+ }
413
+ .max-md\:cursor-default {
414
+ @media (width < 48rem) {
415
+ cursor: default;
416
+ }
417
+ }
418
+ .max-md\:flex-col {
419
+ @media (width < 48rem) {
420
+ flex-direction: column;
421
+ }
422
+ }
423
+ .md\:cursor-default {
424
+ @media (width >= 48rem) {
425
+ cursor: default;
426
+ }
427
+ }
428
+ .md\:flex-col {
429
+ @media (width >= 48rem) {
430
+ flex-direction: column;
431
+ }
432
+ }
433
+ .lg\:size-6 {
434
+ @media (width >= 64rem) {
435
+ width: calc(var(--spacing) * 6);
436
+ height: calc(var(--spacing) * 6);
437
+ }
438
+ }
439
+ .\[\&\:\:-webkit-scrollbar\]\:hidden {
440
+ &::-webkit-scrollbar {
441
+ display: none;
442
+ }
443
+ }
444
+ }
445
+ @property --tw-scroll-snap-strictness {
446
+ syntax: "*";
447
+ inherits: false;
448
+ initial-value: proximity;
449
+ }
450
+ @property --tw-font-weight {
451
+ syntax: "*";
452
+ inherits: false;
453
+ }
454
+ @property --tw-border-style {
455
+ syntax: "*";
456
+ inherits: false;
457
+ initial-value: solid;
458
+ }
459
+ @layer properties {
460
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
461
+ *, ::before, ::after, ::backdrop {
462
+ --tw-scroll-snap-strictness: proximity;
463
+ --tw-font-weight: initial;
464
+ --tw-border-style: solid;
465
+ }
466
+ }
467
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zayne-labs/ui-react",
3
3
  "type": "module",
4
- "version": "0.8.11",
4
+ "version": "0.8.12",
5
5
  "description": "A composable UI/UI-utilities components library. ",
6
6
  "author": "Ryan Zayne",
7
7
  "license": "MIT",
@@ -17,6 +17,7 @@
17
17
  "sideEffects": false,
18
18
  "exports": {
19
19
  ".": null,
20
+ "./style.css": "./dist/style.css",
20
21
  "./*": "./dist/esm/ui/*/index.js",
21
22
  "./common/*": "./dist/esm/common/*/index.js",
22
23
  "./css/*": "./css/*"
@@ -48,14 +49,15 @@
48
49
  }
49
50
  },
50
51
  "dependencies": {
51
- "@zayne-labs/toolkit-core": "0.9.27",
52
- "@zayne-labs/toolkit-react": "0.9.27",
53
- "@zayne-labs/toolkit-type-helpers": "0.9.27"
52
+ "@zayne-labs/toolkit-core": "0.9.29",
53
+ "@zayne-labs/toolkit-react": "0.9.29",
54
+ "@zayne-labs/toolkit-type-helpers": "0.9.29"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@arethetypeswrong/cli": "0.17.4",
57
58
  "@size-limit/esbuild-why": "11.2.0",
58
59
  "@size-limit/preset-small-lib": "11.2.0",
60
+ "@tailwindcss/cli": "^4.1.4",
59
61
  "@total-typescript/ts-reset": "0.6.1",
60
62
  "@types/react": "19.1.2",
61
63
  "@types/react-dom": "19.1.2",
@@ -63,9 +65,10 @@
63
65
  "concurrently": "9.1.2",
64
66
  "cross-env": "7.0.3",
65
67
  "publint": "0.3.12",
68
+ "publish": "^0.6.0",
66
69
  "react": "19.1.0",
67
70
  "react-dom": "19.1.0",
68
- "react-hook-form": "7.56.0",
71
+ "react-hook-form": "7.56.1",
69
72
  "size-limit": "11.2.0",
70
73
  "tailwind-merge": "3.2.0",
71
74
  "tailwindcss": "^4.1.4",
@@ -89,9 +92,9 @@
89
92
  }
90
93
  ],
91
94
  "scripts": {
92
- "build": "tsup",
95
+ "build": "concurrently 'tsup' 'pnpm:build:tailwind'",
93
96
  "build:dev": "cross-env NODE_ENV=development tsup",
94
- "build:tailwind": "pnpx tailwindcss -i ./tailwind.css -o ./dist/css/main.css --watch",
97
+ "build:tailwind": "tailwindcss -i css/style.css -o ./dist/style.css",
95
98
  "build:test": "concurrently --prefix-colors \"yellow.bold,#7da4f8.bold,magenta\" --names PUBLINT,TSUP 'pnpm:lint:publint' 'pnpm:build:dev'",
96
99
  "dev": "pnpm build:dev --watch",
97
100
  "lint:attw": "attw --pack . --profile esm-only --format table-flipped --ignore-rules=cjs-resolves-to-esm --ignore-rules=named-exports",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/common/slot/slot.tsx"],"names":[],"mappings":";;;;;;AAYO,SAAS,SAAA,CAAU,EAAE,QAAA,EAAyC,EAAA;AACpE,EAAO,OAAA,QAAA;AACR;AAEA,IAAM,WAAA,GAAc,CAAC,KAAwD,KAAA;AAC5E,EAAA,OAAO,cAAe,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,IAAS,KAAA,SAAA;AAChD,CAAA;AAMO,SAAS,KAAK,KAAkB,EAAA;AACtC,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,eAAA,EAAoB,GAAA,KAAA;AAEzC,EAAA,MAAM,gBAAgB,OAAyB,CAAA,QAAQ,CAAI,GAAA,QAAA,GAAW,CAAC,QAAQ,CAAA;AAC/E,EAAA,MAAM,YAAY,aAAc,CAAA,IAAA,CAAK,CAAC,OAAY,KAAA,WAAA,CAAY,OAAO,CAAC,CAAA;AAEtE,EAAA,IAAI,SAAW,EAAA;AAEd,IAAM,MAAA,UAAA,GAAc,UAAU,KAAoB,CAAA,QAAA;AAElD,IAAA,IAAI,QAAS,CAAA,KAAA,CAAM,UAAU,CAAA,GAAI,CAAG,EAAA;AACnC,MAAO,OAAA,QAAA,CAAS,KAAK,IAAI,CAAA;AAAA;AAG1B,IAAA,MAAM,kBAAqB,GAAA,aAAA,CAAc,GAAI,CAAA,CAAC,KAAU,KAAA;AACvD,MAAA,IAAI,UAAU,SAAW,EAAA;AAExB,QAAA,OAAO,cAA0B,CAAA,UAAU,CAAK,IAAA,UAAA,CAAW,KAAM,CAAA,QAAA;AAAA;AAGlE,MAAO,OAAA,KAAA;AAAA,KACP,CAAA;AAED,IACC,uBAAA,KAAA,CAAA,aAAA,CAAC,SAAW,EAAA,EAAA,GAAG,eACb,EAAA,EAAA,cAAA,CAAe,UAAU,CAAA,IAAK,YAAa,CAAA,UAAA,EAAY,MAAW,EAAA,kBAAkB,CACtF,CAAA;AAAA;AAIF,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAW,GAAG,eAAA,EAAA,EAAkB,QAAS,CAAA;AAClD;AASA,SAAS,UAAU,KAAuB,EAAA;AACzC,EAAA,MAAM,EAAE,QAAU,EAAA,GAAA,EAAK,YAAc,EAAA,GAAG,iBAAoB,GAAA,KAAA;AAE5D,EAAI,IAAA,CAAC,cAA6B,CAAA,QAAQ,CAAG,EAAA;AAC5C,IAAO,OAAA,QAAA,CAAS,MAAM,QAAQ,CAAA,GAAI,IAAI,QAAS,CAAA,IAAA,CAAK,IAAI,CAAI,GAAA,IAAA;AAAA;AAG7D,EAAA,MAAM,QAAY,GAAA,QAAA,CAAS,KAAM,CAAA,GAAA,IAC5B,QAAqC,CAAA,GAAA;AAE1C,EAAA,MAAM,WAAc,GAAA;AAAA,IACnB,GAAG,UAAA,CAAW,eAAiB,EAAA,QAAA,CAAS,KAAK,CAAA;AAAA,IAC7C,KAAK,YAAe,GAAA,WAAA,CAAY,CAAC,YAAc,EAAA,QAAQ,CAAC,CAAI,GAAA;AAAA,GAC7D;AAEA,EAAO,OAAA,YAAA,CAAa,UAAU,WAAW,CAAA;AAC1C","file":"chunk-L2SROZYQ.js","sourcesContent":["import * as React from \"react\";\n\nimport { type InferProps, composeRefs, mergeProps } from \"@zayne-labs/toolkit-react/utils\";\nimport { isArray } from \"@zayne-labs/toolkit-type-helpers\";\nimport { Children, cloneElement, isValidElement } from \"react\";\n\ntype SlotProps = InferProps<HTMLElement>;\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * ----------------------------------------------------------------------------------------------- */\n\nexport function Slottable({ children }: Pick<SlotProps, \"children\">) {\n\treturn children;\n}\n\nconst isSlottable = (child: React.ReactNode): child is React.ReactElement => {\n\treturn isValidElement(child) && child.type === Slottable;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * ----------------------------------------------------------------------------------------------- */\n\nexport function Slot(props: SlotProps) {\n\tconst { children, ...restOfSlotProps } = props;\n\n\tconst childrenArray = isArray<React.ReactNode>(children) ? children : [children];\n\tconst slottable = childrenArray.find((element) => isSlottable(element));\n\n\tif (slottable) {\n\t\t// == The new element to render is the one passed as a child of `Slottable`\n\t\tconst newElement = (slottable.props as SlotProps).children;\n\n\t\tif (Children.count(newElement) > 1) {\n\t\t\treturn Children.only(null);\n\t\t}\n\n\t\tconst newElementChildren = childrenArray.map((child) => {\n\t\t\tif (child === slottable) {\n\t\t\t\t// == Because the new element will be the one rendered, we are only interested in grabbing its children (`newElement.props.children`)\n\t\t\t\treturn isValidElement<SlotProps>(newElement) && newElement.props.children;\n\t\t\t}\n\n\t\t\treturn child;\n\t\t});\n\n\t\treturn (\n\t\t\t<SlotClone {...restOfSlotProps}>\n\t\t\t\t{isValidElement(newElement) && cloneElement(newElement, undefined, newElementChildren)}\n\t\t\t</SlotClone>\n\t\t);\n\t}\n\n\treturn <SlotClone {...restOfSlotProps}>{children}</SlotClone>;\n}\n\ntype SlotCloneProps = {\n\tchildren: React.ReactNode;\n\tref?: React.RefObject<HTMLElement>;\n};\n\ntype UnknownProps = Record<string, unknown>;\n\nfunction SlotClone(props: SlotCloneProps) {\n\tconst { children, ref: forwardedRef, ...restOfSlotProps } = props;\n\n\tif (!isValidElement<UnknownProps>(children)) {\n\t\treturn Children.count(children) > 1 ? Children.only(null) : null;\n\t}\n\n\tconst childRef = (children.props.ref\n\t\t?? (children as unknown as UnknownProps).ref) as React.Ref<HTMLElement>;\n\n\tconst clonedProps = {\n\t\t...mergeProps(restOfSlotProps, children.props),\n\t\tref: forwardedRef ? composeRefs([forwardedRef, childRef]) : childRef,\n\t};\n\n\treturn cloneElement(children, clonedProps);\n}\n"]}