@ixfx/components 0.3.1 → 0.4.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/bundle/index.d.ts +1086 -603
- package/bundle/index.d.ts.map +1 -1
- package/bundle/index.js +16527 -14258
- package/bundle/index.js.map +1 -1
- package/bundle/style.css +14 -4
- package/dist/ac-text.d.ts.map +1 -1
- package/dist/ac-text.js +11 -6
- package/dist/ac-text.js.map +1 -1
- package/dist/{button-DMt5XWUK.js → button-C3fLMKUv.js} +4 -4
- package/dist/{button-DMt5XWUK.js.map → button-C3fLMKUv.js.map} +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +14 -8
- package/dist/checkbox.js.map +1 -1
- package/dist/{colour-C3MQIjFJ-BLXg8W3U.js → colour-C3MQIjFJ-vRCdr8W-.js} +146 -552
- package/dist/colour-C3MQIjFJ-vRCdr8W-.js.map +1 -0
- package/dist/{colour-picker-K6zu82lm.js → colour-picker-0sgAha1T.js} +14 -9
- package/dist/colour-picker-0sgAha1T.js.map +1 -0
- package/dist/colour-picker.d.ts +1 -1
- package/dist/colour-picker.js +1 -1
- package/dist/crumbs.d.ts +1 -1
- package/dist/crumbs.d.ts.map +1 -1
- package/dist/crumbs.js +11 -6
- package/dist/crumbs.js.map +1 -1
- package/dist/data-display.d.ts +9 -4
- package/dist/data-display.d.ts.map +1 -1
- package/dist/data-display.js +270 -43
- package/dist/data-display.js.map +1 -1
- package/dist/data-provider-DgI909FP.js +23 -0
- package/dist/data-provider-DgI909FP.js.map +1 -0
- package/dist/{decorate-D7rC1gLP.js → decorate-DdjvVHS-.js} +2 -2
- package/dist/{decorate-D7rC1gLP.js.map → decorate-DdjvVHS-.js.map} +1 -1
- package/dist/{defaults-C7elhuyJ.js → defaults-C3b9OWJD.js} +2 -2
- package/dist/{defaults-C7elhuyJ.js.map → defaults-C3b9OWJD.js.map} +1 -1
- package/dist/{dist-TAGYwaju.js → dist-CA13FvMn.js} +7 -66
- package/dist/dist-CA13FvMn.js.map +1 -0
- package/dist/editable-label.d.ts.map +1 -1
- package/dist/editable-label.js +3 -2
- package/dist/editable-label.js.map +1 -1
- package/dist/fallbacks-pNMOMx38.js +168 -0
- package/dist/fallbacks-pNMOMx38.js.map +1 -0
- package/dist/{hex-editor-DlfoA65y.d.ts → hex-editor-CMIxtNgT.d.ts} +1 -1
- package/dist/hex-editor-CMIxtNgT.d.ts.map +1 -0
- package/dist/{hex-editor-CsN_ySkH.js → hex-editor-WZrjRtvL.js} +3 -3
- package/dist/{hex-editor-CsN_ySkH.js.map → hex-editor-WZrjRtvL.js.map} +1 -1
- package/dist/hex.d.ts +1 -1
- package/dist/hex.js +1 -1
- package/dist/{highlight-TPbSHruI.js → highlight-B-eQrhhb.js} +1 -1
- package/dist/{highlight-TPbSHruI.js.map → highlight-B-eQrhhb.js.map} +1 -1
- package/dist/{icon-CeTDJhC7.d.ts → icon-Bd5BiU4b.d.ts} +2 -2
- package/dist/icon-Bd5BiU4b.d.ts.map +1 -0
- package/dist/{icon-9NWTXtE1.js → icon-Ndo40kNO.js} +6 -5
- package/dist/icon-Ndo40kNO.js.map +1 -0
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +3 -3
- package/dist/{incr-search-DSKKsk6w.js → incr-search-CeERfijK.js} +2 -2
- package/dist/{incr-search-DSKKsk6w.js.map → incr-search-CeERfijK.js.map} +1 -1
- package/dist/incr-search.d.ts +1 -1
- package/dist/incr-search.js +2 -2
- package/dist/{index-hXFn14tM.d.ts → index-BMjri2-S.d.ts} +2 -2
- package/dist/{index-hXFn14tM.d.ts.map → index-BMjri2-S.d.ts.map} +1 -1
- package/dist/{index-DSlPeWLK.d.ts → index-CWpNcQKE.d.ts} +5 -5
- package/dist/index-CWpNcQKE.d.ts.map +1 -0
- package/dist/{index--hrxPBkQ.d.ts → index-CowKi2mo.d.ts} +2 -1
- package/dist/index-CowKi2mo.d.ts.map +1 -0
- package/dist/{index-B1hNR7Z9.d.ts → index-D87kRcEs.d.ts} +1 -1
- package/dist/{index-B1hNR7Z9.d.ts.map → index-D87kRcEs.d.ts.map} +1 -1
- package/dist/{index-CnL9krsH.d.ts → index-DgXpCg_G.d.ts} +32 -26
- package/dist/index-DgXpCg_G.d.ts.map +1 -0
- package/dist/{index-DrQjA8Gs.d.ts → index-s_IhSnwc.d.ts} +2 -2
- package/dist/index-s_IhSnwc.d.ts.map +1 -0
- package/dist/index.d.ts +432 -121
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2370 -1707
- package/dist/index.js.map +1 -1
- package/dist/interaction-D6efrBLo.js +1 -0
- package/dist/{keyboard-De_vOHLg.js → keyboard-CimiEskD.js} +1 -1
- package/dist/{keyboard-De_vOHLg.js.map → keyboard-CimiEskD.js.map} +1 -1
- package/dist/{labelled-input-base-CqPL5rKm.js → labelled-input-base-9K_w3oLj.js} +2 -2
- package/dist/{labelled-input-base-CqPL5rKm.js.map → labelled-input-base-9K_w3oLj.js.map} +1 -1
- package/dist/{labelled-input-base-D-Y7agky.d.ts → labelled-input-base-ORb1rGq6.d.ts} +1 -1
- package/dist/labelled-input-base-ORb1rGq6.d.ts.map +1 -0
- package/dist/labelled-radial-input.d.ts +2 -2
- package/dist/labelled-radial-input.d.ts.map +1 -1
- package/dist/labelled-radial-input.js +7 -6
- package/dist/labelled-radial-input.js.map +1 -1
- package/dist/labelled-range-input.d.ts +1 -1
- package/dist/labelled-range-input.js +2 -2
- package/dist/led.d.ts +1 -1
- package/dist/led.d.ts.map +1 -1
- package/dist/led.js +2 -2
- package/dist/led.js.map +1 -1
- package/dist/{menu-item-CKRfP0pN.js → menu-item-BrIuORYD.js} +20 -10
- package/dist/menu-item-BrIuORYD.js.map +1 -0
- package/dist/{menu-item-ClQF2DKN.d.ts → menu-item-COx-Azgj.d.ts} +1 -1
- package/dist/menu-item-COx-Azgj.d.ts.map +1 -0
- package/dist/{menu-DJJuCm-5.js → menu-vjoiHZ13.js} +30 -17
- package/dist/menu-vjoiHZ13.js.map +1 -0
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +2 -2
- package/dist/miller.d.ts +2 -2
- package/dist/miller.d.ts.map +1 -1
- package/dist/miller.js +18 -11
- package/dist/miller.js.map +1 -1
- package/dist/narrowed-text.d.ts.map +1 -1
- package/dist/narrowed-text.js +7 -5
- package/dist/narrowed-text.js.map +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/panel.d.ts.map +1 -1
- package/dist/panel.js +5 -4
- package/dist/panel.js.map +1 -1
- package/dist/plots.d.ts +2 -2
- package/dist/plots.js +2 -2
- package/dist/polar-pad.d.ts +1 -1
- package/dist/polar-pad.d.ts.map +1 -1
- package/dist/polar-pad.js +10 -4
- package/dist/polar-pad.js.map +1 -1
- package/dist/{popup-ImtS9KnS.js → popup-DiWMxsWj.js} +1 -1
- package/dist/{popup-ImtS9KnS.js.map → popup-DiWMxsWj.js.map} +1 -1
- package/dist/prominence-DlFShic3.js +104 -0
- package/dist/prominence-DlFShic3.js.map +1 -0
- package/dist/{radial-input-LUSBEycd.d.ts → radial-input-CpQPs1Mp.d.ts} +1 -1
- package/dist/radial-input-CpQPs1Mp.d.ts.map +1 -0
- package/dist/{radial-input-DZA6WaFu.js → radial-input-DZ7eQCcM.js} +11 -6
- package/dist/radial-input-DZ7eQCcM.js.map +1 -0
- package/dist/radial-input.d.ts +1 -1
- package/dist/radial-input.js +1 -1
- package/dist/range-input.d.ts +1 -1
- package/dist/range-input.d.ts.map +1 -1
- package/dist/range-input.js +9 -4
- package/dist/range-input.js.map +1 -1
- package/dist/range.d.ts +1 -1
- package/dist/range.d.ts.map +1 -1
- package/dist/range.js +5 -3
- package/dist/range.js.map +1 -1
- package/dist/{registry-Q2gYQCHM.js → registry-CkW7q09Q.js} +1 -1
- package/dist/{registry-Q2gYQCHM.js.map → registry-CkW7q09Q.js.map} +1 -1
- package/dist/selecthorizontal.d.ts +1 -1
- package/dist/selecthorizontal.d.ts.map +1 -1
- package/dist/selecthorizontal.js +4 -3
- package/dist/selecthorizontal.js.map +1 -1
- package/dist/snap-container.d.ts.map +1 -1
- package/dist/snap-container.js +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/split-layout.js +6 -5
- package/dist/split-layout.js.map +1 -1
- package/dist/style.css +14 -4
- package/dist/swipe.d.ts.map +1 -1
- package/dist/swipe.js +9 -4
- package/dist/swipe.js.map +1 -1
- package/dist/{tab-list-BnqISNvO.d.ts → tab-list-DLzb-m-I.d.ts} +2 -2
- package/dist/tab-list-DLzb-m-I.d.ts.map +1 -0
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +10 -4
- package/dist/tabs.js.map +1 -1
- package/dist/{tickled-controller-Cq1Va0rR.d.ts → tickled-controller-BjYCzGrU.d.ts} +2 -2
- package/dist/tickled-controller-BjYCzGrU.d.ts.map +1 -0
- package/dist/{tickled-styles-Bg3QbcrD.js → tickled-styles-fNDdqf6l.js} +1 -17
- package/dist/{tickled-styles-Bg3QbcrD.js.map → tickled-styles-fNDdqf6l.js.map} +1 -1
- package/dist/{timeline-Cv75Th2U.js → timeline-2OFtN4Ta.js} +1437 -36
- package/dist/timeline-2OFtN4Ta.js.map +1 -0
- package/dist/timeline.d.ts +1 -1
- package/dist/timeline.js +1 -1
- package/dist/{tooltip-DMxmBNky.js → tooltip-CJt3WLmN.js} +1 -1
- package/dist/{tooltip-DMxmBNky.js.map → tooltip-CJt3WLmN.js.map} +1 -1
- package/dist/{tooltip-CwGfb4lp.d.ts → tooltip-RGVIwHrZ.d.ts} +1 -1
- package/dist/{tooltip-CwGfb4lp.d.ts.map → tooltip-RGVIwHrZ.d.ts.map} +1 -1
- package/dist/{tree-CvvKbO-f.js → tree-CJWpMUvD.js} +113 -103
- package/dist/tree-CJWpMUvD.js.map +1 -0
- package/dist/{tree-component-D8Bg48tt.d.ts → tree-component-BcO26Xvt.d.ts} +65 -3
- package/dist/tree-component-BcO26Xvt.d.ts.map +1 -0
- package/dist/tree.d.ts +15 -15
- package/dist/tree.d.ts.map +1 -1
- package/dist/tree.js +1 -1
- package/dist/{types-BKaqnpwx.d.ts → types-DSfbtHs3.d.ts} +1 -1
- package/dist/types-DSfbtHs3.d.ts.map +1 -0
- package/dist/{xy-axis-DL0tfJDr.js → xy-axis-CK64haaK.js} +1831 -359
- package/dist/xy-axis-CK64haaK.js.map +1 -0
- package/dist/{xy-axis-D9uwpGTT.d.ts → xy-axis-McdUpcYr.d.ts} +102 -3
- package/dist/xy-axis-McdUpcYr.d.ts.map +1 -0
- package/dist/xy-pad.d.ts +1 -1
- package/dist/xy-pad.d.ts.map +1 -1
- package/dist/xy-pad.js +11 -6
- package/dist/xy-pad.js.map +1 -1
- package/docs-user/README.md +45 -0
- package/docs-user/ac-text.md +67 -0
- package/docs-user/ac-token.md +187 -0
- package/docs-user/button.md +355 -0
- package/docs-user/checkbox.md +62 -0
- package/docs-user/colour-picker.md +237 -0
- package/docs-user/crumbs.md +66 -0
- package/docs-user/data-display.md +98 -0
- package/docs-user/editable-label.md +244 -0
- package/docs-user/grouped-item-lister.md +424 -0
- package/docs-user/icons.md +191 -0
- package/docs-user/incr-search.md +94 -0
- package/docs-user/labelled-radial-input.md +204 -0
- package/docs-user/labelled-range-input.md +194 -0
- package/docs-user/led.md +40 -0
- package/docs-user/menu.md +319 -0
- package/docs-user/miller.md +453 -0
- package/docs-user/narrowed-text.md +72 -0
- package/docs-user/panel.md +250 -0
- package/docs-user/plots.md +361 -0
- package/docs-user/polar-pad.md +228 -0
- package/docs-user/radial-input.md +559 -0
- package/docs-user/range-input.md +264 -0
- package/docs-user/range.md +12 -0
- package/docs-user/selecthorizontal.md +32 -0
- package/docs-user/snap-container.md +132 -0
- package/docs-user/split-layout.md +232 -0
- package/docs-user/swipe.md +44 -0
- package/docs-user/tabs.md +217 -0
- package/docs-user/timeline.md +116 -0
- package/docs-user/transitory-label.md +120 -0
- package/docs-user/tree.md +592 -0
- package/docs-user/user-catalog.md +165 -0
- package/docs-user/user-theming.md +379 -0
- package/docs-user/util.md +122 -0
- package/docs-user/vertical-list.md +351 -0
- package/docs-user/xy-pad.md +94 -0
- package/package.json +19 -18
- package/dist/colour-C3MQIjFJ-BLXg8W3U.js.map +0 -1
- package/dist/colour-picker-K6zu82lm.js.map +0 -1
- package/dist/dist-BX0OVIm7.js +0 -1290
- package/dist/dist-BX0OVIm7.js.map +0 -1
- package/dist/dist-TAGYwaju.js.map +0 -1
- package/dist/hex-editor-DlfoA65y.d.ts.map +0 -1
- package/dist/icon-9NWTXtE1.js.map +0 -1
- package/dist/icon-CeTDJhC7.d.ts.map +0 -1
- package/dist/index--hrxPBkQ.d.ts.map +0 -1
- package/dist/index-CnL9krsH.d.ts.map +0 -1
- package/dist/index-DSlPeWLK.d.ts.map +0 -1
- package/dist/index-DrQjA8Gs.d.ts.map +0 -1
- package/dist/interaction-DG7X1rhI.js +0 -1
- package/dist/labelled-input-base-D-Y7agky.d.ts.map +0 -1
- package/dist/menu-DJJuCm-5.js.map +0 -1
- package/dist/menu-item-CKRfP0pN.js.map +0 -1
- package/dist/menu-item-ClQF2DKN.d.ts.map +0 -1
- package/dist/prominence--ic9uWBl.js +0 -98
- package/dist/prominence--ic9uWBl.js.map +0 -1
- package/dist/radial-input-DZA6WaFu.js.map +0 -1
- package/dist/radial-input-LUSBEycd.d.ts.map +0 -1
- package/dist/tab-list-BnqISNvO.d.ts.map +0 -1
- package/dist/tickled-controller-Cq1Va0rR.d.ts.map +0 -1
- package/dist/timeline-Cv75Th2U.js.map +0 -1
- package/dist/tree-CvvKbO-f.js.map +0 -1
- package/dist/tree-component-D8Bg48tt.d.ts.map +0 -1
- package/dist/types-BKaqnpwx.d.ts.map +0 -1
- package/dist/xy-axis-D9uwpGTT.d.ts.map +0 -1
- package/dist/xy-axis-DL0tfJDr.js.map +0 -1
- /package/bundle/{chunk-pbuEa-1d.js → chunk-D7D4PA-g.js} +0 -0
- /package/dist/{chunk-pbuEa-1d.js → chunk-D7D4PA-g.js} +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Component Catalog
|
|
2
|
+
|
|
3
|
+
This guide provides an overview of the ixfx component library, organized by common use cases to help you find the right building blocks for your application.
|
|
4
|
+
|
|
5
|
+
## Buttons and Controls
|
|
6
|
+
|
|
7
|
+
### ixfx-button
|
|
8
|
+
A styled button component with support for icons, loading states, and flexible layout. Use it as a direct replacement for standard HTML buttons when you need consistent theming and enhanced visual feedback.
|
|
9
|
+
|
|
10
|
+
### ixfx-split-button
|
|
11
|
+
A button that combines a primary action with a dropdown menu. Ideal for actions that have a default behavior plus additional variants (like "Save" with a menu for "Save As", "Save All", etc.).
|
|
12
|
+
|
|
13
|
+
### ixfx-radio-group
|
|
14
|
+
A group of mutually exclusive options that can render as traditional radio buttons or as a toggle switch when used without explicit options. Great for settings panels or form selections where only one choice is allowed.
|
|
15
|
+
|
|
16
|
+
### ixfx-checkbox
|
|
17
|
+
A brutalist-style checkbox with diagonal check mark indicator and indeterminate state support. Perfect for terms acceptance, feature toggles, or any binary selection.
|
|
18
|
+
|
|
19
|
+
### ixfx-toggle-switch
|
|
20
|
+
A compact on/off switch that provides a clear visual indication of state. Use for settings that have two distinct values like enabled/disabled or show/hide.
|
|
21
|
+
|
|
22
|
+
## Input Components
|
|
23
|
+
|
|
24
|
+
### ixfx-labelled-range-input
|
|
25
|
+
Combines a range slider with a label and optional input field for precise value entry. Use when users need to select from a continuous range of values with both coarse and fine control.
|
|
26
|
+
|
|
27
|
+
### ixfx-labelled-radial-input
|
|
28
|
+
A circular input control for selecting values in a rotational manner. Ideal for color pickers, angle selectors, or any cyclical value selection.
|
|
29
|
+
|
|
30
|
+
### ixfx-ac-text
|
|
31
|
+
An autocomplete text input that suggests options as the user type. Perfect for search boxes, tag entry, or any field where you want to assist users with predefined options.
|
|
32
|
+
|
|
33
|
+
### ixfx-narrowed-text
|
|
34
|
+
A specialized text input that constrains input length and provides visual feedback about remaining capacity. Use for fields with strict character limits like tweet composition or SMS messages.
|
|
35
|
+
|
|
36
|
+
### ixfx-editable-label
|
|
37
|
+
A label that becomes an inline editor when clicked or focused. Useful for in-place editing of list items, card titles, or any display text that users might need to modify.
|
|
38
|
+
|
|
39
|
+
### ixfx-color-picker
|
|
40
|
+
A comprehensive color selection tool with multiple modes (hue/saturation/lightness, red/green/blue, etc.) and support for saving custom colors. Use whenever users need to select or adjust colors.
|
|
41
|
+
|
|
42
|
+
## Display Components
|
|
43
|
+
|
|
44
|
+
### ixfx-panel
|
|
45
|
+
A container component with consistent theming, elevation, and padding. Use as a building block for cards, dialogs, sidebar sections, or any content grouping that needs visual separation.
|
|
46
|
+
|
|
47
|
+
### ixfx-panel-group
|
|
48
|
+
A collection of panels that can be expanded or collapsed, similar to an accordion. Perfect for settings pages, FAQ sections, or any content that benefits from progressive disclosure.
|
|
49
|
+
|
|
50
|
+
### ixfx-tabs
|
|
51
|
+
A tabbed interface for organizing content into separate views. Use when you have related content that users need to switch between frequently.
|
|
52
|
+
|
|
53
|
+
### ixfx-tab-panel
|
|
54
|
+
Individual panels that work with the ixfx-tabs component to create tabbed interfaces.
|
|
55
|
+
|
|
56
|
+
### ixfx-data-display
|
|
57
|
+
A flexible component for presenting various types of data with consistent formatting. Use for showing metrics, status information, or any structured data that benefits from standardized presentation.
|
|
58
|
+
|
|
59
|
+
## Navigation Components
|
|
60
|
+
|
|
61
|
+
### ixfx-menu
|
|
62
|
+
A contextual popup menu that can be attached to buttons or other elements. Use for context menus, action menus, or any list of commands that should appear on demand.
|
|
63
|
+
|
|
64
|
+
### ixfx-menu-bar
|
|
65
|
+
A horizontal menu bar typically placed at the top of an application or window. Ideal for main application navigation with dropdown menus.
|
|
66
|
+
|
|
67
|
+
### ixfx-menu-item
|
|
68
|
+
Individual items that populate menus, supporting icons, shortcuts, and various states (disabled, checked, etc.).
|
|
69
|
+
|
|
70
|
+
### ixfx-breadcrumb-navigation
|
|
71
|
+
A component that shows the hierarchical path to the current location. Use in file browsers, documentation sites, or any application with nested content structures.
|
|
72
|
+
|
|
73
|
+
### ixfx-tree
|
|
74
|
+
A hierarchical tree view component for displaying nested data structures. Perfect for file explorers, organizational charts, or any data with parent-child relationships.
|
|
75
|
+
|
|
76
|
+
### ixfx-crumb-navigation
|
|
77
|
+
Similar to breadcrumb navigation but with a more compact representation focused on the immediate path context.
|
|
78
|
+
|
|
79
|
+
## Layout Components
|
|
80
|
+
|
|
81
|
+
### ixfx-split-layout
|
|
82
|
+
A resizable split pane that allows users to adjust the proportion between two adjacent sections. Use for editor layouts, file explorers with previews, or any interface where users need to control space allocation.
|
|
83
|
+
|
|
84
|
+
### ixfx-snap-container
|
|
85
|
+
A container that snaps child elements to specific positions or alignments. Useful for creating custom layouts, dashboards, or any interface where precise element positioning is needed.
|
|
86
|
+
|
|
87
|
+
### ixfx-polar-pad
|
|
88
|
+
A circular input device for selecting points in polar coordinates (angle and radius). Ideal for color pickers, directional controls, or any circular input scenario.
|
|
89
|
+
|
|
90
|
+
## Visualization Components
|
|
91
|
+
|
|
92
|
+
### ixfx-xy-pad
|
|
93
|
+
A two-dimensional pad for selecting X and Y coordinate values simultaneously. Commonly used for color selection (saturation/brightness), audio filtering, or any 2D parameter space.
|
|
94
|
+
|
|
95
|
+
### ixfx-single-axis
|
|
96
|
+
A component for displaying data along a single axis with appropriate scaling and labeling. Use for simple charts, waveform displays, or any linear data visualization.
|
|
97
|
+
|
|
98
|
+
### ixfx-xy-axis
|
|
99
|
+
A pair of orthogonal axes that work together to create a coordinate system for plotting data. Essential building block for custom charts and graphs.
|
|
100
|
+
|
|
101
|
+
### ixfx-colour-map
|
|
102
|
+
A visualization component that displays data as a color gradient or heatmap. Use for showing intensity distributions, correlation matrices, or any 2D data where color represents value.
|
|
103
|
+
|
|
104
|
+
### ixfx-timeline
|
|
105
|
+
A horizontal timeline for displaying events or data points over time. Perfect for audio/video editing, historical data presentation, or any chronological data visualization.
|
|
106
|
+
|
|
107
|
+
### ixfx-range
|
|
108
|
+
A component for representing and manipulating numerical ranges with visual handles. Use for date/time ranges, value selectors, or any scenario where users need to define a minimum and maximum.
|
|
109
|
+
|
|
110
|
+
### ixfx-range-multi
|
|
111
|
+
An extension of the range component that allows multiple non-overlapping ranges to be selected simultaneously. Ideal for selecting multiple time segments or value ranges.
|
|
112
|
+
|
|
113
|
+
## Utility Components
|
|
114
|
+
|
|
115
|
+
### ixfx-icon
|
|
116
|
+
A flexible icon component that supports both built-in icons and custom SVG content. Use for visual enhancement of buttons, menu items, or any interface element that benefits from symbolic representation.
|
|
117
|
+
|
|
118
|
+
### ixfx-tooltip
|
|
119
|
+
A small popup that appears on hover or focus to provide additional information about an element. Use for explaining icon buttons, providing context for form fields, or any situation where brief supplemental help is needed.
|
|
120
|
+
|
|
121
|
+
### ixfx-led
|
|
122
|
+
A simple indicator light component that can show on/off states or various colors. Use for status indicators, power lights, or any binary state visualization.
|
|
123
|
+
|
|
124
|
+
### ixfx-horizontal-selector
|
|
125
|
+
A compact horizontal control for selecting from a set of options. Use when you need a more space-efficient alternative to radio groups or dropdowns.
|
|
126
|
+
|
|
127
|
+
## Component Selection Guidelines
|
|
128
|
+
|
|
129
|
+
When choosing components for your application, consider these patterns:
|
|
130
|
+
|
|
131
|
+
### For Forms and Settings
|
|
132
|
+
- Use `ixfx-checkbox` for binary options
|
|
133
|
+
- Use `ixfx-radio-group` for mutually exclusive choices
|
|
134
|
+
- Use `ixfx-labelled-range-input` for numerical parameters
|
|
135
|
+
- Use `ixfx-toggle-switch` for settings with clear on/off states
|
|
136
|
+
- Use `ixfx-panel` or `ixfx-panel-group` to organize related settings
|
|
137
|
+
|
|
138
|
+
### For Data Display
|
|
139
|
+
- Use `ixfx-data-display` for consistent metric presentation
|
|
140
|
+
- Use `ixfx-panel` as containers for grouped information
|
|
141
|
+
- Use `ixfx-tabs` to separate different views of related data
|
|
142
|
+
- Use visualization components (`ixfx-xy-pad`, `ixfx-single-axis`, etc.) for graphical data representation
|
|
143
|
+
|
|
144
|
+
### For Navigation and Selection
|
|
145
|
+
- Use `ixfx-menu` for contextual actions
|
|
146
|
+
- Use `ixfx-menu-bar` for primary application navigation
|
|
147
|
+
- Use `ixfx-tree` for hierarchical data exploration
|
|
148
|
+
- Use `ixfx-breadcrumb-navigation` to show location in hierarchies
|
|
149
|
+
- Use `ixfx-ac-text` for assisted text entry with predefined options
|
|
150
|
+
|
|
151
|
+
### For Layout and Structure
|
|
152
|
+
- Use `ixfx-split-layout` for adjustable panes
|
|
153
|
+
- Use `ixfx-panel` as basic building blocks
|
|
154
|
+
- Use `ixfx-snap-container` for custom positioning needs
|
|
155
|
+
- Use `ixfx-tabs` to organize content into separate views
|
|
156
|
+
|
|
157
|
+
### For Interactive Controls
|
|
158
|
+
- Use `ixfx-xy-pad` for 2D parameter control
|
|
159
|
+
- Use `ixfx-labelled-radial-input` for circular parameters
|
|
160
|
+
- Use `ixfx-range` or `ixfx-range-multi` for value ranges
|
|
161
|
+
- Use `ixfx-color-picker` for comprehensive color selection
|
|
162
|
+
|
|
163
|
+
This catalog represents the core components available in the ixfx library. Each component is designed to work together through a shared theming system and consistent interaction patterns, allowing you to build cohesive interfaces with minimal effort.
|
|
164
|
+
|
|
165
|
+
For detailed usage instructions on any specific component, refer to the individual component documentation in the src/ directory or the corresponding user guide documents in @docs-user/.
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
# User Theming Guide
|
|
2
|
+
|
|
3
|
+
This document explains how users of the ixfx components can customize the appearance of components through CSS variables and theme overrides.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The ixfx component library uses a CSS variable-based theming system that allows easy customization of colors, spacing, typography, and other visual properties. Rather than hardcoding values, components reference semantic CSS variables that can be overridden to create custom themes.
|
|
8
|
+
|
|
9
|
+
## How Theming Works
|
|
10
|
+
|
|
11
|
+
Components use CSS variables for all visual properties. For example:
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
/* Instead of hardcoded values */
|
|
15
|
+
background: #fff;
|
|
16
|
+
color: #000;
|
|
17
|
+
|
|
18
|
+
/* Components use variables */
|
|
19
|
+
background: var(--surface-3);
|
|
20
|
+
color: var(--surface-3-text);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
These variables are defined in the base theme (`src/style.css`) and can be overridden at different scopes:
|
|
24
|
+
- Globally (affects all components)
|
|
25
|
+
- On specific components or containers
|
|
26
|
+
- Per-instance using inline styles
|
|
27
|
+
|
|
28
|
+
## Available Variables
|
|
29
|
+
|
|
30
|
+
The theming system includes variables for:
|
|
31
|
+
|
|
32
|
+
### Surfaces
|
|
33
|
+
UI elevation levels (`--surface-0` through `--surface-6`) with paired text colors (`--surface-*-text`).
|
|
34
|
+
|
|
35
|
+
### Content
|
|
36
|
+
Background and text colors for user content areas (`--content`, `--content-text`).
|
|
37
|
+
|
|
38
|
+
### Accent
|
|
39
|
+
Primary action colors (`--accent`, `--accent-text`) and surface-based accent variants.
|
|
40
|
+
|
|
41
|
+
### Feedback/Status
|
|
42
|
+
State indicator colors (`--error`, `--error-text`).
|
|
43
|
+
|
|
44
|
+
### Typography
|
|
45
|
+
Font families, weights, and sizes (`--font-family`, `--font-mono`, `--text-xs`, etc.).
|
|
46
|
+
|
|
47
|
+
### Spacing
|
|
48
|
+
Consistent spacing values (`--space-xs`, `--space-s`, `--space-m`, etc.).
|
|
49
|
+
|
|
50
|
+
### Borders & Radius
|
|
51
|
+
Border styles and corner rounding (`--border`, `--border-subtle`, `--radius-s`, etc.).
|
|
52
|
+
|
|
53
|
+
### Shadows
|
|
54
|
+
Elevation effects (`--shadow-m`, `--shadow-l`).
|
|
55
|
+
|
|
56
|
+
### Theme Fallbacks
|
|
57
|
+
All components include a centralized fallback module (`themeFallbacks` in `src/styles/fallbacks.ts`) that registers `@property` rules for every theme variable. This ensures components render correctly even when the base theme CSS isn't loaded — the fallback values mirror the dark theme defaults.
|
|
58
|
+
|
|
59
|
+
### Interaction
|
|
60
|
+
Disabled states and transitions (`--disabled-opacity`, `--transition`).
|
|
61
|
+
|
|
62
|
+
### Item States
|
|
63
|
+
Styling for list/item components (`--item-border`, `--item-bg-selected`, etc.).
|
|
64
|
+
|
|
65
|
+
### Prominence Styles
|
|
66
|
+
Interaction feedback for visual components (`--prominence-idle-opacity`, etc.).
|
|
67
|
+
|
|
68
|
+
## Customizing Themes
|
|
69
|
+
|
|
70
|
+
### Global Overrides
|
|
71
|
+
|
|
72
|
+
To customize themes globally, override variables on the `:root` selector:
|
|
73
|
+
|
|
74
|
+
```css
|
|
75
|
+
:root {
|
|
76
|
+
/* Change accent color */
|
|
77
|
+
--accent: oklch(60% 0.15 200); /* Blue-ish accent */
|
|
78
|
+
|
|
79
|
+
/* Modify surface colors */
|
|
80
|
+
--surface-3: oklch(90% 0.01 240); /* Lighter panel background */
|
|
81
|
+
|
|
82
|
+
/* Adjust spacing */
|
|
83
|
+
--space-m: 10px; /* Larger default spacing */
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Component-Specific Overrides
|
|
88
|
+
|
|
89
|
+
Apply theme overrides to specific components or containers:
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<!-- All components inside this container use custom theme -->
|
|
93
|
+
<div class="my-custom-theme">
|
|
94
|
+
<ixfx-button>Click me</ixfx-button>
|
|
95
|
+
<ixfx-panel>Content</ixfx-panel>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```css
|
|
100
|
+
.my-custom-theme {
|
|
101
|
+
--accent: oklch(50% 0.2 300); /* Purple accent */
|
|
102
|
+
--font-family: 'Georgia', serif; /* Different font */
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Per-Instance Overrides
|
|
107
|
+
|
|
108
|
+
Customize individual components using inline styles:
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<ixfx-button style="
|
|
112
|
+
--accent: oklch(70% 0.15 50); /* Orange for this button */
|
|
113
|
+
--space-m: 16px; /* Larger spacing just for this button */
|
|
114
|
+
">
|
|
115
|
+
Custom Button
|
|
116
|
+
</ixfx-button>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Complete Base Theme Reference
|
|
120
|
+
|
|
121
|
+
Below is the full set of CSS variables used by the library. Copy this into your own stylesheet as a starting point and override the values you want to change.
|
|
122
|
+
|
|
123
|
+
```css
|
|
124
|
+
/* ========================================
|
|
125
|
+
ixfx Components — Base Theme Reference
|
|
126
|
+
========================================
|
|
127
|
+
All colours use OKLCH for perceptual uniformity.
|
|
128
|
+
Dark theme is the default. Light theme overrides
|
|
129
|
+
are nested under @media (prefers-color-scheme: light).
|
|
130
|
+
======================================== */
|
|
131
|
+
|
|
132
|
+
:root {
|
|
133
|
+
/* ── Surfaces (depth: higher = more elevated) ── */
|
|
134
|
+
--surface-0: oklch(5% 0.02 240);
|
|
135
|
+
--surface-1: oklch(8% 0.02 240);
|
|
136
|
+
--surface-2: oklch(12% 0.02 240);
|
|
137
|
+
--surface-3: oklch(15% 0.02 240); /* default UI plane */
|
|
138
|
+
--surface-4: oklch(22% 0.02 240); /* buttons, inputs */
|
|
139
|
+
--surface-5: oklch(28% 0.02 240); /* menus, popovers */
|
|
140
|
+
--surface-6: oklch(35% 0.02 240); /* active/pressed, hover in popups */
|
|
141
|
+
|
|
142
|
+
/* ── Text on Surfaces ── */
|
|
143
|
+
--surface-2-text: #fff;
|
|
144
|
+
--surface-3-text: oklch(75% 0.02 240);
|
|
145
|
+
--surface-4-text: #fff;
|
|
146
|
+
--surface-5-text: #fff;
|
|
147
|
+
--surface-6-text: #fff;
|
|
148
|
+
--surface-muted-text: oklch(55% 0.02 240);
|
|
149
|
+
|
|
150
|
+
/* ── Content (user content areas — canvas, editors) ── */
|
|
151
|
+
--content: oklch(10% 0.01 240);
|
|
152
|
+
--content-text: #fff;
|
|
153
|
+
|
|
154
|
+
/* ── Accent ── */
|
|
155
|
+
--accent: oklch(60% 0.15 140);
|
|
156
|
+
--accent-text: #fff;
|
|
157
|
+
|
|
158
|
+
/* ── Feedback / Status ── */
|
|
159
|
+
--error: oklch(60% 0.15 20);
|
|
160
|
+
--error-text: #fff;
|
|
161
|
+
|
|
162
|
+
/* ── Typography ── */
|
|
163
|
+
--font-family: system-ui, sans-serif;
|
|
164
|
+
--font-mono: ui-monospace, monospace;
|
|
165
|
+
--font-weight: 400;
|
|
166
|
+
--font-weight-bold: 600;
|
|
167
|
+
--text-xs: 10px;
|
|
168
|
+
--text-s: 11px;
|
|
169
|
+
--text-m: 12px;
|
|
170
|
+
--text-l: 13px;
|
|
171
|
+
--text-xl: 16px;
|
|
172
|
+
--text-2xl: 20px;
|
|
173
|
+
|
|
174
|
+
/* ── Spacing ── */
|
|
175
|
+
--space-xs: 3px;
|
|
176
|
+
--space-s: 4px;
|
|
177
|
+
--space-m: 8px;
|
|
178
|
+
--space-l: 12px;
|
|
179
|
+
--space-xl: 16px;
|
|
180
|
+
--space-2xl: 20px;
|
|
181
|
+
|
|
182
|
+
/* ── Borders ── */
|
|
183
|
+
--border: 1px solid oklch(25% 0.02 240);
|
|
184
|
+
--border-subtle: 1px solid oklch(18% 0.02 240);
|
|
185
|
+
--radius-s: 3px;
|
|
186
|
+
--radius-m: 4px;
|
|
187
|
+
--radius-l: 6px;
|
|
188
|
+
--radius-xl: 8px;
|
|
189
|
+
|
|
190
|
+
/* ── Shadows ── */
|
|
191
|
+
--shadow-m: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
192
|
+
--shadow-l: 0 4px 24px rgba(0, 0, 0, 0.5);
|
|
193
|
+
|
|
194
|
+
/* ── Interaction ── */
|
|
195
|
+
--disabled-opacity: 0.5;
|
|
196
|
+
--transition: 0.15s ease-out;
|
|
197
|
+
|
|
198
|
+
/* ── Item States ── */
|
|
199
|
+
--item-bg: transparent;
|
|
200
|
+
--item-bg-tickled: var(--surface-5);
|
|
201
|
+
--item-bg-selected: var(--accent);
|
|
202
|
+
--item-bg-selected-tickled: color-mix(in oklch, var(--accent) 80%, oklch(0% 0 0));
|
|
203
|
+
--item-text-tickled: var(--surface-5-text);
|
|
204
|
+
--item-text-selected: var(--accent-text);
|
|
205
|
+
--item-border: 1px solid var(--surface-5);
|
|
206
|
+
--item-border-tickled: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
|
|
207
|
+
--item-border-selected: 1px dashed var(--accent);
|
|
208
|
+
--item-border-active: 2px solid var(--accent);
|
|
209
|
+
--item-border-dragged: 2px dotted color-mix(in oklch, var(--accent) 80%, transparent);
|
|
210
|
+
--item-border-disabled: 1px solid var(--surface-4);
|
|
211
|
+
--item-padding: var(--space-s) var(--space-m);
|
|
212
|
+
--item-border-radius: var(--radius-m);
|
|
213
|
+
--item-icon-spacing: var(--space-s);
|
|
214
|
+
|
|
215
|
+
/* ── Item Label Styling ── */
|
|
216
|
+
--item-label-font-style-default: normal;
|
|
217
|
+
--item-label-font-style-selected: italic;
|
|
218
|
+
--item-label-font-style-tickled: normal;
|
|
219
|
+
--item-label-text-decoration-default: none;
|
|
220
|
+
--item-label-text-decoration-selected: none;
|
|
221
|
+
--item-label-text-decoration-tickled: underline;
|
|
222
|
+
--item-label-text-underline-offset-default: auto;
|
|
223
|
+
--item-label-text-underline-offset-tickled: 3px;
|
|
224
|
+
|
|
225
|
+
/* ── Prominence (filter-based idle/tickled/active) ── */
|
|
226
|
+
--prominence-idle-opacity: 0.6;
|
|
227
|
+
--prominence-idle-saturate: 0.4;
|
|
228
|
+
--prominence-tickled-opacity: 0.85;
|
|
229
|
+
--prominence-tickled-saturate: 0.8;
|
|
230
|
+
--prominence-disabled-opacity: 0.3;
|
|
231
|
+
--prominence-disabled-saturate: 0.1;
|
|
232
|
+
|
|
233
|
+
/* ── Miscellaneous ── */
|
|
234
|
+
--transparent-bg: oklch(30% 0.02 240);
|
|
235
|
+
--plot-color: var(--accent);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (prefers-color-scheme: light) {
|
|
239
|
+
:root {
|
|
240
|
+
--surface-0: oklch(70% 0 0);
|
|
241
|
+
--surface-1: oklch(80% 0.01 240);
|
|
242
|
+
--surface-2: oklch(85% 0.01 240);
|
|
243
|
+
--surface-3: oklch(90% 0.01 240);
|
|
244
|
+
--surface-4: oklch(94% 0.01 240);
|
|
245
|
+
--surface-5: oklch(96% 0.01 240);
|
|
246
|
+
--surface-6: oklch(99% 0.01 240);
|
|
247
|
+
|
|
248
|
+
--surface-2-text: oklch(15% 0.02 240);
|
|
249
|
+
--surface-3-text: oklch(25% 0.02 240);
|
|
250
|
+
--surface-4-text: oklch(15% 0.02 240);
|
|
251
|
+
--surface-5-text: oklch(10% 0.02 240);
|
|
252
|
+
--surface-6-text: oklch(10% 0.02 240);
|
|
253
|
+
--surface-muted-text: oklch(45% 0.02 240);
|
|
254
|
+
|
|
255
|
+
--content: oklch(100% 0 0);
|
|
256
|
+
--content-text: oklch(10% 0.02 240);
|
|
257
|
+
|
|
258
|
+
--accent: oklch(45% 0.15 140);
|
|
259
|
+
--accent-text: #fff;
|
|
260
|
+
|
|
261
|
+
--error: oklch(55% 0.15 20);
|
|
262
|
+
--error-text: #fff;
|
|
263
|
+
|
|
264
|
+
--border: 1px solid oklch(80% 0.01 240);
|
|
265
|
+
--border-subtle: 1px solid oklch(88% 0.01 240);
|
|
266
|
+
|
|
267
|
+
--shadow-m: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
268
|
+
--shadow-l: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
269
|
+
|
|
270
|
+
--prominence-idle-opacity: 0.55;
|
|
271
|
+
--prominence-idle-saturate: 0.35;
|
|
272
|
+
--prominence-tickled-opacity: 0.8;
|
|
273
|
+
--prominence-tickled-saturate: 0.75;
|
|
274
|
+
--prominence-disabled-opacity: 0.25;
|
|
275
|
+
--prominence-disabled-saturate: 0.1;
|
|
276
|
+
|
|
277
|
+
--transparent-bg: oklch(85% 0.01 240);
|
|
278
|
+
|
|
279
|
+
--item-border: 1px solid var(--surface-4);
|
|
280
|
+
--item-border-tickled: 1px solid color-mix(in oklch, var(--accent) 50%, transparent);
|
|
281
|
+
--item-border-selected: 1px dashed var(--accent);
|
|
282
|
+
--item-border-active: 2px solid var(--accent);
|
|
283
|
+
--item-border-dragged: 2px dotted var(--accent);
|
|
284
|
+
--item-border-disabled: 1px solid var(--surface-3);
|
|
285
|
+
--item-bg-tickled: var(--surface-4);
|
|
286
|
+
--item-bg-selected-tickled: color-mix(in oklch, var(--accent) 80%, oklch(0% 0 0));
|
|
287
|
+
--item-text-tickled: var(--surface-4-text);
|
|
288
|
+
--item-bg-selected: var(--accent);
|
|
289
|
+
--item-text-selected: var(--accent-text);
|
|
290
|
+
|
|
291
|
+
--item-label-font-style-default: normal;
|
|
292
|
+
--item-label-font-style-selected: italic;
|
|
293
|
+
--item-label-font-style-tickled: normal;
|
|
294
|
+
--item-label-text-decoration-default: none;
|
|
295
|
+
--item-label-text-decoration-selected: none;
|
|
296
|
+
--item-label-text-decoration-tickled: underline;
|
|
297
|
+
--item-label-text-underline-offset-default: auto;
|
|
298
|
+
--item-label-text-underline-offset-tickled: 3px;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Using Demo Themes as Examples
|
|
304
|
+
|
|
305
|
+
The library includes several demo themes that showcase different customization approaches:
|
|
306
|
+
|
|
307
|
+
### Cyberpunk Theme
|
|
308
|
+
- Monospace typography
|
|
309
|
+
- Sharp corners (0px radius)
|
|
310
|
+
- Custom accent hue (cyan/blue)
|
|
311
|
+
- Modified surface colors
|
|
312
|
+
|
|
313
|
+
### Retro Theme
|
|
314
|
+
- Serif typography
|
|
315
|
+
- Larger border radii
|
|
316
|
+
- Warm accent colors (orange/brown)
|
|
317
|
+
- Dashed borders for selected items
|
|
318
|
+
|
|
319
|
+
### Flat Theme
|
|
320
|
+
- Minimal styling
|
|
321
|
+
- High contrast colors
|
|
322
|
+
- No deboss effects
|
|
323
|
+
|
|
324
|
+
You can inspect the demo themes in:
|
|
325
|
+
- `demo/shared/base-themes.css` - Base dark/light theme definitions
|
|
326
|
+
- `demo/shared/demo-themes.css` - Theme-specific overrides
|
|
327
|
+
|
|
328
|
+
## Best Practices
|
|
329
|
+
|
|
330
|
+
1. **Use Semantic Variables**: Always prefer `--surface-3` over hardcoded colors for better theme compatibility
|
|
331
|
+
2. **Maintain Contrast**: Ensure text remains readable against background colors
|
|
332
|
+
3. **Test Both Themes**: Verify customizations work in both dark and light modes
|
|
333
|
+
4. **Leverage Inheritance**: Set variables on parent elements to affect child components
|
|
334
|
+
5. **Use Theme Fallbacks in Shadow DOM**: When building custom elements that use these variables in their shadow DOM, import and include the `themeFallbacks` module in your `static styles`:
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
import { themeFallbacks } from '@ixfx/components/styles/fallbacks.js';
|
|
338
|
+
|
|
339
|
+
class MyWidget extends LitElement {
|
|
340
|
+
static styles = [themeFallbacks, css`
|
|
341
|
+
:host {
|
|
342
|
+
background: var(--surface-3);
|
|
343
|
+
color: var(--surface-3-text);
|
|
344
|
+
}
|
|
345
|
+
`];
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
This registers `@property` rules so the variables resolve correctly in shadow DOM even when no `:root` theme is loaded. Do not use per-usage CSS fallbacks (`var(--surface-3, #ccc)`) — the `@property` approach is centralized and automatically stays in sync with the theme.
|
|
350
|
+
|
|
351
|
+
## Theme Activation
|
|
352
|
+
|
|
353
|
+
The system automatically detects theme preference via `prefers-color-scheme` media query. To force a specific theme:
|
|
354
|
+
|
|
355
|
+
```html
|
|
356
|
+
<!-- Force dark theme -->
|
|
357
|
+
<html class="theme-dark">
|
|
358
|
+
<!-- components -->
|
|
359
|
+
</html>
|
|
360
|
+
|
|
361
|
+
<!-- Force light theme -->
|
|
362
|
+
<html class="theme-light">
|
|
363
|
+
<!-- components -->
|
|
364
|
+
</html>
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Migration Notes
|
|
368
|
+
|
|
369
|
+
If you're upgrading from previous versions:
|
|
370
|
+
- All color values now use OKLCH for perceptual uniformity
|
|
371
|
+
- Variable names remain stable but values may have been adjusted
|
|
372
|
+
- Custom themes may need adjustment for the new color system
|
|
373
|
+
|
|
374
|
+
## Further Reading
|
|
375
|
+
|
|
376
|
+
For implementation details, see:
|
|
377
|
+
- [`docs/infra-theming.md`](infra-theming.md) - Internal theming specification
|
|
378
|
+
- [`src/style.css`] - Base theme definitions
|
|
379
|
+
- [`demo/shared/`] - Example theme implementations
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# `ixfx-tooltip`
|
|
2
|
+
|
|
3
|
+
A tooltip component that renders a value with optional icon and formatted number display. Uses native render root (no shadow DOM).
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<ixfx-tooltip value="42" orientation="top"></ixfx-tooltip>
|
|
7
|
+
<ixfx-tooltip value="3.14159" icon="pi"></ixfx-tooltip>
|
|
8
|
+
<ixfx-tooltip value="error" icon="<svg>...</svg>" orientation="bottom"></ixfx-tooltip>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Properties / attributes
|
|
12
|
+
|
|
13
|
+
| Attribute / Property | Type | Default | Description |
|
|
14
|
+
|----------------------|--------------------------------|---------------------------|-------------------------------|
|
|
15
|
+
| `value` | `unknown` | `undefined` | Value to display |
|
|
16
|
+
| `orientation` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'top'` | Popover orientation |
|
|
17
|
+
| `anchor` | `string` | `'--tooltip'` | CSS anchor name |
|
|
18
|
+
| `icon` | `string \| undefined` | `undefined` | Icon name or raw SVG string |
|
|
19
|
+
|
|
20
|
+
### Value formatting
|
|
21
|
+
|
|
22
|
+
Numbers are formatted using `valueFormatTooltip`:
|
|
23
|
+
- Integers display as-is
|
|
24
|
+
- Floats display with 2 decimal places
|
|
25
|
+
- Strings display as-is
|
|
26
|
+
- Other values are JSON-stringified
|
|
27
|
+
|
|
28
|
+
### Static properties
|
|
29
|
+
|
|
30
|
+
| Property | Type | Description |
|
|
31
|
+
|-----------------------|-------------------------|--------------------------------|
|
|
32
|
+
| `numberFormatter` | `(v: number) => string` | Formats number for display |
|
|
33
|
+
| `defaultFormatter` | `FormatValueForHuman` | Default value formatter |
|
|
34
|
+
|
|
35
|
+
### Instance properties
|
|
36
|
+
|
|
37
|
+
| Property | Type | Description |
|
|
38
|
+
|-----------------------|-------------------------|--------------------------------|
|
|
39
|
+
| `valueFormatTooltip` | `FormatValueForHuman` | Instance formatter, adjustable |
|
|
40
|
+
|
|
41
|
+
### CSS custom properties
|
|
42
|
+
|
|
43
|
+
| Property | Default | Description |
|
|
44
|
+
|------------|---------|-------------------|
|
|
45
|
+
| `--anchor-id` | set dynamically | CSS anchor for positioning |
|
|
46
|
+
|
|
47
|
+
### CSS classes
|
|
48
|
+
|
|
49
|
+
The component applies these classes to the output element:
|
|
50
|
+
- `tooltip`
|
|
51
|
+
- `tooltip-orientation-{top|right|bottom|left}`
|
|
52
|
+
- `tooltip-type-text` or `tooltip-type-number`
|
|
53
|
+
- `tooltip-style-bubble`
|
|
54
|
+
|
|
55
|
+
### Usage notes
|
|
56
|
+
|
|
57
|
+
- `renderRenderRoot` returns `this` (light DOM), allowing CSS from parent to style the tooltip
|
|
58
|
+
- For native CSS anchor positioning, set `anchor` to a unique CSS custom property name
|
|
59
|
+
- Can be used as an overlay element positioned via CSS Anchor Positioning API
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
# `ixfx-value-drag`
|
|
64
|
+
|
|
65
|
+
A vertical drag handle for adjusting numeric values. Drag up/down to change value; click the slot to activate an editor.
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<ixfx-value-drag min="0" max="100" value="50"></ixfx-value-drag>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Properties / attributes
|
|
72
|
+
|
|
73
|
+
| Attribute / Property | Type | Default | Description |
|
|
74
|
+
|---------------------|------------------------|------------|----------------------------------------------|
|
|
75
|
+
| `min` | `number` | `0` | Minimum value |
|
|
76
|
+
| `max` | `number` | `1` | Maximum value |
|
|
77
|
+
| `value` | `number` | `0.5` | Current value |
|
|
78
|
+
| `sensitivity` | `number` | `0.3` | Screen percentage needed to reach min/max |
|
|
79
|
+
| `disabled` | `boolean` | `false` | Disables interaction |
|
|
80
|
+
| `numberConverter` | `(v: number) => number`| `Math.floor` | Converts the raw value |
|
|
81
|
+
|
|
82
|
+
### Events
|
|
83
|
+
|
|
84
|
+
| Event | Detail | Description |
|
|
85
|
+
|----------|---------------------------|----------------------------------------|
|
|
86
|
+
| `input` | `{ value: number }` | Fired continuously during drag |
|
|
87
|
+
| `change` | `{ value: number }` | Fired when drag ends |
|
|
88
|
+
|
|
89
|
+
### Usage
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
const drag = document.querySelector('ixfx-value-drag');
|
|
93
|
+
drag.min = 0;
|
|
94
|
+
drag.max = 255;
|
|
95
|
+
drag.value = 128;
|
|
96
|
+
|
|
97
|
+
// Listen for changes
|
|
98
|
+
drag.addEventListener('change', e => {
|
|
99
|
+
console.log('final value:', e.detail.value);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// Listen during drag
|
|
103
|
+
drag.addEventListener('input', e => {
|
|
104
|
+
console.log('current value:', e.detail.value);
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Custom value conversion
|
|
109
|
+
|
|
110
|
+
By default, values are floored to integers. Provide a custom converter:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
drag.numberConverter = v => Math.round(v); // Round instead of floor
|
|
114
|
+
drag.numberConverter = v => v.toFixed(2); // Keep 2 decimal places (returns string!)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### CSS custom properties
|
|
118
|
+
|
|
119
|
+
| Property | Default | Description |
|
|
120
|
+
|------------|---------|-------------------|
|
|
121
|
+
| --surface-3 | `#ccc` | Background color |
|
|
122
|
+
| --surface-text | `#000` | Text color |
|