@kerfjs/ui 5.0.0-beta.106 → 5.0.0-beta.108
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 +2 -1
- package/ai/application-ui-diagnostic-ids-v1.json +1 -0
- package/ai/application-ui-profile.defaults.json +6 -1
- package/ai/component-catalog.json +184 -39
- package/ai/component-composition-rules.json +20 -2
- package/ai/component-composition.d.ts +11 -0
- package/ai/component-composition.json +126 -21
- package/ai/component-composition.schema.json +32 -0
- package/ai/components/README.md +3 -2
- package/ai/components/button.md +9 -6
- package/ai/components/checkbox-group.md +89 -0
- package/ai/components/checkbox.md +3 -2
- package/ai/components/chip.md +1 -0
- package/ai/components/color-picker.md +10 -7
- package/ai/components/disclosure.md +6 -1
- package/ai/components/foundation.md +1 -1
- package/ai/components/list-detail-dialog.md +1 -1
- package/ai/components/list.md +1 -1
- package/ai/components/message-composer.md +2 -1
- package/ai/components/radio-group.md +4 -3
- package/ai/components/segmented-control.md +1 -0
- package/ai/components/split-button.md +5 -2
- package/ai/components/surface-scaffold.md +3 -1
- package/ai/components/switch.md +1 -1
- package/ai/components/text-field.md +3 -1
- package/ai/components/text.md +2 -0
- package/ai/components/toolbar-control-group.md +1 -0
- package/ai/components/toolbar.md +1 -1
- package/ai/components/wa-checkbox-group.md +5 -5
- package/ai/components/workbench-dialog.md +1 -1
- package/ai/public-api-signatures-v1.md +258 -35
- package/ai/skill.md +82 -65
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/checkbox-group.js +5 -0
- package/dist/button.d.ts +18 -5
- package/dist/button.js +1 -1
- package/dist/catalog.js +11 -10
- package/dist/catalog.js.map +1 -1
- package/dist/checkbox-group.d.ts +70 -0
- package/dist/checkbox-group.js +7 -0
- package/dist/checkbox-group.js.map +1 -0
- package/dist/chip.d.ts +20 -2
- package/dist/chip.js +2 -1
- package/dist/{chunk-SQ2Q3OQI.js → chunk-2LM3PYHA.js} +2 -2
- package/dist/{chunk-SQ2Q3OQI.js.map → chunk-2LM3PYHA.js.map} +1 -1
- package/dist/{chunk-HYORKKYP.js → chunk-3VZ6SFD4.js} +1 -1
- package/dist/chunk-3VZ6SFD4.js.map +1 -0
- package/dist/{chunk-EKBMUXFV.js → chunk-3Z7N2NAZ.js} +141 -54
- package/dist/chunk-3Z7N2NAZ.js.map +1 -0
- package/dist/{chunk-23PPPNH6.js → chunk-4OV272LF.js} +2 -2
- package/dist/{chunk-23PPPNH6.js.map → chunk-4OV272LF.js.map} +1 -1
- package/dist/{chunk-2PXZBFEC.js → chunk-5J6Z4BWY.js} +1 -1
- package/dist/{chunk-2PXZBFEC.js.map → chunk-5J6Z4BWY.js.map} +1 -1
- package/dist/{chunk-TAHR457X.js → chunk-6CDILXF4.js} +5 -1
- package/dist/chunk-6CDILXF4.js.map +1 -0
- package/dist/{chunk-DDSCVEO5.js → chunk-CPSGUGAY.js} +6 -6
- package/dist/{chunk-DDSCVEO5.js.map → chunk-CPSGUGAY.js.map} +1 -1
- package/dist/{chunk-C3RLKKFQ.js → chunk-EYDXFOSH.js} +13 -8
- package/dist/chunk-EYDXFOSH.js.map +1 -0
- package/dist/{chunk-PE2KPZDW.js → chunk-HDXUHLTQ.js} +7 -2
- package/dist/chunk-HDXUHLTQ.js.map +1 -0
- package/dist/chunk-HU5IHXCI.js +73 -0
- package/dist/chunk-HU5IHXCI.js.map +1 -0
- package/dist/{chunk-DF2YKGIX.js → chunk-JCCN3U6X.js} +2 -2
- package/dist/{chunk-DF2YKGIX.js.map → chunk-JCCN3U6X.js.map} +1 -1
- package/dist/{chunk-UTCAOOXU.js → chunk-KPINJHIC.js} +8 -2
- package/dist/chunk-KPINJHIC.js.map +1 -0
- package/dist/{chunk-N7MBGONH.js → chunk-LMHN2TJL.js} +22 -2
- package/dist/chunk-LMHN2TJL.js.map +1 -0
- package/dist/{chunk-NS2TBYM4.js → chunk-LZUUUHNH.js} +7 -3
- package/dist/chunk-LZUUUHNH.js.map +1 -0
- package/dist/{chunk-GCAK23PU.js → chunk-MVKHSAKE.js} +2 -2
- package/dist/{chunk-GCAK23PU.js.map → chunk-MVKHSAKE.js.map} +1 -1
- package/dist/{chunk-OY2MXIBB.js → chunk-NB6POCFH.js} +3 -1
- package/dist/chunk-NB6POCFH.js.map +1 -0
- package/dist/{chunk-ECFCAKWE.js → chunk-NR6O74ST.js} +5 -1
- package/dist/chunk-NR6O74ST.js.map +1 -0
- package/dist/{chunk-7W3GKMN4.js → chunk-OQP3PFKQ.js} +7 -4
- package/dist/chunk-OQP3PFKQ.js.map +1 -0
- package/dist/{chunk-FKKJHGN5.js → chunk-P7EJ4CAD.js} +2 -2
- package/dist/{chunk-FKKJHGN5.js.map → chunk-P7EJ4CAD.js.map} +1 -1
- package/dist/{chunk-ZXZAECHZ.js → chunk-SOFPUW3O.js} +4 -4
- package/dist/{chunk-ZXZAECHZ.js.map → chunk-SOFPUW3O.js.map} +1 -1
- package/dist/{chunk-WJKHLOP5.js → chunk-TI2GV36S.js} +8 -2
- package/dist/chunk-TI2GV36S.js.map +1 -0
- package/dist/{chunk-QLA25V2K.js → chunk-WPNIKZMJ.js} +15 -1
- package/dist/chunk-WPNIKZMJ.js.map +1 -0
- package/dist/{chunk-FG6U7KQQ.js → chunk-WSEJ2FDE.js} +4 -4
- package/dist/{chunk-FG6U7KQQ.js.map → chunk-WSEJ2FDE.js.map} +1 -1
- package/dist/{chunk-ACUKTVS3.js → chunk-XWNXGFX3.js} +52 -42
- package/dist/chunk-XWNXGFX3.js.map +1 -0
- package/dist/{chunk-WU57BYYM.js → chunk-YVZCKXR3.js} +8 -2
- package/dist/chunk-YVZCKXR3.js.map +1 -0
- package/dist/{chunk-CMLPFIC5.js → chunk-ZN7KUMPY.js} +3 -1
- package/dist/chunk-ZN7KUMPY.js.map +1 -0
- package/dist/collapsible-panel.js +2 -2
- package/dist/color-picker.d.ts +30 -5
- package/dist/color-picker.js +1 -1
- package/dist/disclosure.d.ts +13 -4
- package/dist/disclosure.js.map +1 -1
- package/dist/help-tags-register.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +24 -23
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.d.ts +7 -1
- package/dist/list-detail-dialog.js +7 -5
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-header.d.ts +8 -1
- package/dist/list-header.js +1 -1
- package/dist/list.d.ts +7 -1
- package/dist/list.js +1 -1
- package/dist/message-composer.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/popup-menu-register.js +2 -2
- package/dist/popup-menu.d.ts +15 -5
- package/dist/popup-menu.js +1 -1
- package/dist/segmented-control.d.ts +3 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select-register.js +3 -3
- package/dist/split-button.d.ts +14 -2
- package/dist/split-button.js +1 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/anchored-surface.css +3 -0
- package/dist/styles/button.css +57 -2
- package/dist/styles/catalog/components/catalog-example.css +55 -18
- package/dist/styles/checkbox-group.css +63 -0
- package/dist/styles/checkbox.css +7 -6
- package/dist/styles/color-picker.css +69 -34
- package/dist/styles/components/actions/button/button.css +57 -2
- package/dist/styles/components/actions/split-button/split-button.css +51 -5
- package/dist/styles/components/actions/toolbar/toolbar.css +9 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +29 -1
- package/dist/styles/components/collections/framed-list/framed-list.css +6 -0
- package/dist/styles/components/collections/list/list.css +6 -0
- package/dist/styles/components/collections/list-header/list-header.css +7 -0
- package/dist/styles/components/feedback/anchored-surface/anchored-surface.css +3 -0
- package/dist/styles/components/forms/checkbox/checkbox.css +7 -6
- package/dist/styles/components/forms/checkbox-group/checkbox-group.css +63 -0
- package/dist/styles/components/forms/color-picker/color-picker.css +69 -34
- package/dist/styles/components/forms/radio-group/radio-group.css +7 -5
- package/dist/styles/components/forms/select/select.css +6 -2
- package/dist/styles/components/forms/switch/switch.css +3 -3
- package/dist/styles/components/layout/pane/pane.css +24 -0
- package/dist/styles/components/layout/workbench/workbench.css +4 -0
- package/dist/styles/components/navigation/nav-stack/nav-stack.css +77 -1
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +6 -0
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +17 -0
- package/dist/styles/components/surfaces/content-item/content-item.css +30 -0
- package/dist/styles/components/surfaces/disclosure/disclosure.css +38 -0
- package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +3 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +8 -0
- package/dist/styles/components/typography/text/text.css +10 -0
- package/dist/styles/content-item.css +30 -0
- package/dist/styles/disclosure.css +38 -0
- package/dist/styles/foundation.css +78 -13
- package/dist/styles/framed-list.css +6 -0
- package/dist/styles/list-header.css +7 -0
- package/dist/styles/list.css +6 -0
- package/dist/styles/nav-stack.css +77 -1
- package/dist/styles/pane.css +24 -0
- package/dist/styles/radio-group.css +7 -5
- package/dist/styles/select.css +6 -2
- package/dist/styles/split-button.css +51 -5
- package/dist/styles/styles.css +1 -0
- package/dist/styles/sunken-panel.css +3 -0
- package/dist/styles/surface-scaffold.css +8 -0
- package/dist/styles/switch.css +3 -3
- package/dist/styles/tab-bar.css +6 -0
- package/dist/styles/tab-navigator.css +17 -0
- package/dist/styles/text.css +10 -0
- package/dist/styles/toolbar-control-group.css +29 -1
- package/dist/styles/toolbar.css +9 -0
- package/dist/styles/webawesome.css +56 -12
- package/dist/styles/workbench.css +4 -0
- package/dist/surface-scaffold.d.ts +15 -1
- package/dist/surface-scaffold.js +1 -1
- package/dist/text-field.d.ts +7 -1
- package/dist/text-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +8 -2
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar.d.ts +6 -1
- package/dist/toolbar.js +1 -1
- package/dist/wire-catalog.js +1 -1
- package/dist/wire-color-fields.js +2 -2
- package/dist/wire-color-pickers.d.ts +4 -3
- package/dist/wire-color-pickers.js +1 -1
- package/dist/wire-comboboxes.js +1 -1
- package/dist/wire-workbench.js +1 -1
- package/dist/workbench-dialog.d.ts +11 -2
- package/dist/workbench-dialog.js +6 -3
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +58 -3
- package/docs/anchored-surface.md +6 -1
- package/docs/catalog.md +26 -1
- package/docs/color-picker.md +39 -8
- package/docs/component-contract.md +47 -3
- package/docs/component-selection.md +58 -21
- package/docs/design/templates/button/full-width-dark.svg +1 -0
- package/docs/design/templates/button/full-width.svg +1 -0
- package/docs/design/templates/button/tones-dark.svg +1 -1
- package/docs/design/templates/button/tones.svg +1 -1
- package/docs/design/templates/button-dark.svg +1 -1
- package/docs/design/templates/button.svg +1 -1
- package/docs/design/templates/checkbox/error-dark.svg +1 -1
- package/docs/design/templates/checkbox/error.svg +1 -1
- package/docs/design/templates/checkbox/states-dark.svg +1 -1
- package/docs/design/templates/checkbox/states.svg +1 -1
- package/docs/design/templates/checkbox-dark.svg +1 -1
- package/docs/design/templates/checkbox-group/horizontal-dark.svg +1 -0
- package/docs/design/templates/checkbox-group/horizontal.svg +1 -0
- package/docs/design/templates/checkbox-group/vertical-dark.svg +1 -0
- package/docs/design/templates/checkbox-group/vertical.svg +1 -0
- package/docs/design/templates/checkbox-group-dark.svg +1 -0
- package/docs/design/templates/checkbox-group.svg +1 -0
- package/docs/design/templates/checkbox.svg +1 -1
- package/docs/design/templates/color-picker/gray-dark.svg +1 -1
- package/docs/design/templates/color-picker/gray.svg +1 -1
- package/docs/design/templates/color-picker/hsb-dark.svg +1 -0
- package/docs/design/templates/color-picker/hsb.svg +1 -0
- package/docs/design/templates/color-picker/rgb-dark.svg +1 -1
- package/docs/design/templates/color-picker/rgb.svg +1 -1
- package/docs/design/templates/color-picker-dark.svg +1 -1
- package/docs/design/templates/color-picker.svg +1 -1
- package/docs/design/templates/disclosure/embedded-dark.svg +1 -0
- package/docs/design/templates/disclosure/embedded.svg +1 -0
- package/docs/design/templates/disclosure-dark.svg +1 -1
- package/docs/design/templates/disclosure.svg +1 -1
- package/docs/design/templates/radio-group/horizontal-dark.svg +1 -1
- package/docs/design/templates/radio-group/horizontal.svg +1 -1
- package/docs/design/templates/radio-group/vertical-dark.svg +1 -1
- package/docs/design/templates/radio-group/vertical.svg +1 -1
- package/docs/design/templates/radio-group-dark.svg +1 -1
- package/docs/design/templates/radio-group.svg +1 -1
- package/docs/design/templates/split-button/full-width-dark.svg +1 -0
- package/docs/design/templates/split-button/full-width.svg +1 -0
- package/docs/design/templates/split-button/pill-dark.svg +1 -0
- package/docs/design/templates/split-button/pill.svg +1 -0
- package/docs/design/templates/split-button/states-dark.svg +1 -0
- package/docs/design/templates/split-button/states.svg +1 -0
- package/docs/design/templates/split-button/tones-dark.svg +1 -0
- package/docs/design/templates/split-button/tones.svg +1 -0
- package/docs/design/templates/split-button-dark.svg +1 -0
- package/docs/design/templates/split-button.svg +1 -0
- package/docs/design/templates/switch/states-dark.svg +1 -1
- package/docs/design/templates/switch/states.svg +1 -1
- package/docs/design/templates/switch-dark.svg +1 -1
- package/docs/design/templates/switch.svg +1 -1
- package/docs/design/templates/text-field/number-dark.svg +1 -0
- package/docs/design/templates/text-field/number.svg +1 -0
- package/docs/design/templates/text-field-dark.svg +1 -1
- package/docs/design/templates/text-field.svg +1 -1
- package/docs/design/templates.md +10 -3
- package/docs/disclosure.md +34 -0
- package/docs/layout.md +16 -5
- package/docs/list-detail-dialog.md +4 -0
- package/docs/nav-stack.md +6 -2
- package/docs/surface-scaffold.md +6 -2
- package/docs/ui-doctor.md +16 -4
- package/docs/webawesome-migration.md +3 -1
- package/docs/webawesome-theme.md +56 -18
- package/docs/workbench-dialog.md +4 -1
- package/docs/workbench.md +7 -1
- package/docs/writing.md +3 -3
- package/doctor/copy-capitalization-checks.mjs +10 -7
- package/llms.txt +65 -23
- package/package.json +7 -1
- package/dist/chunk-7W3GKMN4.js.map +0 -1
- package/dist/chunk-ACUKTVS3.js.map +0 -1
- package/dist/chunk-C3RLKKFQ.js.map +0 -1
- package/dist/chunk-CMLPFIC5.js.map +0 -1
- package/dist/chunk-ECFCAKWE.js.map +0 -1
- package/dist/chunk-EKBMUXFV.js.map +0 -1
- package/dist/chunk-HYORKKYP.js.map +0 -1
- package/dist/chunk-N7MBGONH.js.map +0 -1
- package/dist/chunk-NS2TBYM4.js.map +0 -1
- package/dist/chunk-OY2MXIBB.js.map +0 -1
- package/dist/chunk-PE2KPZDW.js.map +0 -1
- package/dist/chunk-QLA25V2K.js.map +0 -1
- package/dist/chunk-TAHR457X.js.map +0 -1
- package/dist/chunk-UTCAOOXU.js.map +0 -1
- package/dist/chunk-WJKHLOP5.js.map +0 -1
- package/dist/chunk-WU57BYYM.js.map +0 -1
package/dist/color-picker.d.ts
CHANGED
|
@@ -60,22 +60,47 @@ interface ColorPickerProps {
|
|
|
60
60
|
/** Native named-slot assignment when composed inside a web component. */
|
|
61
61
|
slot?: string;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The labels, accessible names, maximum, and spoken unit of each channel per
|
|
65
|
+
* mode; the mode's sliders and fields both follow it.
|
|
66
|
+
*/
|
|
64
67
|
declare const COLOR_PICKER_CHANNELS: Record<ColorPickerMode, readonly {
|
|
65
68
|
short: string;
|
|
66
69
|
name: string;
|
|
67
70
|
max: number;
|
|
71
|
+
unit: '' | '%' | '°';
|
|
68
72
|
}[]>;
|
|
69
73
|
/** The rounded channel values a mode shows for an HSV color. */
|
|
70
74
|
declare function colorPickerChannels(mode: ColorPickerMode, hsv: Hsva): number[];
|
|
75
|
+
/** One channel slider's attributes; see {@link colorPickerSlider}. */
|
|
76
|
+
interface ColorPickerSliderState {
|
|
77
|
+
max: number;
|
|
78
|
+
value: string;
|
|
79
|
+
label: string;
|
|
80
|
+
valueText: string;
|
|
81
|
+
style: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The attributes of one channel slider for a mode's exact channel values:
|
|
85
|
+
* its range, value, accessible name and spoken value, and an inline style
|
|
86
|
+
* with the track gradient of the colors that channel produces while the
|
|
87
|
+
* others hold (the full rainbow for the HSL and HSB hue) and the color under
|
|
88
|
+
* the thumb.
|
|
89
|
+
* `undefined` for a slot the mode does not use.
|
|
90
|
+
*/
|
|
91
|
+
declare function colorPickerSlider(mode: ColorPickerMode, index: number, values: readonly number[]): ColorPickerSliderState | undefined;
|
|
71
92
|
/** The area's spoken value. */
|
|
72
93
|
declare function colorPickerAreaText(hsv: Hsva): string;
|
|
73
94
|
/** The CSS custom properties that place the thumbs and paint the tracks. */
|
|
74
95
|
declare function colorPickerStyle(hsv: Hsva): string;
|
|
75
96
|
/**
|
|
76
|
-
* A full color picker panel: a saturation and brightness area
|
|
77
|
-
*
|
|
78
|
-
*
|
|
97
|
+
* A full color picker panel: a saturation and brightness area; a slider for
|
|
98
|
+
* each channel of the color model (red, green, and blue; hue, saturation, and
|
|
99
|
+
* lightness or brightness; or one gray level), each track painting the colors
|
|
100
|
+
* that channel produces while the others hold (the hue track the full
|
|
101
|
+
* rainbow); an optional opacity slider on
|
|
102
|
+
* a checkerboard; a color-model menu (RGB, HSL, HSB, Grayscale) with its
|
|
103
|
+
* channel fields, a hex field (8 digits below full
|
|
79
104
|
* opacity) and an opacity field, an optional screen sampler (EyeDropper), and
|
|
80
105
|
* optional preset and sample swatches. The controlled `value` renders it;
|
|
81
106
|
* wire `wireColorPickers` from `@kerfjs/ui/wire-color-pickers` to make it
|
|
@@ -85,4 +110,4 @@ declare function colorPickerStyle(hsv: Hsva): string;
|
|
|
85
110
|
*/
|
|
86
111
|
declare function ColorPicker({ id, label, value, mode, alpha, name, form, eyedropper, presets, samples, addSampleAction, disabled, className, rootAttributes, slot, }: ColorPickerProps): kerfjs.SafeHtml;
|
|
87
112
|
|
|
88
|
-
export { COLOR_PICKER_CHANNELS, COLOR_PICKER_SWATCH_ACTION, ColorPicker, type ColorPickerMode, type ColorPickerProps, type ColorPickerRootAttributes, type ColorPickerSamples, colorPickerAreaText, colorPickerChannels, colorPickerStyle };
|
|
113
|
+
export { COLOR_PICKER_CHANNELS, COLOR_PICKER_SWATCH_ACTION, ColorPicker, type ColorPickerMode, type ColorPickerProps, type ColorPickerRootAttributes, type ColorPickerSamples, type ColorPickerSliderState, colorPickerAreaText, colorPickerChannels, colorPickerSlider, colorPickerStyle };
|
package/dist/color-picker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { COLOR_PICKER_CHANNELS, COLOR_PICKER_SWATCH_ACTION, ColorPicker, colorPickerAreaText, colorPickerChannels, colorPickerStyle } from './chunk-
|
|
1
|
+
export { COLOR_PICKER_CHANNELS, COLOR_PICKER_SWATCH_ACTION, ColorPicker, colorPickerAreaText, colorPickerChannels, colorPickerSlider, colorPickerStyle } from './chunk-3Z7N2NAZ.js';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
package/dist/disclosure.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The Disclosure's surface: `plain` (default) on the surrounding surface,
|
|
6
|
-
* `framed` with the standard neutral border,
|
|
7
|
-
* textured work surface with a border
|
|
6
|
+
* `framed` with the standard neutral border, `sunken` on the lowered,
|
|
7
|
+
* textured work surface with a border, or `embedded` inside owner chrome such
|
|
8
|
+
* as a `ContentItem`: no margin, border, or padding of its own and a compact
|
|
9
|
+
* summary row, so the arrow sits on the owner's content inset.
|
|
8
10
|
*/
|
|
9
|
-
type DisclosureAppearance = 'plain' | 'framed' | 'sunken';
|
|
11
|
+
type DisclosureAppearance = 'plain' | 'framed' | 'sunken' | 'embedded';
|
|
10
12
|
/**
|
|
11
13
|
* Application `data-*` identity on the `<details>` root, such as `data-key`;
|
|
12
14
|
* the Disclosure's own configuration attributes stay protected.
|
|
@@ -31,6 +33,11 @@ interface DisclosureProps {
|
|
|
31
33
|
* where opening one closes the others (the native `<details name>`).
|
|
32
34
|
*/
|
|
33
35
|
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Surface treatment; defaults to `plain`. Use `embedded` only inside chrome
|
|
38
|
+
* that already owns the content-item inset, such as a `ContentItem`, and
|
|
39
|
+
* give it content that draws no inset of its own (`Text flush`).
|
|
40
|
+
*/
|
|
34
41
|
appearance?: DisclosureAppearance;
|
|
35
42
|
/**
|
|
36
43
|
* A `data-action` value on the `<details>` root, for a delegated listener of
|
|
@@ -48,7 +55,9 @@ interface DisclosureProps {
|
|
|
48
55
|
* Content a person shows and hides under a summary row: a native `<details>`
|
|
49
56
|
* with a `<summary>` that carries a `DisclosureArrow` and the title, on the
|
|
50
57
|
* shared content-item geometry (8px inline margin, a 1px border, 8px
|
|
51
|
-
* padding, the rounded radius).
|
|
58
|
+
* padding, the rounded radius). `appearance="embedded"` drops that geometry
|
|
59
|
+
* for a Disclosure inside owner chrome (a `ContentItem`) that already insets
|
|
60
|
+
* it. Keyboard and screen-reader behavior is the
|
|
52
61
|
* platform's: the summary is a button that Enter and Space toggle, and it
|
|
53
62
|
* reports its expanded state. Disclosures sharing a `name` form an accordion.
|
|
54
63
|
*/
|
package/dist/disclosure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/surfaces/disclosure/disclosure.tsx"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/components/surfaces/disclosure/disclosure.tsx"],"names":[],"mappings":";;;;;;AAqBA,IAAM,oBAAA,uBAA2B,GAAA,CAAI;AAAA,EACnC,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA;AACF,CAAC,CAAA;AAkDM,SAAS,UAAA,CAAW;AAAA,EACzB,KAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA,GAAO,KAAA;AAAA,EACP,IAAA;AAAA,EACA,UAAA,GAAa,OAAA;AAAA,EACb,YAAA;AAAA,EACA,EAAA;AAAA,EACA,iBAAiB,EAAC;AAAA,EAClB,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAAoB;AAClB,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,oBAAoB,CAAA;AAAA,MAC7D,EAAA;AAAA,MACA,KAAA,EAAO,CAAA,eAAA,EAAkB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC1C,gBAAA,EAAe,YAAA;AAAA,MACf,iBAAA,EAAiB,UAAA;AAAA,MACjB,aAAA,EAAa,YAAA;AAAA,MACb,IAAA;AAAA,MACA,MAAM,IAAA,IAAQ,MAAA;AAAA,MACd,IAAA;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,SAAA,EAAA,EAAQ,OAAM,yBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,mBAAgB,IAAA,EAAY,CAAA;AAAA,0BAC7B,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,uBAAA,EAAyB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,UAC1C,WAAW,MAAA,GAAY,IAAA,uBACrB,MAAA,EAAA,EAAK,KAAA,EAAM,0BAA0B,QAAA,EAAA,MAAA,EAAO;AAAA,SAAA,EAEjD,CAAA;AAAA,wBACA,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,yBAAA,EAA2B,QAAA,EAAS;AAAA;AAAA;AAAA,GACjD;AAEJ","file":"disclosure.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { DisclosureArrow } from '../../navigation/disclosure-arrow/disclosure-arrow.js';\n\n/**\n * The Disclosure's surface: `plain` (default) on the surrounding surface,\n * `framed` with the standard neutral border, `sunken` on the lowered,\n * textured work surface with a border, or `embedded` inside owner chrome such\n * as a `ContentItem`: no margin, border, or padding of its own and a compact\n * summary row, so the arrow sits on the owner's content inset.\n */\nexport type DisclosureAppearance = 'plain' | 'framed' | 'sunken' | 'embedded';\n\n/**\n * Application `data-*` identity on the `<details>` root, such as `data-key`;\n * the Disclosure's own configuration attributes stay protected.\n */\nexport type DisclosureRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\nconst DISCLOSURE_PROTECTED = new Set([\n 'data-component',\n 'data-appearance',\n 'data-action',\n]);\n\nexport interface DisclosureProps {\n /** The always-visible summary: a short title for the hidden content. */\n title: KerfUiContent | string;\n /** A quiet line after the title in the summary, such as a count. */\n detail?: KerfUiContent | string;\n /** The content shown while open. */\n children: KerfUiContent | string;\n /**\n * Render it open. The open state belongs to the native `<details>` once it\n * is on the page: a person toggles it, a re-render that passes `open` opens\n * it, and a re-render never closes it (kerf's morph leaves a `<details>`\n * element's live `open` alone). Close it from code with `element.open = false`.\n */\n open?: boolean;\n /**\n * An exclusive group: Disclosures sharing a `name` behave as an accordion,\n * where opening one closes the others (the native `<details name>`).\n */\n name?: string;\n /**\n * Surface treatment; defaults to `plain`. Use `embedded` only inside chrome\n * that already owns the content-item inset, such as a `ContentItem`, and\n * give it content that draws no inset of its own (`Text flush`).\n */\n appearance?: DisclosureAppearance;\n /**\n * A `data-action` value on the `<details>` root, for a delegated listener of\n * the native `toggle` event (it does not bubble: listen in the capture phase,\n * for example with `delegateCapture`). `event.newState` is `open` or `closed`.\n */\n toggleAction?: string;\n id?: string;\n rootAttributes?: DisclosureRootAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * Content a person shows and hides under a summary row: a native `<details>`\n * with a `<summary>` that carries a `DisclosureArrow` and the title, on the\n * shared content-item geometry (8px inline margin, a 1px border, 8px\n * padding, the rounded radius). `appearance=\"embedded\"` drops that geometry\n * for a Disclosure inside owner chrome (a `ContentItem`) that already insets\n * it. Keyboard and screen-reader behavior is the\n * platform's: the summary is a button that Enter and Space toggle, and it\n * reports its expanded state. Disclosures sharing a `name` form an accordion.\n */\nexport function Disclosure({\n title,\n detail,\n children,\n open = false,\n name,\n appearance = 'plain',\n toggleAction,\n id,\n rootAttributes = {},\n className = '',\n slot,\n}: DisclosureProps) {\n return (\n <details\n {...filterDataAttributes(rootAttributes, DISCLOSURE_PROTECTED)}\n id={id}\n class={`kui-disclosure ${className}`.trim()}\n data-component=\"disclosure\"\n data-appearance={appearance}\n data-action={toggleAction}\n name={name}\n open={open || undefined}\n slot={slot}\n >\n <summary class=\"kui-disclosure__summary\">\n <DisclosureArrow open={open} />\n <span class=\"kui-disclosure__title\">{title}</span>\n {detail === undefined ? null : (\n <span class=\"kui-disclosure__detail\">{detail}</span>\n )}\n </summary>\n <div class=\"kui-disclosure__content\">{children}</div>\n </details>\n );\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Button, ButtonContent, ButtonEmphasis, ButtonLabel, ButtonOptions, ButtonProps, ButtonRootAttributes, ButtonShape, ButtonSize, ButtonTone, ButtonType } from './button.js';
|
|
2
2
|
export { FloatingToolbar, FloatingToolbarPosition, FloatingToolbarProps } from './floating-toolbar.js';
|
|
3
3
|
export { PopupMenu, PopupMenuAnchor, PopupMenuDivider, PopupMenuElement, PopupMenuEntry, PopupMenuHeading, PopupMenuItem, PopupMenuPlacement, PopupMenuProps, closePopupMenu, openPopupMenu, openPopupMenuAt } from './popup-menu.js';
|
|
4
|
-
export { SplitButton, SplitButtonProps, SplitButtonTone } from './split-button.js';
|
|
4
|
+
export { SplitButton, SplitButtonProps, SplitButtonShape, SplitButtonTone } from './split-button.js';
|
|
5
5
|
export { Toolbar, ToolbarConfig, ToolbarPosition, ToolbarProps } from './toolbar.js';
|
|
6
6
|
export { ToolbarActionLink, ToolbarActionLinkProps, ToolbarControlGroup, ToolbarControlGroupAppearance, ToolbarControlGroupButtonAppearance, ToolbarControlGroupContent, ToolbarControlGroupDensity, ToolbarControlGroupExpandedOverflow, ToolbarControlGroupMaterial, ToolbarControlGroupMenuInset, ToolbarControlGroupOverflow, ToolbarControlGroupProps, ToolbarControlGroupSelectedChrome, ToolbarControlGroupSelectedTone, ToolbarControlGroupShape, ToolbarControlGroupSize, ToolbarControlGroupTileTone, ToolbarControlGroupTone, ToolbarControlGroupVisibility } from './toolbar-control-group.js';
|
|
7
7
|
export { HeadingLevel, ToolbarText, ToolbarTextProps, ToolbarTextSize, ToolbarTextTone } from './toolbar-text.js';
|
|
@@ -27,6 +27,7 @@ export { Skeleton, SkeletonProps } from './skeleton.js';
|
|
|
27
27
|
export { StateBanner, StateBannerProps, StateBannerTone, StateBannerUrgency } from './state-banner.js';
|
|
28
28
|
export { Checkbox, CheckboxProps, CheckboxRootAttributes, CheckboxSize } from './checkbox.js';
|
|
29
29
|
export { wireCheckboxes } from './wire-checkboxes.js';
|
|
30
|
+
export { CheckboxGroup, CheckboxGroupChoice, CheckboxGroupName, CheckboxGroupOptions, CheckboxGroupOrientation, CheckboxGroupProps, CheckboxGroupRootAttributes, CheckboxGroupSize } from './checkbox-group.js';
|
|
30
31
|
export { ChoiceChips, ChoiceChipsChoice, ChoiceChipsProps, ChoiceChipsSelectionMode, ChoiceChipsSize, ChoiceChipsSwatch } from './choice-chips.js';
|
|
31
32
|
export { readChoiceChips, wireChoiceChips } from './wire-choice-chips.js';
|
|
32
33
|
export { Combobox, ComboboxProps, ComboboxSuggestion } from './combobox.js';
|
package/dist/index.js
CHANGED
|
@@ -1,85 +1,86 @@
|
|
|
1
1
|
export { reorderTabs, wireTabBars } from './chunk-T74YB76U.js';
|
|
2
2
|
export { wireTextFields } from './chunk-KC6WUSNS.js';
|
|
3
3
|
export { wireToolbarVisibility } from './chunk-2GOCOLQL.js';
|
|
4
|
+
export { reorderListItems, wireListReorder } from './chunk-MJ5RU6XT.js';
|
|
4
5
|
export { wireMessageComposers } from './chunk-HTERKONR.js';
|
|
5
6
|
export { wireOverlaySheets } from './chunk-4RECPEHI.js';
|
|
6
7
|
export { wireResizableRegions } from './chunk-GS2QD3N7.js';
|
|
7
8
|
export { wireSearchFields } from './chunk-UMNHJSIO.js';
|
|
8
|
-
export {
|
|
9
|
+
export { readChoiceChips, wireChoiceChips } from './chunk-K57NINLH.js';
|
|
10
|
+
export { wireComboboxes } from './chunk-MVKHSAKE.js';
|
|
9
11
|
export { wireCornerStatus } from './chunk-ZKKO4MHC.js';
|
|
10
12
|
export { fileMatchesAccept, wireFilePickers } from './chunk-KK3S5OTW.js';
|
|
11
13
|
export { wireListFocusScroll } from './chunk-QDSZTQXL.js';
|
|
12
|
-
export { reorderListItems, wireListReorder } from './chunk-MJ5RU6XT.js';
|
|
13
14
|
export { ValueTable, ValueTableRow } from './chunk-DZJ4GBSP.js';
|
|
14
15
|
|
|
15
16
|
export { wireScrollDividers } from './chunk-OZ6X76G5.js';
|
|
16
17
|
export { wireCheckboxes } from './chunk-CNM6ZWP2.js';
|
|
17
|
-
export { readChoiceChips, wireChoiceChips } from './chunk-K57NINLH.js';
|
|
18
18
|
export { TabBarItem } from './chunk-ZCDRLN3B.js';
|
|
19
19
|
export { TabBar } from './chunk-RFLW4FPL.js';
|
|
20
|
-
export { TextField } from './chunk-
|
|
20
|
+
export { TextField } from './chunk-YVZCKXR3.js';
|
|
21
21
|
export { Spacer } from './chunk-YMUIQRWK.js';
|
|
22
|
-
export { SplitButton } from './chunk-
|
|
22
|
+
export { SplitButton } from './chunk-TI2GV36S.js';
|
|
23
23
|
export { StateBanner } from './chunk-2FW7D4IG.js';
|
|
24
24
|
export { SummaryRow } from './chunk-4UB5Z3ZZ.js';
|
|
25
25
|
export { SunkenPanel } from './chunk-D5RGM3XA.js';
|
|
26
26
|
export { createSearchFieldModel } from './chunk-CIAUILRR.js';
|
|
27
|
-
export { SegmentedControl } from './chunk-
|
|
27
|
+
export { SegmentedControl } from './chunk-LZUUUHNH.js';
|
|
28
28
|
export { Select } from './chunk-ZX2QQJXD.js';
|
|
29
29
|
|
|
30
30
|
export { applySelection, isApplePlatform, selectionGesture } from './chunk-GXSX6Q6O.js';
|
|
31
|
+
export { MessageComposer } from './chunk-4OV272LF.js';
|
|
31
32
|
export { RadioGroup } from './chunk-OHPYT2BH.js';
|
|
32
|
-
export {
|
|
33
|
+
export { DialogSurface, PopoverDialogSurface, PopupSurface } from './chunk-6CDILXF4.js';
|
|
34
|
+
export { closeDialog, openDialog } from './chunk-ATGAJVZ6.js';
|
|
35
|
+
|
|
36
|
+
export { EmptyState } from './chunk-B53PS2LE.js';
|
|
33
37
|
export { FileDropZone, FilePickerTrigger } from './chunk-KDQZ3E5C.js';
|
|
34
38
|
export { FramedList, FramedListRow } from './chunk-S2XULQEK.js';
|
|
35
39
|
export { Grid } from './chunk-KCS6NJ3O.js';
|
|
36
40
|
|
|
37
|
-
export { ListActionRow } from './chunk-
|
|
38
|
-
export {
|
|
39
|
-
export { closeDialog, openDialog } from './chunk-ATGAJVZ6.js';
|
|
40
|
-
|
|
41
|
+
export { ListActionRow } from './chunk-JCCN3U6X.js';
|
|
42
|
+
export { ContentItem } from './chunk-5USKCWGL.js';
|
|
41
43
|
export { ContentSwap } from './chunk-EIET4QLK.js';
|
|
42
44
|
export { CornerStatus } from './chunk-G3J7JDP6.js';
|
|
43
45
|
export { EdgeActivityIndicator } from './chunk-QH5KOFNS.js';
|
|
44
|
-
export {
|
|
46
|
+
export { Chip } from './chunk-LMHN2TJL.js';
|
|
45
47
|
export { ChoiceChips } from './chunk-ITUQC4FW.js';
|
|
46
48
|
export { ColumnTrack } from './chunk-QYMJHS4K.js';
|
|
47
49
|
export { Combobox } from './chunk-BKUMG2KB.js';
|
|
48
|
-
export { ContentItem } from './chunk-5USKCWGL.js';
|
|
49
50
|
export { openAnchoredSurface, openAnchoredSurfaceAt } from './chunk-3WYREXW4.js';
|
|
50
51
|
export { BackdropImage } from './chunk-SCDWURBO.js';
|
|
51
|
-
export { Button } from './chunk-
|
|
52
|
+
export { Button } from './chunk-KPINJHIC.js';
|
|
52
53
|
export { Switch } from './chunk-LTBVP6VN.js';
|
|
53
54
|
export { Row } from './chunk-AMIHGFLP.js';
|
|
54
55
|
export { SearchField, placeSearchFieldCaret, readSearchField } from './chunk-VEME3D7K.js';
|
|
55
|
-
export {
|
|
56
|
+
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-Y6KT7ZTR.js';
|
|
57
|
+
export { ToolbarText } from './chunk-EKHDLBRP.js';
|
|
58
|
+
export { ListHeader } from './chunk-NR6O74ST.js';
|
|
59
|
+
export { FieldLabel, Text } from './chunk-7K6U6FCN.js';
|
|
56
60
|
export { ListInsetControl } from './chunk-AN5IWMTM.js';
|
|
57
61
|
export { ListInsetText } from './chunk-S4Y3YTAI.js';
|
|
58
62
|
export { ListItem, ListItemLink } from './chunk-3GLYIIFR.js';
|
|
59
|
-
export { FieldLabel, Text } from './chunk-7K6U6FCN.js';
|
|
60
63
|
export { FloatingToolbar } from './chunk-S3ECMF23.js';
|
|
61
|
-
export { PopupMenu, closePopupMenu, openPopupMenu, openPopupMenuAt } from './chunk-
|
|
64
|
+
export { PopupMenu, closePopupMenu, openPopupMenu, openPopupMenuAt } from './chunk-OQP3PFKQ.js';
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
|
|
65
|
-
export { ToolbarText } from './chunk-EKHDLBRP.js';
|
|
66
|
-
export { ResizableRegion, clampRegionSize, resizeRegionFromPointer } from './chunk-Y6KT7ZTR.js';
|
|
67
68
|
export { Skeleton } from './chunk-CVD5IZGB.js';
|
|
68
69
|
export { DisclosureArrow } from './chunk-TKNVL53O.js';
|
|
69
|
-
export { ToolbarActionLink, ToolbarControlGroup } from './chunk-
|
|
70
|
+
export { ToolbarActionLink, ToolbarControlGroup } from './chunk-5J6Z4BWY.js';
|
|
71
|
+
export { Toolbar } from './chunk-ZN7KUMPY.js';
|
|
70
72
|
export { Pane } from './chunk-HQZG3OFL.js';
|
|
71
73
|
|
|
72
74
|
export { ensureSunkenTexture } from './chunk-IKS72C6P.js';
|
|
73
|
-
export { List } from './chunk-
|
|
75
|
+
export { List } from './chunk-NB6POCFH.js';
|
|
74
76
|
|
|
75
|
-
export { Toolbar } from './chunk-CMLPFIC5.js';
|
|
76
77
|
|
|
77
78
|
export { LoadingSpinner } from './chunk-WVS6CUCT.js';
|
|
78
79
|
export { Badge } from './chunk-RMWNO6BA.js';
|
|
80
|
+
export { CheckboxGroup } from './chunk-HU5IHXCI.js';
|
|
79
81
|
export { Checkbox } from './chunk-C26Q6P4Q.js';
|
|
80
82
|
export { LucideIcon } from './chunk-HJXVVFBT.js';
|
|
81
83
|
export { calc, colorVar, em, fillColor, flex, foregroundColor, foregroundColorVar, lengthVar, pct, plus, px, rem, space, uiColor } from './chunk-IQSRHXZR.js';
|
|
82
84
|
|
|
83
|
-
export { Chip } from './chunk-N7MBGONH.js';
|
|
84
85
|
|
|
85
86
|
//# sourceMappingURL=index.js.map
|
package/dist/list-action-row.js
CHANGED
|
@@ -70,6 +70,12 @@ interface ListDetailDialogProps {
|
|
|
70
70
|
id: string;
|
|
71
71
|
/** The dialog's accessible name. */
|
|
72
72
|
label: string;
|
|
73
|
+
/**
|
|
74
|
+
* Id of the element whose text is the dialog's accessible description,
|
|
75
|
+
* such as app-owned summary copy. The detail's `description` describes the
|
|
76
|
+
* selection, not the dialog, so it is not wired automatically.
|
|
77
|
+
*/
|
|
78
|
+
describedBy?: string;
|
|
73
79
|
list: ListDetailDialogList;
|
|
74
80
|
detail: ListDetailDialogDetail;
|
|
75
81
|
/**
|
|
@@ -112,6 +118,6 @@ interface ListDetailDialogProps {
|
|
|
112
118
|
* stack's back control dispatches `nav-back`). Built from `DialogSurface`,
|
|
113
119
|
* `SplitView`, and `Pane`.
|
|
114
120
|
*/
|
|
115
|
-
declare function ListDetailDialog({ id, label, list, detail, compact, detailActive, backLabel, closeLabel, lightDismiss, size, preferredWidth, height, maxHeight, viewportGutter, rootAttributes, className, slot, }: ListDetailDialogProps): kerfjs.SafeHtml;
|
|
121
|
+
declare function ListDetailDialog({ id, label, describedBy, list, detail, compact, detailActive, backLabel, closeLabel, lightDismiss, size, preferredWidth, height, maxHeight, viewportGutter, rootAttributes, className, slot, }: ListDetailDialogProps): kerfjs.SafeHtml;
|
|
116
122
|
|
|
117
123
|
export { ListDetailDialog, type ListDetailDialogDetail, type ListDetailDialogList, type ListDetailDialogProps, type ListDetailDialogRootAttributes };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SplitView } from './chunk-
|
|
2
|
-
import { DialogSurface } from './chunk-
|
|
1
|
+
import { SplitView } from './chunk-P7EJ4CAD.js';
|
|
2
|
+
import { DialogSurface } from './chunk-6CDILXF4.js';
|
|
3
3
|
export { closeDialog, openDialog } from './chunk-ATGAJVZ6.js';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import { ToolbarText } from './chunk-EKHDLBRP.js';
|
|
7
6
|
|
|
7
|
+
import { ToolbarText } from './chunk-EKHDLBRP.js';
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
import { ToolbarControlGroup } from './chunk-
|
|
10
|
+
import { ToolbarControlGroup } from './chunk-5J6Z4BWY.js';
|
|
11
|
+
import { Toolbar } from './chunk-ZN7KUMPY.js';
|
|
11
12
|
import { Pane } from './chunk-HQZG3OFL.js';
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
import { Toolbar } from './chunk-CMLPFIC5.js';
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
import { LucideIcon } from './chunk-HJXVVFBT.js';
|
|
@@ -29,6 +29,7 @@ function closeGroup(closeLabel) {
|
|
|
29
29
|
function ListDetailDialog({
|
|
30
30
|
id,
|
|
31
31
|
label,
|
|
32
|
+
describedBy,
|
|
32
33
|
list,
|
|
33
34
|
detail,
|
|
34
35
|
compact = false,
|
|
@@ -138,6 +139,7 @@ function ListDetailDialog({
|
|
|
138
139
|
{
|
|
139
140
|
id,
|
|
140
141
|
label,
|
|
142
|
+
describedBy,
|
|
141
143
|
withoutHeader: true,
|
|
142
144
|
lightDismiss,
|
|
143
145
|
closeLabel,
|
|
@@ -1 +1 @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H,oBAAA,EAAsB;AAAA,OACxB;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"list-detail-dialog.js","sourcesContent":["import { X } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\nimport { remify } from '../../../shared/styles/css-values.js';\nimport { Toolbar } from '../../actions/toolbar/toolbar.js';\nimport { ToolbarControlGroup } from '../../actions/toolbar-control-group/toolbar-control-group.js';\nimport { ToolbarText } from '../../actions/toolbar-text/toolbar-text.js';\nimport { Pane } from '../../layout/pane/pane.js';\nimport {\n SplitView,\n type SplitViewListWidth,\n} from '../../layout/split-view/split-view.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\nimport {\n DialogSurface,\n type DialogSurfaceHeight,\n type DialogSurfaceMaxHeight,\n type DialogSurfaceRootAttributes,\n type DialogSurfaceSize,\n} from '../surface-scaffold/surface-scaffold.js';\n\n// Open and close it like any DialogSurface, from the same import.\nexport {\n closeDialog,\n type DialogCloseSource,\n type DialogRequestCloseDetail,\n openDialog,\n} from '../surface-scaffold/surface-scaffold.js';\n\n/** The list column: a secondary title, its own controls, and the list. */\nexport interface ListDetailDialogList {\n /**\n * The column's title, at the default toolbar size so it reads as pane\n * identity beside the detail's primary title. On compact devices it titles\n * the root view.\n */\n title: string;\n /** Controls after the title in the column's header, such as a `ToolbarControlGroup`. */\n toolbar?: KerfUiContent;\n /** The list, usually a `List` of selectable `ListItem`s. */\n content: KerfUiContent;\n /** Content pinned below the list, such as an add control. */\n footer?: KerfUiContent;\n /**\n * The column's width on roomy devices (default 280px, at most 40% of the\n * dialog's width).\n */\n width?: SplitViewListWidth;\n}\n\n/** The detail column: the dialog's primary title, actions, and close control. */\nexport interface ListDetailDialogDetail {\n /**\n * The dialog's primary title: an xl heading at the top of the detail\n * column on roomy devices, and the pushed view's title on compact devices.\n */\n title: string;\n /** A short supporting line under the roomy title. */\n description?: string;\n /**\n * Header controls before the close control, such as a\n * `ToolbarControlGroup`. Primary record actions usually go in `footer`.\n */\n actions?: KerfUiContent;\n /** The selected item's detail. */\n content: KerfUiContent;\n /** Content pinned below the detail, usually its buttons. */\n footer?: KerfUiContent;\n}\n\n/**\n * Application `data-*` identity on the dialog root, such as `data-key`; the\n * dialog's own configuration attributes stay protected.\n */\nexport type ListDetailDialogRootAttributes = DialogSurfaceRootAttributes;\n\nexport interface ListDetailDialogProps {\n /**\n * The dialog's id, for `openDialog(document.getElementById(id))`. Also\n * prefixes the ids of the split and the detail title.\n */\n id: string;\n /** The dialog's accessible name. */\n label: string;\n list: ListDetailDialogList;\n detail: ListDetailDialogDetail;\n /**\n * One pane at a time: derive from `deviceClass().value.compact`. The dialog\n * fills the screen and drills from the list into the detail as a\n * `NavStack`; every view keeps the close control.\n */\n compact?: boolean;\n /** On compact devices, whether the detail is pushed over the list. */\n detailActive?: boolean;\n /** The compact back control's accessible name (default `Back`). */\n backLabel?: string;\n /** The close control's accessible name (default `Close`). */\n closeLabel?: string;\n /** Close on a press on the backdrop; otherwise the panel pulses. */\n lightDismiss?: boolean;\n /** Roomy preferred width preset (default `large`). */\n size?: DialogSurfaceSize;\n /** Roomy preferred width; takes precedence over `size`. */\n preferredWidth?: CssLength;\n /** Roomy definite height (default 560px), bounded by the viewport. */\n height?: DialogSurfaceHeight;\n /** Roomy height cap in place of a definite height. */\n maxHeight?: DialogSurfaceMaxHeight;\n /** Roomy edge clearance from the viewport. */\n viewportGutter?: CssLength;\n rootAttributes?: ListDetailDialogRootAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nconst DEFAULT_LIST_WIDTH: SplitViewListWidth = { size: 280, maxFraction: 0.4 };\n\nfunction closeGroup(closeLabel: string) {\n return (\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button type=\"button\" aria-label={closeLabel} data-dialog-close=\"\">\n <LucideIcon icon={X} name=\"x\" />\n </button>\n </ToolbarControlGroup>\n );\n}\n\n/**\n * A list-detail dialog: a modal whose list column and detail column each run\n * its full height. The list column carries a secondary title and its own\n * controls; the detail column carries the dialog's primary title, its\n * actions, and the close control, so the divider between them runs from top\n * to bottom. On compact devices it fills the screen and becomes a `NavStack`\n * that drills from the list into the detail. Open it with `openDialog()`;\n * the app owns the selection and, on compact devices, `detailActive` (the\n * stack's back control dispatches `nav-back`). Built from `DialogSurface`,\n * `SplitView`, and `Pane`.\n */\nexport function ListDetailDialog({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n backLabel = 'Back',\n closeLabel = 'Close',\n lightDismiss = false,\n size = 'large',\n preferredWidth,\n height,\n maxHeight,\n viewportGutter,\n rootAttributes,\n className = '',\n slot,\n}: ListDetailDialogProps) {\n const close = closeGroup(closeLabel);\n const split = compact ? (\n <SplitView\n id={`${id}-split`}\n label={label}\n compact\n detailActive={detailActive}\n listTitle={list.title}\n detailTitle={detail.title}\n backLabel={backLabel}\n compactStack={{\n list: {\n toolbar: {\n trailing: (\n <>\n {list.toolbar}\n {close}\n </>\n ),\n },\n footer: list.footer,\n },\n detail: {\n toolbar: {\n trailing: (\n <>\n {detail.actions}\n {close}\n </>\n ),\n },\n footer: detail.footer,\n },\n }}\n list={list.content}\n detail={detail.content}\n />\n ) : (\n <SplitView\n id={`${id}-split`}\n label={label}\n listTitle={list.title}\n detailTitle={detail.title}\n listWidth={list.width ?? DEFAULT_LIST_WIDTH}\n list={\n <Pane\n label={list.title}\n header={\n <Toolbar\n label={list.title}\n leading={<ToolbarText text={list.title} />}\n trailing={list.toolbar}\n />\n }\n footer={list.footer}\n >\n {list.content}\n </Pane>\n }\n detail={\n <Pane\n label={detail.title}\n header={\n <Toolbar\n label={detail.title}\n leading={\n <ToolbarText\n text={detail.title}\n description={detail.description}\n size=\"xlarge\"\n id={`${id}-title`}\n headingLevel={2}\n />\n }\n trailing={\n <>\n {detail.actions}\n {close}\n </>\n }\n />\n }\n footer={detail.footer}\n >\n {detail.content}\n </Pane>\n }\n />\n );\n return (\n <DialogSurface\n id={id}\n label={label}\n withoutHeader\n lightDismiss={lightDismiss}\n closeLabel={closeLabel}\n size={size}\n presentation={compact ? 'fullscreen' : 'modal'}\n preferredWidth={preferredWidth}\n height={\n compact\n ? undefined\n : maxHeight === undefined\n ? (height ?? remify(560))\n : height\n }\n maxHeight={compact ? undefined : maxHeight}\n viewportGutter={compact ? undefined : viewportGutter}\n bodyInset=\"none\"\n bodyLayout=\"fill\"\n rootAttributes={{\n ...rootAttributes,\n 'data-dialog-layout': 'list-detail',\n }}\n className={className}\n slot={slot}\n >\n {split}\n </DialogSurface>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/surfaces/list-detail-dialog/list-detail-dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2HA,IAAM,kBAAA,GAAyC,EAAE,IAAA,EAAM,GAAA,EAAK,aAAa,GAAA,EAAI;AAE7E,SAAS,WAAW,UAAA,EAAoB;AACtC,EAAA,uBACE,GAAA,CAAC,uBAAoB,UAAA,EAAW,YAAA,EAAa,QAAM,IAAA,EACjD,QAAA,kBAAA,GAAA,CAAC,YAAO,IAAA,EAAK,QAAA,EAAS,cAAY,UAAA,EAAY,mBAAA,EAAkB,IAC9D,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,MAAM,CAAA,EAAG,IAAA,EAAK,GAAA,EAAI,CAAA,EAChC,CAAA,EACF,CAAA;AAEJ;AAaO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,EAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV,YAAA,GAAe,KAAA;AAAA,EACf,SAAA,GAAY,MAAA;AAAA,EACZ,UAAA,GAAa,OAAA;AAAA,EACb,YAAA,GAAe,KAAA;AAAA,EACf,IAAA,GAAO,OAAA;AAAA,EACP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,MACA,aAAA,EAAa,IAAA;AAAA,MACb,YAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,MACA,YAAA,EAAc,UAAU,YAAA,GAAe,OAAA;AAAA,MACvC,cAAA;AAAA,MACA,MAAA,EACE,UACI,MAAA,GACA,SAAA,KAAc,SACX,MAAA,IAAU,MAAA,CAAO,GAAG,CAAA,GACrB,MAAA;AAAA,MAER,SAAA,EAAW,UAAU,MAAA,GAAY,SAAA;AAAA,MACjC,cAAA,EAAgB,UAAU,MAAA,GAAY,cAAA;AAAA,MACtC,SAAA,EAAU,MAAA;AAAA,MACV,UAAA,EAAW,MAAA;AAAA,MACX,cAAA,EAAgB;AAAA,QACd,GAAG,cAAA;AAAA,QACH,oBAAA,EAAsB;AAAA,OACxB;AAAA,MACA,SAAA;AAAA,MACA,IAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"list-detail-dialog.js","sourcesContent":["import { X } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\nimport { remify } from '../../../shared/styles/css-values.js';\nimport { Toolbar } from '../../actions/toolbar/toolbar.js';\nimport { ToolbarControlGroup } from '../../actions/toolbar-control-group/toolbar-control-group.js';\nimport { ToolbarText } from '../../actions/toolbar-text/toolbar-text.js';\nimport { Pane } from '../../layout/pane/pane.js';\nimport {\n SplitView,\n type SplitViewListWidth,\n} from '../../layout/split-view/split-view.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\nimport {\n DialogSurface,\n type DialogSurfaceHeight,\n type DialogSurfaceMaxHeight,\n type DialogSurfaceRootAttributes,\n type DialogSurfaceSize,\n} from '../surface-scaffold/surface-scaffold.js';\n\n// Open and close it like any DialogSurface, from the same import.\nexport {\n closeDialog,\n type DialogCloseSource,\n type DialogRequestCloseDetail,\n openDialog,\n} from '../surface-scaffold/surface-scaffold.js';\n\n/** The list column: a secondary title, its own controls, and the list. */\nexport interface ListDetailDialogList {\n /**\n * The column's title, at the default toolbar size so it reads as pane\n * identity beside the detail's primary title. On compact devices it titles\n * the root view.\n */\n title: string;\n /** Controls after the title in the column's header, such as a `ToolbarControlGroup`. */\n toolbar?: KerfUiContent;\n /** The list, usually a `List` of selectable `ListItem`s. */\n content: KerfUiContent;\n /** Content pinned below the list, such as an add control. */\n footer?: KerfUiContent;\n /**\n * The column's width on roomy devices (default 280px, at most 40% of the\n * dialog's width).\n */\n width?: SplitViewListWidth;\n}\n\n/** The detail column: the dialog's primary title, actions, and close control. */\nexport interface ListDetailDialogDetail {\n /**\n * The dialog's primary title: an xl heading at the top of the detail\n * column on roomy devices, and the pushed view's title on compact devices.\n */\n title: string;\n /** A short supporting line under the roomy title. */\n description?: string;\n /**\n * Header controls before the close control, such as a\n * `ToolbarControlGroup`. Primary record actions usually go in `footer`.\n */\n actions?: KerfUiContent;\n /** The selected item's detail. */\n content: KerfUiContent;\n /** Content pinned below the detail, usually its buttons. */\n footer?: KerfUiContent;\n}\n\n/**\n * Application `data-*` identity on the dialog root, such as `data-key`; the\n * dialog's own configuration attributes stay protected.\n */\nexport type ListDetailDialogRootAttributes = DialogSurfaceRootAttributes;\n\nexport interface ListDetailDialogProps {\n /**\n * The dialog's id, for `openDialog(document.getElementById(id))`. Also\n * prefixes the ids of the split and the detail title.\n */\n id: string;\n /** The dialog's accessible name. */\n label: string;\n /**\n * Id of the element whose text is the dialog's accessible description,\n * such as app-owned summary copy. The detail's `description` describes the\n * selection, not the dialog, so it is not wired automatically.\n */\n describedBy?: string;\n list: ListDetailDialogList;\n detail: ListDetailDialogDetail;\n /**\n * One pane at a time: derive from `deviceClass().value.compact`. The dialog\n * fills the screen and drills from the list into the detail as a\n * `NavStack`; every view keeps the close control.\n */\n compact?: boolean;\n /** On compact devices, whether the detail is pushed over the list. */\n detailActive?: boolean;\n /** The compact back control's accessible name (default `Back`). */\n backLabel?: string;\n /** The close control's accessible name (default `Close`). */\n closeLabel?: string;\n /** Close on a press on the backdrop; otherwise the panel pulses. */\n lightDismiss?: boolean;\n /** Roomy preferred width preset (default `large`). */\n size?: DialogSurfaceSize;\n /** Roomy preferred width; takes precedence over `size`. */\n preferredWidth?: CssLength;\n /** Roomy definite height (default 560px), bounded by the viewport. */\n height?: DialogSurfaceHeight;\n /** Roomy height cap in place of a definite height. */\n maxHeight?: DialogSurfaceMaxHeight;\n /** Roomy edge clearance from the viewport. */\n viewportGutter?: CssLength;\n rootAttributes?: ListDetailDialogRootAttributes;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nconst DEFAULT_LIST_WIDTH: SplitViewListWidth = { size: 280, maxFraction: 0.4 };\n\nfunction closeGroup(closeLabel: string) {\n return (\n <ToolbarControlGroup appearance=\"borderless\" single>\n <button type=\"button\" aria-label={closeLabel} data-dialog-close=\"\">\n <LucideIcon icon={X} name=\"x\" />\n </button>\n </ToolbarControlGroup>\n );\n}\n\n/**\n * A list-detail dialog: a modal whose list column and detail column each run\n * its full height. The list column carries a secondary title and its own\n * controls; the detail column carries the dialog's primary title, its\n * actions, and the close control, so the divider between them runs from top\n * to bottom. On compact devices it fills the screen and becomes a `NavStack`\n * that drills from the list into the detail. Open it with `openDialog()`;\n * the app owns the selection and, on compact devices, `detailActive` (the\n * stack's back control dispatches `nav-back`). Built from `DialogSurface`,\n * `SplitView`, and `Pane`.\n */\nexport function ListDetailDialog({\n id,\n label,\n describedBy,\n list,\n detail,\n compact = false,\n detailActive = false,\n backLabel = 'Back',\n closeLabel = 'Close',\n lightDismiss = false,\n size = 'large',\n preferredWidth,\n height,\n maxHeight,\n viewportGutter,\n rootAttributes,\n className = '',\n slot,\n}: ListDetailDialogProps) {\n const close = closeGroup(closeLabel);\n const split = compact ? (\n <SplitView\n id={`${id}-split`}\n label={label}\n compact\n detailActive={detailActive}\n listTitle={list.title}\n detailTitle={detail.title}\n backLabel={backLabel}\n compactStack={{\n list: {\n toolbar: {\n trailing: (\n <>\n {list.toolbar}\n {close}\n </>\n ),\n },\n footer: list.footer,\n },\n detail: {\n toolbar: {\n trailing: (\n <>\n {detail.actions}\n {close}\n </>\n ),\n },\n footer: detail.footer,\n },\n }}\n list={list.content}\n detail={detail.content}\n />\n ) : (\n <SplitView\n id={`${id}-split`}\n label={label}\n listTitle={list.title}\n detailTitle={detail.title}\n listWidth={list.width ?? DEFAULT_LIST_WIDTH}\n list={\n <Pane\n label={list.title}\n header={\n <Toolbar\n label={list.title}\n leading={<ToolbarText text={list.title} />}\n trailing={list.toolbar}\n />\n }\n footer={list.footer}\n >\n {list.content}\n </Pane>\n }\n detail={\n <Pane\n label={detail.title}\n header={\n <Toolbar\n label={detail.title}\n leading={\n <ToolbarText\n text={detail.title}\n description={detail.description}\n size=\"xlarge\"\n id={`${id}-title`}\n headingLevel={2}\n />\n }\n trailing={\n <>\n {detail.actions}\n {close}\n </>\n }\n />\n }\n footer={detail.footer}\n >\n {detail.content}\n </Pane>\n }\n />\n );\n return (\n <DialogSurface\n id={id}\n label={label}\n describedBy={describedBy}\n withoutHeader\n lightDismiss={lightDismiss}\n closeLabel={closeLabel}\n size={size}\n presentation={compact ? 'fullscreen' : 'modal'}\n preferredWidth={preferredWidth}\n height={\n compact\n ? undefined\n : maxHeight === undefined\n ? (height ?? remify(560))\n : height\n }\n maxHeight={compact ? undefined : maxHeight}\n viewportGutter={compact ? undefined : viewportGutter}\n bodyInset=\"none\"\n bodyLayout=\"fill\"\n rootAttributes={{\n ...rootAttributes,\n 'data-dialog-layout': 'list-detail',\n }}\n className={className}\n slot={slot}\n >\n {split}\n </DialogSurface>\n );\n}\n"]}
|
package/dist/list-header.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ type ListHeaderRootAttributes = Readonly<Record<`data-${string}`, string | undef
|
|
|
12
12
|
'data-divider'?: never;
|
|
13
13
|
'data-inline'?: never;
|
|
14
14
|
'data-width'?: never;
|
|
15
|
+
'data-wrap'?: never;
|
|
15
16
|
'data-indicator-tone'?: never;
|
|
16
17
|
'data-toggle'?: never;
|
|
17
18
|
}>;
|
|
@@ -33,6 +34,12 @@ interface ListHeaderBaseProps {
|
|
|
33
34
|
inline?: boolean;
|
|
34
35
|
/** Fill the available row or shrink-wrap while retaining normal header geometry. */
|
|
35
36
|
width?: 'fill' | 'content';
|
|
37
|
+
/**
|
|
38
|
+
* Wrap a long label onto further lines instead of truncating it to one
|
|
39
|
+
* ellipsized line. Default false. Use it where the whole label must stay
|
|
40
|
+
* readable in a narrow column, such as a specimen or form-section heading.
|
|
41
|
+
*/
|
|
42
|
+
wrap?: boolean;
|
|
36
43
|
indicatorTone?: 'neutral' | 'accent' | 'pop' | 'danger';
|
|
37
44
|
/** Render as an unanimated loading skeleton: keep the label and action affordance, disable interaction. */
|
|
38
45
|
placeholder?: boolean;
|
|
@@ -93,6 +100,6 @@ type ListHeaderIndicatorProps = {
|
|
|
93
100
|
status?: SafeHtml | undefined;
|
|
94
101
|
};
|
|
95
102
|
type ListHeaderProps = ListHeaderBaseProps & ListHeaderIndicatorProps & ListHeaderModeProps;
|
|
96
|
-
declare function ListHeader({ label, size, headingLevel, count, countLabel, badge, status, density, divider, inline, width, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, slot, }: ListHeaderProps): SafeHtml;
|
|
103
|
+
declare function ListHeader({ label, size, headingLevel, count, countLabel, badge, status, density, divider, inline, width, wrap, indicatorTone, action, actionLabel, actionIcon, actionDisabled, disabledReason, expanded, toggle, placeholder, rootAttributes, triggerAttributes, slot, }: ListHeaderProps): SafeHtml;
|
|
97
104
|
|
|
98
105
|
export { ListHeader, type ListHeaderProps };
|
package/dist/list-header.js
CHANGED
package/dist/list.d.ts
CHANGED
|
@@ -121,6 +121,12 @@ interface ListProps {
|
|
|
121
121
|
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
122
122
|
controlInsets?: Sides;
|
|
123
123
|
className?: string;
|
|
124
|
+
/**
|
|
125
|
+
* The list's id, so app code can address it: name it as a
|
|
126
|
+
* `wireScrollDividers` scroller (with a `Toolbar` above it as its chrome),
|
|
127
|
+
* or find it in tests.
|
|
128
|
+
*/
|
|
129
|
+
id?: string;
|
|
124
130
|
/**
|
|
125
131
|
* Safe `data-*`, `aria-*`, and structural `role` metadata (a named drop
|
|
126
132
|
* `region`, `aria-busy`); List-owned structural attributes remain
|
|
@@ -138,6 +144,6 @@ interface ListProps {
|
|
|
138
144
|
*/
|
|
139
145
|
type ListConfig = Pick<ListProps, 'gap' | 'hAlign' | 'vAlign' | 'dividerSides' | 'textInsets' | 'controlInsets'>;
|
|
140
146
|
/** A stretch-aligned vertical stack with optional gap, flex, fill, scroll, and dividers. */
|
|
141
|
-
declare function List({ children, selectionMode, ariaLabel, gap, flex, fill, hAlign, vAlign, scrollable, scrollClearance, frame, maxHeight, minHeight, surface, inset, contentWidth, contentAlign, dividerSides, textInsets, controlInsets, className, rootAttributes, slot, }: ListProps): kerfjs.SafeHtml;
|
|
147
|
+
declare function List({ children, selectionMode, ariaLabel, gap, flex, fill, hAlign, vAlign, scrollable, scrollClearance, frame, maxHeight, minHeight, surface, inset, contentWidth, contentAlign, dividerSides, textInsets, controlInsets, className, id, rootAttributes, slot, }: ListProps): kerfjs.SafeHtml;
|
|
142
148
|
|
|
143
149
|
export { CssFlex, CssFlexKeyword, CssLength, HorizontalAlignment, List, type ListConfig, type ListContentWidth, type ListInset, type ListProps, type ListSurface, ListVerticalAlignment, ScrollClearance, Sides, UiGap };
|
package/dist/list.js
CHANGED
package/dist/message-composer.js
CHANGED
package/dist/nav-stack.js
CHANGED
package/dist/popup-menu.d.ts
CHANGED
|
@@ -98,7 +98,11 @@ type PopupMenuProps = PopupMenuTrigger & {
|
|
|
98
98
|
/** Trigger icon, typically a `LucideIcon`, before any visible text. */
|
|
99
99
|
icon?: KerfUiContent;
|
|
100
100
|
items: readonly PopupMenuEntry[];
|
|
101
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* Where the menu opens relative to its trigger, or to its anchor point for
|
|
103
|
+
* a `context` menu (`top-start` opens above the point). Defaults to
|
|
104
|
+
* `bottom-start`.
|
|
105
|
+
*/
|
|
102
106
|
placement?: PopupMenuPlacement;
|
|
103
107
|
/** Show the disclosure caret after the trigger content. Defaults to true. */
|
|
104
108
|
caret?: boolean;
|
|
@@ -112,13 +116,19 @@ type PopupMenuProps = PopupMenuTrigger & {
|
|
|
112
116
|
type PopupMenuElement = HTMLElement;
|
|
113
117
|
/**
|
|
114
118
|
* Open a PopupMenu at viewport pointer coordinates. A `context` menu rendered
|
|
115
|
-
* without `anchor` moves its invisible anchor there
|
|
116
|
-
* `anchor` opens with `openPopupMenu`
|
|
119
|
+
* without `anchor` moves its invisible anchor there and opens at its
|
|
120
|
+
* `placement` (a menu rendered with `anchor` opens with `openPopupMenu`
|
|
121
|
+
* instead). A button-triggered menu (such
|
|
117
122
|
* as a `ListActionRow` trailing menu) opens `bottom-start` from the point,
|
|
118
123
|
* like a context menu, for this opening only; its next opening returns to its
|
|
119
|
-
* trigger and placement.
|
|
124
|
+
* trigger and placement. `options.placement` sets the placement at the point
|
|
125
|
+
* for this opening instead (`top-start` sits above it, say), for either kind
|
|
126
|
+
* of menu; flipping, shifting, and the height cap still apply. Needs the
|
|
127
|
+
* `/register` entry.
|
|
120
128
|
*/
|
|
121
|
-
declare function openPopupMenuAt(menu: PopupMenuElement, x: number, y: number
|
|
129
|
+
declare function openPopupMenuAt(menu: PopupMenuElement, x: number, y: number, options?: {
|
|
130
|
+
placement?: PopupMenuPlacement;
|
|
131
|
+
}): void;
|
|
122
132
|
/**
|
|
123
133
|
* Open a PopupMenu from its trigger, or a context PopupMenu at the `anchor`
|
|
124
134
|
* it was rendered with (or the point a previous `openPopupMenuAt` set).
|
package/dist/popup-menu.js
CHANGED
|
@@ -25,9 +25,11 @@ interface SegmentedControlProps<Value extends string = string> {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
/** Render as a loading placeholder: every choice keeps its live label or icon, none is selected, and every segment is disabled. */
|
|
27
27
|
placeholder?: boolean;
|
|
28
|
+
/** Disable the whole control: every segment is disabled and dimmed, the selection stays visible, and the group reports `aria-disabled`. A choice's own `disabled` still disables just that segment. */
|
|
29
|
+
disabled?: boolean;
|
|
28
30
|
/** Native named-slot assignment when composed inside a web component. */
|
|
29
31
|
slot?: string;
|
|
30
32
|
}
|
|
31
|
-
declare function SegmentedControl<Value extends string>({ id, label, value, choices, action, appearance, shape, size, layout, className, placeholder, slot, }: SegmentedControlProps<Value>): kerfjs.SafeHtml;
|
|
33
|
+
declare function SegmentedControl<Value extends string>({ id, label, value, choices, action, appearance, shape, size, layout, className, placeholder, disabled, slot, }: SegmentedControlProps<Value>): kerfjs.SafeHtml;
|
|
32
34
|
|
|
33
35
|
export { SegmentedControl, type SegmentedControlAppearance, type SegmentedControlChoice, type SegmentedControlLayout, type SegmentedControlProps, type SegmentedControlShape, type SegmentedControlSize };
|
package/dist/select-register.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { installPopupMenus } from './chunk-
|
|
2
|
-
import { installHelpTags } from './chunk-
|
|
1
|
+
import { installPopupMenus } from './chunk-EYDXFOSH.js';
|
|
2
|
+
import { installHelpTags } from './chunk-2LM3PYHA.js';
|
|
3
3
|
import { summarizeSelection } from './chunk-TUID42UE.js';
|
|
4
|
-
import { followAnchor, positionPopup } from './chunk-
|
|
4
|
+
import { followAnchor, positionPopup } from './chunk-HDXUHLTQ.js';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
// src/components/forms/select/internal/select-element.ts
|
package/dist/split-button.d.ts
CHANGED
|
@@ -2,11 +2,15 @@ import { SafeHtml } from 'kerfjs';
|
|
|
2
2
|
|
|
3
3
|
/** The loud fill the whole split button paints. */
|
|
4
4
|
type SplitButtonTone = 'brand' | 'neutral' | 'success' | 'warning' | 'danger';
|
|
5
|
+
/** Corner shape: the shared `rounded` control radius (default) or a full `pill`, as on `Button`. */
|
|
6
|
+
type SplitButtonShape = 'rounded' | 'pill';
|
|
5
7
|
type SplitButtonRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
6
8
|
'data-component'?: never;
|
|
7
9
|
'data-tone'?: never;
|
|
8
10
|
'data-fill'?: never;
|
|
9
11
|
'data-busy'?: never;
|
|
12
|
+
'data-shape'?: never;
|
|
13
|
+
'data-focus-ring-inset'?: never;
|
|
10
14
|
}>;
|
|
11
15
|
interface SplitButtonProps {
|
|
12
16
|
/** Visible primary label. */
|
|
@@ -31,6 +35,14 @@ interface SplitButtonProps {
|
|
|
31
35
|
tone?: SplitButtonTone;
|
|
32
36
|
/** Span the full width of the parent instead of sizing to the label. */
|
|
33
37
|
fill?: boolean;
|
|
38
|
+
/** Corner shape (default `rounded`); `pill` fully rounds both outer ends. */
|
|
39
|
+
shape?: SplitButtonShape;
|
|
40
|
+
/**
|
|
41
|
+
* Keep each half's focus ring inside its box when an ancestor clips
|
|
42
|
+
* overflow. The inset ring is two-tone, a surface-colored line inside the
|
|
43
|
+
* ring color, so it stays visible on every loud fill.
|
|
44
|
+
*/
|
|
45
|
+
focusRingInset?: boolean;
|
|
34
46
|
/** Show work in progress: a spinner replaces the icon and the primary is `aria-busy`. */
|
|
35
47
|
busy?: boolean;
|
|
36
48
|
/** Disable the primary half. */
|
|
@@ -52,6 +64,6 @@ interface SplitButtonProps {
|
|
|
52
64
|
* technology directly; the application opens its own menu from the options
|
|
53
65
|
* action and owns the running state.
|
|
54
66
|
*/
|
|
55
|
-
declare function SplitButton({ label, action, icon, accessibleLabel, optionsLabel, optionsAction, optionsExpanded, optionsPopup, optionsControls, tone, fill, busy, disabled, optionsDisabled, title, className, rootAttributes, slot, }: SplitButtonProps): SafeHtml;
|
|
67
|
+
declare function SplitButton({ label, action, icon, accessibleLabel, optionsLabel, optionsAction, optionsExpanded, optionsPopup, optionsControls, tone, fill, shape, focusRingInset, busy, disabled, optionsDisabled, title, className, rootAttributes, slot, }: SplitButtonProps): SafeHtml;
|
|
56
68
|
|
|
57
|
-
export { SplitButton, type SplitButtonProps, type SplitButtonTone };
|
|
69
|
+
export { SplitButton, type SplitButtonProps, type SplitButtonShape, type SplitButtonTone };
|
package/dist/split-button.js
CHANGED