@scattered-light/loomiere-base-ui 0.14.1 → 0.15.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/README.md +13 -1
- package/dist/{chunk-HPUI5FIO.js → chunk-RLXKWWZG.js} +18 -3
- package/dist/chunk-RLXKWWZG.js.map +1 -0
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +1 -1
- package/dist/design-system/components/PickerButton/preview.html +1 -1
- package/dist/design-system/components/PickerSplit/README.md +18 -0
- package/dist/design-system/components/bundle.js +7 -7
- package/dist/design-system/components/index.d.ts +1 -1
- package/dist/design-system/components/styles.css +172 -60
- package/dist/{index-kV9TCCxP.d.ts → index-BlPgd6jW.d.ts} +26 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/components/Accordion.css +1 -1
- package/dist/styles/components/AlertDialog.css +1 -1
- package/dist/styles/components/Autocomplete.css +1 -1
- package/dist/styles/components/Avatar.css +1 -1
- package/dist/styles/components/Button.css +1 -1
- package/dist/styles/components/Checkbox.css +1 -1
- package/dist/styles/components/CheckboxGroup.css +1 -1
- package/dist/styles/components/Collapsible.css +1 -1
- package/dist/styles/components/Combobox.css +1 -1
- package/dist/styles/components/ContextMenu.css +1 -1
- package/dist/styles/components/Dialog.css +1 -1
- package/dist/styles/components/Drawer.css +1 -1
- package/dist/styles/components/Field.css +1 -1
- package/dist/styles/components/Fieldset.css +1 -1
- package/dist/styles/components/Form.css +1 -1
- package/dist/styles/components/Input.css +1 -1
- package/dist/styles/components/Menu.css +1 -1
- package/dist/styles/components/Menubar.css +1 -1
- package/dist/styles/components/Meter.css +1 -1
- package/dist/styles/components/NavigationMenu.css +1 -1
- package/dist/styles/components/NumberField.css +1 -1
- package/dist/styles/components/OTPField.css +1 -1
- package/dist/styles/components/Popover.css +1 -1
- package/dist/styles/components/PreviewCard.css +1 -1
- package/dist/styles/components/Progress.css +1 -1
- package/dist/styles/components/Radio.css +1 -1
- package/dist/styles/components/ScrollArea.css +1 -1
- package/dist/styles/components/Select.css +1 -1
- package/dist/styles/components/Separator.css +1 -1
- package/dist/styles/components/Slider.css +1 -1
- package/dist/styles/components/Switch.css +1 -1
- package/dist/styles/components/Tabs.css +1 -1
- package/dist/styles/components/Toast.css +1 -1
- package/dist/styles/components/Toggle.css +1 -1
- package/dist/styles/components/ToggleGroup.css +1 -1
- package/dist/styles/components/Toolbar.css +1 -1
- package/dist/styles/components/Tooltip.css +1 -1
- package/dist/styles/custom/AppBar.css +1 -1
- package/dist/styles/custom/Badge.css +1 -1
- package/dist/styles/custom/Collection.css +1 -1
- package/dist/styles/custom/CollectionPagination.css +1 -1
- package/dist/styles/custom/CollectionToolbar.css +1 -1
- package/dist/styles/custom/DataList.css +1 -1
- package/dist/styles/custom/DataTable.css +1 -1
- package/dist/styles/custom/DatePicker.css +1 -1
- package/dist/styles/custom/DescriptionList.css +1 -1
- package/dist/styles/custom/EditableList.css +1 -1
- package/dist/styles/custom/EmptyState.css +1 -1
- package/dist/styles/custom/ListDetail.css +1 -1
- package/dist/styles/custom/MoneyField.css +1 -1
- package/dist/styles/custom/PickerButton.css +1 -1
- package/dist/styles/custom/PickerSplit.css +96 -0
- package/dist/styles/custom/Sheet.css +7 -1
- package/dist/styles/custom/SideNav.css +1 -1
- package/dist/styles/custom/Splitter.css +1 -1
- package/dist/styles/custom/StatFigure.css +1 -1
- package/dist/styles/custom/Table.css +10 -1
- package/dist/styles/index.css +2 -1
- package/dist/styles/reset/accessibility.css +1 -1
- package/dist/styles/reset/reset-accessibility.css +1 -1
- package/dist/styles/reset/reset-tailwind.css +1 -1
- package/dist/styles/reset/reset.css +1 -1
- package/dist/styles/tailwind.css +2 -1
- package/package.json +2 -2
- package/dist/chunk-HPUI5FIO.js.map +0 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Use Base UI as usual, with the class names the styles target, or the few wrapper
|
|
|
30
30
|
```tsx
|
|
31
31
|
import {
|
|
32
32
|
Accordion, AlertDialog, Autocomplete, Avatar, Badge, Button, Calendar, Checkbox, CheckboxGroup, Collapsible,
|
|
33
|
-
AppBar, AppBarSpacer, Combobox, ContextMenu, DatePicker, DatePresets, DescriptionItem, DescriptionList, Dialog, Drawer, EmptyState, Field, Form, Input, ListDetail, Menu, Menubar, Meter, MoneyField, NumberField, PickerButton,
|
|
33
|
+
AppBar, AppBarSpacer, Combobox, ContextMenu, DatePicker, DatePresets, DescriptionItem, DescriptionList, Dialog, Drawer, EmptyState, Field, Form, Input, ListDetail, Menu, Menubar, Meter, MoneyField, NumberField, PickerButton, PickerSplit, PickerSplitMain, PickerSplitTrigger,
|
|
34
34
|
OTPField, Popover, PreviewCard, Progress, Radio, ScrollArea, Select, Separator, Sheet, SideNav, SideNavGroup, SideNavItem, SideNavToggle, Slider, Splitter, StatFigure, Switch,
|
|
35
35
|
Tabs, Toast, Toggle, ToggleGroup, Toolbar, Tooltip, useListDetail,
|
|
36
36
|
} from '@scattered-light/loomiere-base-ui';
|
|
@@ -201,6 +201,18 @@ A tree in a DataTable (`getSubRows`) has options for a register of parents and c
|
|
|
201
201
|
</AppBar>
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
+
`PickerSplit` is the same field with two parts, for a choice that is also a link or action: `PickerSplitMain` (the label and choice, a button) and `PickerSplitTrigger` (a square chevron button that opens the list). Anchor the popup to the root with a ref.
|
|
205
|
+
|
|
206
|
+
```tsx
|
|
207
|
+
<PickerSplit ref={anchor}>
|
|
208
|
+
<PickerSplitMain label="Client" value={client.name} onClick={openClient} />
|
|
209
|
+
<Menu.Root>
|
|
210
|
+
<Menu.Trigger render={(props) => <PickerSplitTrigger {...props} aria-label="Choose client" />} />
|
|
211
|
+
<Menu.Portal><Menu.Positioner anchor={anchor}>…</Menu.Positioner></Menu.Portal>
|
|
212
|
+
</Menu.Root>
|
|
213
|
+
</PickerSplit>
|
|
214
|
+
```
|
|
215
|
+
|
|
204
216
|
`data-variant="segmented"` on a `ToggleGroup` joins its toggles in one outline (`toggle-group.segmented-border-color`, the rule color) and fills the pressed one solid (`fill.inverse`), for switching between a few views or modules.
|
|
205
217
|
|
|
206
218
|
### Side navigation: SideNav
|
|
@@ -3562,6 +3562,21 @@ var PickerButton = React10.forwardRef(function PickerButton2({ className, label,
|
|
|
3562
3562
|
/* @__PURE__ */ jsx("svg", { className: "PickerButtonIcon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" }) })
|
|
3563
3563
|
] });
|
|
3564
3564
|
});
|
|
3565
|
+
var withoutButton = (className) => className?.split(/\s+/).filter((name) => name !== "Button").join(" ");
|
|
3566
|
+
var PickerSplit = React10.forwardRef(function PickerSplit2({ className, ...props }, ref) {
|
|
3567
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("PickerSplit", className), ...props });
|
|
3568
|
+
});
|
|
3569
|
+
var PickerSplitMain = React10.forwardRef(function PickerSplitMain2({ className, label, value, placeholder, type = "button", children, ...props }, ref) {
|
|
3570
|
+
const empty = value == null || value === "";
|
|
3571
|
+
return /* @__PURE__ */ jsxs("button", { ref, type, className: cn("PickerSplitMain", withoutButton(className)), ...props, children: [
|
|
3572
|
+
/* @__PURE__ */ jsx("span", { className: "PickerButtonLabel", children: label }),
|
|
3573
|
+
/* @__PURE__ */ jsx("span", { className: "PickerButtonValue", "data-placeholder": empty ? "" : void 0, children: empty ? placeholder : value }),
|
|
3574
|
+
children
|
|
3575
|
+
] });
|
|
3576
|
+
});
|
|
3577
|
+
var PickerSplitTrigger = React10.forwardRef(function PickerSplitTrigger2({ className, type = "button", ...props }, ref) {
|
|
3578
|
+
return /* @__PURE__ */ jsx("button", { ref, type, className: cn("PickerSplitTrigger", withoutButton(className)), ...props, children: /* @__PURE__ */ jsx("svg", { className: "PickerButtonIcon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" }) }) });
|
|
3579
|
+
});
|
|
3565
3580
|
var SideNav = React10.forwardRef(function SideNav2({ className, collapsed, children, ...props }, ref) {
|
|
3566
3581
|
return /* @__PURE__ */ jsx("nav", { ref, className: cn("SideNav", className), "data-collapsed": collapsed ? "" : void 0, ...props, children });
|
|
3567
3582
|
});
|
|
@@ -3832,6 +3847,6 @@ var EditableList = {
|
|
|
3832
3847
|
Balance: EditableListBalance
|
|
3833
3848
|
};
|
|
3834
3849
|
|
|
3835
|
-
export { AppBar, AppBarSpacer, Badge, CURRENCY_SEARCH_THRESHOLD, Calendar, CurrencySelect, DatePicker, DatePresets, DescriptionItem, DescriptionList, Drawer, EditableList, Field, ListDetail, ListDetailDetail, ListDetailList, ListDetailRoot, MAX_MINOR_UNITS, MoneyField, MoneyFieldAffix, MoneyFieldGroup, MoneyFieldInput, MoneyFieldRoot, NumberField, PickerButton, Popover, Sheet, SideNav, SideNavGroup, SideNavItem, SideNavToggle, Splitter, SplitterHandle, SplitterPanel, SplitterRoot, StatFigure, addDays, addMonths, affixSide, applyKey, applyStored, ariaPercents, builtinPresets, clampDate, createPanels, cssSize, currencyName, currencySymbol, daysInMonth, defaultPresets, defaultWeekStartsOn, endOfWeek, formatDay, formatFull, formatMoney2 as formatMoney, fromMinorUnits, getCurrencyDigits, handleTarget, inclusiveDays, isValidCurrency, isoWeek, last30Days, last7Days, lastMonth, lastWeek, layoutOf, lengthBlockReason, measure, monthCells, moveFocusDate, nextMonth, nextWeek, normalizePaste, orderRange, parseDate, parseDecimalString, parseSize, presetInBounds, resetToDefault, resizeByDelta, resolvePreset, roundHalfExpand, roundingChangesValue, sameSelection, serializeSize, settle, sizeText, startOfWeek, syncPanels, thisMonth, thisQuarter, thisWeek, toDecimalString, toMinorUnits, today, todayDate, toggleCollapsed, tomorrow, useListDetail, valueText, yearToDate, yesterday };
|
|
3836
|
-
//# sourceMappingURL=chunk-
|
|
3837
|
-
//# sourceMappingURL=chunk-
|
|
3850
|
+
export { AppBar, AppBarSpacer, Badge, CURRENCY_SEARCH_THRESHOLD, Calendar, CurrencySelect, DatePicker, DatePresets, DescriptionItem, DescriptionList, Drawer, EditableList, Field, ListDetail, ListDetailDetail, ListDetailList, ListDetailRoot, MAX_MINOR_UNITS, MoneyField, MoneyFieldAffix, MoneyFieldGroup, MoneyFieldInput, MoneyFieldRoot, NumberField, PickerButton, PickerSplit, PickerSplitMain, PickerSplitTrigger, Popover, Sheet, SideNav, SideNavGroup, SideNavItem, SideNavToggle, Splitter, SplitterHandle, SplitterPanel, SplitterRoot, StatFigure, addDays, addMonths, affixSide, applyKey, applyStored, ariaPercents, builtinPresets, clampDate, createPanels, cssSize, currencyName, currencySymbol, daysInMonth, defaultPresets, defaultWeekStartsOn, endOfWeek, formatDay, formatFull, formatMoney2 as formatMoney, fromMinorUnits, getCurrencyDigits, handleTarget, inclusiveDays, isValidCurrency, isoWeek, last30Days, last7Days, lastMonth, lastWeek, layoutOf, lengthBlockReason, measure, monthCells, moveFocusDate, nextMonth, nextWeek, normalizePaste, orderRange, parseDate, parseDecimalString, parseSize, presetInBounds, resetToDefault, resizeByDelta, resolvePreset, roundHalfExpand, roundingChangesValue, sameSelection, serializeSize, settle, sizeText, startOfWeek, syncPanels, thisMonth, thisQuarter, thisWeek, toDecimalString, toMinorUnits, today, todayDate, toggleCollapsed, tomorrow, useListDetail, valueText, yearToDate, yesterday };
|
|
3851
|
+
//# sourceMappingURL=chunk-RLXKWWZG.js.map
|
|
3852
|
+
//# sourceMappingURL=chunk-RLXKWWZG.js.map
|