@proyecto-viviana/solidaria-components 0.0.4 → 0.0.5

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/index.js CHANGED
@@ -1,8 +1,5 @@
1
- import { createMemo, splitProps, createContext, useContext } from 'solid-js';
2
- import { createComponent, Dynamic, mergeProps, template, spread, insert, use } from 'solid-js/web';
3
- import { createButton, createFocusRing, createHover, createSwitch, createCheckboxGroupItem, createCheckbox, createCheckboxGroup, createRadioGroup, createRadio, createTextField, createLink, createProgressBar, createSeparator } from '@proyecto-viviana/solidaria';
4
- import { createToggleState, createCheckboxGroupState, createRadioGroupState, createTextFieldState } from '@proyecto-viviana/solid-stately';
5
-
1
+ // src/utils.tsx
2
+ import { createContext, useContext, createMemo } from "solid-js";
6
3
  function useRenderProps(props, values) {
7
4
  return createMemo(() => {
8
5
  const currentValues = values();
@@ -65,7 +62,12 @@ function filterDOMProps(props, options = {}) {
65
62
  return result;
66
63
  }
67
64
 
68
- const visuallyHiddenStyles = {
65
+ // src/VisuallyHidden.tsx
66
+ import { createComponent as _$createComponent } from "solid-js/web";
67
+ import { mergeProps as _$mergeProps } from "solid-js/web";
68
+ import { splitProps } from "solid-js";
69
+ import { Dynamic } from "solid-js/web";
70
+ var visuallyHiddenStyles = {
69
71
  border: "0",
70
72
  clip: "rect(0 0 0 0)",
71
73
  "clip-path": "inset(50%)",
@@ -80,7 +82,7 @@ const visuallyHiddenStyles = {
80
82
  function VisuallyHidden(props) {
81
83
  const [local, others] = splitProps(props, ["elementType", "children", "isFocusable"]);
82
84
  const elementType = () => local.elementType ?? "span";
83
- return createComponent(Dynamic, mergeProps({
85
+ return _$createComponent(Dynamic, _$mergeProps({
84
86
  get component() {
85
87
  return elementType();
86
88
  },
@@ -92,10 +94,20 @@ function VisuallyHidden(props) {
92
94
  }));
93
95
  }
94
96
 
95
- var _tmpl$$5 = /* @__PURE__ */ template(`<button>`);
96
- const ButtonContext = createContext(null);
97
+ // src/Button.tsx
98
+ import { template as _$template } from "solid-js/web";
99
+ import { getNextElement as _$getNextElement } from "solid-js/web";
100
+ import { runHydrationEvents as _$runHydrationEvents } from "solid-js/web";
101
+ import { insert as _$insert } from "solid-js/web";
102
+ import { spread as _$spread } from "solid-js/web";
103
+ import { mergeProps as _$mergeProps2 } from "solid-js/web";
104
+ import { memo as _$memo } from "solid-js/web";
105
+ import { createContext as createContext2, createMemo as createMemo2, splitProps as splitProps2 } from "solid-js";
106
+ import { createButton, createFocusRing, createHover } from "@proyecto-viviana/solidaria";
107
+ var _tmpl$ = /* @__PURE__ */ _$template(`<button>`);
108
+ var ButtonContext = createContext2(null);
97
109
  function Button(props) {
98
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
110
+ const [local, ariaProps] = splitProps2(props, ["children", "class", "style", "slot"]);
99
111
  const resolveDisabled = () => {
100
112
  const disabled = ariaProps.isDisabled;
101
113
  if (typeof disabled === "function") {
@@ -122,7 +134,7 @@ function Button(props) {
122
134
  return resolveDisabled();
123
135
  }
124
136
  });
125
- const renderValues = createMemo(() => ({
137
+ const renderValues = createMemo2(() => ({
126
138
  isHovered: isHovered(),
127
139
  isPressed: buttonAria.isPressed(),
128
140
  isFocused: isFocused(),
@@ -135,7 +147,7 @@ function Button(props) {
135
147
  style: local.style,
136
148
  defaultClassName: "solidaria-Button"
137
149
  }, renderValues);
138
- const domProps = createMemo(() => {
150
+ const domProps = createMemo2(() => {
139
151
  const filtered = filterDOMProps(ariaProps, {
140
152
  global: true
141
153
  });
@@ -163,8 +175,8 @@ function Button(props) {
163
175
  return rest;
164
176
  };
165
177
  return (() => {
166
- var _el$ = _tmpl$$5();
167
- spread(_el$, mergeProps(domProps, cleanButtonProps, cleanFocusProps, cleanHoverProps, {
178
+ var _el$ = _$getNextElement(_tmpl$);
179
+ _$spread(_el$, _$mergeProps2(domProps, cleanButtonProps, cleanFocusProps, cleanHoverProps, {
168
180
  get ["class"]() {
169
181
  return renderProps().class;
170
182
  },
@@ -187,16 +199,32 @@ function Button(props) {
187
199
  return resolveDisabled() || void 0;
188
200
  }
189
201
  }), false, true);
190
- insert(_el$, () => renderProps().children);
202
+ _$insert(_el$, () => renderProps().children);
203
+ _$runHydrationEvents();
191
204
  return _el$;
192
205
  })();
193
206
  }
194
207
 
195
- var _tmpl$$4 = /* @__PURE__ */ template(`<input>`), _tmpl$2$3 = /* @__PURE__ */ template(`<label>`);
196
- const ToggleSwitchContext = createContext(null);
208
+ // src/Switch.tsx
209
+ import { template as _$template2 } from "solid-js/web";
210
+ import { getNextMarker as _$getNextMarker } from "solid-js/web";
211
+ import { insert as _$insert2 } from "solid-js/web";
212
+ import { createComponent as _$createComponent2 } from "solid-js/web";
213
+ import { getNextElement as _$getNextElement2 } from "solid-js/web";
214
+ import { runHydrationEvents as _$runHydrationEvents2 } from "solid-js/web";
215
+ import { use as _$use } from "solid-js/web";
216
+ import { spread as _$spread2 } from "solid-js/web";
217
+ import { mergeProps as _$mergeProps3 } from "solid-js/web";
218
+ import { memo as _$memo2 } from "solid-js/web";
219
+ import { createContext as createContext3, createMemo as createMemo3, splitProps as splitProps3 } from "solid-js";
220
+ import { createSwitch, createFocusRing as createFocusRing2, createHover as createHover2 } from "@proyecto-viviana/solidaria";
221
+ import { createToggleState } from "@proyecto-viviana/solid-stately";
222
+ var _tmpl$2 = /* @__PURE__ */ _$template2(`<input>`);
223
+ var _tmpl$22 = /* @__PURE__ */ _$template2(`<label><!$><!/><!$><!/>`);
224
+ var ToggleSwitchContext = createContext3(null);
197
225
  function ToggleSwitch(props) {
198
226
  let inputRef = null;
199
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
227
+ const [local, ariaProps] = splitProps3(props, ["children", "class", "style", "slot"]);
200
228
  const state = createToggleState({
201
229
  get isSelected() {
202
230
  return ariaProps.isSelected;
@@ -219,16 +247,16 @@ function ToggleSwitch(props) {
219
247
  isFocused,
220
248
  isFocusVisible,
221
249
  focusProps
222
- } = createFocusRing();
250
+ } = createFocusRing2();
223
251
  const {
224
252
  isHovered,
225
253
  hoverProps
226
- } = createHover({
254
+ } = createHover2({
227
255
  get isDisabled() {
228
256
  return ariaProps.isDisabled || ariaProps.isReadOnly;
229
257
  }
230
258
  });
231
- const renderValues = createMemo(() => ({
259
+ const renderValues = createMemo3(() => ({
232
260
  isSelected: switchAria.isSelected(),
233
261
  isHovered: isHovered(),
234
262
  isPressed: switchAria.isPressed(),
@@ -244,7 +272,7 @@ function ToggleSwitch(props) {
244
272
  style: local.style,
245
273
  defaultClassName: "solidaria-ToggleSwitch"
246
274
  }, renderValues);
247
- const domProps = createMemo(() => {
275
+ const domProps = createMemo3(() => {
248
276
  const filtered = filterDOMProps(ariaProps, {
249
277
  global: true
250
278
  });
@@ -281,8 +309,8 @@ function ToggleSwitch(props) {
281
309
  return rest;
282
310
  };
283
311
  return (() => {
284
- var _el$ = _tmpl$2$3();
285
- spread(_el$, mergeProps(domProps, cleanLabelProps, cleanHoverProps, {
312
+ var _el$ = _$getNextElement2(_tmpl$22), _el$3 = _el$.firstChild, [_el$4, _co$] = _$getNextMarker(_el$3.nextSibling), _el$5 = _el$4.nextSibling, [_el$6, _co$2] = _$getNextMarker(_el$5.nextSibling);
313
+ _$spread2(_el$, _$mergeProps3(domProps, cleanLabelProps, cleanHoverProps, {
286
314
  get ["class"]() {
287
315
  return renderProps().class;
288
316
  },
@@ -311,25 +339,43 @@ function ToggleSwitch(props) {
311
339
  return switchAria.isReadOnly || void 0;
312
340
  }
313
341
  }), false, true);
314
- insert(_el$, createComponent(VisuallyHidden, {
342
+ _$insert2(_el$, _$createComponent2(VisuallyHidden, {
315
343
  get children() {
316
- var _el$2 = _tmpl$$4();
317
- use((el) => inputRef = el, _el$2);
318
- spread(_el$2, mergeProps(cleanInputProps, cleanFocusProps), false, false);
344
+ var _el$2 = _$getNextElement2(_tmpl$2);
345
+ _$use((el) => inputRef = el, _el$2);
346
+ _$spread2(_el$2, _$mergeProps3(cleanInputProps, cleanFocusProps), false, false);
347
+ _$runHydrationEvents2();
319
348
  return _el$2;
320
349
  }
321
- }), null);
322
- insert(_el$, () => renderProps().children, null);
350
+ }), _el$4, _co$);
351
+ _$insert2(_el$, () => renderProps().children, _el$6, _co$2);
352
+ _$runHydrationEvents2();
323
353
  return _el$;
324
354
  })();
325
355
  }
326
356
 
327
- var _tmpl$$3 = /* @__PURE__ */ template(`<div>`), _tmpl$2$2 = /* @__PURE__ */ template(`<input>`), _tmpl$3$2 = /* @__PURE__ */ template(`<label>`);
328
- const CheckboxGroupContext = createContext(null);
329
- const CheckboxGroupStateContext = createContext(null);
330
- const CheckboxContext = createContext(null);
357
+ // src/Checkbox.tsx
358
+ import { template as _$template3 } from "solid-js/web";
359
+ import { getNextMarker as _$getNextMarker2 } from "solid-js/web";
360
+ import { use as _$use2 } from "solid-js/web";
361
+ import { createComponent as _$createComponent3 } from "solid-js/web";
362
+ import { getNextElement as _$getNextElement3 } from "solid-js/web";
363
+ import { runHydrationEvents as _$runHydrationEvents3 } from "solid-js/web";
364
+ import { insert as _$insert3 } from "solid-js/web";
365
+ import { spread as _$spread3 } from "solid-js/web";
366
+ import { mergeProps as _$mergeProps4 } from "solid-js/web";
367
+ import { memo as _$memo3 } from "solid-js/web";
368
+ import { createContext as createContext4, useContext as useContext2, createMemo as createMemo4, splitProps as splitProps4 } from "solid-js";
369
+ import { createCheckbox, createCheckboxGroup, createCheckboxGroupItem, createFocusRing as createFocusRing3, createHover as createHover3 } from "@proyecto-viviana/solidaria";
370
+ import { createToggleState as createToggleState2, createCheckboxGroupState } from "@proyecto-viviana/solid-stately";
371
+ var _tmpl$3 = /* @__PURE__ */ _$template3(`<div>`);
372
+ var _tmpl$23 = /* @__PURE__ */ _$template3(`<input>`);
373
+ var _tmpl$32 = /* @__PURE__ */ _$template3(`<label><!$><!/><!$><!/>`);
374
+ var CheckboxGroupContext = createContext4(null);
375
+ var CheckboxGroupStateContext = createContext4(null);
376
+ var CheckboxContext = createContext4(null);
331
377
  function CheckboxGroup(props) {
332
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
378
+ const [local, ariaProps] = splitProps4(props, ["children", "class", "style", "slot"]);
333
379
  const state = createCheckboxGroupState({
334
380
  get value() {
335
381
  return ariaProps.value;
@@ -354,7 +400,7 @@ function CheckboxGroup(props) {
354
400
  }
355
401
  });
356
402
  const groupAria = createCheckboxGroup(() => ariaProps, state);
357
- const renderValues = createMemo(() => ({
403
+ const renderValues = createMemo4(() => ({
358
404
  isDisabled: state.isDisabled,
359
405
  isReadOnly: state.isReadOnly,
360
406
  isRequired: ariaProps.isRequired ?? false,
@@ -367,7 +413,7 @@ function CheckboxGroup(props) {
367
413
  style: local.style,
368
414
  defaultClassName: "solidaria-CheckboxGroup"
369
415
  }, renderValues);
370
- const domProps = createMemo(() => filterDOMProps(ariaProps, {
416
+ const domProps = createMemo4(() => filterDOMProps(ariaProps, {
371
417
  global: true
372
418
  }));
373
419
  const cleanGroupProps = () => {
@@ -377,11 +423,11 @@ function CheckboxGroup(props) {
377
423
  } = groupAria.groupProps;
378
424
  return rest;
379
425
  };
380
- return createComponent(CheckboxGroupStateContext.Provider, {
426
+ return _$createComponent3(CheckboxGroupStateContext.Provider, {
381
427
  value: state,
382
428
  get children() {
383
- var _el$ = _tmpl$$3();
384
- spread(_el$, mergeProps(domProps, cleanGroupProps, {
429
+ var _el$ = _$getNextElement3(_tmpl$3);
430
+ _$spread3(_el$, _$mergeProps4(domProps, cleanGroupProps, {
385
431
  get ["class"]() {
386
432
  return renderProps().class;
387
433
  },
@@ -401,15 +447,16 @@ function CheckboxGroup(props) {
401
447
  return groupAria.isInvalid || void 0;
402
448
  }
403
449
  }), false, true);
404
- insert(_el$, () => renderProps().children);
450
+ _$insert3(_el$, () => renderProps().children);
451
+ _$runHydrationEvents3();
405
452
  return _el$;
406
453
  }
407
454
  });
408
455
  }
409
456
  function Checkbox(props) {
410
457
  let inputRef = null;
411
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot", "isIndeterminate"]);
412
- const groupState = useContext(CheckboxGroupStateContext);
458
+ const [local, ariaProps] = splitProps4(props, ["children", "class", "style", "slot", "isIndeterminate"]);
459
+ const groupState = useContext2(CheckboxGroupStateContext);
413
460
  let isSelected;
414
461
  let isPressed;
415
462
  let isDisabled;
@@ -431,7 +478,7 @@ function Checkbox(props) {
431
478
  labelProps = itemAria.labelProps;
432
479
  inputProps = itemAria.inputProps;
433
480
  } else {
434
- const state = createToggleState({
481
+ const state = createToggleState2({
435
482
  get isSelected() {
436
483
  return ariaProps.isSelected;
437
484
  },
@@ -462,16 +509,16 @@ function Checkbox(props) {
462
509
  isFocused,
463
510
  isFocusVisible,
464
511
  focusProps
465
- } = createFocusRing();
512
+ } = createFocusRing3();
466
513
  const {
467
514
  isHovered,
468
515
  hoverProps
469
- } = createHover({
516
+ } = createHover3({
470
517
  get isDisabled() {
471
518
  return isDisabled || isReadOnly;
472
519
  }
473
520
  });
474
- const renderValues = createMemo(() => ({
521
+ const renderValues = createMemo4(() => ({
475
522
  isSelected: isSelected(),
476
523
  isIndeterminate: local.isIndeterminate ?? false,
477
524
  isHovered: isHovered(),
@@ -489,7 +536,7 @@ function Checkbox(props) {
489
536
  style: local.style,
490
537
  defaultClassName: "solidaria-Checkbox"
491
538
  }, renderValues);
492
- const domProps = createMemo(() => {
539
+ const domProps = createMemo4(() => {
493
540
  const filtered = filterDOMProps(ariaProps, {
494
541
  global: true
495
542
  });
@@ -526,8 +573,8 @@ function Checkbox(props) {
526
573
  return rest;
527
574
  };
528
575
  return (() => {
529
- var _el$2 = _tmpl$3$2();
530
- spread(_el$2, mergeProps(domProps, cleanLabelProps, cleanHoverProps, {
576
+ var _el$2 = _$getNextElement3(_tmpl$32), _el$4 = _el$2.firstChild, [_el$5, _co$] = _$getNextMarker2(_el$4.nextSibling), _el$6 = _el$5.nextSibling, [_el$7, _co$2] = _$getNextMarker2(_el$6.nextSibling);
577
+ _$spread3(_el$2, _$mergeProps4(domProps, cleanLabelProps, cleanHoverProps, {
531
578
  get ["class"]() {
532
579
  return renderProps().class;
533
580
  },
@@ -559,25 +606,43 @@ function Checkbox(props) {
559
606
  return ariaProps.isRequired || void 0;
560
607
  }
561
608
  }), false, true);
562
- insert(_el$2, createComponent(VisuallyHidden, {
609
+ _$insert3(_el$2, _$createComponent3(VisuallyHidden, {
563
610
  get children() {
564
- var _el$3 = _tmpl$2$2();
565
- use((el) => inputRef = el, _el$3);
566
- spread(_el$3, mergeProps(cleanInputProps, cleanFocusProps), false, false);
611
+ var _el$3 = _$getNextElement3(_tmpl$23);
612
+ _$use2((el) => inputRef = el, _el$3);
613
+ _$spread3(_el$3, _$mergeProps4(cleanInputProps, cleanFocusProps), false, false);
614
+ _$runHydrationEvents3();
567
615
  return _el$3;
568
616
  }
569
- }), null);
570
- insert(_el$2, () => renderProps().children, null);
617
+ }), _el$5, _co$);
618
+ _$insert3(_el$2, () => renderProps().children, _el$7, _co$2);
619
+ _$runHydrationEvents3();
571
620
  return _el$2;
572
621
  })();
573
622
  }
574
623
 
575
- var _tmpl$$2 = /* @__PURE__ */ template(`<div>`), _tmpl$2$1 = /* @__PURE__ */ template(`<input>`), _tmpl$3$1 = /* @__PURE__ */ template(`<label>`);
576
- const RadioGroupContext = createContext(null);
577
- const RadioGroupStateContext = createContext(null);
578
- const RadioContext = createContext(null);
624
+ // src/RadioGroup.tsx
625
+ import { template as _$template4 } from "solid-js/web";
626
+ import { getNextMarker as _$getNextMarker3 } from "solid-js/web";
627
+ import { use as _$use3 } from "solid-js/web";
628
+ import { createComponent as _$createComponent4 } from "solid-js/web";
629
+ import { getNextElement as _$getNextElement4 } from "solid-js/web";
630
+ import { runHydrationEvents as _$runHydrationEvents4 } from "solid-js/web";
631
+ import { insert as _$insert4 } from "solid-js/web";
632
+ import { spread as _$spread4 } from "solid-js/web";
633
+ import { mergeProps as _$mergeProps5 } from "solid-js/web";
634
+ import { memo as _$memo4 } from "solid-js/web";
635
+ import { createContext as createContext5, useContext as useContext3, createMemo as createMemo5, splitProps as splitProps5 } from "solid-js";
636
+ import { createRadio, createRadioGroup, createFocusRing as createFocusRing4, createHover as createHover4 } from "@proyecto-viviana/solidaria";
637
+ import { createRadioGroupState } from "@proyecto-viviana/solid-stately";
638
+ var _tmpl$4 = /* @__PURE__ */ _$template4(`<div>`);
639
+ var _tmpl$24 = /* @__PURE__ */ _$template4(`<input>`);
640
+ var _tmpl$33 = /* @__PURE__ */ _$template4(`<label><!$><!/><!$><!/>`);
641
+ var RadioGroupContext = createContext5(null);
642
+ var RadioGroupStateContext = createContext5(null);
643
+ var RadioContext = createContext5(null);
579
644
  function RadioGroup(props) {
580
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
645
+ const [local, ariaProps] = splitProps5(props, ["children", "class", "style", "slot"]);
581
646
  const state = createRadioGroupState({
582
647
  get value() {
583
648
  return props.value;
@@ -602,7 +667,7 @@ function RadioGroup(props) {
602
667
  }
603
668
  });
604
669
  const groupAria = createRadioGroup(() => ariaProps, state);
605
- const renderValues = createMemo(() => ({
670
+ const renderValues = createMemo5(() => ({
606
671
  orientation: ariaProps.orientation ?? "vertical",
607
672
  isDisabled: state.isDisabled,
608
673
  isReadOnly: state.isReadOnly,
@@ -616,7 +681,7 @@ function RadioGroup(props) {
616
681
  style: local.style,
617
682
  defaultClassName: "solidaria-RadioGroup"
618
683
  }, renderValues);
619
- const domProps = createMemo(() => filterDOMProps(ariaProps, {
684
+ const domProps = createMemo5(() => filterDOMProps(ariaProps, {
620
685
  global: true
621
686
  }));
622
687
  const cleanGroupProps = () => {
@@ -626,11 +691,11 @@ function RadioGroup(props) {
626
691
  } = groupAria.radioGroupProps;
627
692
  return rest;
628
693
  };
629
- return createComponent(RadioGroupStateContext.Provider, {
694
+ return _$createComponent4(RadioGroupStateContext.Provider, {
630
695
  value: state,
631
696
  get children() {
632
- var _el$ = _tmpl$$2();
633
- spread(_el$, mergeProps(domProps, cleanGroupProps, {
697
+ var _el$ = _$getNextElement4(_tmpl$4);
698
+ _$spread4(_el$, _$mergeProps5(domProps, cleanGroupProps, {
634
699
  get ["class"]() {
635
700
  return renderProps().class;
636
701
  },
@@ -653,7 +718,8 @@ function RadioGroup(props) {
653
718
  return groupAria.isInvalid || void 0;
654
719
  }
655
720
  }), false, true);
656
- insert(_el$, () => renderProps().children);
721
+ _$insert4(_el$, () => renderProps().children);
722
+ _$runHydrationEvents4();
657
723
  return _el$;
658
724
  }
659
725
  });
@@ -664,7 +730,7 @@ function RadioImpl(props) {
664
730
  radioProps,
665
731
  state
666
732
  } = props;
667
- const [local, ariaProps] = splitProps(radioProps, ["children", "class", "style", "slot"]);
733
+ const [local, ariaProps] = splitProps5(radioProps, ["children", "class", "style", "slot"]);
668
734
  const radioAria = createRadio(() => ({
669
735
  ...ariaProps,
670
736
  children: typeof local.children === "function" ? true : local.children
@@ -673,16 +739,16 @@ function RadioImpl(props) {
673
739
  isFocused,
674
740
  isFocusVisible,
675
741
  focusProps
676
- } = createFocusRing();
742
+ } = createFocusRing4();
677
743
  const {
678
744
  isHovered,
679
745
  hoverProps
680
- } = createHover({
746
+ } = createHover4({
681
747
  get isDisabled() {
682
748
  return radioAria.isDisabled || state.isReadOnly;
683
749
  }
684
750
  });
685
- const renderValues = createMemo(() => ({
751
+ const renderValues = createMemo5(() => ({
686
752
  isSelected: radioAria.isSelected(),
687
753
  isHovered: isHovered(),
688
754
  isPressed: radioAria.isPressed(),
@@ -699,7 +765,7 @@ function RadioImpl(props) {
699
765
  style: local.style,
700
766
  defaultClassName: "solidaria-Radio"
701
767
  }, renderValues);
702
- const domProps = createMemo(() => {
768
+ const domProps = createMemo5(() => {
703
769
  const filtered = filterDOMProps(ariaProps, {
704
770
  global: true
705
771
  });
@@ -736,8 +802,8 @@ function RadioImpl(props) {
736
802
  return rest;
737
803
  };
738
804
  return (() => {
739
- var _el$2 = _tmpl$3$1();
740
- spread(_el$2, mergeProps(domProps, cleanLabelProps, cleanHoverProps, {
805
+ var _el$2 = _$getNextElement4(_tmpl$33), _el$4 = _el$2.firstChild, [_el$5, _co$] = _$getNextMarker3(_el$4.nextSibling), _el$6 = _el$5.nextSibling, [_el$7, _co$2] = _$getNextMarker3(_el$6.nextSibling);
806
+ _$spread4(_el$2, _$mergeProps5(domProps, cleanLabelProps, cleanHoverProps, {
741
807
  get ["class"]() {
742
808
  return renderProps().class;
743
809
  },
@@ -772,35 +838,52 @@ function RadioImpl(props) {
772
838
  return state.isRequired || void 0;
773
839
  }
774
840
  }), false, true);
775
- insert(_el$2, createComponent(VisuallyHidden, {
841
+ _$insert4(_el$2, _$createComponent4(VisuallyHidden, {
776
842
  get children() {
777
- var _el$3 = _tmpl$2$1();
778
- use((el) => inputRef = el, _el$3);
779
- spread(_el$3, mergeProps(cleanInputProps, cleanFocusProps), false, false);
843
+ var _el$3 = _$getNextElement4(_tmpl$24);
844
+ _$use3((el) => inputRef = el, _el$3);
845
+ _$spread4(_el$3, _$mergeProps5(cleanInputProps, cleanFocusProps), false, false);
846
+ _$runHydrationEvents4();
780
847
  return _el$3;
781
848
  }
782
- }), null);
783
- insert(_el$2, () => renderProps().children, null);
849
+ }), _el$5, _co$);
850
+ _$insert4(_el$2, () => renderProps().children, _el$7, _co$2);
851
+ _$runHydrationEvents4();
784
852
  return _el$2;
785
853
  })();
786
854
  }
787
855
  function Radio(props) {
788
- return (() => {
789
- const state = useContext(RadioGroupStateContext);
856
+ return () => {
857
+ const state = useContext3(RadioGroupStateContext);
790
858
  if (!state) {
791
859
  throw new Error("Radio must be used within a RadioGroup");
792
860
  }
793
- return createComponent(RadioImpl, {
861
+ return _$createComponent4(RadioImpl, {
794
862
  radioProps: props,
795
863
  state
796
864
  });
797
- });
865
+ };
798
866
  }
799
867
 
800
- var _tmpl$$1 = /* @__PURE__ */ template(`<label>`), _tmpl$2 = /* @__PURE__ */ template(`<input>`), _tmpl$3 = /* @__PURE__ */ template(`<textarea>`), _tmpl$4 = /* @__PURE__ */ template(`<div>`);
801
- const TextFieldContext = createContext(null);
868
+ // src/TextField.tsx
869
+ import { template as _$template5 } from "solid-js/web";
870
+ import { createComponent as _$createComponent5 } from "solid-js/web";
871
+ import { memo as _$memo5 } from "solid-js/web";
872
+ import { getNextElement as _$getNextElement5 } from "solid-js/web";
873
+ import { runHydrationEvents as _$runHydrationEvents5 } from "solid-js/web";
874
+ import { insert as _$insert5 } from "solid-js/web";
875
+ import { spread as _$spread5 } from "solid-js/web";
876
+ import { mergeProps as _$mergeProps6 } from "solid-js/web";
877
+ import { createContext as createContext6, useContext as useContext4, createMemo as createMemo6, splitProps as splitProps6 } from "solid-js";
878
+ import { createTextField, createFocusRing as createFocusRing5, createHover as createHover5 } from "@proyecto-viviana/solidaria";
879
+ import { createTextFieldState } from "@proyecto-viviana/solid-stately";
880
+ var _tmpl$5 = /* @__PURE__ */ _$template5(`<label>`);
881
+ var _tmpl$25 = /* @__PURE__ */ _$template5(`<input>`);
882
+ var _tmpl$34 = /* @__PURE__ */ _$template5(`<textarea>`);
883
+ var _tmpl$42 = /* @__PURE__ */ _$template5(`<div>`);
884
+ var TextFieldContext = createContext6(null);
802
885
  function Label(props) {
803
- const context = useContext(TextFieldContext);
886
+ const context = useContext4(TextFieldContext);
804
887
  const mergedProps = () => {
805
888
  if (context) {
806
889
  const {
@@ -815,14 +898,15 @@ function Label(props) {
815
898
  return props;
816
899
  };
817
900
  return (() => {
818
- var _el$ = _tmpl$$1();
819
- spread(_el$, mergeProps(mergedProps), false, true);
820
- insert(_el$, () => props.children);
901
+ var _el$ = _$getNextElement5(_tmpl$5);
902
+ _$spread5(_el$, _$mergeProps6(mergedProps), false, true);
903
+ _$insert5(_el$, () => props.children);
904
+ _$runHydrationEvents5();
821
905
  return _el$;
822
906
  })();
823
907
  }
824
908
  function Input(props) {
825
- const context = useContext(TextFieldContext);
909
+ const context = useContext4(TextFieldContext);
826
910
  const mergedProps = () => {
827
911
  if (context) {
828
912
  const {
@@ -837,13 +921,14 @@ function Input(props) {
837
921
  return props;
838
922
  };
839
923
  return (() => {
840
- var _el$2 = _tmpl$2();
841
- spread(_el$2, mergeProps(mergedProps), false, false);
924
+ var _el$2 = _$getNextElement5(_tmpl$25);
925
+ _$spread5(_el$2, _$mergeProps6(mergedProps), false, false);
926
+ _$runHydrationEvents5();
842
927
  return _el$2;
843
928
  })();
844
929
  }
845
930
  function TextArea(props) {
846
- const context = useContext(TextFieldContext);
931
+ const context = useContext4(TextFieldContext);
847
932
  const mergedProps = () => {
848
933
  if (context) {
849
934
  const {
@@ -859,13 +944,14 @@ function TextArea(props) {
859
944
  return props;
860
945
  };
861
946
  return (() => {
862
- var _el$3 = _tmpl$3();
863
- spread(_el$3, mergeProps(mergedProps), false, false);
947
+ var _el$3 = _$getNextElement5(_tmpl$34);
948
+ _$spread5(_el$3, _$mergeProps6(mergedProps), false, false);
949
+ _$runHydrationEvents5();
864
950
  return _el$3;
865
951
  })();
866
952
  }
867
953
  function TextField(props) {
868
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
954
+ const [local, ariaProps] = splitProps6(props, ["children", "class", "style", "slot"]);
869
955
  const state = createTextFieldState({
870
956
  get value() {
871
957
  return ariaProps.value;
@@ -886,16 +972,16 @@ function TextField(props) {
886
972
  isFocused,
887
973
  isFocusVisible,
888
974
  focusProps
889
- } = createFocusRing();
975
+ } = createFocusRing5();
890
976
  const {
891
977
  isHovered,
892
978
  hoverProps
893
- } = createHover({
979
+ } = createHover5({
894
980
  get isDisabled() {
895
981
  return ariaProps.isDisabled;
896
982
  }
897
983
  });
898
- const renderValues = createMemo(() => ({
984
+ const renderValues = createMemo6(() => ({
899
985
  isDisabled: ariaProps.isDisabled || false,
900
986
  isInvalid: textFieldAria.isInvalid,
901
987
  isReadOnly: ariaProps.isReadOnly || false,
@@ -910,7 +996,7 @@ function TextField(props) {
910
996
  style: local.style,
911
997
  defaultClassName: "solidaria-TextField"
912
998
  }, renderValues);
913
- const domProps = createMemo(() => {
999
+ const domProps = createMemo6(() => {
914
1000
  const filtered = filterDOMProps(ariaProps, {
915
1001
  global: true
916
1002
  });
@@ -934,11 +1020,11 @@ function TextField(props) {
934
1020
  errorMessageProps: textFieldAria.errorMessageProps,
935
1021
  isInvalid: textFieldAria.isInvalid
936
1022
  };
937
- return createComponent(TextFieldContext.Provider, {
1023
+ return _$createComponent5(TextFieldContext.Provider, {
938
1024
  value: contextValue,
939
1025
  get children() {
940
- var _el$4 = _tmpl$4();
941
- spread(_el$4, mergeProps(domProps, cleanHoverProps, {
1026
+ var _el$4 = _$getNextElement5(_tmpl$42);
1027
+ _$spread5(_el$4, _$mergeProps6(domProps, cleanHoverProps, {
942
1028
  get ["class"]() {
943
1029
  return renderProps().class;
944
1030
  },
@@ -967,15 +1053,23 @@ function TextField(props) {
967
1053
  return isFocusVisible() || void 0;
968
1054
  }
969
1055
  }), false, true);
970
- insert(_el$4, () => renderProps().children);
1056
+ _$insert5(_el$4, () => renderProps().children);
1057
+ _$runHydrationEvents5();
971
1058
  return _el$4;
972
1059
  }
973
1060
  });
974
1061
  }
975
1062
 
976
- const LinkContext = createContext(null);
1063
+ // src/Link.tsx
1064
+ import { createComponent as _$createComponent6 } from "solid-js/web";
1065
+ import { mergeProps as _$mergeProps7 } from "solid-js/web";
1066
+ import { memo as _$memo6 } from "solid-js/web";
1067
+ import { createContext as createContext7, createMemo as createMemo7, splitProps as splitProps7 } from "solid-js";
1068
+ import { Dynamic as Dynamic2 } from "solid-js/web";
1069
+ import { createLink, createFocusRing as createFocusRing6, createHover as createHover6 } from "@proyecto-viviana/solidaria";
1070
+ var LinkContext = createContext7(null);
977
1071
  function Link(props) {
978
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot", "onHoverStart", "onHoverEnd", "onHoverChange"]);
1072
+ const [local, ariaProps] = splitProps7(props, ["children", "class", "style", "slot", "onHoverStart", "onHoverEnd", "onHoverChange"]);
979
1073
  const elementType = () => {
980
1074
  if (ariaProps.href && !ariaProps.isDisabled) {
981
1075
  return "a";
@@ -1045,11 +1139,11 @@ function Link(props) {
1045
1139
  isFocused,
1046
1140
  isFocusVisible,
1047
1141
  focusProps
1048
- } = createFocusRing();
1142
+ } = createFocusRing6();
1049
1143
  const {
1050
1144
  isHovered,
1051
1145
  hoverProps
1052
- } = createHover({
1146
+ } = createHover6({
1053
1147
  get isDisabled() {
1054
1148
  return ariaProps.isDisabled ?? false;
1055
1149
  },
@@ -1063,7 +1157,7 @@ function Link(props) {
1063
1157
  return local.onHoverChange;
1064
1158
  }
1065
1159
  });
1066
- const renderValues = createMemo(() => ({
1160
+ const renderValues = createMemo7(() => ({
1067
1161
  isCurrent: !!ariaProps["aria-current"],
1068
1162
  isHovered: isHovered(),
1069
1163
  isPressed: linkAria.isPressed(),
@@ -1077,7 +1171,7 @@ function Link(props) {
1077
1171
  style: local.style,
1078
1172
  defaultClassName: "solidaria-Link"
1079
1173
  }, renderValues);
1080
- const domProps = createMemo(() => filterDOMProps(ariaProps, {
1174
+ const domProps = createMemo7(() => filterDOMProps(ariaProps, {
1081
1175
  global: true
1082
1176
  }));
1083
1177
  const cleanLinkProps = () => {
@@ -1101,7 +1195,7 @@ function Link(props) {
1101
1195
  } = focusProps;
1102
1196
  return rest;
1103
1197
  };
1104
- return createComponent(Dynamic, mergeProps({
1198
+ return _$createComponent6(Dynamic2, _$mergeProps7({
1105
1199
  get component() {
1106
1200
  return elementType();
1107
1201
  }
@@ -1136,13 +1230,22 @@ function Link(props) {
1136
1230
  }));
1137
1231
  }
1138
1232
 
1139
- var _tmpl$ = /* @__PURE__ */ template(`<div>`);
1140
- const ProgressBarContext = createContext(null);
1233
+ // src/ProgressBar.tsx
1234
+ import { template as _$template6 } from "solid-js/web";
1235
+ import { getNextElement as _$getNextElement6 } from "solid-js/web";
1236
+ import { runHydrationEvents as _$runHydrationEvents6 } from "solid-js/web";
1237
+ import { insert as _$insert6 } from "solid-js/web";
1238
+ import { spread as _$spread6 } from "solid-js/web";
1239
+ import { mergeProps as _$mergeProps8 } from "solid-js/web";
1240
+ import { createContext as createContext8, createMemo as createMemo8, splitProps as splitProps8 } from "solid-js";
1241
+ import { createProgressBar } from "@proyecto-viviana/solidaria";
1242
+ var _tmpl$6 = /* @__PURE__ */ _$template6(`<div>`);
1243
+ var ProgressBarContext = createContext8(null);
1141
1244
  function clamp(value, min, max) {
1142
1245
  return Math.min(Math.max(value, min), max);
1143
1246
  }
1144
1247
  function ProgressBar(props) {
1145
- const [local, ariaProps] = splitProps(props, ["children", "class", "style", "slot"]);
1248
+ const [local, ariaProps] = splitProps8(props, ["children", "class", "style", "slot"]);
1146
1249
  const value = () => ariaProps.value ?? 0;
1147
1250
  const minValue = () => ariaProps.minValue ?? 0;
1148
1251
  const maxValue = () => ariaProps.maxValue ?? 100;
@@ -1182,17 +1285,17 @@ function ProgressBar(props) {
1182
1285
  return ariaProps["aria-details"];
1183
1286
  }
1184
1287
  });
1185
- const percentage = createMemo(() => {
1288
+ const percentage = createMemo8(() => {
1186
1289
  if (isIndeterminate()) {
1187
1290
  return void 0;
1188
1291
  }
1189
1292
  const clampedValue = clamp(value(), minValue(), maxValue());
1190
1293
  return (clampedValue - minValue()) / (maxValue() - minValue()) * 100;
1191
1294
  });
1192
- const valueText = createMemo(() => {
1295
+ const valueText = createMemo8(() => {
1193
1296
  return progressAria.progressBarProps["aria-valuetext"];
1194
1297
  });
1195
- const renderValues = createMemo(() => ({
1298
+ const renderValues = createMemo8(() => ({
1196
1299
  percentage: percentage(),
1197
1300
  valueText: valueText(),
1198
1301
  isIndeterminate: isIndeterminate()
@@ -1203,12 +1306,12 @@ function ProgressBar(props) {
1203
1306
  style: local.style,
1204
1307
  defaultClassName: "solidaria-ProgressBar"
1205
1308
  }, renderValues);
1206
- const domProps = createMemo(() => filterDOMProps(ariaProps, {
1309
+ const domProps = createMemo8(() => filterDOMProps(ariaProps, {
1207
1310
  global: true
1208
1311
  }));
1209
1312
  return (() => {
1210
- var _el$ = _tmpl$();
1211
- spread(_el$, mergeProps(domProps, () => progressAria.progressBarProps, {
1313
+ var _el$ = _$getNextElement6(_tmpl$6);
1314
+ _$spread6(_el$, _$mergeProps8(domProps, () => progressAria.progressBarProps, {
1212
1315
  get ["class"]() {
1213
1316
  return renderProps().class;
1214
1317
  },
@@ -1219,15 +1322,22 @@ function ProgressBar(props) {
1219
1322
  return local.slot;
1220
1323
  }
1221
1324
  }), false, true);
1222
- insert(_el$, () => renderProps().children);
1325
+ _$insert6(_el$, () => renderProps().children);
1326
+ _$runHydrationEvents6();
1223
1327
  return _el$;
1224
1328
  })();
1225
1329
  }
1226
1330
 
1227
- const SeparatorContext = createContext(null);
1331
+ // src/Separator.tsx
1332
+ import { createComponent as _$createComponent7 } from "solid-js/web";
1333
+ import { mergeProps as _$mergeProps9 } from "solid-js/web";
1334
+ import { createContext as createContext9, createMemo as createMemo9, splitProps as splitProps9 } from "solid-js";
1335
+ import { Dynamic as Dynamic3 } from "solid-js/web";
1336
+ import { createSeparator } from "@proyecto-viviana/solidaria";
1337
+ var SeparatorContext = createContext9(null);
1228
1338
  function Separator(props) {
1229
- const [local, ariaProps] = splitProps(props, ["class", "style", "slot"]);
1230
- const elementType = createMemo(() => {
1339
+ const [local, ariaProps] = splitProps9(props, ["class", "style", "slot"]);
1340
+ const elementType = createMemo9(() => {
1231
1341
  let element = ariaProps.elementType || "hr";
1232
1342
  if (element === "hr" && ariaProps.orientation === "vertical") {
1233
1343
  element = "div";
@@ -1251,27 +1361,27 @@ function Separator(props) {
1251
1361
  return ariaProps.id;
1252
1362
  }
1253
1363
  });
1254
- const renderValues = createMemo(() => ({
1364
+ const renderValues = createMemo9(() => ({
1255
1365
  orientation: ariaProps.orientation ?? "horizontal"
1256
1366
  }));
1257
- const resolvedClass = createMemo(() => {
1367
+ const resolvedClass = createMemo9(() => {
1258
1368
  const cls = local.class;
1259
1369
  if (typeof cls === "function") {
1260
1370
  return cls(renderValues());
1261
1371
  }
1262
1372
  return cls ?? "solidaria-Separator";
1263
1373
  });
1264
- const resolvedStyle = createMemo(() => {
1374
+ const resolvedStyle = createMemo9(() => {
1265
1375
  const style = local.style;
1266
1376
  if (typeof style === "function") {
1267
1377
  return style(renderValues());
1268
1378
  }
1269
1379
  return style;
1270
1380
  });
1271
- const domProps = createMemo(() => filterDOMProps(ariaProps, {
1381
+ const domProps = createMemo9(() => filterDOMProps(ariaProps, {
1272
1382
  global: true
1273
1383
  }));
1274
- return createComponent(Dynamic, mergeProps({
1384
+ return _$createComponent7(Dynamic3, _$mergeProps9({
1275
1385
  get component() {
1276
1386
  return elementType();
1277
1387
  }
@@ -1287,6 +1397,37 @@ function Separator(props) {
1287
1397
  }
1288
1398
  }));
1289
1399
  }
1290
-
1291
- export { Button, ButtonContext, Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, CheckboxGroupStateContext, Input, Label, Link, LinkContext, ProgressBar, ProgressBarContext, Radio, RadioContext, RadioGroup, RadioGroupContext, RadioGroupStateContext, Separator, SeparatorContext, TextArea, TextField, TextFieldContext, ToggleSwitch, ToggleSwitchContext, VisuallyHidden, createDataAttributes, dataAttr, filterDOMProps, removeDataAttributes, useRenderProps };
1292
- //# sourceMappingURL=index.js.map
1400
+ export {
1401
+ Button,
1402
+ ButtonContext,
1403
+ Checkbox,
1404
+ CheckboxContext,
1405
+ CheckboxGroup,
1406
+ CheckboxGroupContext,
1407
+ CheckboxGroupStateContext,
1408
+ Input,
1409
+ Label,
1410
+ Link,
1411
+ LinkContext,
1412
+ ProgressBar,
1413
+ ProgressBarContext,
1414
+ Radio,
1415
+ RadioContext,
1416
+ RadioGroup,
1417
+ RadioGroupContext,
1418
+ RadioGroupStateContext,
1419
+ Separator,
1420
+ SeparatorContext,
1421
+ TextArea,
1422
+ TextField,
1423
+ TextFieldContext,
1424
+ ToggleSwitch,
1425
+ ToggleSwitchContext,
1426
+ VisuallyHidden,
1427
+ createDataAttributes,
1428
+ dataAttr,
1429
+ filterDOMProps,
1430
+ removeDataAttributes,
1431
+ useRenderProps
1432
+ };
1433
+ //# sourceMappingURL=index.js.map