@bolio-ui/core 3.0.0-alpha.1 → 3.0.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/Alert/Alert.d.ts +20 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.js +16 -0
- package/dist/BolioUIProvider/index.js +7 -6
- package/dist/Button/index.js +3 -3
- package/dist/ButtonDropdown/index.js +3 -2
- package/dist/Calendar/index.js +2 -2
- package/dist/Chip/Chip.d.ts +17 -0
- package/dist/Chip/ChipContext.d.ts +11 -0
- package/dist/Chip/ChipGroup.d.ts +16 -0
- package/dist/Chip/index.d.ts +9 -0
- package/dist/Chip/index.js +15 -0
- package/dist/ColorInput/index.js +3 -2
- package/dist/Combobox/index.js +3 -2
- package/dist/Command/index.js +9 -8
- package/dist/ContextMenu/index.js +5 -4
- package/dist/CssBaseline/index.js +2 -2
- package/dist/DatePicker/index.js +4 -3
- package/dist/DateRangePicker/index.js +4 -3
- package/dist/Drawer/index.js +6 -5
- package/dist/Grid/Grid.d.ts +16 -16
- package/dist/Grid/GridContainer.d.ts +16 -16
- package/dist/ImageZoom/ImageZoom.d.ts +14 -0
- package/dist/ImageZoom/index.d.ts +3 -0
- package/dist/ImageZoom/index.js +17 -0
- package/dist/Mention/Mention.d.ts +25 -0
- package/dist/Mention/index.d.ts +3 -0
- package/dist/Mention/index.js +17 -0
- package/dist/Menu/index.js +4 -3
- package/dist/Modal/index.js +8 -7
- package/dist/Note/Note.d.ts +10 -0
- package/dist/Note/index.js +3 -2
- package/dist/Popover/index.js +4 -3
- package/dist/Select/index.js +7 -6
- package/dist/Splitter/Splitter.d.ts +14 -0
- package/dist/Splitter/SplitterContext.d.ts +6 -0
- package/dist/Splitter/SplitterPanel.d.ts +13 -0
- package/dist/Splitter/index.d.ts +9 -0
- package/dist/Splitter/index.js +14 -0
- package/dist/Table/Table.d.ts +11 -1
- package/dist/Table/TableBody.d.ts +8 -2
- package/dist/Table/TableColumn.d.ts +2 -0
- package/dist/Table/TableHead.d.ts +9 -1
- package/dist/Table/TableSelectBox.d.ts +9 -0
- package/dist/Table/TableTypes.d.ts +8 -0
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +3 -3
- package/dist/Toolbar/Toolbar.d.ts +11 -0
- package/dist/Toolbar/ToolbarSeparator.d.ts +4 -0
- package/dist/Toolbar/index.d.ts +9 -0
- package/dist/Toolbar/index.js +14 -0
- package/dist/Tooltip/index.js +3 -2
- package/dist/Tour/Tour.d.ts +26 -0
- package/dist/Tour/index.d.ts +3 -0
- package/dist/Tour/index.js +24 -0
- package/dist/{chunk-PGQYW6YF.js → chunk-25NFUHLR.js} +12 -8
- package/dist/{chunk-AFBCMW2I.js → chunk-26KDVRFS.js} +1 -3
- package/dist/{chunk-4ZGR7UMX.js → chunk-4DH6SOK4.js} +10 -6
- package/dist/chunk-CGS2MT3G.js +10 -0
- package/dist/{chunk-6ZBFUZSL.js → chunk-CU6SNPIM.js} +25 -22
- package/dist/chunk-CY5KTINE.js +107 -0
- package/dist/{chunk-IJGIEX5J.js → chunk-DEMQXB46.js} +6 -2
- package/dist/{chunk-AVO2SK2I.js → chunk-DYYSUJ35.js} +2 -2
- package/dist/chunk-EUYSKHRS.js +13 -0
- package/dist/chunk-FFEAKF3A.js +220 -0
- package/dist/{chunk-XLPOECCE.js → chunk-FLUNRVVG.js} +12 -7
- package/dist/chunk-FQWH4PDK.js +165 -0
- package/dist/chunk-FSO65ZAH.js +249 -0
- package/dist/{chunk-2EYJZXS4.js → chunk-ICACLCJR.js} +13 -8
- package/dist/{chunk-XF4TPE2W.js → chunk-IL7L3BEL.js} +7 -2
- package/dist/{chunk-MGHMAZRL.js → chunk-KRSISARC.js} +7 -3
- package/dist/{chunk-4QA7Z7VP.js → chunk-M64V32WO.js} +6 -3
- package/dist/chunk-Q3I54DUS.js +131 -0
- package/dist/chunk-REWKR7S3.js +109 -0
- package/dist/{chunk-SGWX6H4Y.js → chunk-RWRFOGCU.js} +6 -2
- package/dist/chunk-SJVWKNGY.js +236 -0
- package/dist/{chunk-P245HSVB.js → chunk-TLVSZCKU.js} +2 -1
- package/dist/{chunk-AG2NWQYL.js → chunk-WCTANCLG.js} +3 -1
- package/dist/{chunk-TDJGMSGT.js → chunk-WIIDIZYK.js} +3 -1
- package/dist/{chunk-DIMJQLWY.js → chunk-XUNC7RB7.js} +9 -5
- package/dist/{chunk-GGCVPMXO.js → chunk-Y432C24Z.js} +2 -2
- package/dist/{chunk-TKICX5R6.js → chunk-Y5CFWIGV.js} +227 -35
- package/dist/{chunk-GYFW5NLU.js → chunk-YLLPYRJH.js} +34 -11
- package/dist/css/Alert.css +53 -0
- package/dist/css/ButtonDropdown-ButtonDropdownItem.css +0 -1
- package/dist/css/ButtonGroup.css +0 -1
- package/dist/css/Calendar.css +0 -1
- package/dist/css/Carousel.css +0 -1
- package/dist/css/Chip-ChipGroup.css +8 -0
- package/dist/css/Chip.css +65 -0
- package/dist/css/ColorInput.css +7 -3
- package/dist/css/ColorPicker.css +5 -4
- package/dist/css/Combobox.css +1 -2
- package/dist/css/DatePicker.css +1 -3
- package/dist/css/DateRangePicker.css +7 -3
- package/dist/css/Dropzone.css +0 -3
- package/dist/css/Fieldset-FieldsetGroup.css +0 -1
- package/dist/css/ImageZoom.css +93 -0
- package/dist/css/Input.css +1 -1
- package/dist/css/Mention.css +93 -0
- package/dist/css/Menu-MenuList.css +0 -1
- package/dist/css/Modal-ModalAction.css +6 -1
- package/dist/css/Modal-ModalActions.css +9 -2
- package/dist/css/NumberInput.css +1 -1
- package/dist/css/PinInput.css +1 -1
- package/dist/css/Radio.css +0 -1
- package/dist/css/SegmentedControl.css +0 -1
- package/dist/css/Select-SelectDropdown.css +0 -1
- package/dist/css/Select-SelectOption.css +0 -1
- package/dist/css/Select.css +0 -1
- package/dist/css/Splitter.css +77 -0
- package/dist/css/Table-TableBody.css +10 -0
- package/dist/css/Table-TableHead.css +41 -0
- package/dist/css/Table-TableSelectBox.css +11 -0
- package/dist/css/TagsInput.css +1 -2
- package/dist/css/Textarea.css +1 -1
- package/dist/css/Toggle.css +0 -1
- package/dist/css/Toolbar.css +32 -0
- package/dist/css/Tour.css +81 -0
- package/dist/css/use-toasts-toast-item.css +0 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +92 -62
- package/dist/styles.css +3571 -2997
- package/dist/utils/surface.d.ts +6 -0
- package/esm/Alert/Alert.d.ts +20 -0
- package/esm/Alert/index.d.ts +3 -0
- package/esm/Alert/index.js +16 -0
- package/esm/BolioUIProvider/index.js +6 -5
- package/esm/Button/index.js +2 -2
- package/esm/ButtonDropdown/index.js +2 -1
- package/esm/Calendar/index.js +1 -1
- package/esm/Chip/Chip.d.ts +17 -0
- package/esm/Chip/ChipContext.d.ts +11 -0
- package/esm/Chip/ChipGroup.d.ts +16 -0
- package/esm/Chip/index.d.ts +9 -0
- package/esm/Chip/index.js +15 -0
- package/esm/ColorInput/index.js +2 -1
- package/esm/Combobox/index.js +2 -1
- package/esm/Command/index.js +8 -7
- package/esm/ContextMenu/index.js +4 -3
- package/esm/CssBaseline/index.js +1 -1
- package/esm/DatePicker/index.js +3 -2
- package/esm/DateRangePicker/index.js +3 -2
- package/esm/Drawer/index.js +5 -4
- package/esm/Grid/Grid.d.ts +16 -16
- package/esm/Grid/GridContainer.d.ts +16 -16
- package/esm/ImageZoom/ImageZoom.d.ts +14 -0
- package/esm/ImageZoom/index.d.ts +3 -0
- package/esm/ImageZoom/index.js +17 -0
- package/esm/Mention/Mention.d.ts +25 -0
- package/esm/Mention/index.d.ts +3 -0
- package/esm/Mention/index.js +17 -0
- package/esm/Menu/index.js +3 -2
- package/esm/Modal/index.js +7 -6
- package/esm/Note/Note.d.ts +10 -0
- package/esm/Note/index.js +2 -1
- package/esm/Popover/index.js +3 -2
- package/esm/Select/index.js +6 -5
- package/esm/Splitter/Splitter.d.ts +14 -0
- package/esm/Splitter/SplitterContext.d.ts +6 -0
- package/esm/Splitter/SplitterPanel.d.ts +13 -0
- package/esm/Splitter/index.d.ts +9 -0
- package/esm/Splitter/index.js +14 -0
- package/esm/Table/Table.d.ts +11 -1
- package/esm/Table/TableBody.d.ts +8 -2
- package/esm/Table/TableColumn.d.ts +2 -0
- package/esm/Table/TableHead.d.ts +9 -1
- package/esm/Table/TableSelectBox.d.ts +9 -0
- package/esm/Table/TableTypes.d.ts +8 -0
- package/esm/Table/index.d.ts +1 -1
- package/esm/Table/index.js +2 -2
- package/esm/Toolbar/Toolbar.d.ts +11 -0
- package/esm/Toolbar/ToolbarSeparator.d.ts +4 -0
- package/esm/Toolbar/index.d.ts +9 -0
- package/esm/Toolbar/index.js +14 -0
- package/esm/Tooltip/index.js +2 -1
- package/esm/Tour/Tour.d.ts +26 -0
- package/esm/Tour/index.d.ts +3 -0
- package/esm/Tour/index.js +24 -0
- package/esm/{chunk-PGQYW6YF.js → chunk-25NFUHLR.js} +7 -3
- package/esm/{chunk-AFBCMW2I.js → chunk-26KDVRFS.js} +2 -4
- package/esm/{chunk-4ZGR7UMX.js → chunk-4DH6SOK4.js} +10 -6
- package/esm/chunk-CGS2MT3G.js +10 -0
- package/esm/{chunk-6ZBFUZSL.js → chunk-CU6SNPIM.js} +15 -12
- package/esm/chunk-CY5KTINE.js +107 -0
- package/esm/{chunk-IJGIEX5J.js → chunk-DEMQXB46.js} +6 -2
- package/esm/{chunk-AVO2SK2I.js → chunk-DYYSUJ35.js} +1 -1
- package/esm/chunk-EUYSKHRS.js +13 -0
- package/esm/chunk-FFEAKF3A.js +220 -0
- package/esm/{chunk-XLPOECCE.js → chunk-FLUNRVVG.js} +11 -6
- package/esm/chunk-FQWH4PDK.js +165 -0
- package/esm/chunk-FSO65ZAH.js +249 -0
- package/esm/{chunk-2EYJZXS4.js → chunk-ICACLCJR.js} +8 -3
- package/esm/{chunk-XF4TPE2W.js → chunk-IL7L3BEL.js} +7 -2
- package/esm/{chunk-MGHMAZRL.js → chunk-KRSISARC.js} +7 -3
- package/esm/{chunk-4QA7Z7VP.js → chunk-M64V32WO.js} +5 -2
- package/esm/chunk-Q3I54DUS.js +131 -0
- package/esm/chunk-REWKR7S3.js +109 -0
- package/esm/{chunk-SGWX6H4Y.js → chunk-RWRFOGCU.js} +6 -2
- package/esm/chunk-SJVWKNGY.js +236 -0
- package/esm/{chunk-P245HSVB.js → chunk-TLVSZCKU.js} +2 -1
- package/esm/{chunk-AG2NWQYL.js → chunk-WCTANCLG.js} +3 -1
- package/esm/{chunk-TDJGMSGT.js → chunk-WIIDIZYK.js} +3 -1
- package/esm/{chunk-DIMJQLWY.js → chunk-XUNC7RB7.js} +9 -5
- package/esm/{chunk-GGCVPMXO.js → chunk-Y432C24Z.js} +1 -1
- package/esm/chunk-Y5CFWIGV.js +543 -0
- package/esm/{chunk-GYFW5NLU.js → chunk-YLLPYRJH.js} +30 -7
- package/esm/css/Alert.css +53 -0
- package/esm/css/ButtonDropdown-ButtonDropdownItem.css +0 -1
- package/esm/css/ButtonGroup.css +0 -1
- package/esm/css/Calendar.css +0 -1
- package/esm/css/Carousel.css +0 -1
- package/esm/css/Chip-ChipGroup.css +8 -0
- package/esm/css/Chip.css +65 -0
- package/esm/css/ColorInput.css +7 -3
- package/esm/css/ColorPicker.css +5 -4
- package/esm/css/Combobox.css +1 -2
- package/esm/css/DatePicker.css +1 -3
- package/esm/css/DateRangePicker.css +7 -3
- package/esm/css/Dropzone.css +0 -3
- package/esm/css/Fieldset-FieldsetGroup.css +0 -1
- package/esm/css/ImageZoom.css +93 -0
- package/esm/css/Input.css +1 -1
- package/esm/css/Mention.css +93 -0
- package/esm/css/Menu-MenuList.css +0 -1
- package/esm/css/Modal-ModalAction.css +6 -1
- package/esm/css/Modal-ModalActions.css +9 -2
- package/esm/css/NumberInput.css +1 -1
- package/esm/css/PinInput.css +1 -1
- package/esm/css/Radio.css +0 -1
- package/esm/css/SegmentedControl.css +0 -1
- package/esm/css/Select-SelectDropdown.css +0 -1
- package/esm/css/Select-SelectOption.css +0 -1
- package/esm/css/Select.css +0 -1
- package/esm/css/Splitter.css +77 -0
- package/esm/css/Table-TableBody.css +10 -0
- package/esm/css/Table-TableHead.css +41 -0
- package/esm/css/Table-TableSelectBox.css +11 -0
- package/esm/css/TagsInput.css +1 -2
- package/esm/css/Textarea.css +1 -1
- package/esm/css/Toggle.css +0 -1
- package/esm/css/Toolbar.css +32 -0
- package/esm/css/Tour.css +81 -0
- package/esm/css/use-toasts-toast-item.css +0 -1
- package/esm/index.d.ts +15 -1
- package/esm/index.js +109 -79
- package/esm/styles.css +3206 -2632
- package/esm/utils/surface.d.ts +6 -0
- package/package.json +1 -1
- package/esm/chunk-TKICX5R6.js +0 -351
- package/dist/{chunk-DXHNQANX.js → chunk-TPZUTHTQ.js} +3 -3
- package/dist/{chunk-TKIUVNKP.js → chunk-XKJDF225.js} +2 -2
- package/esm/{chunk-DXHNQANX.js → chunk-TPZUTHTQ.js} +3 -3
- package/esm/{chunk-TKIUVNKP.js → chunk-XKJDF225.js} +3 -3
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
|
|
3
|
+
var _chunkGJZT47MPjs = require('./chunk-GJZT47MP.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkMAICNLTYjs = require('./chunk-MAICNLTY.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkV5I4ORQQjs = require('./chunk-V5I4ORQQ.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunk5KUROAEPjs = require('./chunk-5KUROAEP.js');
|
|
14
|
+
|
|
15
|
+
// core/Chip/Chip.tsx
|
|
16
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
17
|
+
|
|
18
|
+
// core/Chip/ChipContext.ts
|
|
19
|
+
|
|
20
|
+
var ChipContext = _react2.default.createContext(null);
|
|
21
|
+
var useChipContext = () => _react2.default.useContext(ChipContext);
|
|
22
|
+
|
|
23
|
+
// css-module-source:/Users/brunnoandrade/Desktop/BolioUI/bolio-ui/core/Chip/Chip.module.css.bolio-css-module-source
|
|
24
|
+
var Chip_module_css_default = { "chip": "Chip-module_chip__r494r", "input": "Chip-module_input__GhNGk", "text": "Chip-module_text__sYRMh" };
|
|
25
|
+
|
|
26
|
+
// core/Chip/Chip.tsx
|
|
27
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
28
|
+
var ChipComponent = _react2.default.forwardRef(
|
|
29
|
+
({
|
|
30
|
+
value,
|
|
31
|
+
checked: customChecked,
|
|
32
|
+
initialChecked = false,
|
|
33
|
+
onChange,
|
|
34
|
+
type = "primary",
|
|
35
|
+
disabled = false,
|
|
36
|
+
className = "",
|
|
37
|
+
children,
|
|
38
|
+
style,
|
|
39
|
+
...props
|
|
40
|
+
}, ref) => {
|
|
41
|
+
const theme = _chunkV5I4ORQQjs.use_theme_default.call(void 0, );
|
|
42
|
+
const { SCALES } = _chunkMAICNLTYjs.use_scale_default.call(void 0, );
|
|
43
|
+
const group = useChipContext();
|
|
44
|
+
const [selfChecked, setSelfChecked] = _react.useState.call(void 0, initialChecked);
|
|
45
|
+
const checked = group ? group.value.includes(value) : customChecked !== void 0 ? customChecked : selfChecked;
|
|
46
|
+
const changeHandler = (event) => {
|
|
47
|
+
if (group) {
|
|
48
|
+
if (group.toggle) group.toggle(value);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
setSelfChecked(event.target.checked);
|
|
52
|
+
if (onChange) onChange(event.target.checked);
|
|
53
|
+
};
|
|
54
|
+
const { bg, color, border } = _chunkGJZT47MPjs.getVariantColors.call(void 0, theme.palette, type, "light");
|
|
55
|
+
const chipStyle = {
|
|
56
|
+
height: SCALES.height(2),
|
|
57
|
+
margin: `${SCALES.mt(0)} ${SCALES.mr(0)} ${SCALES.mb(0)} ${SCALES.ml(0)}`,
|
|
58
|
+
fontSize: SCALES.font(0.875),
|
|
59
|
+
"--chip-color": theme.palette.accents_6,
|
|
60
|
+
"--chip-border": theme.palette.accents_3,
|
|
61
|
+
"--chip-hover-bg": theme.palette.accents_1,
|
|
62
|
+
"--chip-checked-bg": bg,
|
|
63
|
+
"--chip-checked-color": color,
|
|
64
|
+
"--chip-checked-border": border,
|
|
65
|
+
"--chip-focus": theme.palette[type],
|
|
66
|
+
...style
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: _chunk5KUROAEPjs.use_classes_default.call(void 0, Chip_module_css_default.chip, className), style: chipStyle, children: [
|
|
69
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
70
|
+
"input",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
type: group && !group.multiple ? "radio" : "checkbox",
|
|
74
|
+
className: Chip_module_css_default.input,
|
|
75
|
+
name: group == null ? void 0 : group.name,
|
|
76
|
+
value,
|
|
77
|
+
checked,
|
|
78
|
+
disabled: disabled || (group == null ? void 0 : group.disabled),
|
|
79
|
+
onChange: changeHandler,
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: Chip_module_css_default.text, children: [
|
|
84
|
+
checked && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
85
|
+
"svg",
|
|
86
|
+
{
|
|
87
|
+
viewBox: "0 0 24 24",
|
|
88
|
+
width: "14",
|
|
89
|
+
height: "14",
|
|
90
|
+
fill: "none",
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
strokeWidth: "3",
|
|
93
|
+
strokeLinecap: "round",
|
|
94
|
+
strokeLinejoin: "round",
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "m5 12 5 5L20 7" })
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
children
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
ChipComponent.displayName = "BolioUIChip";
|
|
105
|
+
var Chip = _chunkMAICNLTYjs.with_scale_default.call(void 0, ChipComponent);
|
|
106
|
+
var Chip_default = Chip;
|
|
107
|
+
|
|
108
|
+
// core/Chip/ChipGroup.tsx
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
// css-module-source:/Users/brunnoandrade/Desktop/BolioUI/bolio-ui/core/Chip/ChipGroup.module.css.bolio-css-module-source
|
|
112
|
+
var ChipGroup_module_css_default = { "group": "ChipGroup-module_group__6ARIk" };
|
|
113
|
+
|
|
114
|
+
// core/Chip/ChipGroup.tsx
|
|
115
|
+
|
|
116
|
+
var ChipGroup = _react2.default.forwardRef(
|
|
117
|
+
({
|
|
118
|
+
value: customValue,
|
|
119
|
+
initialValue = [],
|
|
120
|
+
onChange,
|
|
121
|
+
multiple = false,
|
|
122
|
+
disabled = false,
|
|
123
|
+
className = "",
|
|
124
|
+
children,
|
|
125
|
+
...props
|
|
126
|
+
}, ref) => {
|
|
127
|
+
const name = _react.useId.call(void 0, );
|
|
128
|
+
const [selfValue, setSelfValue] = _react.useState.call(void 0, initialValue);
|
|
129
|
+
const value = customValue !== void 0 ? customValue : selfValue;
|
|
130
|
+
const providerValue = _react.useMemo.call(void 0,
|
|
131
|
+
() => ({
|
|
132
|
+
name,
|
|
133
|
+
multiple,
|
|
134
|
+
value,
|
|
135
|
+
disabled,
|
|
136
|
+
toggle: (chip) => {
|
|
137
|
+
const next = !multiple ? [chip] : value.includes(chip) ? value.filter((v) => v !== chip) : [...value, chip];
|
|
138
|
+
setSelfValue(next);
|
|
139
|
+
if (onChange) onChange(next);
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
[name, multiple, value, disabled, onChange]
|
|
143
|
+
);
|
|
144
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChipContext.Provider, { value: providerValue, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
ref,
|
|
148
|
+
role: multiple ? "group" : "radiogroup",
|
|
149
|
+
className: _chunk5KUROAEPjs.use_classes_default.call(void 0, ChipGroup_module_css_default.group, className),
|
|
150
|
+
...props,
|
|
151
|
+
children
|
|
152
|
+
}
|
|
153
|
+
) });
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
ChipGroup.displayName = "BolioUIChipGroup";
|
|
157
|
+
var ChipGroup_default = ChipGroup;
|
|
158
|
+
|
|
159
|
+
// core/Chip/index.ts
|
|
160
|
+
Chip_default.Group = ChipGroup_default;
|
|
161
|
+
var Chip_default2 = Chip_default;
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
exports.Chip_default = Chip_default2;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
|
|
3
|
+
var _chunkKBZEYKCZjs = require('./chunk-KBZEYKCZ.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkEUYSKHRSjs = require('./chunk-EUYSKHRS.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkMAICNLTYjs = require('./chunk-MAICNLTY.js');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkV5I4ORQQjs = require('./chunk-V5I4ORQQ.js');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunk5KUROAEPjs = require('./chunk-5KUROAEP.js');
|
|
18
|
+
|
|
19
|
+
// core/Mention/Mention.tsx
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
28
|
+
|
|
29
|
+
// css-module-source:/Users/brunnoandrade/Desktop/BolioUI/bolio-ui/core/Mention/Mention.module.css.bolio-css-module-source
|
|
30
|
+
var Mention_module_css_default = { "mention": "Mention-module_mention__R3-5t", "field": "Mention-module_field__U5FXf", "list": "Mention-module_list__QQ5RM", "empty": "Mention-module_empty__YkZOO", "option": "Mention-module_option__8CupI", "active": "Mention-module_active__8GmDl", "disabled": "Mention-module_disabled__4PL94" };
|
|
31
|
+
|
|
32
|
+
// core/Mention/Mention.tsx
|
|
33
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
34
|
+
var getLabel = (option) => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = option.label) != null ? _a : option.value;
|
|
37
|
+
};
|
|
38
|
+
var escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
39
|
+
var MentionComponent = _react2.default.forwardRef(
|
|
40
|
+
({
|
|
41
|
+
options,
|
|
42
|
+
trigger = "@",
|
|
43
|
+
value: customValue,
|
|
44
|
+
initialValue = "",
|
|
45
|
+
onChange,
|
|
46
|
+
onSelect,
|
|
47
|
+
placeholder,
|
|
48
|
+
rows = 3,
|
|
49
|
+
disabled = false,
|
|
50
|
+
type = "default",
|
|
51
|
+
emptyText = "No results",
|
|
52
|
+
className = "",
|
|
53
|
+
onKeyDown,
|
|
54
|
+
onBlur,
|
|
55
|
+
style,
|
|
56
|
+
...props
|
|
57
|
+
}, ref) => {
|
|
58
|
+
const theme = _chunkV5I4ORQQjs.use_theme_default.call(void 0, );
|
|
59
|
+
const surface = _chunkEUYSKHRSjs.getSurface.call(void 0, theme);
|
|
60
|
+
const { SCALES } = _chunkMAICNLTYjs.use_scale_default.call(void 0, );
|
|
61
|
+
const colors = _chunkKBZEYKCZjs.getColors.call(void 0, theme.palette, type, disabled, {});
|
|
62
|
+
const baseId = _react.useId.call(void 0, );
|
|
63
|
+
const listId = `${baseId}-list`;
|
|
64
|
+
const optionId = (index) => `${baseId}-option-${index}`;
|
|
65
|
+
const field = _react.useRef.call(void 0, null);
|
|
66
|
+
const setRef = (node) => {
|
|
67
|
+
field.current = node;
|
|
68
|
+
if (typeof ref === "function") ref(node);
|
|
69
|
+
else if (ref) ref.current = node;
|
|
70
|
+
};
|
|
71
|
+
const isControlled = customValue !== void 0;
|
|
72
|
+
const [selfValue, setSelfValue] = _react.useState.call(void 0, initialValue);
|
|
73
|
+
const text = isControlled ? customValue : selfValue;
|
|
74
|
+
const [caret, setCaret] = _react.useState.call(void 0, text.length);
|
|
75
|
+
const [dismissed, setDismissed] = _react.useState.call(void 0, false);
|
|
76
|
+
const [activeIndex, setActiveIndex] = _react.useState.call(void 0, -1);
|
|
77
|
+
const pendingCaret = _react.useRef.call(void 0, null);
|
|
78
|
+
const token = _react.useMemo.call(void 0, () => {
|
|
79
|
+
const t = escapeRegExp(trigger);
|
|
80
|
+
const match = new RegExp(`(^|\\s)${t}([^\\s${t}]*)$`).exec(
|
|
81
|
+
text.slice(0, caret)
|
|
82
|
+
);
|
|
83
|
+
return match ? { query: match[2], start: caret - match[2].length - trigger.length } : null;
|
|
84
|
+
}, [text, caret, trigger]);
|
|
85
|
+
const visible = _react.useMemo.call(void 0,
|
|
86
|
+
() => token ? options.filter(
|
|
87
|
+
(option) => getLabel(option).toLowerCase().includes(token.query.toLowerCase())
|
|
88
|
+
) : [],
|
|
89
|
+
[options, token]
|
|
90
|
+
);
|
|
91
|
+
const open = !!token && !dismissed && !disabled;
|
|
92
|
+
const expanded = open && visible.length > 0;
|
|
93
|
+
_react.useEffect.call(void 0, () => {
|
|
94
|
+
setActiveIndex(
|
|
95
|
+
open ? visible.findIndex((option) => !option.disabled) : -1
|
|
96
|
+
);
|
|
97
|
+
}, [open, token == null ? void 0 : token.query]);
|
|
98
|
+
_react.useEffect.call(void 0, () => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
if (activeIndex < 0) return;
|
|
101
|
+
(_b = (_a = document.getElementById(optionId(activeIndex))) == null ? void 0 : _a.scrollIntoView) == null ? void 0 : _b.call(_a, { block: "nearest" });
|
|
102
|
+
}, [activeIndex]);
|
|
103
|
+
_react.useLayoutEffect.call(void 0, () => {
|
|
104
|
+
if (pendingCaret.current === null || !field.current) return;
|
|
105
|
+
field.current.setSelectionRange(
|
|
106
|
+
pendingCaret.current,
|
|
107
|
+
pendingCaret.current
|
|
108
|
+
);
|
|
109
|
+
pendingCaret.current = null;
|
|
110
|
+
}, [text]);
|
|
111
|
+
const update = (next) => {
|
|
112
|
+
if (!isControlled) setSelfValue(next);
|
|
113
|
+
if (onChange) onChange(next);
|
|
114
|
+
};
|
|
115
|
+
const choose = (option) => {
|
|
116
|
+
if (option.disabled || !token) return;
|
|
117
|
+
const inserted = `${trigger}${option.value} `;
|
|
118
|
+
const next = text.slice(0, token.start) + inserted + text.slice(caret);
|
|
119
|
+
const position = token.start + inserted.length;
|
|
120
|
+
pendingCaret.current = position;
|
|
121
|
+
setCaret(position);
|
|
122
|
+
update(next);
|
|
123
|
+
if (onSelect) onSelect(option);
|
|
124
|
+
};
|
|
125
|
+
const changeHandler = (event) => {
|
|
126
|
+
setCaret(event.target.selectionStart);
|
|
127
|
+
setDismissed(false);
|
|
128
|
+
update(event.target.value);
|
|
129
|
+
};
|
|
130
|
+
const move = (direction) => {
|
|
131
|
+
const count = visible.length;
|
|
132
|
+
let index = activeIndex;
|
|
133
|
+
for (let step = 0; step < count; step++) {
|
|
134
|
+
index = (index + direction + count) % count;
|
|
135
|
+
if (!visible[index].disabled) return setActiveIndex(index);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const keyDownHandler = (event) => {
|
|
139
|
+
if (onKeyDown) onKeyDown(event);
|
|
140
|
+
if (event.defaultPrevented || !expanded) return;
|
|
141
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
move(event.key === "ArrowDown" ? 1 : -1);
|
|
144
|
+
} else if ((event.key === "Enter" || event.key === "Tab") && activeIndex >= 0) {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
choose(visible[activeIndex]);
|
|
147
|
+
} else if (event.key === "Escape") {
|
|
148
|
+
event.preventDefault();
|
|
149
|
+
setDismissed(true);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const syncCaret = (event) => {
|
|
153
|
+
const next = event.currentTarget.selectionStart;
|
|
154
|
+
if (next !== caret) {
|
|
155
|
+
setCaret(next);
|
|
156
|
+
setDismissed(false);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const blurHandler = (event) => {
|
|
160
|
+
if (onBlur) onBlur(event);
|
|
161
|
+
setDismissed(true);
|
|
162
|
+
};
|
|
163
|
+
const mentionStyle = {
|
|
164
|
+
"--mention-font-size": SCALES.font(0.875),
|
|
165
|
+
"--mention-width": SCALES.width(1, "100%"),
|
|
166
|
+
"--mention-height": SCALES.height(1, "auto"),
|
|
167
|
+
"--mention-margin-top": SCALES.mt(0),
|
|
168
|
+
"--mention-margin-right": SCALES.mr(0),
|
|
169
|
+
"--mention-margin-bottom": SCALES.mb(0),
|
|
170
|
+
"--mention-margin-left": SCALES.ml(0),
|
|
171
|
+
"--mention-text-color": theme.palette.foreground,
|
|
172
|
+
"--mention-bg": surface.bg,
|
|
173
|
+
"--mention-border-color": theme.palette.border,
|
|
174
|
+
"--mention-radius": theme.layout.radius,
|
|
175
|
+
"--mention-field-color": colors.color,
|
|
176
|
+
"--mention-field-bg": colors.bgColor,
|
|
177
|
+
"--mention-field-border": colors.borderColor,
|
|
178
|
+
"--mention-field-hover-bg": colors.hoverBgColor,
|
|
179
|
+
"--mention-field-hover-border": colors.hoverBorder,
|
|
180
|
+
"--mention-focus-border-color": colors.focusBorder,
|
|
181
|
+
"--mention-placeholder-color": colors.placeholderColor,
|
|
182
|
+
"--mention-shadow": surface.shadow,
|
|
183
|
+
"--mention-active-bg": surface.hover,
|
|
184
|
+
"--mention-empty-color": theme.palette.accents_5,
|
|
185
|
+
...style
|
|
186
|
+
};
|
|
187
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
className: _chunk5KUROAEPjs.use_classes_default.call(void 0, Mention_module_css_default.mention, className),
|
|
191
|
+
style: mentionStyle,
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
194
|
+
"textarea",
|
|
195
|
+
{
|
|
196
|
+
ref: setRef,
|
|
197
|
+
"aria-autocomplete": "list",
|
|
198
|
+
"aria-controls": expanded ? listId : void 0,
|
|
199
|
+
"aria-activedescendant": expanded && activeIndex >= 0 ? optionId(activeIndex) : void 0,
|
|
200
|
+
value: text,
|
|
201
|
+
rows,
|
|
202
|
+
placeholder,
|
|
203
|
+
disabled,
|
|
204
|
+
onChange: changeHandler,
|
|
205
|
+
onKeyDown: keyDownHandler,
|
|
206
|
+
onKeyUp: syncCaret,
|
|
207
|
+
onClick: syncCaret,
|
|
208
|
+
onSelect: syncCaret,
|
|
209
|
+
onBlur: blurHandler,
|
|
210
|
+
className: Mention_module_css_default.field,
|
|
211
|
+
...props
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
expanded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { id: listId, role: "listbox", className: Mention_module_css_default.list, children: visible.map((option, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
215
|
+
"li",
|
|
216
|
+
{
|
|
217
|
+
id: optionId(index),
|
|
218
|
+
role: "option",
|
|
219
|
+
"aria-selected": index === activeIndex,
|
|
220
|
+
"aria-disabled": option.disabled || void 0,
|
|
221
|
+
className: _chunk5KUROAEPjs.joinClasses.call(void 0, Mention_module_css_default.option, {
|
|
222
|
+
[Mention_module_css_default.active]: index === activeIndex,
|
|
223
|
+
[Mention_module_css_default.disabled]: option.disabled
|
|
224
|
+
}),
|
|
225
|
+
onMouseDown: (event) => {
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
choose(option);
|
|
228
|
+
},
|
|
229
|
+
onMouseMove: () => !option.disabled && setActiveIndex(index),
|
|
230
|
+
children: getLabel(option)
|
|
231
|
+
},
|
|
232
|
+
option.value
|
|
233
|
+
)) }),
|
|
234
|
+
open && visible.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: Mention_module_css_default.empty, children: emptyText })
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
MentionComponent.displayName = "BolioUIMention";
|
|
241
|
+
var Mention = _chunkMAICNLTYjs.with_scale_default.call(void 0, MentionComponent);
|
|
242
|
+
var Mention_default = Mention;
|
|
243
|
+
|
|
244
|
+
// core/Mention/index.ts
|
|
245
|
+
var Mention_default2 = Mention_default;
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
exports.Mention_default = Mention_default2;
|
|
@@ -6,12 +6,15 @@ var _chunkKBZEYKCZjs = require('./chunk-KBZEYKCZ.js');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTLVSZCKUjs = require('./chunk-TLVSZCKU.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkDGXZP4VJjs = require('./chunk-DGXZP4VJ.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
var _chunkEUYSKHRSjs = require('./chunk-EUYSKHRS.js');
|
|
16
|
+
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
var _chunkMAICNLTYjs = require('./chunk-MAICNLTY.js');
|
|
17
20
|
|
|
@@ -52,6 +55,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
52
55
|
...props
|
|
53
56
|
}, ref) => {
|
|
54
57
|
const theme = _chunkV5I4ORQQjs.use_theme_default.call(void 0, );
|
|
58
|
+
const surface = _chunkEUYSKHRSjs.getSurface.call(void 0, theme);
|
|
55
59
|
const { SCALES } = _chunkMAICNLTYjs.use_scale_default.call(void 0, );
|
|
56
60
|
const colors = _chunkKBZEYKCZjs.getColors.call(void 0, theme.palette, type, disabled, {
|
|
57
61
|
filled,
|
|
@@ -62,7 +66,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
62
66
|
const isControlled = customValue !== void 0;
|
|
63
67
|
const [selfValue, setSelfValue] = _react.useState.call(void 0, initialValue);
|
|
64
68
|
const selected = isControlled ? customValue : selfValue;
|
|
65
|
-
const selectedText = selected ?
|
|
69
|
+
const selectedText = selected ? _chunkTLVSZCKUjs.toISO.call(void 0, selected) : "";
|
|
66
70
|
const [text, setText] = _react.useState.call(void 0, selectedText);
|
|
67
71
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
68
72
|
_react.useEffect.call(void 0, () => {
|
|
@@ -73,7 +77,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
73
77
|
const buttonRef = _react.useRef.call(void 0, null);
|
|
74
78
|
_react.useImperativeHandle.call(void 0, ref, () => inputRef.current);
|
|
75
79
|
_chunkDGXZP4VJjs.use_click_away_default.call(void 0, rootRef, () => setOpen(false));
|
|
76
|
-
const isInRange = (date) => !(min && date <
|
|
80
|
+
const isInRange = (date) => !(min && date < _chunkTLVSZCKUjs.startOfDay.call(void 0, min) || max && date > _chunkTLVSZCKUjs.startOfDay.call(void 0, max));
|
|
77
81
|
const commit = (date) => {
|
|
78
82
|
if (!isControlled) setSelfValue(date);
|
|
79
83
|
if (onChange) onChange(date);
|
|
@@ -82,7 +86,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
82
86
|
const next = event.target.value;
|
|
83
87
|
setText(next);
|
|
84
88
|
if (next === "") return commit(null);
|
|
85
|
-
const date =
|
|
89
|
+
const date = _chunkTLVSZCKUjs.fromISO.call(void 0, next);
|
|
86
90
|
if (date && isInRange(date)) commit(date);
|
|
87
91
|
};
|
|
88
92
|
const blurHandler = (event) => {
|
|
@@ -92,7 +96,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
92
96
|
const pick = (date) => {
|
|
93
97
|
var _a;
|
|
94
98
|
commit(date);
|
|
95
|
-
setText(
|
|
99
|
+
setText(_chunkTLVSZCKUjs.toISO.call(void 0, date));
|
|
96
100
|
setOpen(false);
|
|
97
101
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
98
102
|
};
|
|
@@ -117,7 +121,8 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
117
121
|
"--datepicker-margin-bottom": SCALES.mb(0),
|
|
118
122
|
"--datepicker-margin-left": SCALES.ml(0),
|
|
119
123
|
"--datepicker-text-color": theme.palette.foreground,
|
|
120
|
-
"--datepicker-bg":
|
|
124
|
+
"--datepicker-bg": surface.bg,
|
|
125
|
+
"--calendar-popup-hover": surface.hover,
|
|
121
126
|
"--datepicker-border-color": theme.palette.border,
|
|
122
127
|
"--datepicker-radius": rounded ? "25px" : theme.layout.radius,
|
|
123
128
|
"--datepicker-popup-radius": theme.layout.radius,
|
|
@@ -131,7 +136,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
131
136
|
"--datepicker-toggle-color": colors.iconColor,
|
|
132
137
|
"--datepicker-toggle-hover-color": colors.color,
|
|
133
138
|
"--datepicker-toggle-disabled-color": colors.iconColor,
|
|
134
|
-
"--datepicker-shadow":
|
|
139
|
+
"--datepicker-shadow": surface.shadow
|
|
135
140
|
};
|
|
136
141
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
137
142
|
"div",
|
|
@@ -195,7 +200,7 @@ var DatePickerComponent = _react2.default.forwardRef(
|
|
|
195
200
|
className: DatePicker_module_css_default.popup,
|
|
196
201
|
onKeyDown: keyDownHandler,
|
|
197
202
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
198
|
-
|
|
203
|
+
_chunkTLVSZCKUjs.Calendar_default,
|
|
199
204
|
{
|
|
200
205
|
autoFocus: true,
|
|
201
206
|
value: selected,
|
|
@@ -22,6 +22,9 @@ var _chunkGJZT47MPjs = require('./chunk-GJZT47MP.js');
|
|
|
22
22
|
var _chunkDGXZP4VJjs = require('./chunk-DGXZP4VJ.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
var _chunkEUYSKHRSjs = require('./chunk-EUYSKHRS.js');
|
|
26
|
+
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
var _chunkMAICNLTYjs = require('./chunk-MAICNLTY.js');
|
|
27
30
|
|
|
@@ -319,6 +322,8 @@ var TooltipContent = ({
|
|
|
319
322
|
[type, theme.palette, light, ghost, subtle]
|
|
320
323
|
);
|
|
321
324
|
const hasShadow = type === "default";
|
|
325
|
+
const surface = _chunkEUYSKHRSjs.getSurface.call(void 0, theme);
|
|
326
|
+
const bgColor = hasShadow && colors.bgColor === theme.palette.background ? surface.bg : colors.bgColor;
|
|
322
327
|
const classes = _chunk5KUROAEPjs.use_classes_default.call(void 0,
|
|
323
328
|
"tooltip-content",
|
|
324
329
|
TooltipContent_module_css_default.tooltipContent,
|
|
@@ -350,14 +355,14 @@ var TooltipContent = ({
|
|
|
350
355
|
const contentStyle = {
|
|
351
356
|
"--tooltip-icon-offset-x": iconOffset.x,
|
|
352
357
|
"--tooltip-icon-offset-y": iconOffset.y,
|
|
353
|
-
"--tooltip-content-bg":
|
|
358
|
+
"--tooltip-content-bg": bgColor,
|
|
354
359
|
top: rect.top,
|
|
355
360
|
left: rect.left,
|
|
356
361
|
transform: rect.transform,
|
|
357
362
|
color: colors.color,
|
|
358
363
|
border: `1px solid ${colors.borderColor}`,
|
|
359
364
|
borderRadius: theme.layout.radius,
|
|
360
|
-
boxShadow: hasShadow ?
|
|
365
|
+
boxShadow: hasShadow ? surface.shadow : "none",
|
|
361
366
|
width: SCALES.width(1, "auto"),
|
|
362
367
|
height: SCALES.height(1, "auto")
|
|
363
368
|
};
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
var _chunkKBZEYKCZjs = require('./chunk-KBZEYKCZ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkEUYSKHRSjs = require('./chunk-EUYSKHRS.js');
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
|
|
7
10
|
var _chunkMAICNLTYjs = require('./chunk-MAICNLTY.js');
|
|
8
11
|
|
|
@@ -50,6 +53,7 @@ var ComboboxComponent = _react2.default.forwardRef(
|
|
|
50
53
|
...props
|
|
51
54
|
}, ref) => {
|
|
52
55
|
const theme = _chunkV5I4ORQQjs.use_theme_default.call(void 0, );
|
|
56
|
+
const surface = _chunkEUYSKHRSjs.getSurface.call(void 0, theme);
|
|
53
57
|
const { SCALES } = _chunkMAICNLTYjs.use_scale_default.call(void 0, );
|
|
54
58
|
const colors = _chunkKBZEYKCZjs.getColors.call(void 0, theme.palette, type, disabled, {
|
|
55
59
|
filled,
|
|
@@ -148,7 +152,7 @@ var ComboboxComponent = _react2.default.forwardRef(
|
|
|
148
152
|
"--combobox-margin-bottom": SCALES.mb(0),
|
|
149
153
|
"--combobox-margin-left": SCALES.ml(0),
|
|
150
154
|
"--combobox-text-color": theme.palette.foreground,
|
|
151
|
-
"--combobox-bg":
|
|
155
|
+
"--combobox-bg": surface.bg,
|
|
152
156
|
"--combobox-border-color": theme.palette.border,
|
|
153
157
|
"--combobox-radius": rounded ? "25px" : theme.layout.radius,
|
|
154
158
|
"--combobox-popup-radius": theme.layout.radius,
|
|
@@ -160,8 +164,8 @@ var ComboboxComponent = _react2.default.forwardRef(
|
|
|
160
164
|
"--combobox-focus-border-color": colors.focusBorder,
|
|
161
165
|
"--combobox-placeholder-color": colors.placeholderColor,
|
|
162
166
|
"--combobox-disabled-color": theme.palette.accents_4,
|
|
163
|
-
"--combobox-shadow":
|
|
164
|
-
"--combobox-active-bg":
|
|
167
|
+
"--combobox-shadow": surface.shadow,
|
|
168
|
+
"--combobox-active-bg": surface.hover,
|
|
165
169
|
"--combobox-empty-color": theme.palette.accents_5
|
|
166
170
|
};
|
|
167
171
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCU6SNPIMjs = require('./chunk-CU6SNPIM.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkNEG5UNM6js = require('./chunk-NEG5UNM6.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
var _chunkEUYSKHRSjs = require('./chunk-EUYSKHRS.js');
|
|
10
|
+
|
|
11
|
+
|
|
9
12
|
var _chunkV5I4ORQQjs = require('./chunk-V5I4ORQQ.js');
|
|
10
13
|
|
|
11
14
|
|
|
@@ -57,7 +60,7 @@ var Command = ({
|
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
60
|
-
|
|
63
|
+
_chunkCU6SNPIMjs.Modal_default,
|
|
61
64
|
{
|
|
62
65
|
visible,
|
|
63
66
|
onClose,
|
|
@@ -97,7 +100,7 @@ var Command = ({
|
|
|
97
100
|
"aria-selected": index === active,
|
|
98
101
|
className: Command_module_css_default.item,
|
|
99
102
|
style: {
|
|
100
|
-
backgroundColor: index === active ?
|
|
103
|
+
backgroundColor: index === active ? _chunkEUYSKHRSjs.getSurface.call(void 0, theme).hover : void 0
|
|
101
104
|
},
|
|
102
105
|
onMouseEnter: () => setActive(index),
|
|
103
106
|
onClick: () => select(item),
|