@uniformdev/design-system 20.55.1-alpha.1 → 20.55.2-alpha.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.
- package/dist/esm/index.js +30 -10
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +30 -10
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -7951,6 +7951,10 @@ var datePart = css54`
|
|
|
7951
7951
|
overflow: hidden;
|
|
7952
7952
|
white-space: nowrap;
|
|
7953
7953
|
`;
|
|
7954
|
+
var compactInput = css54`
|
|
7955
|
+
/* matches the rendered height of ParameterInput (padding + line-height + border) */
|
|
7956
|
+
min-height: calc(var(--spacing-sm) * 2 + var(--fs-sm) * 1.5 + 2px);
|
|
7957
|
+
`;
|
|
7954
7958
|
var datePartButton = css54`
|
|
7955
7959
|
// this allows the button to be as wide as the text
|
|
7956
7960
|
min-width: 0;
|
|
@@ -8119,6 +8123,7 @@ var DateTimePicker = ({
|
|
|
8119
8123
|
testId = "datetime-picker",
|
|
8120
8124
|
placement = "bottom-start",
|
|
8121
8125
|
portal = false,
|
|
8126
|
+
compact = false,
|
|
8122
8127
|
...props
|
|
8123
8128
|
}) => {
|
|
8124
8129
|
const popover2 = usePopoverStore({ placement });
|
|
@@ -8190,7 +8195,12 @@ var DateTimePicker = ({
|
|
|
8190
8195
|
/* @__PURE__ */ jsxs43(
|
|
8191
8196
|
"div",
|
|
8192
8197
|
{
|
|
8193
|
-
css: [
|
|
8198
|
+
css: [
|
|
8199
|
+
input("nowrap"),
|
|
8200
|
+
input2,
|
|
8201
|
+
compact && compactInput,
|
|
8202
|
+
errorMessage ? inputError : null
|
|
8203
|
+
],
|
|
8194
8204
|
"data-disabled": disabled2,
|
|
8195
8205
|
"data-focus": visible,
|
|
8196
8206
|
children: [
|
|
@@ -8215,7 +8225,17 @@ var DateTimePicker = ({
|
|
|
8215
8225
|
children: "clear"
|
|
8216
8226
|
}
|
|
8217
8227
|
),
|
|
8218
|
-
/* @__PURE__ */ jsx66(
|
|
8228
|
+
/* @__PURE__ */ jsx66(
|
|
8229
|
+
Button,
|
|
8230
|
+
{
|
|
8231
|
+
css: trigger,
|
|
8232
|
+
buttonType: "ghost",
|
|
8233
|
+
size: compact ? "sm" : "md",
|
|
8234
|
+
disabled: disabled2,
|
|
8235
|
+
onClick: popover2.show,
|
|
8236
|
+
children: /* @__PURE__ */ jsx66(Icon, { icon: triggerIcon, iconColor: "gray", size: "1rem" })
|
|
8237
|
+
}
|
|
8238
|
+
)
|
|
8219
8239
|
]
|
|
8220
8240
|
}
|
|
8221
8241
|
),
|
|
@@ -11257,21 +11277,16 @@ var LabelsQuickFilter = ({
|
|
|
11257
11277
|
const filteredItems = useMemo6(() => {
|
|
11258
11278
|
const searchLower = searchTerm.toLowerCase().trim();
|
|
11259
11279
|
const matchesSearch = (item) => item.name.toLowerCase().includes(searchLower);
|
|
11260
|
-
|
|
11261
|
-
return items;
|
|
11262
|
-
}
|
|
11263
|
-
const groupsWithMatchingChildren = new Set(
|
|
11264
|
-
items.filter((item) => item.parent && matchesSearch(item)).map((item) => item.parent)
|
|
11265
|
-
);
|
|
11266
|
-
return items.filter((item) => {
|
|
11280
|
+
const filtered = !searchTerm ? [...items] : items.filter((item) => {
|
|
11267
11281
|
if (matchesSearch(item)) {
|
|
11268
11282
|
return true;
|
|
11269
11283
|
}
|
|
11270
|
-
if (item.isGroup &&
|
|
11284
|
+
if (item.isGroup && items.some((child) => child.parent === item.id && matchesSearch(child))) {
|
|
11271
11285
|
return true;
|
|
11272
11286
|
}
|
|
11273
11287
|
return false;
|
|
11274
11288
|
});
|
|
11289
|
+
return filtered.sort((a, b) => a.name.localeCompare(b.name));
|
|
11275
11290
|
}, [items, searchTerm]);
|
|
11276
11291
|
const handleToggle = (item) => {
|
|
11277
11292
|
if (selectedIdsSet.has(item.id)) {
|
|
@@ -13359,6 +13374,11 @@ var input3 = css97`
|
|
|
13359
13374
|
cursor: not-allowed;
|
|
13360
13375
|
color: var(--gray-400);
|
|
13361
13376
|
}
|
|
13377
|
+
|
|
13378
|
+
&::-webkit-calendar-picker-indicator {
|
|
13379
|
+
color: var(--gray-500);
|
|
13380
|
+
opacity: var(--opacity-50);
|
|
13381
|
+
}
|
|
13362
13382
|
`;
|
|
13363
13383
|
var selectInput = css97`
|
|
13364
13384
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
package/dist/index.d.mts
CHANGED
|
@@ -1803,6 +1803,8 @@ type DateTimePickerProps = {
|
|
|
1803
1803
|
offset?: number;
|
|
1804
1804
|
/** (optional) sets whether to render the popover in a portal */
|
|
1805
1805
|
portal?: boolean;
|
|
1806
|
+
/** (optional) reduces input height to match compact parameter inputs */
|
|
1807
|
+
compact?: boolean;
|
|
1806
1808
|
};
|
|
1807
1809
|
/**
|
|
1808
1810
|
* Use this context for slots within the date time picker
|
|
@@ -1822,7 +1824,7 @@ declare function useDateTimePickerContext(): {
|
|
|
1822
1824
|
* Subcomponents can manipulate the value directly by using
|
|
1823
1825
|
* the `useDateTimePickerContext()` hook.
|
|
1824
1826
|
*/
|
|
1825
|
-
declare const DateTimePicker: ({ id, label, triggerIcon, value, minVisible, maxVisible, variant, caption, placeholder, belowTimeInputSlot, showLabel, errorMessage, warningMessage, disabled, onChange, offset, testId, placement, portal, ...props }: DateTimePickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1827
|
+
declare const DateTimePicker: ({ id, label, triggerIcon, value, minVisible, maxVisible, variant, caption, placeholder, belowTimeInputSlot, showLabel, errorMessage, warningMessage, disabled, onChange, offset, testId, placement, portal, compact, ...props }: DateTimePickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1826
1828
|
|
|
1827
1829
|
declare function DateTimePickerSummary({ value, placeholder, }: {
|
|
1828
1830
|
value: DateTimePickerValue | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1803,6 +1803,8 @@ type DateTimePickerProps = {
|
|
|
1803
1803
|
offset?: number;
|
|
1804
1804
|
/** (optional) sets whether to render the popover in a portal */
|
|
1805
1805
|
portal?: boolean;
|
|
1806
|
+
/** (optional) reduces input height to match compact parameter inputs */
|
|
1807
|
+
compact?: boolean;
|
|
1806
1808
|
};
|
|
1807
1809
|
/**
|
|
1808
1810
|
* Use this context for slots within the date time picker
|
|
@@ -1822,7 +1824,7 @@ declare function useDateTimePickerContext(): {
|
|
|
1822
1824
|
* Subcomponents can manipulate the value directly by using
|
|
1823
1825
|
* the `useDateTimePickerContext()` hook.
|
|
1824
1826
|
*/
|
|
1825
|
-
declare const DateTimePicker: ({ id, label, triggerIcon, value, minVisible, maxVisible, variant, caption, placeholder, belowTimeInputSlot, showLabel, errorMessage, warningMessage, disabled, onChange, offset, testId, placement, portal, ...props }: DateTimePickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1827
|
+
declare const DateTimePicker: ({ id, label, triggerIcon, value, minVisible, maxVisible, variant, caption, placeholder, belowTimeInputSlot, showLabel, errorMessage, warningMessage, disabled, onChange, offset, testId, placement, portal, compact, ...props }: DateTimePickerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1826
1828
|
|
|
1827
1829
|
declare function DateTimePickerSummary({ value, placeholder, }: {
|
|
1828
1830
|
value: DateTimePickerValue | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -9786,6 +9786,10 @@ var datePart = import_react81.css`
|
|
|
9786
9786
|
overflow: hidden;
|
|
9787
9787
|
white-space: nowrap;
|
|
9788
9788
|
`;
|
|
9789
|
+
var compactInput = import_react81.css`
|
|
9790
|
+
/* matches the rendered height of ParameterInput (padding + line-height + border) */
|
|
9791
|
+
min-height: calc(var(--spacing-sm) * 2 + var(--fs-sm) * 1.5 + 2px);
|
|
9792
|
+
`;
|
|
9789
9793
|
var datePartButton = import_react81.css`
|
|
9790
9794
|
// this allows the button to be as wide as the text
|
|
9791
9795
|
min-width: 0;
|
|
@@ -9949,6 +9953,7 @@ var DateTimePicker = ({
|
|
|
9949
9953
|
testId = "datetime-picker",
|
|
9950
9954
|
placement = "bottom-start",
|
|
9951
9955
|
portal = false,
|
|
9956
|
+
compact = false,
|
|
9952
9957
|
...props
|
|
9953
9958
|
}) => {
|
|
9954
9959
|
const popover2 = (0, import_react82.usePopoverStore)({ placement });
|
|
@@ -10020,7 +10025,12 @@ var DateTimePicker = ({
|
|
|
10020
10025
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
10021
10026
|
"div",
|
|
10022
10027
|
{
|
|
10023
|
-
css: [
|
|
10028
|
+
css: [
|
|
10029
|
+
input("nowrap"),
|
|
10030
|
+
input2,
|
|
10031
|
+
compact && compactInput,
|
|
10032
|
+
errorMessage ? inputError : null
|
|
10033
|
+
],
|
|
10024
10034
|
"data-disabled": disabled2,
|
|
10025
10035
|
"data-focus": visible,
|
|
10026
10036
|
children: [
|
|
@@ -10045,7 +10055,17 @@ var DateTimePicker = ({
|
|
|
10045
10055
|
children: "clear"
|
|
10046
10056
|
}
|
|
10047
10057
|
),
|
|
10048
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
10058
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
10059
|
+
Button,
|
|
10060
|
+
{
|
|
10061
|
+
css: trigger,
|
|
10062
|
+
buttonType: "ghost",
|
|
10063
|
+
size: compact ? "sm" : "md",
|
|
10064
|
+
disabled: disabled2,
|
|
10065
|
+
onClick: popover2.show,
|
|
10066
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { icon: triggerIcon, iconColor: "gray", size: "1rem" })
|
|
10067
|
+
}
|
|
10068
|
+
)
|
|
10049
10069
|
]
|
|
10050
10070
|
}
|
|
10051
10071
|
),
|
|
@@ -13154,21 +13174,16 @@ var LabelsQuickFilter = ({
|
|
|
13154
13174
|
const filteredItems = (0, import_react120.useMemo)(() => {
|
|
13155
13175
|
const searchLower = searchTerm.toLowerCase().trim();
|
|
13156
13176
|
const matchesSearch = (item) => item.name.toLowerCase().includes(searchLower);
|
|
13157
|
-
|
|
13158
|
-
return items;
|
|
13159
|
-
}
|
|
13160
|
-
const groupsWithMatchingChildren = new Set(
|
|
13161
|
-
items.filter((item) => item.parent && matchesSearch(item)).map((item) => item.parent)
|
|
13162
|
-
);
|
|
13163
|
-
return items.filter((item) => {
|
|
13177
|
+
const filtered = !searchTerm ? [...items] : items.filter((item) => {
|
|
13164
13178
|
if (matchesSearch(item)) {
|
|
13165
13179
|
return true;
|
|
13166
13180
|
}
|
|
13167
|
-
if (item.isGroup &&
|
|
13181
|
+
if (item.isGroup && items.some((child) => child.parent === item.id && matchesSearch(child))) {
|
|
13168
13182
|
return true;
|
|
13169
13183
|
}
|
|
13170
13184
|
return false;
|
|
13171
13185
|
});
|
|
13186
|
+
return filtered.sort((a, b) => a.name.localeCompare(b.name));
|
|
13172
13187
|
}, [items, searchTerm]);
|
|
13173
13188
|
const handleToggle = (item) => {
|
|
13174
13189
|
if (selectedIdsSet.has(item.id)) {
|
|
@@ -15323,6 +15338,11 @@ var input3 = import_react151.css`
|
|
|
15323
15338
|
cursor: not-allowed;
|
|
15324
15339
|
color: var(--gray-400);
|
|
15325
15340
|
}
|
|
15341
|
+
|
|
15342
|
+
&::-webkit-calendar-picker-indicator {
|
|
15343
|
+
color: var(--gray-500);
|
|
15344
|
+
opacity: var(--opacity-50);
|
|
15345
|
+
}
|
|
15326
15346
|
`;
|
|
15327
15347
|
var selectInput = import_react151.css`
|
|
15328
15348
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.55.
|
|
3
|
+
"version": "20.55.2-alpha.2+62d2ec9b3f",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"exports": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@storybook/react-vite": "10.1.0",
|
|
36
36
|
"@types/react": "19.2.2",
|
|
37
37
|
"@types/react-dom": "19.2.2",
|
|
38
|
-
"@uniformdev/canvas": "^20.55.
|
|
39
|
-
"@uniformdev/richtext": "^20.55.
|
|
38
|
+
"@uniformdev/canvas": "^20.55.2-alpha.2+62d2ec9b3f",
|
|
39
|
+
"@uniformdev/richtext": "^20.55.2-alpha.2+62d2ec9b3f",
|
|
40
40
|
"autoprefixer": "10.4.21",
|
|
41
41
|
"hygen": "6.2.11",
|
|
42
42
|
"jsdom": "20.0.3",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "62d2ec9b3f273a02798cb93040a1edf4dee0c9c2"
|
|
92
92
|
}
|