@monolith-forensics/monolith-ui 1.8.1 → 1.9.0
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/MonolithUIProvider/MonolithUIProvider.d.ts +0 -4
- package/dist/Tabs/Tab.js +0 -8
- package/dist/TagBox/TagBox.d.ts +1 -1
- package/dist/TagBox/TagBox.js +135 -35
- package/dist/TagBox/types.d.ts +13 -0
- package/dist/core/controlSizes.d.ts +0 -26
- package/dist/core/controlSizes.js +0 -156
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/theme/variants.js +0 -8
- package/package.json +1 -1
- package/dist/Charts/BarChart/BarChart.d.ts +0 -5
- package/dist/Charts/BarChart/BarChart.js +0 -563
- package/dist/Charts/BarChart/BarChart.lib.d.ts +0 -31
- package/dist/Charts/BarChart/BarChart.lib.js +0 -136
- package/dist/Charts/BarChart/BarChart.styled.d.ts +0 -56
- package/dist/Charts/BarChart/BarChart.styled.js +0 -119
- package/dist/Charts/BarChart/BarChart.types.d.ts +0 -179
- package/dist/Charts/BarChart/BarChart.types.js +0 -1
- package/dist/Charts/BarChart/index.d.ts +0 -3
- package/dist/Charts/BarChart/index.js +0 -2
- package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +0 -11
- package/dist/Charts/ChartPrimitives/ChartExportControl.js +0 -29
- package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +0 -1
- package/dist/Charts/ChartPrimitives/chartActions.styled.js +0 -8
- package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +0 -12
- package/dist/Charts/ChartPrimitives/chartLegend.styled.js +0 -52
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +0 -19
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +0 -61
- package/dist/Charts/ChartPrimitives/index.d.ts +0 -4
- package/dist/Charts/ChartPrimitives/index.js +0 -4
- package/dist/Charts/ChartUtils/chartColors.d.ts +0 -8
- package/dist/Charts/ChartUtils/chartColors.js +0 -65
- package/dist/Charts/ChartUtils/chartExport.d.ts +0 -47
- package/dist/Charts/ChartUtils/chartExport.js +0 -311
- package/dist/Charts/ChartUtils/chartMath.d.ts +0 -3
- package/dist/Charts/ChartUtils/chartMath.js +0 -3
- package/dist/Charts/ChartUtils/chartSizing.d.ts +0 -20
- package/dist/Charts/ChartUtils/chartSizing.js +0 -83
- package/dist/Charts/ChartUtils/index.d.ts +0 -4
- package/dist/Charts/ChartUtils/index.js +0 -4
- package/dist/Charts/HeatMap/HeatMap.d.ts +0 -5
- package/dist/Charts/HeatMap/HeatMap.js +0 -233
- package/dist/Charts/HeatMap/HeatMap.lib.d.ts +0 -30
- package/dist/Charts/HeatMap/HeatMap.lib.js +0 -115
- package/dist/Charts/HeatMap/HeatMap.styled.d.ts +0 -41
- package/dist/Charts/HeatMap/HeatMap.styled.js +0 -94
- package/dist/Charts/HeatMap/HeatMap.types.d.ts +0 -86
- package/dist/Charts/HeatMap/HeatMap.types.js +0 -1
- package/dist/Charts/HeatMap/index.d.ts +0 -3
- package/dist/Charts/HeatMap/index.js +0 -2
- package/dist/Charts/LineChart/LineChart.d.ts +0 -5
- package/dist/Charts/LineChart/LineChart.js +0 -548
- package/dist/Charts/LineChart/LineChart.lib.d.ts +0 -24
- package/dist/Charts/LineChart/LineChart.lib.js +0 -132
- package/dist/Charts/LineChart/LineChart.styled.d.ts +0 -64
- package/dist/Charts/LineChart/LineChart.styled.js +0 -151
- package/dist/Charts/LineChart/LineChart.types.d.ts +0 -201
- package/dist/Charts/LineChart/LineChart.types.js +0 -1
- package/dist/Charts/LineChart/index.d.ts +0 -3
- package/dist/Charts/LineChart/index.js +0 -2
- package/dist/Charts/PieChart/PieChart.d.ts +0 -4
- package/dist/Charts/PieChart/PieChart.js +0 -214
- package/dist/Charts/PieChart/PieChart.lib.d.ts +0 -5
- package/dist/Charts/PieChart/PieChart.lib.js +0 -19
- package/dist/Charts/PieChart/PieChart.styled.d.ts +0 -56
- package/dist/Charts/PieChart/PieChart.styled.js +0 -168
- package/dist/Charts/PieChart/PieChart.types.d.ts +0 -104
- package/dist/Charts/PieChart/PieChart.types.js +0 -1
- package/dist/Charts/PieChart/index.d.ts +0 -2
- package/dist/Charts/PieChart/index.js +0 -1
- package/dist/Charts/index.d.ts +0 -5
- package/dist/Charts/index.js +0 -4
- package/dist/QueryFilter/QueryFilter.constants.d.ts +0 -134
- package/dist/QueryFilter/QueryFilter.constants.js +0 -39
- package/dist/QueryFilter/QueryFilter.lib.d.ts +0 -14
- package/dist/QueryFilter/QueryFilter.lib.js +0 -84
- package/dist/QueryFilter/QueryFilter.styled.d.ts +0 -89
- package/dist/QueryFilter/QueryFilter.styled.js +0 -184
- package/dist/QueryFilter/QueryFilter.types.d.ts +0 -61
- package/dist/QueryFilter/QueryFilter.types.js +0 -1
- package/dist/QueryFilter/components/MultiSelectEditor.d.ts +0 -7
- package/dist/QueryFilter/components/MultiSelectEditor.js +0 -44
- package/dist/QueryFilter/components/RuleChip.d.ts +0 -8
- package/dist/QueryFilter/components/RuleChip.js +0 -37
- package/dist/QueryFilter/components/Rules.d.ts +0 -11
- package/dist/QueryFilter/components/Rules.js +0 -41
- package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +0 -5
- package/dist/QueryFilter/components/UnavailableRuleChip.js +0 -7
- package/dist/QueryFilter/components/ValueEditor.d.ts +0 -7
- package/dist/QueryFilter/components/ValueEditor.js +0 -45
- package/dist/QueryFilter/components/ValueSelector.d.ts +0 -7
- package/dist/QueryFilter/components/ValueSelector.js +0 -34
- package/dist/QueryFilter/components/index.d.ts +0 -6
- package/dist/QueryFilter/components/index.js +0 -6
- package/dist/RichTextEditor/Components/CodeBlockBaseButton.d.ts +0 -18
- package/dist/RichTextEditor/Components/CodeBlockBaseButton.js +0 -6
- package/dist/RichTextEditor/Components/CodeBlockCopyButton.d.ts +0 -9
- package/dist/RichTextEditor/Components/CodeBlockCopyButton.js +0 -42
- package/dist/RichTextEditor/Components/CodeBlockFormatButton.d.ts +0 -10
- package/dist/RichTextEditor/Components/CodeBlockFormatButton.js +0 -60
- package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.d.ts +0 -9
- package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.js +0 -30
- package/dist/RichTextEditor/Components/CodeBlockNodeView.d.ts +0 -3
- package/dist/RichTextEditor/Components/CodeBlockNodeView.js +0 -28
- package/dist/RichTextEditor/Components/CodeBlockWrapButton.d.ts +0 -10
- package/dist/RichTextEditor/Components/CodeBlockWrapButton.js +0 -17
- package/dist/RichTextEditor/Components/LinkEditor.d.ts +0 -8
- package/dist/RichTextEditor/Components/LinkEditor.js +0 -94
- package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.d.ts +0 -2
- package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.js +0 -19
- package/dist/RichTextEditor/Components/TableTools/TableInsertControls.d.ts +0 -2
- package/dist/RichTextEditor/Components/TableTools/TableInsertControls.js +0 -24
- package/dist/RichTextEditor/Components/TableTools/TableRails.d.ts +0 -2
- package/dist/RichTextEditor/Components/TableTools/TableRails.js +0 -180
- package/dist/RichTextEditor/Components/TableTools/TableToolMenu.d.ts +0 -5
- package/dist/RichTextEditor/Components/TableTools/TableToolMenu.js +0 -6
- package/dist/RichTextEditor/Components/TableTools/TableTools.actions.d.ts +0 -5
- package/dist/RichTextEditor/Components/TableTools/TableTools.actions.js +0 -183
- package/dist/RichTextEditor/Components/TableTools/TableTools.commands.d.ts +0 -16
- package/dist/RichTextEditor/Components/TableTools/TableTools.commands.js +0 -217
- package/dist/RichTextEditor/Components/TableTools/TableTools.constants.d.ts +0 -8
- package/dist/RichTextEditor/Components/TableTools/TableTools.constants.js +0 -11
- package/dist/RichTextEditor/Components/TableTools/TableTools.d.ts +0 -3
- package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.d.ts +0 -23
- package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.js +0 -75
- package/dist/RichTextEditor/Components/TableTools/TableTools.js +0 -3
- package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.d.ts +0 -16
- package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.js +0 -53
- package/dist/RichTextEditor/Components/TableTools/TableTools.styled.d.ts +0 -40
- package/dist/RichTextEditor/Components/TableTools/TableTools.styled.js +0 -167
- package/dist/RichTextEditor/Components/TableTools/TableTools.types.d.ts +0 -76
- package/dist/RichTextEditor/Components/TableTools/TableTools.types.js +0 -1
- package/dist/RichTextEditor/Components/TableTools/TableTools.utils.d.ts +0 -4
- package/dist/RichTextEditor/Components/TableTools/TableTools.utils.js +0 -4
- package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.d.ts +0 -2
- package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.js +0 -12
- package/dist/RichTextEditor/Components/TableTools/index.d.ts +0 -3
- package/dist/RichTextEditor/Components/TableTools/index.js +0 -2
- package/dist/RichTextEditor/Enums/HighlightColors.d.ts +0 -9
- package/dist/RichTextEditor/Enums/HighlightColors.js +0 -10
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +0 -3
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +0 -238
- package/dist/RichTextEditor/Utils/codeBlockUtils.d.ts +0 -20
- package/dist/RichTextEditor/Utils/codeBlockUtils.js +0 -137
- package/dist/RichTextEditor/Utils/codeUtils.d.ts +0 -3
- package/dist/RichTextEditor/Utils/codeUtils.js +0 -12
- package/dist/RichTextEditor/Utils/linkUtils.d.ts +0 -19
- package/dist/RichTextEditor/Utils/linkUtils.js +0 -57
- package/dist/RichTextEditor/Utils/tableUtils.d.ts +0 -1
- package/dist/RichTextEditor/Utils/tableUtils.js +0 -1
- package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +0 -24
- package/dist/SuperDatePicker/SuperDatePicker.constants.js +0 -30
- package/dist/SuperDatePicker/SuperDatePicker.d.ts +0 -3
- package/dist/SuperDatePicker/SuperDatePicker.js +0 -31
- package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +0 -17
- package/dist/SuperDatePicker/SuperDatePicker.lib.js +0 -206
- package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +0 -60
- package/dist/SuperDatePicker/SuperDatePicker.styled.js +0 -256
- package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +0 -48
- package/dist/SuperDatePicker/SuperDatePicker.types.js +0 -1
- package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +0 -7
- package/dist/SuperDatePicker/components/CommonPresetGroups.js +0 -6
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +0 -10
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +0 -9
- package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +0 -16
- package/dist/SuperDatePicker/components/EndpointDateInput.js +0 -26
- package/dist/SuperDatePicker/components/EndpointPopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/EndpointPopover.js +0 -11
- package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +0 -14
- package/dist/SuperDatePicker/components/QuickRangeDropdown.js +0 -19
- package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/QuickRangePopover.js +0 -12
- package/dist/SuperDatePicker/components/index.d.ts +0 -6
- package/dist/SuperDatePicker/components/index.js +0 -6
- package/dist/SuperDatePicker/index.d.ts +0 -3
- package/dist/SuperDatePicker/index.js +0 -3
- package/dist/SuperDatePicker/useSuperDatePicker.d.ts +0 -32
- package/dist/SuperDatePicker/useSuperDatePicker.js +0 -125
package/dist/Tabs/Tab.js
CHANGED
|
@@ -12,14 +12,6 @@ const StyledTabButton = styled(Button) `
|
|
|
12
12
|
color: ${({ theme }) => theme.palette.text.secondary};
|
|
13
13
|
font-weight: 500;
|
|
14
14
|
|
|
15
|
-
&:focus {
|
|
16
|
-
text-decoration: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&:focus-visible {
|
|
20
|
-
background-color: ${({ theme }) => theme.palette.action.hover};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
${({ orientation }) => orientation === "horizontal" &&
|
|
24
16
|
css `
|
|
25
17
|
border-bottom: 2px solid transparent;
|
package/dist/TagBox/TagBox.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TagBoxProps } from "./types";
|
|
2
|
-
declare const TagBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<TagBoxProps, never>> & string & Omit<({ className, data, placeholder, arrow, defaultValue, value, grouped, searchFn, onChange, onScroll, onSearch, onItemAdded, size, variant, width, allowCustomValue, searchable, clearable, openOnFocus, label, description, required, error, loading, sort, disabled, renderOption, renderTag, OptionTooltip, DropDownProps, }: TagBoxProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
2
|
+
declare const TagBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<TagBoxProps, never>> & string & Omit<({ className, data, placeholder, arrow, defaultValue, value, grouped, searchFn, onChange, onScroll, onSearch, onItemAdded, size, variant, width, allowCustomValue, searchable, clearable, enableSelectAll, maxDisplayed, openOnFocus, label, description, required, error, loading, sort, disabled, renderOption, renderTag, OptionTooltip, DropDownProps, }: TagBoxProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
3
3
|
export default TagBox;
|
package/dist/TagBox/TagBox.js
CHANGED
|
@@ -12,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import styled from "styled-components";
|
|
14
14
|
import { useFloating, flip, offset, autoUpdate, FloatingPortal, } from "@floating-ui/react";
|
|
15
|
-
import { useCallback, useEffect, useRef, useState, } from "react";
|
|
15
|
+
import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
16
16
|
import { Input, Tooltip, FieldLabel, Pill, Loader } from "..";
|
|
17
|
-
import { ArrowButton, ClearButton, StyledFloatContainer, StyledContent, } from "../core";
|
|
17
|
+
import { ArrowButton, ClearButton, StyledFloatContainer, StyledContent, getControlSizeTokens, } from "../core";
|
|
18
18
|
const StyledInputContainer = styled.div `
|
|
19
19
|
position: relative;
|
|
20
20
|
cursor: pointer;
|
|
@@ -306,6 +306,43 @@ const StyledItem = styled.div `
|
|
|
306
306
|
pointer-events: none;
|
|
307
307
|
}
|
|
308
308
|
`;
|
|
309
|
+
const SelectAllItem = styled.button `
|
|
310
|
+
position: sticky;
|
|
311
|
+
top: 0;
|
|
312
|
+
z-index: 1;
|
|
313
|
+
|
|
314
|
+
display: flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
width: 100%;
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
user-select: none;
|
|
319
|
+
box-sizing: border-box;
|
|
320
|
+
min-height: ${({ size }) => `${getControlSizeTokens(size).menuRowHeight + 4}px`};
|
|
321
|
+
padding: 0 ${({ size }) => `${getControlSizeTokens(size).menuItemPaddingX}px`};
|
|
322
|
+
margin-bottom: 4px;
|
|
323
|
+
border: 0;
|
|
324
|
+
border-bottom: 1px solid ${(props) => props.theme.palette.divider};
|
|
325
|
+
background-color: ${(props) => props.theme.palette.input.background};
|
|
326
|
+
font-family: ${({ theme }) => theme.typography.fontFamily};
|
|
327
|
+
font-size: ${({ size }) => `${getControlSizeTokens(size).fontSize}px`};
|
|
328
|
+
color: ${(props) => props.theme.palette.text.primary};
|
|
329
|
+
text-align: left;
|
|
330
|
+
appearance: none;
|
|
331
|
+
|
|
332
|
+
&:hover {
|
|
333
|
+
background-color: ${(props) => props.theme.palette.action.hover};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&:focus {
|
|
337
|
+
outline: none;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&:focus-visible {
|
|
341
|
+
background-color: ${(props) => props.theme.palette.action.hover};
|
|
342
|
+
outline: 2px solid ${(props) => props.theme.palette.primary.main};
|
|
343
|
+
outline-offset: -2px;
|
|
344
|
+
}
|
|
345
|
+
`;
|
|
309
346
|
const EmptyComponent = styled.div `
|
|
310
347
|
display: flex;
|
|
311
348
|
align-items: center;
|
|
@@ -341,7 +378,7 @@ const resolveValues = (value, data) => {
|
|
|
341
378
|
}
|
|
342
379
|
return resolvedValues;
|
|
343
380
|
};
|
|
344
|
-
const TagBox = styled(({ className, data = [], placeholder = "Select tags", arrow = true, defaultValue, value, grouped, searchFn, onChange, onScroll, onSearch, onItemAdded, size = "sm", variant = "outlined", width = "100%", allowCustomValue = false, searchable = false, clearable = false, openOnFocus = true, label, description, required = false, error, loading = false, sort = false, disabled = false, renderOption, renderTag, OptionTooltip, DropDownProps = {}, }) => {
|
|
381
|
+
const TagBox = styled(({ className, data = [], placeholder = "Select tags", arrow = true, defaultValue, value, grouped, searchFn, onChange, onScroll, onSearch, onItemAdded, size = "sm", variant = "outlined", width = "100%", allowCustomValue = false, searchable = false, clearable = false, enableSelectAll = false, maxDisplayed, openOnFocus = true, label, description, required = false, error, loading = false, sort = false, disabled = false, renderOption, renderTag, OptionTooltip, DropDownProps = {}, }) => {
|
|
345
382
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
346
383
|
const isObjectArray = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.hasOwnProperty("label");
|
|
347
384
|
const isControlled = value !== undefined;
|
|
@@ -349,15 +386,19 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
349
386
|
* Resolve the options to a consistent format
|
|
350
387
|
* also remove duplicates
|
|
351
388
|
*/
|
|
352
|
-
const resolvedOptions = Array.from(new Map(data
|
|
389
|
+
const resolvedOptions = useMemo(() => Array.from(new Map(data
|
|
353
390
|
.map((item) => ({
|
|
354
|
-
value: isObjectArray
|
|
355
|
-
|
|
391
|
+
value: isObjectArray
|
|
392
|
+
? item.value
|
|
393
|
+
: item,
|
|
394
|
+
label: isObjectArray
|
|
395
|
+
? item.label
|
|
396
|
+
: item,
|
|
356
397
|
group: isObjectArray ? item.group : undefined,
|
|
357
398
|
disabled: isObjectArray ? item.disabled : undefined,
|
|
358
399
|
data: isObjectArray ? item.data : undefined,
|
|
359
400
|
}))
|
|
360
|
-
.map((item) => [item.value, item])).values());
|
|
401
|
+
.map((item) => [item.value, item])).values()), [data, isObjectArray]);
|
|
361
402
|
/**
|
|
362
403
|
* Get the correct option if the default value is a string
|
|
363
404
|
* otherwise, use the default value as is
|
|
@@ -431,6 +472,36 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
431
472
|
}))
|
|
432
473
|
.sort((a, b) => a.label.localeCompare(b.label))
|
|
433
474
|
: [];
|
|
475
|
+
const selectableMatchingItems = useMemo(() => resolvedOptions
|
|
476
|
+
.concat(customItems)
|
|
477
|
+
.filter((item) => !item.disabled)
|
|
478
|
+
.filter((item) => item.label.toLowerCase().includes(searchValue.toLowerCase())), [resolvedOptions, customItems, searchValue]);
|
|
479
|
+
const selectedValueKeys = useMemo(() => new Set(_value.map((v) => v.value)), [_value]);
|
|
480
|
+
const selectedMatchingCount = selectableMatchingItems.filter((item) => selectedValueKeys.has(item.value)).length;
|
|
481
|
+
const allMatchingSelected = selectableMatchingItems.length > 0 &&
|
|
482
|
+
selectedMatchingCount === selectableMatchingItems.length;
|
|
483
|
+
const handleToggleSelectAll = useCallback(() => {
|
|
484
|
+
if (selectableMatchingItems.length === 0)
|
|
485
|
+
return;
|
|
486
|
+
if (allMatchingSelected) {
|
|
487
|
+
const matchingKeys = new Set(selectableMatchingItems.map((i) => i.value));
|
|
488
|
+
const next = _value.filter((v) => !matchingKeys.has(v.value));
|
|
489
|
+
!isControlled && setValueState(next);
|
|
490
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(next.map((v) => v.value), next);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
const toAdd = selectableMatchingItems.filter((item) => !selectedValueKeys.has(item.value));
|
|
494
|
+
const next = [..._value, ...toAdd];
|
|
495
|
+
!isControlled && setValueState(next);
|
|
496
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(next.map((v) => v.value), next);
|
|
497
|
+
}, [
|
|
498
|
+
selectableMatchingItems,
|
|
499
|
+
allMatchingSelected,
|
|
500
|
+
selectedValueKeys,
|
|
501
|
+
_value,
|
|
502
|
+
isControlled,
|
|
503
|
+
onChange,
|
|
504
|
+
]);
|
|
434
505
|
const { refs, floatingStyles, update } = useFloating({
|
|
435
506
|
open: isOpen,
|
|
436
507
|
onOpenChange: setIsOpen,
|
|
@@ -453,7 +524,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
453
524
|
});
|
|
454
525
|
};
|
|
455
526
|
const handleClear = (e) => {
|
|
456
|
-
e.preventDefault();
|
|
527
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
457
528
|
if (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current)
|
|
458
529
|
inputRef.current.value = "";
|
|
459
530
|
onChange === null || onChange === void 0 ? void 0 : onChange([]);
|
|
@@ -519,18 +590,24 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
519
590
|
customItems,
|
|
520
591
|
]);
|
|
521
592
|
const handleKeyDown = (e) => {
|
|
522
|
-
var _a, _b;
|
|
593
|
+
var _a, _b, _c;
|
|
523
594
|
const currentInputValue = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.value;
|
|
595
|
+
// When focus is inside the floating dropdown (e.g., on the Select All
|
|
596
|
+
// button), let that element handle its own activation rather than the
|
|
597
|
+
// container-level routing meant for the input.
|
|
598
|
+
const target = e.target;
|
|
599
|
+
const floatingElement = (_b = refs === null || refs === void 0 ? void 0 : refs.floating) === null || _b === void 0 ? void 0 : _b.current;
|
|
600
|
+
const focusInsideDropdown = !!floatingElement && floatingElement.contains(target);
|
|
524
601
|
// Escape key
|
|
525
602
|
if (e.key === "Escape") {
|
|
526
|
-
const reference = (
|
|
603
|
+
const reference = (_c = refs === null || refs === void 0 ? void 0 : refs.reference) === null || _c === void 0 ? void 0 : _c.current;
|
|
527
604
|
reference === null || reference === void 0 ? void 0 : reference.blur();
|
|
528
605
|
setSearchValue("");
|
|
529
606
|
update();
|
|
530
607
|
setIsOpen(false);
|
|
531
608
|
}
|
|
532
609
|
// Enter key
|
|
533
|
-
if (e.key === "Enter") {
|
|
610
|
+
if (e.key === "Enter" && !focusInsideDropdown) {
|
|
534
611
|
if (preSelected) {
|
|
535
612
|
handleItemClick(preSelected);
|
|
536
613
|
setPreSelected(undefined);
|
|
@@ -554,13 +631,15 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
554
631
|
// setIsOpen(false);
|
|
555
632
|
}
|
|
556
633
|
// Backspace key
|
|
557
|
-
if (e.key === "Backspace" &&
|
|
634
|
+
if (e.key === "Backspace" &&
|
|
635
|
+
currentInputValue === "" &&
|
|
636
|
+
!focusInsideDropdown) {
|
|
558
637
|
const newItems = _value === null || _value === void 0 ? void 0 : _value.slice(0, _value.length - 1);
|
|
559
638
|
!isControlled && setValueState(newItems);
|
|
560
639
|
onChange === null || onChange === void 0 ? void 0 : onChange(newItems.map((v) => v.value), newItems);
|
|
561
640
|
}
|
|
562
641
|
// Arrow down
|
|
563
|
-
if (e.key === "ArrowDown") {
|
|
642
|
+
if (e.key === "ArrowDown" && !focusInsideDropdown) {
|
|
564
643
|
e.preventDefault();
|
|
565
644
|
setPreSelected((prev) => {
|
|
566
645
|
let newItem = filteredItems[0]; // Loop back to the first item
|
|
@@ -578,7 +657,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
578
657
|
});
|
|
579
658
|
}
|
|
580
659
|
// Arrow up
|
|
581
|
-
if (e.key === "ArrowUp") {
|
|
660
|
+
if (e.key === "ArrowUp" && !focusInsideDropdown) {
|
|
582
661
|
e.preventDefault();
|
|
583
662
|
setPreSelected((prev) => {
|
|
584
663
|
let newItem = filteredItems[filteredItems.length - 1]; // Loop back to the last item
|
|
@@ -598,9 +677,15 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
598
677
|
return newItem;
|
|
599
678
|
});
|
|
600
679
|
}
|
|
601
|
-
// Tab key
|
|
680
|
+
// Tab key — close when the user is tabbing out of the dropdown itself,
|
|
681
|
+
// or when no focusable element exists inside it. Otherwise leave it open
|
|
682
|
+
// so FloatingPortal's preserveTabOrder can route focus to the Select All
|
|
683
|
+
// button.
|
|
602
684
|
if (e.key === "Tab") {
|
|
603
|
-
|
|
685
|
+
const hasFocusableContent = enableSelectAll && selectableMatchingItems.length > 0;
|
|
686
|
+
if (focusInsideDropdown || !hasFocusableContent) {
|
|
687
|
+
setIsOpen(false);
|
|
688
|
+
}
|
|
604
689
|
}
|
|
605
690
|
};
|
|
606
691
|
// handle scroll item into view
|
|
@@ -642,7 +727,14 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
642
727
|
return (_jsxs("div", { className: className + " mfTagBox", children: [label && (_jsx(FieldLabel, { error: error, asterisk: required, size: size, description: description, children: label })), _jsxs(StyledInputContainer, { className: "styledInputContainer", ref: refs.setReference, onMouseDown: () => {
|
|
643
728
|
setIsOpen(true);
|
|
644
729
|
handleFocus();
|
|
645
|
-
}, onFocus: handleFocus, size: size, variant: variant, onKeyDown: handleKeyDown, "data-open": isOpen, "data-disabled": disabled, tabIndex: 0, children: [_jsx(StyledInnerContainer, { size: size, "data-button-right": arrow || clearable, children: _jsxs(PillContainer, { size: size, children: [
|
|
730
|
+
}, onFocus: handleFocus, size: size, variant: variant, onKeyDown: handleKeyDown, "data-open": isOpen, "data-disabled": disabled, tabIndex: 0, children: [_jsx(StyledInnerContainer, { size: size, "data-button-right": arrow || clearable, children: _jsxs(PillContainer, { size: size, children: [(() => {
|
|
731
|
+
const shouldTruncate = maxDisplayed != null && _value.length > maxDisplayed;
|
|
732
|
+
const displayedItems = shouldTruncate
|
|
733
|
+
? _value.slice(0, maxDisplayed)
|
|
734
|
+
: _value;
|
|
735
|
+
const overflowCount = _value.length - displayedItems.length;
|
|
736
|
+
return (_jsxs(_Fragment, { children: [displayedItems.map((item, index) => (_jsx(Pill, { size: "xs", onRemove: () => handleRemoveItem(item), children: (renderTag === null || renderTag === void 0 ? void 0 : renderTag(item)) || _jsx(_Fragment, { children: item === null || item === void 0 ? void 0 : item.label }) }, index))), overflowCount > 0 && (_jsxs(Pill, { size: "xs", showRemoveIcon: false, children: ["+", overflowCount, " more..."] }))] }));
|
|
737
|
+
})(), (searchable || allowCustomValue || (_value === null || _value === void 0 ? void 0 : _value.length) === 0) && (_jsx(StyledInput, { inputRef: inputRef, onChange: (e) => {
|
|
646
738
|
if (searchFn !== undefined) {
|
|
647
739
|
searchFn === null || searchFn === void 0 ? void 0 : searchFn(e.target.value);
|
|
648
740
|
}
|
|
@@ -669,24 +761,32 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
669
761
|
maxHeight: DropDownProps.autoHeight
|
|
670
762
|
? (dropDownHeight || 250) - 10
|
|
671
763
|
: "",
|
|
672
|
-
}, variant: variant, "data-empty": filteredItems.length === 0 }, DropDownProps, { children: [loading && _jsx(Loader, {}), !loading &&
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
764
|
+
}, variant: variant, "data-empty": filteredItems.length === 0 }, DropDownProps, { children: [loading && _jsx(Loader, {}), !loading &&
|
|
765
|
+
filteredItems.length === 0 &&
|
|
766
|
+
!(enableSelectAll && selectableMatchingItems.length > 0) && (_jsx(EmptyComponent, { children: "No Items" })), !loading && (_jsxs(StyledInnerItemContainer, { ref: scrollContainerRef, "data-scroll-active": scrollActive, onScroll: onScroll, children: [enableSelectAll && selectableMatchingItems.length > 0 && (_jsx(SelectAllItem, { type: "button", size: size, onMouseDown: (e) => {
|
|
767
|
+
e.preventDefault();
|
|
768
|
+
e.stopPropagation();
|
|
769
|
+
}, onClick: (e) => {
|
|
770
|
+
e.preventDefault();
|
|
771
|
+
e.stopPropagation();
|
|
772
|
+
handleToggleSelectAll();
|
|
773
|
+
}, children: allMatchingSelected ? "Deselect all" : "Select all" })), grouped
|
|
774
|
+
? groups.map((group) => (_jsxs("div", { children: [_jsx(GroupTitle, { size: size, children: group.label }), group.items.map((item, index) => {
|
|
775
|
+
return (_jsx(Tooltip, { content: OptionTooltip ? (_jsx(OptionTooltip, { data: item.data })) : null, side: "left", children: _jsx(StyledItem, { className: "mfFloatingItem", onClick: (e) => {
|
|
776
|
+
e.preventDefault();
|
|
777
|
+
e.stopPropagation();
|
|
778
|
+
handleItemClick(item);
|
|
779
|
+
}, "data-highlighted": (preSelected === null || preSelected === void 0 ? void 0 : preSelected.value) === item.value, "data-disabled": item.disabled, size: size, children: (renderOption === null || renderOption === void 0 ? void 0 : renderOption(item)) || (_jsx(_Fragment, { children: typeof item === "string"
|
|
780
|
+
? item
|
|
781
|
+
: item === null || item === void 0 ? void 0 : item.label })) }, index) }, index));
|
|
782
|
+
})] }, group.label)))
|
|
783
|
+
: filteredItems.map((item, index) => {
|
|
784
|
+
return (_jsx(Tooltip, { content: OptionTooltip ? (_jsx(OptionTooltip, { data: item.data })) : null, side: "left", children: _jsx(StyledItem, { className: "mfFloatingItem", onClick: (e) => {
|
|
785
|
+
e.preventDefault();
|
|
786
|
+
e.stopPropagation();
|
|
787
|
+
handleItemClick(item);
|
|
788
|
+
}, "data-highlighted": (preSelected === null || preSelected === void 0 ? void 0 : preSelected.value) === item.value, "data-disabled": item.disabled, size: size, children: (renderOption === null || renderOption === void 0 ? void 0 : renderOption(item)) || _jsx(_Fragment, { children: item === null || item === void 0 ? void 0 : item.label }) }, index) }, index));
|
|
789
|
+
})] }))] })) }) }))] }));
|
|
690
790
|
}) `
|
|
691
791
|
position: relative;
|
|
692
792
|
cursor: pointer;
|
package/dist/TagBox/types.d.ts
CHANGED
|
@@ -22,6 +22,19 @@ export interface TagBoxProps {
|
|
|
22
22
|
allowCustomValue?: boolean;
|
|
23
23
|
searchable?: boolean;
|
|
24
24
|
clearable?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Adds a sticky "Select all" / "Deselect all" button at the top of the
|
|
27
|
+
* dropdown. The button operates on the currently visible (search-filtered,
|
|
28
|
+
* non-disabled) options — not the full dataset. When a search filter is
|
|
29
|
+
* active, only items matching the filter are toggled.
|
|
30
|
+
*/
|
|
31
|
+
enableSelectAll?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum number of selected tags to render as Pills. When the selection
|
|
34
|
+
* exceeds this number, the overflow is summarized as a non-removable
|
|
35
|
+
* "+{count} more..." indicator. Omit to render every selected tag.
|
|
36
|
+
*/
|
|
37
|
+
maxDisplayed?: number;
|
|
25
38
|
label?: string;
|
|
26
39
|
description?: ReactNode;
|
|
27
40
|
required?: boolean;
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import Size from "./Types/Size";
|
|
2
2
|
export declare const DEFAULT_CONTROL_SIZE: Size;
|
|
3
3
|
export type ControlSizeTokens = {
|
|
4
|
-
height: number;
|
|
5
4
|
fontSize: number;
|
|
6
|
-
labelFontSize: number;
|
|
7
|
-
supportingFontSize: number;
|
|
8
|
-
placeholderFontSize: number;
|
|
9
|
-
inputPaddingX: number;
|
|
10
|
-
buttonPaddingX: number;
|
|
11
|
-
iconSize: number;
|
|
12
|
-
iconGap: number;
|
|
13
|
-
adornmentWidth: number;
|
|
14
5
|
menuRowHeight: number;
|
|
15
6
|
menuItemPaddingX: number;
|
|
16
|
-
menuGroupFontSize: number;
|
|
17
|
-
switchTrackWidth: number;
|
|
18
|
-
switchTrackHeight: number;
|
|
19
|
-
switchThumbSize: number;
|
|
20
|
-
switchPadding: number;
|
|
21
|
-
switchGap: number;
|
|
22
|
-
checkboxIconSize: number;
|
|
23
|
-
iconButtonPaddingX: number;
|
|
24
|
-
pillHeight: number;
|
|
25
|
-
pillFontSize: number;
|
|
26
|
-
pillPaddingX: number;
|
|
27
|
-
pillIconSize: number;
|
|
28
|
-
pillGap: number;
|
|
29
|
-
segmentedHeight: number;
|
|
30
|
-
segmentedFontSize: number;
|
|
31
|
-
sectionTitleFontSize: number;
|
|
32
|
-
sectionIconSize: number;
|
|
33
7
|
};
|
|
34
8
|
export declare const getControlSizeTokens: (size?: Size) => ControlSizeTokens;
|
|
@@ -1,190 +1,34 @@
|
|
|
1
1
|
export const DEFAULT_CONTROL_SIZE = "sm";
|
|
2
2
|
const CONTROL_SIZE_TOKENS = {
|
|
3
3
|
xxs: {
|
|
4
|
-
height: 24,
|
|
5
4
|
fontSize: 11,
|
|
6
|
-
labelFontSize: 11,
|
|
7
|
-
supportingFontSize: 10,
|
|
8
|
-
placeholderFontSize: 10,
|
|
9
|
-
inputPaddingX: 8,
|
|
10
|
-
buttonPaddingX: 8,
|
|
11
|
-
iconSize: 14,
|
|
12
|
-
iconGap: 4,
|
|
13
|
-
adornmentWidth: 24,
|
|
14
5
|
menuRowHeight: 24,
|
|
15
6
|
menuItemPaddingX: 8,
|
|
16
|
-
menuGroupFontSize: 10,
|
|
17
|
-
switchTrackWidth: 24,
|
|
18
|
-
switchTrackHeight: 14,
|
|
19
|
-
switchThumbSize: 10,
|
|
20
|
-
switchPadding: 2,
|
|
21
|
-
switchGap: 6,
|
|
22
|
-
checkboxIconSize: 12,
|
|
23
|
-
iconButtonPaddingX: 4,
|
|
24
|
-
pillHeight: 18,
|
|
25
|
-
pillFontSize: 9,
|
|
26
|
-
pillPaddingX: 6,
|
|
27
|
-
pillIconSize: 10,
|
|
28
|
-
pillGap: 4,
|
|
29
|
-
segmentedHeight: 24,
|
|
30
|
-
segmentedFontSize: 11,
|
|
31
|
-
sectionTitleFontSize: 12,
|
|
32
|
-
sectionIconSize: 12,
|
|
33
7
|
},
|
|
34
8
|
xs: {
|
|
35
|
-
height: 28,
|
|
36
9
|
fontSize: 12,
|
|
37
|
-
labelFontSize: 12,
|
|
38
|
-
supportingFontSize: 11,
|
|
39
|
-
placeholderFontSize: 11,
|
|
40
|
-
inputPaddingX: 10,
|
|
41
|
-
buttonPaddingX: 12,
|
|
42
|
-
iconSize: 14,
|
|
43
|
-
iconGap: 6,
|
|
44
|
-
adornmentWidth: 28,
|
|
45
10
|
menuRowHeight: 28,
|
|
46
11
|
menuItemPaddingX: 10,
|
|
47
|
-
menuGroupFontSize: 11,
|
|
48
|
-
switchTrackWidth: 28,
|
|
49
|
-
switchTrackHeight: 16,
|
|
50
|
-
switchThumbSize: 12,
|
|
51
|
-
switchPadding: 2,
|
|
52
|
-
switchGap: 8,
|
|
53
|
-
checkboxIconSize: 14,
|
|
54
|
-
iconButtonPaddingX: 4,
|
|
55
|
-
pillHeight: 20,
|
|
56
|
-
pillFontSize: 10,
|
|
57
|
-
pillPaddingX: 8,
|
|
58
|
-
pillIconSize: 12,
|
|
59
|
-
pillGap: 5,
|
|
60
|
-
segmentedHeight: 28,
|
|
61
|
-
segmentedFontSize: 12,
|
|
62
|
-
sectionTitleFontSize: 13,
|
|
63
|
-
sectionIconSize: 12,
|
|
64
12
|
},
|
|
65
13
|
sm: {
|
|
66
|
-
height: 32,
|
|
67
14
|
fontSize: 13,
|
|
68
|
-
labelFontSize: 12,
|
|
69
|
-
supportingFontSize: 11,
|
|
70
|
-
placeholderFontSize: 12,
|
|
71
|
-
inputPaddingX: 12,
|
|
72
|
-
buttonPaddingX: 14,
|
|
73
|
-
iconSize: 16,
|
|
74
|
-
iconGap: 6,
|
|
75
|
-
adornmentWidth: 32,
|
|
76
15
|
menuRowHeight: 32,
|
|
77
16
|
menuItemPaddingX: 12,
|
|
78
|
-
menuGroupFontSize: 11,
|
|
79
|
-
switchTrackWidth: 32,
|
|
80
|
-
switchTrackHeight: 18,
|
|
81
|
-
switchThumbSize: 14,
|
|
82
|
-
switchPadding: 2,
|
|
83
|
-
switchGap: 8,
|
|
84
|
-
checkboxIconSize: 16,
|
|
85
|
-
iconButtonPaddingX: 6,
|
|
86
|
-
pillHeight: 22,
|
|
87
|
-
pillFontSize: 12,
|
|
88
|
-
pillPaddingX: 10,
|
|
89
|
-
pillIconSize: 14,
|
|
90
|
-
pillGap: 5,
|
|
91
|
-
segmentedHeight: 32,
|
|
92
|
-
segmentedFontSize: 13,
|
|
93
|
-
sectionTitleFontSize: 14,
|
|
94
|
-
sectionIconSize: 14,
|
|
95
17
|
},
|
|
96
18
|
md: {
|
|
97
|
-
height: 36,
|
|
98
19
|
fontSize: 14,
|
|
99
|
-
labelFontSize: 13,
|
|
100
|
-
supportingFontSize: 12,
|
|
101
|
-
placeholderFontSize: 13,
|
|
102
|
-
inputPaddingX: 12,
|
|
103
|
-
buttonPaddingX: 16,
|
|
104
|
-
iconSize: 16,
|
|
105
|
-
iconGap: 8,
|
|
106
|
-
adornmentWidth: 36,
|
|
107
20
|
menuRowHeight: 36,
|
|
108
21
|
menuItemPaddingX: 12,
|
|
109
|
-
menuGroupFontSize: 12,
|
|
110
|
-
switchTrackWidth: 36,
|
|
111
|
-
switchTrackHeight: 20,
|
|
112
|
-
switchThumbSize: 16,
|
|
113
|
-
switchPadding: 2,
|
|
114
|
-
switchGap: 10,
|
|
115
|
-
checkboxIconSize: 18,
|
|
116
|
-
iconButtonPaddingX: 8,
|
|
117
|
-
pillHeight: 24,
|
|
118
|
-
pillFontSize: 14,
|
|
119
|
-
pillPaddingX: 12,
|
|
120
|
-
pillIconSize: 16,
|
|
121
|
-
pillGap: 5,
|
|
122
|
-
segmentedHeight: 36,
|
|
123
|
-
segmentedFontSize: 14,
|
|
124
|
-
sectionTitleFontSize: 16,
|
|
125
|
-
sectionIconSize: 18,
|
|
126
22
|
},
|
|
127
23
|
lg: {
|
|
128
|
-
height: 44,
|
|
129
24
|
fontSize: 15,
|
|
130
|
-
labelFontSize: 14,
|
|
131
|
-
supportingFontSize: 13,
|
|
132
|
-
placeholderFontSize: 14,
|
|
133
|
-
inputPaddingX: 14,
|
|
134
|
-
buttonPaddingX: 18,
|
|
135
|
-
iconSize: 18,
|
|
136
|
-
iconGap: 8,
|
|
137
|
-
adornmentWidth: 44,
|
|
138
25
|
menuRowHeight: 44,
|
|
139
26
|
menuItemPaddingX: 14,
|
|
140
|
-
menuGroupFontSize: 13,
|
|
141
|
-
switchTrackWidth: 44,
|
|
142
|
-
switchTrackHeight: 24,
|
|
143
|
-
switchThumbSize: 20,
|
|
144
|
-
switchPadding: 2,
|
|
145
|
-
switchGap: 12,
|
|
146
|
-
checkboxIconSize: 20,
|
|
147
|
-
iconButtonPaddingX: 10,
|
|
148
|
-
pillHeight: 26,
|
|
149
|
-
pillFontSize: 16,
|
|
150
|
-
pillPaddingX: 14,
|
|
151
|
-
pillIconSize: 18,
|
|
152
|
-
pillGap: 5,
|
|
153
|
-
segmentedHeight: 44,
|
|
154
|
-
segmentedFontSize: 15,
|
|
155
|
-
sectionTitleFontSize: 18,
|
|
156
|
-
sectionIconSize: 24,
|
|
157
27
|
},
|
|
158
28
|
xl: {
|
|
159
|
-
height: 52,
|
|
160
29
|
fontSize: 16,
|
|
161
|
-
labelFontSize: 15,
|
|
162
|
-
supportingFontSize: 14,
|
|
163
|
-
placeholderFontSize: 15,
|
|
164
|
-
inputPaddingX: 16,
|
|
165
|
-
buttonPaddingX: 22,
|
|
166
|
-
iconSize: 18,
|
|
167
|
-
iconGap: 10,
|
|
168
|
-
adornmentWidth: 52,
|
|
169
30
|
menuRowHeight: 52,
|
|
170
31
|
menuItemPaddingX: 16,
|
|
171
|
-
menuGroupFontSize: 14,
|
|
172
|
-
switchTrackWidth: 52,
|
|
173
|
-
switchTrackHeight: 28,
|
|
174
|
-
switchThumbSize: 24,
|
|
175
|
-
switchPadding: 2,
|
|
176
|
-
switchGap: 12,
|
|
177
|
-
checkboxIconSize: 22,
|
|
178
|
-
iconButtonPaddingX: 12,
|
|
179
|
-
pillHeight: 28,
|
|
180
|
-
pillFontSize: 18,
|
|
181
|
-
pillPaddingX: 16,
|
|
182
|
-
pillIconSize: 20,
|
|
183
|
-
pillGap: 5,
|
|
184
|
-
segmentedHeight: 52,
|
|
185
|
-
segmentedFontSize: 16,
|
|
186
|
-
sectionTitleFontSize: 20,
|
|
187
|
-
sectionIconSize: 28,
|
|
188
32
|
},
|
|
189
33
|
};
|
|
190
34
|
export const getControlSizeTokens = (size = DEFAULT_CONTROL_SIZE) => CONTROL_SIZE_TOKENS[size];
|
package/dist/core/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export { default as StyledContent } from "./StyledContent";
|
|
|
2
2
|
export { default as StyledFloatContainer } from "./StyledFloatContainer";
|
|
3
3
|
export { default as ArrowButton } from "./ArrowButton";
|
|
4
4
|
export { default as ClearButton } from "./ClearButton";
|
|
5
|
+
export * from "./controlSizes";
|
|
5
6
|
export type { default as Size } from "./Types/Size";
|
|
6
7
|
export type { default as Variant } from "./Types/Variant";
|
package/dist/core/index.js
CHANGED
|
@@ -2,3 +2,4 @@ export { default as StyledContent } from "./StyledContent";
|
|
|
2
2
|
export { default as StyledFloatContainer } from "./StyledFloatContainer";
|
|
3
3
|
export { default as ArrowButton } from "./ArrowButton";
|
|
4
4
|
export { default as ClearButton } from "./ClearButton";
|
|
5
|
+
export * from "./controlSizes";
|
package/dist/theme/variants.js
CHANGED
|
@@ -73,10 +73,6 @@ const lightVariant = {
|
|
|
73
73
|
main: green[700],
|
|
74
74
|
contrastText: "#FFF",
|
|
75
75
|
},
|
|
76
|
-
warning: {
|
|
77
|
-
main: "#ffa726",
|
|
78
|
-
contrastText: "#FFF",
|
|
79
|
-
},
|
|
80
76
|
background: {
|
|
81
77
|
default: "#FFF",
|
|
82
78
|
paper: "#FFF",
|
|
@@ -240,10 +236,6 @@ const darkVariant = merge(lightVariant, {
|
|
|
240
236
|
main: green[500],
|
|
241
237
|
contrastText: "#FFF",
|
|
242
238
|
},
|
|
243
|
-
warning: {
|
|
244
|
-
main: "#ffa726",
|
|
245
|
-
contrastText: "#FFF",
|
|
246
|
-
},
|
|
247
239
|
background: {
|
|
248
240
|
default: "#222222",
|
|
249
241
|
paper: "#333333",
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ReactElement, RefAttributes } from "react";
|
|
2
|
-
import { ChartHandle } from "../ChartUtils";
|
|
3
|
-
import { BarChartProps } from "./BarChart.types";
|
|
4
|
-
export declare const BarChart: <TData>(props: BarChartProps<TData> & RefAttributes<ChartHandle>) => ReactElement | null;
|
|
5
|
-
export default BarChart;
|