@a-type/ui 4.1.0-beta.6 → 4.1.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/cjs/components/autocomplete/Autocomplete.d.ts +12 -9
- package/dist/cjs/components/autocomplete/Autocomplete.js +19 -24
- package/dist/cjs/components/autocomplete/Autocomplete.js.map +1 -1
- package/dist/cjs/components/combobox/Combobox.d.ts +202 -0
- package/dist/cjs/components/combobox/Combobox.js +311 -0
- package/dist/cjs/components/combobox/Combobox.js.map +1 -0
- package/dist/cjs/components/combobox/Combobox.stories.d.ts +53 -0
- package/dist/cjs/components/combobox/Combobox.stories.js +115 -0
- package/dist/cjs/components/combobox/Combobox.stories.js.map +1 -0
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.stories.d.ts +1 -0
- package/dist/cjs/components/input/Input.stories.js +4 -1
- package/dist/cjs/components/input/Input.stories.js.map +1 -1
- package/dist/css/main.css +4 -4
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +12 -9
- package/dist/esm/components/autocomplete/Autocomplete.js +18 -24
- package/dist/esm/components/autocomplete/Autocomplete.js.map +1 -1
- package/dist/esm/components/combobox/Combobox.d.ts +202 -0
- package/dist/esm/components/combobox/Combobox.js +271 -0
- package/dist/esm/components/combobox/Combobox.js.map +1 -0
- package/dist/esm/components/combobox/Combobox.stories.d.ts +53 -0
- package/dist/esm/components/combobox/Combobox.stories.js +112 -0
- package/dist/esm/components/combobox/Combobox.stories.js.map +1 -0
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.stories.d.ts +1 -0
- package/dist/esm/components/input/Input.stories.js +3 -0
- package/dist/esm/components/input/Input.stories.js.map +1 -1
- package/package.json +3 -2
- package/src/components/autocomplete/Autocomplete.tsx +46 -66
- package/src/components/combobox/Combobox.stories.tsx +289 -0
- package/src/components/combobox/Combobox.tsx +757 -0
- package/src/components/input/Input.stories.tsx +10 -0
- package/src/components/input/Input.tsx +2 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// @unocss-include
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as BaseCombobox from '@base-ui/react/combobox';
|
|
15
|
+
import clsx from 'clsx';
|
|
16
|
+
import { createContext, useContext, useRef, useState, } from 'react';
|
|
17
|
+
import { withClassName } from '../../hooks.js';
|
|
18
|
+
import { Button } from '../button/Button.js';
|
|
19
|
+
import { Chip } from '../chip/Chip.js';
|
|
20
|
+
import { Icon } from '../icon/Icon.js';
|
|
21
|
+
import { Input } from '../input/Input.js';
|
|
22
|
+
import { arrowClassName, itemClassName, itemListClassName, popupClassName, separatorClassName, } from '../primitives/menus.js';
|
|
23
|
+
import { ArrowSvg } from '../utility/ArrowSvg.js';
|
|
24
|
+
import { SlotDiv } from '../utility/SlotDiv.js';
|
|
25
|
+
export const comboboxPopupClassName = clsx(popupClassName, 'layer-components:w-[--anchor-width]');
|
|
26
|
+
export const comboboxBackdropClassName = clsx('layer-components:fixed layer-components:inset-0');
|
|
27
|
+
export const comboboxListClassName = clsx(itemListClassName, 'layer-components:flex layer-components:flex-col layer-components:overscroll-contain layer-components:outline-none layer-components:overflow-y-auto layer-components:overflow-unstable', 'layer-components:empty:p-0');
|
|
28
|
+
export const comboboxIconClassName = clsx('icon', 'layer-components:flex layer-components:shrink-0 layer-components:items-center layer-components:justify-center layer-components:transition-transform', 'layer-components:data-[open]:rotate-180');
|
|
29
|
+
export const comboboxEmptyClassName = clsx('layer-components:[&:not(:empty)]:p-sm layer-components:[&:not(:empty)]:text-sm layer-components:[&:not(:empty)]:color-gray-dark');
|
|
30
|
+
export const comboboxGroupClassName = clsx('layer-components:flex layer-components:flex-col layer-components:gap-xs layer-components:overflow-hidden layer-components:p-sm');
|
|
31
|
+
export const comboboxGroupItemListClassName = clsx('layer-components:flex layer-components:flex-row layer-components:flex-wrap layer-components:gap-xs');
|
|
32
|
+
export const comboboxGroupLabelClassName = clsx('layer-components:w-full layer-components:px-xs layer-components:text-xs layer-components:font-medium layer-components:uppercase layer-components:color-gray-dark');
|
|
33
|
+
export const comboboxRowClassName = clsx('layer-components:flex layer-components:items-center layer-components:gap-xs');
|
|
34
|
+
export const comboboxGroupItemClassName = clsx('layer-composed-2:bg-white', 'layer-composed-2:data-[highlighted]:ring-2 layer-composed-2:data-[highlighted]:bg-main-wash layer-composed-2:data-[highlighted]:ring-primary');
|
|
35
|
+
export function ComboboxComposedInput(_a) {
|
|
36
|
+
var { open, ref, className, icon, children, disableCaret, disableClear } = _a, props = __rest(_a, ["open", "ref", "className", "icon", "children", "disableCaret", "disableClear"]);
|
|
37
|
+
const hasValue = !!useContext(ComboboxValueContext);
|
|
38
|
+
const isInChips = useContext(ComboboxChipsContext);
|
|
39
|
+
const clearAndCaret = ((!disableClear && hasValue) || !disableCaret) && (_jsxs("div", { className: "flex flex-shrink-0 items-center", children: [!disableClear && hasValue && _jsx(ComboboxClear, {}), !disableCaret && _jsx(ComboboxTrigger, { open: open })] }));
|
|
40
|
+
if (isInChips) {
|
|
41
|
+
return (_jsxs("div", { className: clsx('max-w-full min-w-12ch flex flex-1 flex-row items-center gap-xs', className), children: [_jsx(Input.Input, Object.assign({ autoComplete: "off", ref: ref, className: clsx('layer-components:min-w-3ch layer-components:flex-1'), minLength: 3 }, props)), clearAndCaret, children] }));
|
|
42
|
+
}
|
|
43
|
+
return (_jsxs(Input.Border, { ref: ref, className: className, children: [icon, _jsx(Input.Input, Object.assign({ autoComplete: "off", minLength: 3 }, props)), clearAndCaret, children] }));
|
|
44
|
+
}
|
|
45
|
+
export const ComboboxValueContext = createContext(null);
|
|
46
|
+
const ComboboxCreatableContext = createContext({
|
|
47
|
+
inputValue: '',
|
|
48
|
+
});
|
|
49
|
+
const createableSymbol = Symbol('combobox-creatable');
|
|
50
|
+
function makeCreatableItem(input) {
|
|
51
|
+
const item = {
|
|
52
|
+
[createableSymbol]: true,
|
|
53
|
+
value: input,
|
|
54
|
+
label: input,
|
|
55
|
+
key: input,
|
|
56
|
+
id: input,
|
|
57
|
+
};
|
|
58
|
+
return item;
|
|
59
|
+
}
|
|
60
|
+
function isCreatableItem(item) {
|
|
61
|
+
return !!(item === null || item === void 0 ? void 0 : item[createableSymbol]);
|
|
62
|
+
}
|
|
63
|
+
function getCreateableItem(value) {
|
|
64
|
+
if (isCreatableItem(value)) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
if (Array.isArray(value)) {
|
|
68
|
+
return value.find((v) => isCreatableItem(v));
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function matchItem(items, itemToStringLabel, input) {
|
|
73
|
+
return items.find((item) => {
|
|
74
|
+
const label = itemToStringLabel
|
|
75
|
+
? itemToStringLabel(item)
|
|
76
|
+
: (item === null || item === void 0 ? void 0 : item.label) || (item === null || item === void 0 ? void 0 : item.value) || '';
|
|
77
|
+
return label.toLowerCase() === input.toString().trim().toLowerCase();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const ComboboxRoot = (_a) => {
|
|
81
|
+
var { onCreate, items: userItems, onItemHighlighted, itemToStringLabel: userItemToStringLabel, inputValue: userInputValue, onInputValueChange: userOnInputValueChange, onValueChange: userOnValueChange, showCreatableItem } = _a, props = __rest(_a, ["onCreate", "items", "onItemHighlighted", "itemToStringLabel", "inputValue", "onInputValueChange", "onValueChange", "showCreatableItem"]);
|
|
82
|
+
const highlightedItemRef = useRef(null);
|
|
83
|
+
const handleItemHighlighted = (item, ev) => {
|
|
84
|
+
highlightedItemRef.current = item;
|
|
85
|
+
onItemHighlighted === null || onItemHighlighted === void 0 ? void 0 : onItemHighlighted(item, ev);
|
|
86
|
+
};
|
|
87
|
+
const onInputEnter = onCreate
|
|
88
|
+
? (value) => {
|
|
89
|
+
if (highlightedItemRef.current)
|
|
90
|
+
return;
|
|
91
|
+
onCreate(value);
|
|
92
|
+
}
|
|
93
|
+
: undefined;
|
|
94
|
+
const [internalInputValue, setInternalInputValue] = useState(userInputValue || props.defaultInputValue || '');
|
|
95
|
+
const inputValue = (userInputValue === undefined ? internalInputValue : userInputValue).toString();
|
|
96
|
+
const canCreate = !!(showCreatableItem &&
|
|
97
|
+
onCreate &&
|
|
98
|
+
inputValue &&
|
|
99
|
+
!matchItem(userItems !== null && userItems !== void 0 ? userItems : [], userItemToStringLabel, inputValue));
|
|
100
|
+
const items = canCreate
|
|
101
|
+
? userItems
|
|
102
|
+
? [...userItems, makeCreatableItem(inputValue)]
|
|
103
|
+
: [makeCreatableItem(inputValue)]
|
|
104
|
+
: userItems;
|
|
105
|
+
const anchorRef = useRef(null);
|
|
106
|
+
return (_jsx(ComboboxAnchorContext.Provider, { value: anchorRef, children: _jsx(ComboboxCreatableContext.Provider, { value: { inputValue, onInputEnter, showCreatableItem: canCreate }, children: _jsx(ComboboxValueContext.Provider, { value: props.value || null, children: _jsx(BaseCombobox.Combobox.Root, Object.assign({}, props, { items: items, inputValue: userInputValue, itemToStringLabel: userItemToStringLabel, onInputValueChange: (value, ev) => {
|
|
107
|
+
if (userInputValue === undefined) {
|
|
108
|
+
setInternalInputValue(value);
|
|
109
|
+
}
|
|
110
|
+
userOnInputValueChange === null || userOnInputValueChange === void 0 ? void 0 : userOnInputValueChange(value, ev);
|
|
111
|
+
}, onValueChange: (value, ev) => {
|
|
112
|
+
const creatable = getCreateableItem(value);
|
|
113
|
+
if (creatable) {
|
|
114
|
+
onCreate === null || onCreate === void 0 ? void 0 : onCreate(creatable.value);
|
|
115
|
+
if (value === creatable) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (Array.isArray(value)) {
|
|
119
|
+
value = value.filter((v) => v !== creatable);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
userOnValueChange === null || userOnValueChange === void 0 ? void 0 : userOnValueChange(value, ev);
|
|
123
|
+
}, onItemHighlighted: handleItemHighlighted })) }) }) }));
|
|
124
|
+
};
|
|
125
|
+
function ComboboxTrigger(_a) {
|
|
126
|
+
var { children, open } = _a, props = __rest(_a, ["children", "open"]);
|
|
127
|
+
return (_jsx(BaseCombobox.Combobox.Trigger, Object.assign({ render: _jsx(Button, { emphasis: "ghost", size: "small" }) }, props, { children: children !== null && children !== void 0 ? children : _jsx(ComboboxIcon, { "data-open": open }) })));
|
|
128
|
+
}
|
|
129
|
+
function ComboboxInput(_a) {
|
|
130
|
+
var { disableCaret, disableClear, icon, children, onKeyDown: userOnKeyDown } = _a, outerProps = __rest(_a, ["disableCaret", "disableClear", "icon", "children", "onKeyDown"]);
|
|
131
|
+
const { onInputEnter } = useContext(ComboboxCreatableContext);
|
|
132
|
+
const handleKeyDown = (ev) => {
|
|
133
|
+
if (ev.key === 'Enter' && onInputEnter) {
|
|
134
|
+
onInputEnter(ev.currentTarget.value);
|
|
135
|
+
}
|
|
136
|
+
userOnKeyDown === null || userOnKeyDown === void 0 ? void 0 : userOnKeyDown(ev);
|
|
137
|
+
};
|
|
138
|
+
return (_jsx(BaseCombobox.Combobox.Input, Object.assign({ onKeyDown: handleKeyDown, render: (props, state) => (_jsx(ComboboxComposedInput, Object.assign({}, props, { open: state.open, disableCaret: disableCaret, disableClear: disableClear, icon: icon, children: children }))) }, outerProps)));
|
|
139
|
+
}
|
|
140
|
+
const ComboboxAnchorContext = createContext(null);
|
|
141
|
+
const ComboboxChipsContext = createContext(false);
|
|
142
|
+
function ComboboxChips(_a) {
|
|
143
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
144
|
+
const anchorRef = useContext(ComboboxAnchorContext);
|
|
145
|
+
return (_jsx(ComboboxChipsContext.Provider, { value: true, children: _jsx(BaseCombobox.Combobox.Chips, Object.assign({ ref: anchorRef || undefined, className: clsx('layer-components:flex layer-components:flex-row layer-components:items-center layer-components:gap-xs', className), render: _jsx(Input.Border, {}) }, props)) }));
|
|
146
|
+
}
|
|
147
|
+
const ComboboxChipsList = withClassName(SlotDiv, 'layer-components:flex layer-components:flex-row layer-components:flex-wrap layer-components:gap-xs layer-components:p-xs', 'layer-components:empty:hidden');
|
|
148
|
+
function ComboboxChip(_a) {
|
|
149
|
+
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
150
|
+
return (_jsxs(BaseCombobox.Combobox.Chip, Object.assign({ render: _jsx(Chip, {}), className: clsx('layer-composed-2:my-auto layer-composed-2:flex layer-composed-2:flex-row layer-composed-2:items-center layer-composed-2:gap-xs layer-composed-2:px-sm layer-composed-2:bg-white', className) }, props, { children: [children, _jsx(BaseCombobox.Combobox.ChipRemove, { render: _jsx(Button, { size: "small", emphasis: "ghost", className: "min-h-0 min-w-0 p-0 leading-1", children: _jsx(Icon, { name: "x", size: 10 }) }) })] })));
|
|
151
|
+
}
|
|
152
|
+
function ComboboxIcon(_a) {
|
|
153
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
154
|
+
return (_jsx(BaseCombobox.Combobox.Icon, Object.assign({}, props, { className: clsx(comboboxIconClassName, className), children: _jsx(Icon, { name: "chevron" }) })));
|
|
155
|
+
}
|
|
156
|
+
const ComboboxPopup = withClassName(BaseCombobox.Combobox.Popup, comboboxPopupClassName);
|
|
157
|
+
const ComboboxBackdrop = withClassName(BaseCombobox.Combobox.Backdrop, comboboxBackdropClassName);
|
|
158
|
+
function ComboboxArrow(_a) {
|
|
159
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
160
|
+
return (_jsx(BaseCombobox.Combobox.Arrow, Object.assign({}, props, { className: clsx(arrowClassName, className), children: _jsx(ArrowSvg, {}) })));
|
|
161
|
+
}
|
|
162
|
+
function ComboboxContent(_a) {
|
|
163
|
+
var { positioner, arrow, children } = _a, props = __rest(_a, ["positioner", "arrow", "children"]);
|
|
164
|
+
const anchorRef = useContext(ComboboxAnchorContext);
|
|
165
|
+
return (_jsxs(BaseCombobox.Combobox.Portal, { children: [_jsx(ComboboxBackdrop, {}), _jsx(BaseCombobox.Combobox.Positioner, Object.assign({ sideOffset: 8, anchor: anchorRef }, positioner, { children: _jsxs(ComboboxPopup, Object.assign({}, props, { children: [arrow && _jsx(ComboboxArrow, {}), children] })) }))] }));
|
|
166
|
+
}
|
|
167
|
+
function ComboboxList(_a) {
|
|
168
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
169
|
+
return (_jsx(BaseCombobox.Combobox.List, Object.assign({ className: clsx(comboboxListClassName, className) }, props)));
|
|
170
|
+
}
|
|
171
|
+
const ComboboxEmpty = withClassName(BaseCombobox.Combobox.Empty, comboboxEmptyClassName);
|
|
172
|
+
function ComboboxItem(_a) {
|
|
173
|
+
var { className, color = 'gray', children } = _a, props = __rest(_a, ["className", "color", "children"]);
|
|
174
|
+
return (_jsxs(BaseCombobox.Combobox.Item, Object.assign({}, props, { className: clsx(color && `palette-${color}`, itemClassName, 'layer-components:data-[selected]:color-gray-dark', className), children: [children, _jsx(ComboboxItemIndicator, {})] })));
|
|
175
|
+
}
|
|
176
|
+
const ComboboxItemIndicator = withClassName((props) => (_jsx(BaseCombobox.Combobox.ItemIndicator, Object.assign({}, props, { render: (_a) => {
|
|
177
|
+
var { children: _ } = _a, rest = __rest(_a, ["children"]);
|
|
178
|
+
return _jsx(Icon, Object.assign({ name: "check" }, rest));
|
|
179
|
+
} }))), 'layer-components:ml-auto');
|
|
180
|
+
const ComboboxGroup = withClassName(BaseCombobox.Combobox.Group, comboboxGroupClassName);
|
|
181
|
+
const ComboboxGroupItemList = withClassName(SlotDiv, comboboxGroupItemListClassName);
|
|
182
|
+
const ComboboxGroupLabel = withClassName(BaseCombobox.Combobox.GroupLabel, comboboxGroupLabelClassName);
|
|
183
|
+
const ComboboxRow = withClassName(BaseCombobox.Combobox.Row, comboboxRowClassName);
|
|
184
|
+
const ComboboxSeparator = withClassName(BaseCombobox.Combobox.Separator, separatorClassName);
|
|
185
|
+
function ComboboxGroupItem(_a) {
|
|
186
|
+
var { className, replace, render, color, children } = _a, props = __rest(_a, ["className", "replace", "render", "color", "children"]);
|
|
187
|
+
return (_jsxs(BaseCombobox.Combobox.Item, Object.assign({ render: replace !== null && replace !== void 0 ? replace : _jsx(Button, { render: _jsx(Chip, { render: render, color: color }) }) }, props, { className: clsx(comboboxGroupItemClassName, 'layer-components:data-[selected]:color-gray-dark', className), children: [children, _jsx(ComboboxItemIndicator, { className: "layer-components:h-10px layer-components:w-10px" })] })));
|
|
188
|
+
}
|
|
189
|
+
function ComboboxMultiValue(_a) {
|
|
190
|
+
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
191
|
+
return (_jsx(SlotDiv, Object.assign({ className: clsx('max-w-full flex flex-row flex-wrap gap-xs', className) }, props, { children: _jsx(BaseCombobox.Combobox.Value, { children: children }) })));
|
|
192
|
+
}
|
|
193
|
+
function ComboboxClear(_a) {
|
|
194
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
195
|
+
return (_jsx(BaseCombobox.Combobox.Clear, Object.assign({ render: _jsx(Button, { emphasis: "ghost", size: "small" }) }, props, { children: children !== null && children !== void 0 ? children : _jsx(Icon, { name: "x" }) })));
|
|
196
|
+
}
|
|
197
|
+
const baseSubComponents = {
|
|
198
|
+
useFilter: BaseCombobox.Combobox.useFilter,
|
|
199
|
+
makeCreatableItem,
|
|
200
|
+
isCreatableItem,
|
|
201
|
+
Input: ComboboxInput,
|
|
202
|
+
Content: ComboboxContent,
|
|
203
|
+
Empty: ComboboxEmpty,
|
|
204
|
+
List: ComboboxList,
|
|
205
|
+
Item: ComboboxItem,
|
|
206
|
+
Group: ComboboxGroup,
|
|
207
|
+
GroupItemList: ComboboxGroupItemList,
|
|
208
|
+
GroupLabel: ComboboxGroupLabel,
|
|
209
|
+
Row: ComboboxRow,
|
|
210
|
+
Separator: ComboboxSeparator,
|
|
211
|
+
ItemGroup: ComboboxGroupItem,
|
|
212
|
+
Icon: ComboboxIcon,
|
|
213
|
+
Clear: ComboboxClear,
|
|
214
|
+
Chips: ComboboxChips,
|
|
215
|
+
Chip: ComboboxChip,
|
|
216
|
+
ChipsList: ComboboxChipsList,
|
|
217
|
+
Value: BaseCombobox.Combobox.Value,
|
|
218
|
+
MultiValue: ComboboxMultiValue,
|
|
219
|
+
Positioner: BaseCombobox.Combobox.Positioner,
|
|
220
|
+
Portal: BaseCombobox.Combobox.Portal,
|
|
221
|
+
Backdrop: ComboboxBackdrop,
|
|
222
|
+
Arrow: ComboboxArrow,
|
|
223
|
+
Popup: ComboboxPopup,
|
|
224
|
+
ListItem: ComboboxItem,
|
|
225
|
+
GroupItem: ComboboxGroupItem,
|
|
226
|
+
Unstyled: BaseCombobox.Combobox,
|
|
227
|
+
};
|
|
228
|
+
function createCombobox() {
|
|
229
|
+
function TypedRoot(props) {
|
|
230
|
+
return _jsx(ComboboxRoot, Object.assign({}, props));
|
|
231
|
+
}
|
|
232
|
+
function TypedMultiRoot(props) {
|
|
233
|
+
return _jsx(ComboboxRoot, Object.assign({ multiple: true }, props));
|
|
234
|
+
}
|
|
235
|
+
function TypedList(props) {
|
|
236
|
+
return _jsx(ComboboxList, Object.assign({}, props));
|
|
237
|
+
}
|
|
238
|
+
function TypedItem(props) {
|
|
239
|
+
return _jsx(ComboboxItem, Object.assign({}, props));
|
|
240
|
+
}
|
|
241
|
+
function TypedValue(props) {
|
|
242
|
+
return _jsx(BaseCombobox.Combobox.Value, Object.assign({}, props));
|
|
243
|
+
}
|
|
244
|
+
function TypedMultiValue(props) {
|
|
245
|
+
return _jsx(ComboboxMultiValue, Object.assign({}, props));
|
|
246
|
+
}
|
|
247
|
+
return Object.assign(TypedRoot, Object.assign(Object.assign({}, baseSubComponents), { Multi: TypedMultiRoot, Item: TypedItem, List: TypedList, Value: TypedValue, MultiValue: TypedMultiValue }));
|
|
248
|
+
}
|
|
249
|
+
function createComboboxGrouped() {
|
|
250
|
+
function TypedRoot(props) {
|
|
251
|
+
return _jsx(ComboboxRoot, Object.assign({}, props));
|
|
252
|
+
}
|
|
253
|
+
function TypedMultiRoot(props) {
|
|
254
|
+
return _jsx(ComboboxRoot, Object.assign({ multiple: true }, props));
|
|
255
|
+
}
|
|
256
|
+
function TypedList(props) {
|
|
257
|
+
return _jsx(ComboboxList, Object.assign({}, props));
|
|
258
|
+
}
|
|
259
|
+
function TypedItem(props) {
|
|
260
|
+
return _jsx(ComboboxGroupItem, Object.assign({}, props));
|
|
261
|
+
}
|
|
262
|
+
function TypedValue(props) {
|
|
263
|
+
return _jsx(BaseCombobox.Combobox.Value, Object.assign({}, props));
|
|
264
|
+
}
|
|
265
|
+
function TypedMultiValue(props) {
|
|
266
|
+
return _jsx(ComboboxMultiValue, Object.assign({}, props));
|
|
267
|
+
}
|
|
268
|
+
return Object.assign(TypedRoot, Object.assign(Object.assign({}, baseSubComponents), { Multi: TypedMultiRoot, Item: TypedItem, List: TypedList, Group: ComboboxGroup, GroupList: ComboboxGroupItemList, GroupLabel: ComboboxGroupLabel, Row: ComboboxRow, Value: TypedValue, MultiValue: TypedMultiValue }));
|
|
269
|
+
}
|
|
270
|
+
export const Combobox = Object.assign(ComboboxRoot, Object.assign({ create: createCombobox, createGrouped: createComboboxGrouped }, baseSubComponents));
|
|
271
|
+
//# sourceMappingURL=Combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.js","sourceRoot":"","sources":["../../../../src/components/combobox/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;QAED,OAAO,KAAC,YAAY,kBAAC,QAAQ,UAAM,KAAa,EAAI,CAAC;IACtD,CAAC;IACD,SAAS,SAAS,CACjB,KAEC;QAED,OAAO,KAAC,YAAY,oBAAM,KAAa,EAAI,CAAC;IAC7C,CAAC;IACD,SAAS,SAAS,CACjB,KAEC;QAED,OAAO,KAAC,iBAAiB,oBAAM,KAAa,EAAI,CAAC;IAClD,CAAC;IACD,SAAS,UAAU,CAClB,KAIC;QAED,OAAO,KAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,oBAAK,KAAK,EAAI,CAAC;IACnD,CAAC;IACD,SAAS,eAAe,CACvB,KAIC;QAED,OAAO,KAAC,kBAAkB,oBAAK,KAAK,EAAI,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,kCAC1B,iBAAiB,KACpB,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,qBAAqB,EAChC,UAAU,EAAE,kBAAkB,EAC9B,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,eAAe,IAC1B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,kBACjD,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,qBAAqB,IAEjC,iBAAiB,EACnB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
interface Args {
|
|
3
|
+
arrow?: boolean;
|
|
4
|
+
autoHighlight?: boolean;
|
|
5
|
+
creatable?: boolean;
|
|
6
|
+
highlightItemOnHover?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const meta: {
|
|
9
|
+
title: string;
|
|
10
|
+
argTypes: {
|
|
11
|
+
arrow: {
|
|
12
|
+
control: "boolean";
|
|
13
|
+
description: string;
|
|
14
|
+
defaultValue: boolean;
|
|
15
|
+
};
|
|
16
|
+
autoHighlight: {
|
|
17
|
+
control: "boolean";
|
|
18
|
+
description: string;
|
|
19
|
+
defaultValue: boolean;
|
|
20
|
+
};
|
|
21
|
+
highlightItemOnHover: {
|
|
22
|
+
control: "boolean";
|
|
23
|
+
description: string;
|
|
24
|
+
defaultValue: boolean;
|
|
25
|
+
};
|
|
26
|
+
creatable: {
|
|
27
|
+
control: "boolean";
|
|
28
|
+
description: string;
|
|
29
|
+
defaultValue: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
args: {
|
|
33
|
+
arrow: false;
|
|
34
|
+
autoHighlight: false;
|
|
35
|
+
highlightItemOnHover: true;
|
|
36
|
+
creatable: false;
|
|
37
|
+
};
|
|
38
|
+
parameters: {
|
|
39
|
+
controls: {
|
|
40
|
+
expanded: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<Args>;
|
|
46
|
+
export interface Item {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
export declare const Default: Story;
|
|
51
|
+
export declare const Grouped: Story;
|
|
52
|
+
export declare const NotPopover: Story;
|
|
53
|
+
export declare const MultiSelect: Story;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// @unocss-include
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Box } from '../box/Box.js';
|
|
5
|
+
import { Button } from '../button/Button.js';
|
|
6
|
+
import { Icon } from '../icon/Icon.js';
|
|
7
|
+
import { Combobox } from './Combobox.js';
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Components/Combobox',
|
|
10
|
+
argTypes: {
|
|
11
|
+
arrow: {
|
|
12
|
+
control: 'boolean',
|
|
13
|
+
description: 'Whether to show the arrow on the Combobox popup.',
|
|
14
|
+
defaultValue: false,
|
|
15
|
+
},
|
|
16
|
+
autoHighlight: {
|
|
17
|
+
control: 'boolean',
|
|
18
|
+
description: 'If true, the first item will be automatically highlighted when the list opens.',
|
|
19
|
+
defaultValue: false,
|
|
20
|
+
},
|
|
21
|
+
highlightItemOnHover: {
|
|
22
|
+
control: 'boolean',
|
|
23
|
+
description: 'If true, items will be highlighted when hovered with the mouse.',
|
|
24
|
+
defaultValue: false,
|
|
25
|
+
},
|
|
26
|
+
creatable: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
description: 'If true, the Combobox will allow creating new items based on user input.',
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
arrow: false,
|
|
34
|
+
autoHighlight: false,
|
|
35
|
+
highlightItemOnHover: true,
|
|
36
|
+
creatable: false,
|
|
37
|
+
},
|
|
38
|
+
parameters: {
|
|
39
|
+
controls: { expanded: true },
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
const items = [
|
|
44
|
+
{ id: 'apple', label: 'Apple' },
|
|
45
|
+
{ id: 'banana', label: 'Banana' },
|
|
46
|
+
{ id: 'cherry', label: 'Cherry' },
|
|
47
|
+
{ id: 'date', label: 'Date' },
|
|
48
|
+
{ id: 'elderberry', label: 'Elderberry' },
|
|
49
|
+
{ id: 'fig', label: 'Fig' },
|
|
50
|
+
{ id: 'grape', label: 'Grape' },
|
|
51
|
+
{ id: 'honeydew', label: 'Honeydew' },
|
|
52
|
+
];
|
|
53
|
+
const ExampleCombobox = Combobox.create();
|
|
54
|
+
export const Default = {
|
|
55
|
+
render({ arrow, autoHighlight, highlightItemOnHover, creatable }) {
|
|
56
|
+
const [value, setValue] = useState(null);
|
|
57
|
+
const allItems = value && items.includes(value)
|
|
58
|
+
? items
|
|
59
|
+
: value
|
|
60
|
+
? [value, ...items]
|
|
61
|
+
: items;
|
|
62
|
+
return (_jsxs(ExampleCombobox, { value: value, onValueChange: setValue, items: allItems, autoHighlight: autoHighlight, highlightItemOnHover: highlightItemOnHover, showCreatableItem: creatable, onCreate: creatable
|
|
63
|
+
? (value) => {
|
|
64
|
+
console.log('Creating item:', value);
|
|
65
|
+
setValue({ id: value, label: value });
|
|
66
|
+
}
|
|
67
|
+
: undefined, children: [_jsx(ExampleCombobox.Input, { icon: _jsx(Icon, { name: "food" }), className: "w-[200px]" }), _jsxs(ExampleCombobox.Content, { arrow: arrow, children: [_jsx(ExampleCombobox.List, { children: (item) => (_jsx(ExampleCombobox.Item, { value: item, children: item.label }, item.id)) }), _jsx(ExampleCombobox.Empty, { children: "No results found." })] })] }));
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
const groupedItems = [
|
|
71
|
+
{
|
|
72
|
+
category: 'Fruits',
|
|
73
|
+
items: [
|
|
74
|
+
{ id: 'apple', label: 'Apple' },
|
|
75
|
+
{ id: 'banana', label: 'Banana' },
|
|
76
|
+
{ id: 'cherry', label: 'Cherry' },
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
category: 'Berries',
|
|
81
|
+
items: [
|
|
82
|
+
{ id: 'strawberry', label: 'Strawberry' },
|
|
83
|
+
{ id: 'blueberry', label: 'Blueberry' },
|
|
84
|
+
{ id: 'raspberry', label: 'Raspberry' },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
const GroupedCombobox = Combobox.createGrouped();
|
|
89
|
+
export const Grouped = {
|
|
90
|
+
render({ arrow, autoHighlight, highlightItemOnHover, creatable }) {
|
|
91
|
+
const [value, setValue] = useState(null);
|
|
92
|
+
const [input, setInput] = useState('');
|
|
93
|
+
return (_jsxs(GroupedCombobox, { value: value, onValueChange: setValue, inputValue: input, onInputValueChange: setInput, items: groupedItems, autoHighlight: autoHighlight, highlightItemOnHover: highlightItemOnHover, onCreate: creatable
|
|
94
|
+
? (value) => alert(`Create item: ${value}`)
|
|
95
|
+
: undefined, children: [_jsx(GroupedCombobox.Input, {}), _jsxs(GroupedCombobox.Content, { arrow: arrow, children: [_jsx(GroupedCombobox.List, { children: (group) => (_jsxs(GroupedCombobox.Group, { children: [_jsx(GroupedCombobox.GroupLabel, { children: group.category }), _jsx(GroupedCombobox.GroupList, { children: group.items.map((item) => (_jsx(GroupedCombobox.Item, { value: item, children: item.label }, item.id))) })] }, group.category)) }), _jsx(GroupedCombobox.Empty, { children: creatable ? (_jsxs("div", { children: [_jsx(Icon, { name: "enterKey" }), " Create \"", input, "\""] })) : (`No results found.`) }), _jsx(GroupedCombobox.Separator, {}), _jsxs("div", { className: "p-sm text-xs color-gray-dark", children: ["Select your favorite fruit or berry.", creatable ? ' Enter creates a new item.' : ''] })] })] }));
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
export const NotPopover = {
|
|
99
|
+
render({ autoHighlight, highlightItemOnHover, creatable }) {
|
|
100
|
+
const [value, setValue] = useState(null);
|
|
101
|
+
return (_jsx(GroupedCombobox, { value: value, onValueChange: setValue, items: groupedItems, autoHighlight: autoHighlight, highlightItemOnHover: highlightItemOnHover, onCreate: creatable
|
|
102
|
+
? (value) => alert(`Create item: ${value}`)
|
|
103
|
+
: undefined, children: _jsxs(Box, { border: true, p: true, surface: "white", col: true, children: [_jsx(GroupedCombobox.Input, { disableCaret: true, className: "w-full", disableClear: true, children: _jsx(Button, { size: "small", emphasis: "primary", className: "aspect-1 h-full", children: _jsx(Icon, { name: "plus" }) }) }), _jsx(GroupedCombobox.List, { children: (group) => (_jsxs(GroupedCombobox.Group, { children: [_jsx(GroupedCombobox.GroupLabel, { children: group.category }), _jsx(GroupedCombobox.GroupList, { children: group.items.map((item) => (_jsx(GroupedCombobox.Item, { value: item, children: item.label }, item.id))) })] }, group.category)) }), _jsx(GroupedCombobox.Empty, { children: "No results found." })] }) }));
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
export const MultiSelect = {
|
|
107
|
+
render({ arrow, autoHighlight, highlightItemOnHover, creatable }) {
|
|
108
|
+
const [value, setValue] = useState([]);
|
|
109
|
+
return (_jsxs(ExampleCombobox.Multi, { multiple: true, value: value, onValueChange: setValue, items: items, autoHighlight: autoHighlight, highlightItemOnHover: highlightItemOnHover, showCreatableItem: creatable, children: [_jsx(ExampleCombobox.Chips, { className: "w-300px", children: _jsx(ExampleCombobox.MultiValue, { children: (items) => (_jsxs(_Fragment, { children: [_jsx(ExampleCombobox.ChipsList, { children: items.map((item) => (_jsx(ExampleCombobox.Chip, { children: item.label }, item.id))) }), _jsx(ExampleCombobox.Input, {})] })) }) }), _jsxs(ExampleCombobox.Content, { arrow: arrow, children: [_jsx(ExampleCombobox.List, { children: (item) => (_jsx(ExampleCombobox.Item, { value: item, children: item.label }, item.id)) }), _jsx(ExampleCombobox.Empty, { children: "No results found." })] })] }));
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=Combobox.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.stories.js","sourceRoot":"","sources":["../../../../src/components/combobox/Combobox.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AASzC,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,kDAAkD;YAC/D,YAAY,EAAE,KAAK;SACnB;QACD,aAAa,EAAE;YACd,OAAO,EAAE,SAAS;YAClB,WAAW,EACV,gFAAgF;YACjF,YAAY,EAAE,KAAK;SACnB;QACD,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U,cACzB,CAAC,KAAK,EAAE,EAAE,CAAC,CACX,8BACC,KAAC,eAAe,CAAC,SAAS,cACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACpB,KAAC,eAAe,CAAC,IAAI,cACnB,IAAI,CAAC,KAAK,IADe,IAAI,CAAC,EAAE,CAEX,CACvB,CAAC,GACyB,EAC5B,KAAC,eAAe,CAAC,KAAK,KAAG,IACvB,CACH,GAC2B,GACN,EACxB,MAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,aACpC,KAAC,eAAe,CAAC,IAAI,cACnB,CAAC,IAAI,EAAE,EAAE,CAAC,CACV,KAAC,eAAe,CAAC,IAAI,IAAe,KAAK,EAAE,IAAI,YAC7C,IAAI,CAAC,KAAK,IADe,IAAI,CAAC,EAAE,CAEX,CACvB,GACqB,EACvB,KAAC,eAAe,CAAC,KAAK,oCAA0C,IACvC,IACH,CACxB,CAAC;IACH,CAAC;CACD,CAAC"}
|
|
@@ -18,7 +18,7 @@ import { useRotatingShuffledValue } from '../../hooks/useRotatingShuffledValue.j
|
|
|
18
18
|
import { GroupScaleReset } from '../../systems/GroupScale.js';
|
|
19
19
|
import { inputInfo } from '../../systems/inputs.js';
|
|
20
20
|
export const inputClassName = clsx('layer-components:min-w-60px layer-components:flex-1 layer-components:select-auto layer-components:border-none layer-components:px-0 layer-components:py-1.25 layer-components:text-md layer-components:font-inherit layer-components:bg-transparent', 'layer-components:md:min-w-120px', 'layer-components:placeholder:color-gray-dark', 'layer-components:focus:outline-none', 'layer-components:focus-visible:outline-none', 'layer-components:first:rounded-l-inherit layer-components:first:pl-md', 'layer-components:last:rounded-r-inherit layer-components:last:pr-md');
|
|
21
|
-
const inputBorderClassName = clsx('layer-components:flex layer-components:flex-row layer-components:items-center layer-components:gap-xs layer-components:border-1 layer-components:rounded-lg layer-components:border-solid layer-components:text-md layer-components:shadow-sm layer-components:shadow-inset layer-components:transition-shadow layer-components:color-black layer-components:bg-white layer-components:border-gray-dark', 'layer-components:w-max-content layer-components:overflow-clip', 'layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:shadow-none layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:bg-transparent layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:border-gray layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:placeholder-gray-dark', 'layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:outline-none layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring-4 layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring-accent', 'layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:outline-none layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring-4 layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:bg-lighten-3 layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring-main-light', 'layer-components:[&:has(input:hover),&:has(textarea:hover)]:border-black', 'layer-components:[&>.icon]:mx-sm');
|
|
21
|
+
const inputBorderClassName = clsx('layer-components:[--local-corner-scale:1] layer-components:[--spacing-scale:1]', 'layer-components:[--global-shadow-spread:0] layer-components:flex layer-components:flex-row layer-components:items-center layer-components:gap-xs layer-components:border-1 layer-components:rounded-lg layer-components:border-solid layer-components:text-md layer-components:shadow-sm layer-components:shadow-inset layer-components:transition-shadow layer-components:color-black layer-components:bg-white layer-components:border-gray-dark', 'layer-components:w-max-content layer-components:overflow-clip', 'layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:shadow-none layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:bg-transparent layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:border-gray layer-components:[&:has(input:disabled),&:has(textarea:disabled)]:placeholder-gray-dark', 'layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:outline-none layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring-4 layer-components:[&:has(input:focus-visible),&:has(textarea:focus-visible)]:ring-accent', 'layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:outline-none layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring-4 layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:bg-lighten-3 layer-variants:[&:has(input:focus[data-focus-clicked]),&:has(textarea:focus[data-focus-clicked])]:ring-main-light', 'layer-components:[&:has(input:hover),&:has(textarea:hover)]:border-black', 'layer-components:[&>.icon]:mx-sm');
|
|
22
22
|
function InputBorderImpl(props) {
|
|
23
23
|
return (_jsx(GroupScaleReset, { children: _jsx("div", Object.assign({}, props)) }));
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACN,KAAK,IAAI,SAAS,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CACjC,+GAA+G,EAC/G,mCAAmC,EACnC,gDAAgD,EAChD,uCAAuC,EACvC,+CAA+C,EAC/C,kDAAkD,EAClD,iDAAiD,CACjD,CAAC;AAEF,MAAM,oBAAoB,GAAG,IAAI,CAChC,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACN,KAAK,IAAI,SAAS,GAElB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CACjC,+GAA+G,EAC/G,mCAAmC,EACnC,gDAAgD,EAChD,uCAAuC,EACvC,+CAA+C,EAC/C,kDAAkD,EAClD,iDAAiD,CACjD,CAAC;AAEF,MAAM,oBAAoB,GAAG,IAAI,CAChC,iEAAiE,EACjE,yMAAyM,EACzM,gDAAgD,EAChD,kIAAkI,EAClI,oHAAoH,EACpH,2JAA2J,EAC3J,4EAA4E,EAC5E,oCAAoC,CACpC,CAAC;AAEF,SAAS,eAAe,CACvB,KAEC;IAED,OAAO,CACN,KAAC,eAAe,cACf,8BAAS,KAAK,EAAI,GACD,CAClB,CAAC;AACH,CAAC;AACD,MAAM,WAAW,GAAG,aAAa,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;AAEzE,MAAM,UAAU,GAAG,SAAS,UAAU,CAAC,EAW1B;QAX0B,EACtC,UAAU,EACV,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,WAAW,EACX,sBAAsB,GAAG,IAAI,EAC7B,aAAa,OAGD,EADT,KAAK,cAV8B,0HAWtC,CADQ;IAER,MAAM,WAAW,GAA8B,CAAC,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AC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;IAChD,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,UAAU;CACjB,CAAC,CAAC"}
|
|
@@ -22,4 +22,7 @@ export const ButtonAndInput = {
|
|
|
22
22
|
export const WithAccessories = {
|
|
23
23
|
render: (args) => (_jsxs(Input.Border, { children: [_jsx(Icon, { name: "search" }), _jsx(Input.Input, Object.assign({ placeholder: "Search..." }, args)), _jsx(Button, { emphasis: "ghost", children: _jsx(Icon, { name: "arrowRight" }) })] })),
|
|
24
24
|
};
|
|
25
|
+
export const NestedInBoxes = {
|
|
26
|
+
render: (args) => (_jsx(Box, { p: true, border: true, rounded: true, children: _jsx(Box, { p: true, border: true, rounded: true, children: _jsx(Input, Object.assign({ placeholder: "Type something..." }, args)) }) })),
|
|
27
|
+
};
|
|
25
28
|
//# sourceMappingURL=Input.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../../../src/components/input/Input.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE;QACT,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KAChC;IACD,UAAU,EAAE;QACX,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC5B;CAC4B,CAAC;AAE/B,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM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ACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CACjB,MAAC,GAAG,IAAC,GAAG,QAAC,KAAK,EAAC,QAAQ,aACtB,KAAC,KAAK,kBAAC,WAAW,EAAC,mBAAmB,IAAK,IAAI,EAAI,EACnD,KAAC,MAAM,yBAAgB,IAClB,CACN;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAU;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CACjB,MAAC,KAAK,CAAC,MAAM,eACZ,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,GAAG,EACtB,KAAC,KAAK,CAAC,KAAK,kBAAC,WAAW,EAAC,WAAW,IAAK,IAAI,EAAI,EACjD,KAAC,MAAM,IAAC,QAAQ,EAAC,OAAO,YACvB,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GAClB,IACK,CACf;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CACjB,KAAC,GAAG,IAAC,CAAC,QAAC,MAAM,QAAC,OAAO,kBACpB,KAAC,GAAG,IAAC,CAAC,QAAC,MAAM,QAAC,OAAO,kBACpB,KAAC,KAAK,kBAAC,WAAW,EAAC,mBAAmB,IAAK,IAAI,EAAI,GAC9C,GACD,CACN;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a-type/ui",
|
|
3
|
-
"version": "4.1.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/a-type/ui"
|
|
@@ -117,8 +117,9 @@
|
|
|
117
117
|
"storybook": "storybook dev -p 6006",
|
|
118
118
|
"build-storybook": "storybook build",
|
|
119
119
|
"up-radix": "pnpm update \"@radix-ui/*\" --latest",
|
|
120
|
-
"bump": "pnpm run
|
|
120
|
+
"bump": "pnpm run typecheck && bumpp",
|
|
121
121
|
"test": "vitest",
|
|
122
|
+
"typecheck": "tsc --noEmit",
|
|
122
123
|
"test:browser": "vitest --config=vitest.browser.config.ts",
|
|
123
124
|
"lint": "eslint **/*.{ts,tsx} --fix"
|
|
124
125
|
}
|