@proyecto-viviana/solidaria-components 0.1.3 → 0.2.1
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/Color.d.ts +6 -2
- package/dist/Color.d.ts.map +1 -1
- package/dist/ComboBox.d.ts +3 -3
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/GridList.d.ts +2 -2
- package/dist/GridList.d.ts.map +1 -1
- package/dist/ListBox.d.ts +5 -5
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/Menu.d.ts +3 -3
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Select.d.ts +3 -3
- package/dist/Select.d.ts.map +1 -1
- package/dist/Table.d.ts +2 -2
- package/dist/Table.d.ts.map +1 -1
- package/dist/Tabs.d.ts +1 -1
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +2 -2
- package/dist/index.ssr.js +15 -15
- package/dist/index.ssr.js.map +2 -2
- package/package.json +8 -10
- package/src/Autocomplete.tsx +0 -174
- package/src/Breadcrumbs.tsx +0 -264
- package/src/Button.tsx +0 -238
- package/src/Calendar.tsx +0 -471
- package/src/Checkbox.tsx +0 -387
- package/src/Color.tsx +0 -1370
- package/src/ComboBox.tsx +0 -824
- package/src/DateField.tsx +0 -337
- package/src/DatePicker.tsx +0 -367
- package/src/Dialog.tsx +0 -262
- package/src/Disclosure.tsx +0 -439
- package/src/GridList.tsx +0 -511
- package/src/Landmark.tsx +0 -203
- package/src/Link.tsx +0 -201
- package/src/ListBox.tsx +0 -346
- package/src/Menu.tsx +0 -544
- package/src/Meter.tsx +0 -157
- package/src/Modal.tsx +0 -433
- package/src/NumberField.tsx +0 -542
- package/src/Popover.tsx +0 -540
- package/src/ProgressBar.tsx +0 -162
- package/src/RadioGroup.tsx +0 -356
- package/src/RangeCalendar.tsx +0 -462
- package/src/SearchField.tsx +0 -479
- package/src/Select.tsx +0 -734
- package/src/Separator.tsx +0 -130
- package/src/Slider.tsx +0 -500
- package/src/Switch.tsx +0 -213
- package/src/Table.tsx +0 -857
- package/src/Tabs.tsx +0 -552
- package/src/TagGroup.tsx +0 -421
- package/src/TextField.tsx +0 -271
- package/src/TimeField.tsx +0 -455
- package/src/Toast.tsx +0 -503
- package/src/Toolbar.tsx +0 -160
- package/src/Tooltip.tsx +0 -423
- package/src/Tree.tsx +0 -551
- package/src/VisuallyHidden.tsx +0 -60
- package/src/contexts.ts +0 -74
- package/src/index.ts +0 -620
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
});
|