hs-uix 1.5.0 → 1.5.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/datatable.js +3 -3
- package/dist/datatable.mjs +5 -4
- package/dist/index.js +3 -3
- package/dist/index.mjs +8 -7
- package/package.json +3 -1
package/dist/datatable.js
CHANGED
|
@@ -1004,7 +1004,7 @@ var DataTable = ({
|
|
|
1004
1004
|
}
|
|
1005
1005
|
);
|
|
1006
1006
|
};
|
|
1007
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Box, { flex: 3 }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "
|
|
1007
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Box, { flex: 3 }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showSearch && searchFields.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1008
1008
|
import_ui_extensions.SearchInput,
|
|
1009
1009
|
{
|
|
1010
1010
|
name: "datatable-search",
|
|
@@ -1022,7 +1022,7 @@ var DataTable = ({
|
|
|
1022
1022
|
/* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Icon, { name: "filter", size: "sm" }),
|
|
1023
1023
|
" ",
|
|
1024
1024
|
resolvedFiltersButtonLabel
|
|
1025
|
-
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "
|
|
1025
|
+
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, filters.slice(filterInlineLimit).map(renderFilterControl)), activeChips.length > 0 && (showFilterBadges || showClearFiltersButton) && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showFilterBadges && activeChips.map((chip) => /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Tag, { key: chip.key, variant: "default", onDelete: () => handleFilterRemove(chip.key) }, chip.label)), showClearFiltersButton && /* @__PURE__ */ import_react.default.createElement(
|
|
1026
1026
|
import_ui_extensions.Button,
|
|
1027
1027
|
{
|
|
1028
1028
|
variant: "transparent",
|
|
@@ -1086,7 +1086,7 @@ var DataTable = ({
|
|
|
1086
1086
|
sortDirection: col.sortable ? sortState[col.field] || "none" : "never",
|
|
1087
1087
|
onSortChange: col.sortable ? () => handleSortChange(col.field) : void 0
|
|
1088
1088
|
},
|
|
1089
|
-
col.label
|
|
1089
|
+
col.description ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, col.label, "\xA0", /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Link, { inline: true, variant: "dark", overlay: /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Tooltip, null, col.description) }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Icon, { name: "info", screenReaderText: typeof col.description === "string" ? col.description : void 0 }))) : col.label
|
|
1090
1090
|
);
|
|
1091
1091
|
}), showRowActionsColumn && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.TableHeader, { width: "min" }))),
|
|
1092
1092
|
/* @__PURE__ */ import_react.default.createElement(import_ui_extensions.TableBody, null, displayRows.map(
|
package/dist/datatable.mjs
CHANGED
|
@@ -30,7 +30,8 @@ import {
|
|
|
30
30
|
Text,
|
|
31
31
|
TextArea,
|
|
32
32
|
TimeInput,
|
|
33
|
-
Toggle
|
|
33
|
+
Toggle,
|
|
34
|
+
Tooltip
|
|
34
35
|
} from "@hubspot/ui-extensions";
|
|
35
36
|
var formatDateChip = (dateObj) => {
|
|
36
37
|
if (!dateObj) return "";
|
|
@@ -999,7 +1000,7 @@ var DataTable = ({
|
|
|
999
1000
|
}
|
|
1000
1001
|
);
|
|
1001
1002
|
};
|
|
1002
|
-
return /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ React.createElement(Box, { flex: 3 }, /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "
|
|
1003
|
+
return /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ React.createElement(Box, { flex: 3 }, /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showSearch && searchFields.length > 0 && /* @__PURE__ */ React.createElement(
|
|
1003
1004
|
SearchInput,
|
|
1004
1005
|
{
|
|
1005
1006
|
name: "datatable-search",
|
|
@@ -1017,7 +1018,7 @@ var DataTable = ({
|
|
|
1017
1018
|
/* @__PURE__ */ React.createElement(Icon, { name: "filter", size: "sm" }),
|
|
1018
1019
|
" ",
|
|
1019
1020
|
resolvedFiltersButtonLabel
|
|
1020
|
-
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "
|
|
1021
|
+
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, filters.slice(filterInlineLimit).map(renderFilterControl)), activeChips.length > 0 && (showFilterBadges || showClearFiltersButton) && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showFilterBadges && activeChips.map((chip) => /* @__PURE__ */ React.createElement(Tag, { key: chip.key, variant: "default", onDelete: () => handleFilterRemove(chip.key) }, chip.label)), showClearFiltersButton && /* @__PURE__ */ React.createElement(
|
|
1021
1022
|
Button,
|
|
1022
1023
|
{
|
|
1023
1024
|
variant: "transparent",
|
|
@@ -1081,7 +1082,7 @@ var DataTable = ({
|
|
|
1081
1082
|
sortDirection: col.sortable ? sortState[col.field] || "none" : "never",
|
|
1082
1083
|
onSortChange: col.sortable ? () => handleSortChange(col.field) : void 0
|
|
1083
1084
|
},
|
|
1084
|
-
col.label
|
|
1085
|
+
col.description ? /* @__PURE__ */ React.createElement(React.Fragment, null, col.label, "\xA0", /* @__PURE__ */ React.createElement(Link, { inline: true, variant: "dark", overlay: /* @__PURE__ */ React.createElement(Tooltip, null, col.description) }, /* @__PURE__ */ React.createElement(Icon, { name: "info", screenReaderText: typeof col.description === "string" ? col.description : void 0 }))) : col.label
|
|
1085
1086
|
);
|
|
1086
1087
|
}), showRowActionsColumn && /* @__PURE__ */ React.createElement(TableHeader, { width: "min" }))),
|
|
1087
1088
|
/* @__PURE__ */ React.createElement(TableBody, null, displayRows.map(
|
package/dist/index.js
CHANGED
|
@@ -1011,7 +1011,7 @@ var DataTable = ({
|
|
|
1011
1011
|
}
|
|
1012
1012
|
);
|
|
1013
1013
|
};
|
|
1014
|
-
return /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Box, { flex: 3 }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "
|
|
1014
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Box, { flex: 3 }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showSearch && searchFields.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
1015
1015
|
import_ui_extensions.SearchInput,
|
|
1016
1016
|
{
|
|
1017
1017
|
name: "datatable-search",
|
|
@@ -1029,7 +1029,7 @@ var DataTable = ({
|
|
|
1029
1029
|
/* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Icon, { name: "filter", size: "sm" }),
|
|
1030
1030
|
" ",
|
|
1031
1031
|
resolvedFiltersButtonLabel
|
|
1032
|
-
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "
|
|
1032
|
+
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, filters.slice(filterInlineLimit).map(renderFilterControl)), activeChips.length > 0 && (showFilterBadges || showClearFiltersButton) && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showFilterBadges && activeChips.map((chip) => /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Tag, { key: chip.key, variant: "default", onDelete: () => handleFilterRemove(chip.key) }, chip.label)), showClearFiltersButton && /* @__PURE__ */ import_react.default.createElement(
|
|
1033
1033
|
import_ui_extensions.Button,
|
|
1034
1034
|
{
|
|
1035
1035
|
variant: "transparent",
|
|
@@ -1093,7 +1093,7 @@ var DataTable = ({
|
|
|
1093
1093
|
sortDirection: col.sortable ? sortState[col.field] || "none" : "never",
|
|
1094
1094
|
onSortChange: col.sortable ? () => handleSortChange(col.field) : void 0
|
|
1095
1095
|
},
|
|
1096
|
-
col.label
|
|
1096
|
+
col.description ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, col.label, "\xA0", /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Link, { inline: true, variant: "dark", overlay: /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Tooltip, null, col.description) }, /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.Icon, { name: "info", screenReaderText: typeof col.description === "string" ? col.description : void 0 }))) : col.label
|
|
1097
1097
|
);
|
|
1098
1098
|
}), showRowActionsColumn && /* @__PURE__ */ import_react.default.createElement(import_ui_extensions.TableHeader, { width: "min" }))),
|
|
1099
1099
|
/* @__PURE__ */ import_react.default.createElement(import_ui_extensions.TableBody, null, displayRows.map(
|
package/dist/index.mjs
CHANGED
|
@@ -30,7 +30,8 @@ import {
|
|
|
30
30
|
Text,
|
|
31
31
|
TextArea,
|
|
32
32
|
TimeInput,
|
|
33
|
-
Toggle
|
|
33
|
+
Toggle,
|
|
34
|
+
Tooltip
|
|
34
35
|
} from "@hubspot/ui-extensions";
|
|
35
36
|
var formatDateChip = (dateObj) => {
|
|
36
37
|
if (!dateObj) return "";
|
|
@@ -999,7 +1000,7 @@ var DataTable = ({
|
|
|
999
1000
|
}
|
|
1000
1001
|
);
|
|
1001
1002
|
};
|
|
1002
|
-
return /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ React.createElement(Box, { flex: 3 }, /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "
|
|
1003
|
+
return /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "xs" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", gap: "sm" }, /* @__PURE__ */ React.createElement(Box, { flex: 3 }, /* @__PURE__ */ React.createElement(Flex, { direction: "column", gap: "sm" }, /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showSearch && searchFields.length > 0 && /* @__PURE__ */ React.createElement(
|
|
1003
1004
|
SearchInput,
|
|
1004
1005
|
{
|
|
1005
1006
|
name: "datatable-search",
|
|
@@ -1017,7 +1018,7 @@ var DataTable = ({
|
|
|
1017
1018
|
/* @__PURE__ */ React.createElement(Icon, { name: "filter", size: "sm" }),
|
|
1018
1019
|
" ",
|
|
1019
1020
|
resolvedFiltersButtonLabel
|
|
1020
|
-
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "
|
|
1021
|
+
)), showMoreFilters && filters.length > filterInlineLimit && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, filters.slice(filterInlineLimit).map(renderFilterControl)), activeChips.length > 0 && (showFilterBadges || showClearFiltersButton) && /* @__PURE__ */ React.createElement(Flex, { direction: "row", align: "center", gap: "sm", wrap: "wrap" }, showFilterBadges && activeChips.map((chip) => /* @__PURE__ */ React.createElement(Tag, { key: chip.key, variant: "default", onDelete: () => handleFilterRemove(chip.key) }, chip.label)), showClearFiltersButton && /* @__PURE__ */ React.createElement(
|
|
1021
1022
|
Button,
|
|
1022
1023
|
{
|
|
1023
1024
|
variant: "transparent",
|
|
@@ -1081,7 +1082,7 @@ var DataTable = ({
|
|
|
1081
1082
|
sortDirection: col.sortable ? sortState[col.field] || "none" : "never",
|
|
1082
1083
|
onSortChange: col.sortable ? () => handleSortChange(col.field) : void 0
|
|
1083
1084
|
},
|
|
1084
|
-
col.label
|
|
1085
|
+
col.description ? /* @__PURE__ */ React.createElement(React.Fragment, null, col.label, "\xA0", /* @__PURE__ */ React.createElement(Link, { inline: true, variant: "dark", overlay: /* @__PURE__ */ React.createElement(Tooltip, null, col.description) }, /* @__PURE__ */ React.createElement(Icon, { name: "info", screenReaderText: typeof col.description === "string" ? col.description : void 0 }))) : col.label
|
|
1085
1086
|
);
|
|
1086
1087
|
}), showRowActionsColumn && /* @__PURE__ */ React.createElement(TableHeader, { width: "min" }))),
|
|
1087
1088
|
/* @__PURE__ */ React.createElement(TableBody, null, displayRows.map(
|
|
@@ -1159,7 +1160,7 @@ import {
|
|
|
1159
1160
|
Button as Button2,
|
|
1160
1161
|
LoadingButton,
|
|
1161
1162
|
Alert,
|
|
1162
|
-
Tooltip,
|
|
1163
|
+
Tooltip as Tooltip2,
|
|
1163
1164
|
StepIndicator,
|
|
1164
1165
|
Input as Input2,
|
|
1165
1166
|
TextArea as TextArea2,
|
|
@@ -3169,7 +3170,7 @@ var FormBuilder = forwardRef(function FormBuilder2(props, ref) {
|
|
|
3169
3170
|
const groupLabel = getDependsOnLabel(firstWithLabel) || dependentPropertiesLabel;
|
|
3170
3171
|
const rawMessage = getDependsOnMessage(firstWithMessage);
|
|
3171
3172
|
const tooltipMessage = typeof rawMessage === "function" ? rawMessage(parentField.label) : rawMessage || "";
|
|
3172
|
-
return /* @__PURE__ */ React2.createElement(Tile, { key: `dep-${parentField.name}`, compact: true }, /* @__PURE__ */ React2.createElement(Flex2, { direction: "column", gap }, /* @__PURE__ */ React2.createElement(Flex2, { direction: "row", align: "center", gap: "xs" }, /* @__PURE__ */ React2.createElement(Text2, { format: { fontWeight: "demibold" } }, groupLabel, " ", tooltipMessage && /* @__PURE__ */ React2.createElement(Link2, { inline: true, variant: "dark", overlay: /* @__PURE__ */ React2.createElement(
|
|
3173
|
+
return /* @__PURE__ */ React2.createElement(Tile, { key: `dep-${parentField.name}`, compact: true }, /* @__PURE__ */ React2.createElement(Flex2, { direction: "column", gap }, /* @__PURE__ */ React2.createElement(Flex2, { direction: "row", align: "center", gap: "xs" }, /* @__PURE__ */ React2.createElement(Text2, { format: { fontWeight: "demibold" } }, groupLabel, " ", tooltipMessage && /* @__PURE__ */ React2.createElement(Link2, { inline: true, variant: "dark", overlay: /* @__PURE__ */ React2.createElement(Tooltip2, null, tooltipMessage) }, /* @__PURE__ */ React2.createElement(Icon2, { name: "info" })))), renderFieldSubset(dependents)));
|
|
3173
3174
|
};
|
|
3174
3175
|
const renderGridLayout = (fieldSubset, effectiveCols) => {
|
|
3175
3176
|
const cols = effectiveCols || columns;
|
|
@@ -3405,7 +3406,7 @@ var FormBuilder = forwardRef(function FormBuilder2(props, ref) {
|
|
|
3405
3406
|
);
|
|
3406
3407
|
if (sec.info) {
|
|
3407
3408
|
elements.push(
|
|
3408
|
-
/* @__PURE__ */ React2.createElement(Flex2, { key: sec.id, direction: "row", align: "start", justify: "start", gap: "flush" }, /* @__PURE__ */ React2.createElement(Box2, { flex: 1 }, accordion), /* @__PURE__ */ React2.createElement(Link2, { variant: "dark", overlay: /* @__PURE__ */ React2.createElement(
|
|
3409
|
+
/* @__PURE__ */ React2.createElement(Flex2, { key: sec.id, direction: "row", align: "start", justify: "start", gap: "flush" }, /* @__PURE__ */ React2.createElement(Box2, { flex: 1 }, accordion), /* @__PURE__ */ React2.createElement(Link2, { variant: "dark", overlay: /* @__PURE__ */ React2.createElement(Tooltip2, null, sec.info) }, /* @__PURE__ */ React2.createElement(Icon2, { name: "info", size: "sm", screenReaderText: sec.info })))
|
|
3409
3410
|
);
|
|
3410
3411
|
} else {
|
|
3411
3412
|
elements.push(accordion);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hs-uix",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Production-ready UI components for HubSpot UI Extensions — DataTable, FormBuilder, and more",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup",
|
|
50
50
|
"dev": "tsup --watch",
|
|
51
|
+
"link:demos": "npm link && cd ../hs-uix-demos/src/app/pages && npm link hs-uix",
|
|
52
|
+
"dev:demos": "npm run link:demos && npm run dev",
|
|
51
53
|
"prepublishOnly": "tsup",
|
|
52
54
|
"release:patch": "npm version patch && npm publish && git push origin main --tags",
|
|
53
55
|
"release:minor": "npm version minor && npm publish && git push origin main --tags",
|