@proyecto-viviana/solidaria-components 0.1.3 → 0.2.2

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 (64) hide show
  1. package/dist/Color.d.ts +6 -2
  2. package/dist/Color.d.ts.map +1 -1
  3. package/dist/ComboBox.d.ts +3 -3
  4. package/dist/ComboBox.d.ts.map +1 -1
  5. package/dist/GridList.d.ts +2 -2
  6. package/dist/GridList.d.ts.map +1 -1
  7. package/dist/ListBox.d.ts +5 -5
  8. package/dist/ListBox.d.ts.map +1 -1
  9. package/dist/Menu.d.ts +3 -3
  10. package/dist/Menu.d.ts.map +1 -1
  11. package/dist/Select.d.ts +3 -3
  12. package/dist/Select.d.ts.map +1 -1
  13. package/dist/Table.d.ts +2 -2
  14. package/dist/Table.d.ts.map +1 -1
  15. package/dist/Tabs.d.ts +1 -1
  16. package/dist/Tabs.d.ts.map +1 -1
  17. package/dist/index.js +15 -15
  18. package/dist/index.js.map +2 -2
  19. package/dist/index.jsx +9056 -0
  20. package/dist/index.jsx.map +7 -0
  21. package/dist/index.ssr.js +15 -15
  22. package/dist/index.ssr.js.map +2 -2
  23. package/package.json +8 -10
  24. package/src/Autocomplete.tsx +0 -174
  25. package/src/Breadcrumbs.tsx +0 -264
  26. package/src/Button.tsx +0 -238
  27. package/src/Calendar.tsx +0 -471
  28. package/src/Checkbox.tsx +0 -387
  29. package/src/Color.tsx +0 -1370
  30. package/src/ComboBox.tsx +0 -824
  31. package/src/DateField.tsx +0 -337
  32. package/src/DatePicker.tsx +0 -367
  33. package/src/Dialog.tsx +0 -262
  34. package/src/Disclosure.tsx +0 -439
  35. package/src/GridList.tsx +0 -511
  36. package/src/Landmark.tsx +0 -203
  37. package/src/Link.tsx +0 -201
  38. package/src/ListBox.tsx +0 -346
  39. package/src/Menu.tsx +0 -544
  40. package/src/Meter.tsx +0 -157
  41. package/src/Modal.tsx +0 -433
  42. package/src/NumberField.tsx +0 -542
  43. package/src/Popover.tsx +0 -540
  44. package/src/ProgressBar.tsx +0 -162
  45. package/src/RadioGroup.tsx +0 -356
  46. package/src/RangeCalendar.tsx +0 -462
  47. package/src/SearchField.tsx +0 -479
  48. package/src/Select.tsx +0 -734
  49. package/src/Separator.tsx +0 -130
  50. package/src/Slider.tsx +0 -500
  51. package/src/Switch.tsx +0 -213
  52. package/src/Table.tsx +0 -857
  53. package/src/Tabs.tsx +0 -552
  54. package/src/TagGroup.tsx +0 -421
  55. package/src/TextField.tsx +0 -271
  56. package/src/TimeField.tsx +0 -455
  57. package/src/Toast.tsx +0 -503
  58. package/src/Toolbar.tsx +0 -160
  59. package/src/Tooltip.tsx +0 -423
  60. package/src/Tree.tsx +0 -551
  61. package/src/VisuallyHidden.tsx +0 -60
  62. package/src/contexts.ts +0 -74
  63. package/src/index.ts +0 -620
  64. package/src/utils.tsx +0 -329
package/dist/index.ssr.js CHANGED
@@ -1583,7 +1583,7 @@ function ListBox(props) {
1583
1583
  } = focusProps;
1584
1584
  return rest;
1585
1585
  };
1586
- const isEmpty = () => stateProps.items.length === 0;
1586
+ const isEmpty = () => (stateProps.items?.length ?? 0) === 0;
1587
1587
  return _$createComponent10(ListBoxContext.Provider, {
1588
1588
  value: {
1589
1589
  state
@@ -1613,9 +1613,9 @@ function ListBox(props) {
1613
1613
  }
1614
1614
  }), isEmpty() && local.renderEmptyState ? _$escape8(local.renderEmptyState()) : _$escape8(_$createComponent10(For, {
1615
1615
  get each() {
1616
- return stateProps.items;
1616
+ return stateProps.items ?? [];
1617
1617
  },
1618
- children: (item) => props.children(item)
1618
+ children: (item) => typeof props.children === "function" ? props.children(item) : null
1619
1619
  })), false);
1620
1620
  }
1621
1621
  });
@@ -1954,9 +1954,9 @@ function Menu(props) {
1954
1954
  }
1955
1955
  }), _$escape9(_$createComponent11(For2, {
1956
1956
  get each() {
1957
- return stateProps.items;
1957
+ return stateProps.items ?? [];
1958
1958
  },
1959
- children: (item) => props.children?.(item)
1959
+ children: (item) => typeof props.children === "function" ? props.children(item) : null
1960
1960
  })), false);
1961
1961
  }
1962
1962
  });
@@ -2085,7 +2085,7 @@ function Select(props) {
2085
2085
  const [local, stateProps, ariaProps] = splitProps14(props, ["class", "style", "slot"], ["items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectedKey", "defaultSelectedKey", "onSelectionChange", "isOpen", "defaultOpen", "onOpenChange", "name"]);
2086
2086
  const state = createSelectState({
2087
2087
  get items() {
2088
- return stateProps.items;
2088
+ return stateProps.items ?? [];
2089
2089
  },
2090
2090
  get getKey() {
2091
2091
  return stateProps.getKey;
@@ -4355,7 +4355,7 @@ function ComboBox(props) {
4355
4355
  let buttonRef = null;
4356
4356
  const state = createComboBoxState({
4357
4357
  get items() {
4358
- return stateProps.items;
4358
+ return stateProps.items ?? [];
4359
4359
  },
4360
4360
  get getKey() {
4361
4361
  return stateProps.getKey;
@@ -7400,7 +7400,7 @@ function Table(props) {
7400
7400
  const [ref, setRef] = createSignal12(null);
7401
7401
  const collection = createMemo34(() => createTableCollection({
7402
7402
  columns: stateProps.columns,
7403
- rows: stateProps.items,
7403
+ rows: stateProps.items ?? [],
7404
7404
  getKey: stateProps.getKey,
7405
7405
  getTextValue: stateProps.getTextValue,
7406
7406
  showSelectionCheckboxes: stateProps.showSelectionCheckboxes ?? false
@@ -7438,7 +7438,7 @@ function Table(props) {
7438
7438
  isFocusVisible: isFocusVisible(),
7439
7439
  isDisabled: false,
7440
7440
  // Tables don't have a global disabled state
7441
- isEmpty: stateProps.items.length === 0
7441
+ isEmpty: (stateProps.items?.length ?? 0) === 0
7442
7442
  }));
7443
7443
  const renderProps = useRenderProps({
7444
7444
  children: props.children,
@@ -7496,7 +7496,7 @@ function Table(props) {
7496
7496
  return isFocusVisible() || void 0;
7497
7497
  },
7498
7498
  get ["data-empty"]() {
7499
- return stateProps.items.length === 0 || void 0;
7499
+ return (stateProps.items?.length ?? 0) === 0 || void 0;
7500
7500
  }
7501
7501
  }), _$escape30(renderProps.renderChildren()), false);
7502
7502
  }
@@ -8037,7 +8037,7 @@ function buildGridCollection(items, getKey, getTextValue, getDisabled) {
8037
8037
  function GridList(props) {
8038
8038
  const [local, stateProps, ariaProps] = splitProps34(props, ["children", "class", "style", "slot", "renderEmptyState"], ["items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectionMode", "selectedKeys", "defaultSelectedKeys", "onSelectionChange"]);
8039
8039
  const [ref, setRef] = createSignal13(null);
8040
- const collection = createMemo35(() => buildGridCollection(stateProps.items, stateProps.getKey, stateProps.getTextValue, stateProps.getDisabled));
8040
+ const collection = createMemo35(() => buildGridCollection(stateProps.items ?? [], stateProps.getKey, stateProps.getTextValue, stateProps.getDisabled));
8041
8041
  const allDisabledKeys = createMemo35(() => {
8042
8042
  const keys = /* @__PURE__ */ new Set();
8043
8043
  if (stateProps.disabledKeys) {
@@ -8080,7 +8080,7 @@ function GridList(props) {
8080
8080
  isFocused: state.isFocused || isFocused(),
8081
8081
  isFocusVisible: isFocusVisible(),
8082
8082
  isDisabled: ariaProps.isDisabled ?? false,
8083
- isEmpty: stateProps.items.length === 0
8083
+ isEmpty: (stateProps.items?.length ?? 0) === 0
8084
8084
  }));
8085
8085
  const renderProps = useRenderProps({
8086
8086
  class: local.class,
@@ -8107,7 +8107,7 @@ function GridList(props) {
8107
8107
  } = focusProps;
8108
8108
  return rest;
8109
8109
  };
8110
- const isEmpty = () => stateProps.items.length === 0;
8110
+ const isEmpty = () => (stateProps.items?.length ?? 0) === 0;
8111
8111
  const contextValue = createMemo35(() => ({
8112
8112
  state,
8113
8113
  collection: collection(),
@@ -8142,9 +8142,9 @@ function GridList(props) {
8142
8142
  }
8143
8143
  }), isEmpty() && local.renderEmptyState ? _$escape31(local.renderEmptyState()) : _$escape31(_$createComponent32(For13, {
8144
8144
  get each() {
8145
- return stateProps.items;
8145
+ return stateProps.items ?? [];
8146
8146
  },
8147
- children: (item) => props.children(item)
8147
+ children: (item) => typeof props.children === "function" ? props.children(item) : null
8148
8148
  })), false);
8149
8149
  }
8150
8150
  });