jsl-ui 10.4.3 → 10.4.5

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.
Files changed (95) hide show
  1. package/docs/AutoSuggestComponent.md +17 -17
  2. package/docs/ButtonComponent.md +22 -22
  3. package/docs/CheckBoxComponent.md +12 -12
  4. package/docs/DataBinding.md +19 -19
  5. package/docs/DateComponent.md +12 -12
  6. package/docs/DateRangeComponent.md +13 -13
  7. package/docs/DateTimeComponent.md +14 -14
  8. package/docs/DialogComponent.md +15 -15
  9. package/docs/DropdownMenuComponent.md +22 -22
  10. package/docs/ExpanderComponent.md +13 -13
  11. package/docs/FormComponent.md +15 -15
  12. package/docs/FormFieldComponent.md +15 -15
  13. package/docs/GridComponent.md +39 -39
  14. package/docs/InputComponent.md +15 -15
  15. package/docs/IntervalComponent.md +13 -13
  16. package/docs/LoadingComponent.md +12 -12
  17. package/docs/NavigationComponent.md +17 -17
  18. package/docs/Notification.md +14 -14
  19. package/docs/NotificationComponent.md +13 -13
  20. package/docs/NumberComponent.md +12 -12
  21. package/docs/OverlayComponent.md +13 -13
  22. package/docs/ProgressComponent.md +12 -12
  23. package/docs/README.md +27 -27
  24. package/docs/RibbonMenuComponent.md +14 -14
  25. package/docs/SelectComponent.md +36 -36
  26. package/docs/SliderComponent.md +20 -20
  27. package/docs/SplitterComponent.md +14 -14
  28. package/docs/StackPanelComponent.md +13 -13
  29. package/docs/TabsComponent.md +16 -16
  30. package/docs/TimeComponent.md +13 -13
  31. package/docs/TreeViewComponent.md +16 -16
  32. package/examples/showcase/checks-and-expanders.ts +148 -148
  33. package/examples/showcase/cultures.ts +39 -39
  34. package/examples/showcase/data-binding.ts +138 -138
  35. package/examples/showcase/dates.ts +168 -168
  36. package/examples/showcase/dialogs.ts +184 -184
  37. package/examples/showcase/dropdown-menus.ts +99 -99
  38. package/examples/showcase/feedback-and-navigation.ts +173 -173
  39. package/examples/showcase/fields.ts +166 -166
  40. package/examples/showcase/fonts/OFL-BricolageGrotesque.txt +93 -93
  41. package/examples/showcase/fonts/OFL-Figtree.txt +93 -93
  42. package/examples/showcase/fonts/OFL-Jost.txt +93 -93
  43. package/examples/showcase/generate-sources.cjs +104 -104
  44. package/examples/showcase/grids.ts +484 -484
  45. package/examples/showcase/index.html +71 -71
  46. package/examples/showcase/layout-and-navigation.ts +46 -46
  47. package/examples/showcase/nivona.css +98 -98
  48. package/examples/showcase/package.json +10 -10
  49. package/examples/showcase/selects.ts +184 -184
  50. package/examples/showcase/showcase-sources.ts +94 -94
  51. package/examples/showcase/showcase.css +281 -281
  52. package/examples/showcase/showcase.ts +244 -244
  53. package/examples/showcase/tabs.ts +161 -161
  54. package/examples/showcase/themes.css +83 -83
  55. package/examples/showcase/themes.ts +56 -56
  56. package/examples/showcase/wirtshans.css +65 -65
  57. package/lib/components/checkbox/CheckBoxStyle.scss +73 -73
  58. package/lib/components/date-range/DateRangeStyle.scss +35 -35
  59. package/lib/components/date-time/DateTimeStyle.scss +9 -9
  60. package/lib/components/dialog/DialogComponent.d.ts +9 -2
  61. package/lib/components/dialog/DialogComponent.js +17 -51
  62. package/lib/components/dropdown-menu/DropdownMenuStyle.scss +48 -48
  63. package/lib/components/expander/ExpanderStyle.scss +61 -61
  64. package/lib/components/form-field/FormFieldStyle.scss +36 -36
  65. package/lib/components/host/RenderHost.d.ts +25 -0
  66. package/lib/components/host/RenderHost.js +63 -0
  67. package/lib/components/loading/LoadingStyle.css +18 -18
  68. package/lib/components/navigation/NavigationStyle.scss +61 -61
  69. package/lib/components/notification/Notification.scss +102 -102
  70. package/lib/components/overlay/OverlayComponent.d.ts +9 -1
  71. package/lib/components/overlay/OverlayComponent.js +22 -13
  72. package/lib/components/overlay/overlay.css +15 -15
  73. package/lib/components/progress/ProgressStyle.scss +4 -4
  74. package/lib/components/ribbon-menu/RibbonMenuStyle.scss +5 -5
  75. package/lib/components/select/SelectStyle.scss +207 -207
  76. package/lib/components/slider/SliderStyle.scss +21 -21
  77. package/lib/components/slider/nouislider.css +15 -15
  78. package/lib/components/stack-panel/SplitterStyle.scss +8 -8
  79. package/lib/components/stack-panel/StackPanelStyle.scss +10 -10
  80. package/lib/components/tabs/TabsStyle.scss +139 -139
  81. package/lib/components/time/TimeComponent.scss +3 -3
  82. package/lib/components/tree-view/TreeViewStyle.scss +14 -14
  83. package/lib/core/helper.js +11 -6
  84. package/lib/grid/plugins/slick.headermenu.css +98 -98
  85. package/lib/grid.css +840 -3532
  86. package/lib/index.css.map +1 -1
  87. package/lib/index.js.map +1 -1
  88. package/lib/ui/auto.suggest.css +30 -30
  89. package/lib/ui/button.css +147 -147
  90. package/lib/ui/date-input.css +10 -10
  91. package/lib/ui/date.picker/css/tiny-date-picker.css +124 -124
  92. package/lib/ui/dialog.css +144 -144
  93. package/lib/ui/input.css +35 -35
  94. package/lib/ui/theme.css +28 -28
  95. package/package.json +1 -1
@@ -1,71 +1,71 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta name="description" content="An interactive showcase of the redesigned JSL UI components.">
7
- <title>JSL UI Showcase</title>
8
- <link rel="stylesheet" href="./showcase.css">
9
- </head>
10
- <body>
11
- <a class="skip-link" href="#main">Skip to components</a>
12
- <aside class="sidebar" aria-label="Component navigation">
13
- <a class="brand" href="#main"><span class="brand-mark">j.</span><span>JSL UI<span class="brand-caption">Component showcase</span></span></a>
14
- <p class="nav-label">COMPONENTS <span>24</span></p>
15
- <nav>
16
- <a class="nav-item" href="#buttons" aria-current="location"><span class="nav-icon" aria-hidden="true">▣</span> Buttons <span class="nav-number">01</span></a>
17
- <a class="nav-item" href="#dialogs"><span class="nav-icon" aria-hidden="true">▢</span> Dialogs <span class="nav-number">02</span></a>
18
- <a class="nav-item" href="#tabs"><span class="nav-icon" aria-hidden="true">▤</span> Tabs <span class="nav-number">03</span></a>
19
- <a class="nav-item" href="#sliders"><span class="nav-icon" aria-hidden="true">↔</span> Sliders <span class="nav-number">04</span></a>
20
- <a class="nav-item" href="#dates"><span class="nav-icon" aria-hidden="true">▦</span> Dates <span class="nav-number">05</span></a>
21
- <a class="nav-item" href="#date-ranges"><span class="nav-icon" aria-hidden="true">↔</span> Date ranges <span class="nav-number">06</span></a>
22
- <a class="nav-item" href="#date-times"><span class="nav-icon" aria-hidden="true">◷</span> Date &amp; time <span class="nav-number">07</span></a>
23
- <a class="nav-item" href="#selects"><span class="nav-icon" aria-hidden="true">⌄</span> Selects <span class="nav-number">08</span></a>
24
- <a class="nav-item" href="#checkboxes"><span class="nav-icon" aria-hidden="true">☑</span> Checkboxes <span class="nav-number">09</span></a>
25
- <a class="nav-item" href="#expanders"><span class="nav-icon" aria-hidden="true">›</span> Expanders <span class="nav-number">10</span></a>
26
- <a class="nav-item" href="#inputs"><span class="nav-icon" aria-hidden="true">⌨</span> Inputs <span class="nav-number">11</span></a>
27
- <a class="nav-item" href="#numbers"><span class="nav-icon" aria-hidden="true">#</span> Numbers <span class="nav-number">12</span></a>
28
- <a class="nav-item" href="#form-fields"><span class="nav-icon" aria-hidden="true">▤</span> Form fields <span class="nav-number">13</span></a>
29
- <a class="nav-item" href="#notifications"><span class="nav-icon" aria-hidden="true">!</span> Notifications <span class="nav-number">14</span></a>
30
- <a class="nav-item" href="#loading"><span class="nav-icon" aria-hidden="true">◌</span> Loading <span class="nav-number">15</span></a>
31
- <a class="nav-item" href="#navigation"><span class="nav-icon" aria-hidden="true">☰</span> Navigation <span class="nav-number">16</span></a>
32
- <a class="nav-item" href="#progress"><span class="nav-icon" aria-hidden="true">&#9648;</span> Progress <span class="nav-number">17</span></a>
33
- <a class="nav-item" href="#stack-panels"><span class="nav-icon" aria-hidden="true">&#9707;</span> Stack panels &amp; splitters <span class="nav-number">18</span></a>
34
- <a class="nav-item" href="#trees"><span class="nav-icon" aria-hidden="true">&#8627;</span> Tree views <span class="nav-number">19</span></a>
35
- <a class="nav-item" href="#overlays"><span class="nav-icon" aria-hidden="true">&#9703;</span> Overlays <span class="nav-number">20</span></a>
36
- <a class="nav-item" href="#ribbons"><span class="nav-icon" aria-hidden="true">&#9637;</span> Ribbon menus <span class="nav-number">21</span></a>
37
- <div class="nav-group">
38
- <a class="nav-item" href="#grids"><span class="nav-icon" aria-hidden="true">&#9638;</span> Grids <span class="nav-number">22</span></a>
39
- <div class="nav-submenu" aria-label="Grid showcase categories">
40
- <a class="nav-subitem" href="#grid-browsing">Browsing &amp; layout</a>
41
- <a class="nav-subitem" href="#grid-editing">Editing</a>
42
- <a class="nav-subitem" href="#grid-grouping">Grouping &amp; header groups</a>
43
- <a class="nav-subitem" href="#grid-interaction">Selection &amp; cell components</a>
44
- <a class="nav-subitem" href="#grid-variable-rows">Variable row height</a>
45
- </div>
46
- </div>
47
- <a class="nav-item" href="#dropdown-menus"><span class="nav-icon" aria-hidden="true">&#8942;</span> Dropdown menus <span class="nav-number">23</span></a>
48
- <a class="nav-item" href="#data-binding"><span class="nav-icon" aria-hidden="true">&#8644;</span> Data binding <span class="nav-number">24</span></a>
49
- </nav>
50
- <div class="sidebar-note"><span class="status-dot"></span> A growing collection<p>Redesigned components will be added here as the library evolves.</p></div>
51
- </aside>
52
- <main id="main" tabindex="-1">
53
- <div class="page-meta">
54
- <span>LIBRARY / COMPONENTS</span>
55
- <div class="page-tools">
56
- <label class="theme-picker" for="showcase-culture" title="Changing culture reloads and resets the examples with the selected date and number formats.">Culture
57
- <select id="showcase-culture"><option value="">Default (ISO)</option></select>
58
- </label>
59
- <span id="showcase-format-preview" class="format-preview" aria-label="Date and number format example"></span>
60
- <label class="theme-picker" for="showcase-theme">Theme
61
- <select id="showcase-theme"><option value="default">Default (neutral)</option></select>
62
- </label>
63
- <span class="version">JSL UI <span class="status-dot"></span> Design preview</span>
64
- </div>
65
- </div>
66
- <div id="showcase"></div>
67
- <footer class="page-footer"><span>JSL UI · Component showcase</span><span>Built for everyday work.</span></footer>
68
- </main>
69
- <script type="module" src="./showcase.ts"></script>
70
- </body>
71
- </html>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="An interactive showcase of the redesigned JSL UI components.">
7
+ <title>JSL UI Showcase</title>
8
+ <link rel="stylesheet" href="./showcase.css">
9
+ </head>
10
+ <body>
11
+ <a class="skip-link" href="#main">Skip to components</a>
12
+ <aside class="sidebar" aria-label="Component navigation">
13
+ <a class="brand" href="#main"><span class="brand-mark">j.</span><span>JSL UI<span class="brand-caption">Component showcase</span></span></a>
14
+ <p class="nav-label">COMPONENTS <span>24</span></p>
15
+ <nav>
16
+ <a class="nav-item" href="#buttons" aria-current="location"><span class="nav-icon" aria-hidden="true">▣</span> Buttons <span class="nav-number">01</span></a>
17
+ <a class="nav-item" href="#dialogs"><span class="nav-icon" aria-hidden="true">▢</span> Dialogs <span class="nav-number">02</span></a>
18
+ <a class="nav-item" href="#tabs"><span class="nav-icon" aria-hidden="true">▤</span> Tabs <span class="nav-number">03</span></a>
19
+ <a class="nav-item" href="#sliders"><span class="nav-icon" aria-hidden="true">↔</span> Sliders <span class="nav-number">04</span></a>
20
+ <a class="nav-item" href="#dates"><span class="nav-icon" aria-hidden="true">▦</span> Dates <span class="nav-number">05</span></a>
21
+ <a class="nav-item" href="#date-ranges"><span class="nav-icon" aria-hidden="true">↔</span> Date ranges <span class="nav-number">06</span></a>
22
+ <a class="nav-item" href="#date-times"><span class="nav-icon" aria-hidden="true">◷</span> Date &amp; time <span class="nav-number">07</span></a>
23
+ <a class="nav-item" href="#selects"><span class="nav-icon" aria-hidden="true">⌄</span> Selects <span class="nav-number">08</span></a>
24
+ <a class="nav-item" href="#checkboxes"><span class="nav-icon" aria-hidden="true">☑</span> Checkboxes <span class="nav-number">09</span></a>
25
+ <a class="nav-item" href="#expanders"><span class="nav-icon" aria-hidden="true">›</span> Expanders <span class="nav-number">10</span></a>
26
+ <a class="nav-item" href="#inputs"><span class="nav-icon" aria-hidden="true">⌨</span> Inputs <span class="nav-number">11</span></a>
27
+ <a class="nav-item" href="#numbers"><span class="nav-icon" aria-hidden="true">#</span> Numbers <span class="nav-number">12</span></a>
28
+ <a class="nav-item" href="#form-fields"><span class="nav-icon" aria-hidden="true">▤</span> Form fields <span class="nav-number">13</span></a>
29
+ <a class="nav-item" href="#notifications"><span class="nav-icon" aria-hidden="true">!</span> Notifications <span class="nav-number">14</span></a>
30
+ <a class="nav-item" href="#loading"><span class="nav-icon" aria-hidden="true">◌</span> Loading <span class="nav-number">15</span></a>
31
+ <a class="nav-item" href="#navigation"><span class="nav-icon" aria-hidden="true">☰</span> Navigation <span class="nav-number">16</span></a>
32
+ <a class="nav-item" href="#progress"><span class="nav-icon" aria-hidden="true">&#9648;</span> Progress <span class="nav-number">17</span></a>
33
+ <a class="nav-item" href="#stack-panels"><span class="nav-icon" aria-hidden="true">&#9707;</span> Stack panels &amp; splitters <span class="nav-number">18</span></a>
34
+ <a class="nav-item" href="#trees"><span class="nav-icon" aria-hidden="true">&#8627;</span> Tree views <span class="nav-number">19</span></a>
35
+ <a class="nav-item" href="#overlays"><span class="nav-icon" aria-hidden="true">&#9703;</span> Overlays <span class="nav-number">20</span></a>
36
+ <a class="nav-item" href="#ribbons"><span class="nav-icon" aria-hidden="true">&#9637;</span> Ribbon menus <span class="nav-number">21</span></a>
37
+ <div class="nav-group">
38
+ <a class="nav-item" href="#grids"><span class="nav-icon" aria-hidden="true">&#9638;</span> Grids <span class="nav-number">22</span></a>
39
+ <div class="nav-submenu" aria-label="Grid showcase categories">
40
+ <a class="nav-subitem" href="#grid-browsing">Browsing &amp; layout</a>
41
+ <a class="nav-subitem" href="#grid-editing">Editing</a>
42
+ <a class="nav-subitem" href="#grid-grouping">Grouping &amp; header groups</a>
43
+ <a class="nav-subitem" href="#grid-interaction">Selection &amp; cell components</a>
44
+ <a class="nav-subitem" href="#grid-variable-rows">Variable row height</a>
45
+ </div>
46
+ </div>
47
+ <a class="nav-item" href="#dropdown-menus"><span class="nav-icon" aria-hidden="true">&#8942;</span> Dropdown menus <span class="nav-number">23</span></a>
48
+ <a class="nav-item" href="#data-binding"><span class="nav-icon" aria-hidden="true">&#8644;</span> Data binding <span class="nav-number">24</span></a>
49
+ </nav>
50
+ <div class="sidebar-note"><span class="status-dot"></span> A growing collection<p>Redesigned components will be added here as the library evolves.</p></div>
51
+ </aside>
52
+ <main id="main" tabindex="-1">
53
+ <div class="page-meta">
54
+ <span>LIBRARY / COMPONENTS</span>
55
+ <div class="page-tools">
56
+ <label class="theme-picker" for="showcase-culture" title="Changing culture reloads and resets the examples with the selected date and number formats.">Culture
57
+ <select id="showcase-culture"><option value="">Default (ISO)</option></select>
58
+ </label>
59
+ <span id="showcase-format-preview" class="format-preview" aria-label="Date and number format example"></span>
60
+ <label class="theme-picker" for="showcase-theme">Theme
61
+ <select id="showcase-theme"><option value="default">Default (neutral)</option></select>
62
+ </label>
63
+ <span class="version">JSL UI <span class="status-dot"></span> Design preview</span>
64
+ </div>
65
+ </div>
66
+ <div id="showcase"></div>
67
+ <footer class="page-footer"><span>JSL UI · Component showcase</span><span>Built for everyday work.</span></footer>
68
+ </main>
69
+ <script type="module" src="./showcase.ts"></script>
70
+ </body>
71
+ </html>
@@ -1,47 +1,47 @@
1
- import { IJSLComponent, IJSLVNode } from "jsl-render";
2
- import { ProgressComponent } from "../../components/progress/ProgressComponent";
3
- import { StackPanelComponent } from "../../components/stack-panel/StackPanelComponent";
4
- import { SplitterComponent } from "../../components/stack-panel/SplitterComponent";
5
- import { TreeViewComponent } from "../../components/tree-view/TreeViewComponent";
6
- import { OverlayComponent } from "../../components/overlay/OverlayComponent";
7
- import { RibbonMenuComponent } from "../../components/ribbon-menu/RibbonMenuComponent";
8
- import { ButtonComponent } from "../../components/button/ButtonComponent";
9
- type Content=IJSLVNode|IJSLComponent;
10
- const text=(tag:string,content:string):IJSLVNode=>({tag,content});
11
- const group=(children:Content[],className?:string):IJSLVNode=>({tag:"div",attr:{class:className},children});
12
- const button=(content:string,click:()=>void)=>new ButtonComponent({content,click,type:"button",outlined:true,size:"small"});
13
- const panel=(title:string,copy:string)=>group([text("h3",title),text("p",copy)],"layout-demo-panel");
14
- function section(id:string,number:string,title:string,copy:string,children:Content[],usage:string):IJSLVNode {
15
- return {tag:"section",attr:{id,class:"component-section","aria-labelledby":id+"-title"},children:[
16
- group([text("p","THE ESSENTIALS / "+number),{tag:"h2",content:title,attr:{id:id+"-title",class:"section-title"}},text("p",copy)],"hero-copy"),
17
- group(children,"sample-card remaining-demo"),
18
- {tag:"details",attr:{class:"usage"},children:[text("summary",title+" usage & compatibility"),text("p",usage)]}
19
- ]};
20
- }
21
- const progress=new ProgressComponent(45,{showPercent:true,ariaLabel:"Upload progress"});
22
- export const progressShowcase=section("progress","17","Progress","A clear measure of how far a task has come.",[
23
- progress,group([button("Advance",()=>progress.setProgress(Math.min(100,progress.getProgress()+10))),button("Reset",()=>progress.setProgress(0))],"sample-row"),
24
- new ProgressComponent(72,{ariaLabel:"Processing progress"}),text("p","A slim indicator without a percentage label.")
25
- ],"The numeric constructor, color override, formatting, getProgress(), and setProgress() remain available. Displayed values are clamped to 0–100. ariaLabel names the progress bar.");
26
- export const stackShowcase=section("stack-panels","18","Stack panels & splitters","Comfortable layouts with a small, precise resize handle.",[
27
- text("h3","Side by side"),new StackPanelComponent([panel("Library","Drag the handle or focus it and use the arrow keys."),new SplitterComponent({minSizesInPX:[90,90]}),panel("Workspace","Shift + arrow moves faster. Home and End move to the allowed limits.")],{sizes:["40%",undefined,"*"],style:"height:220px;border:1px solid var(--jsl-color-border);border-radius:.5rem;overflow:hidden"}),
28
- text("h3","One above another"),new StackPanelComponent([panel("Preview","Vertical layouts resize by height."),new SplitterComponent({minSizesInPX:[60,60]}),panel("Details","The completion callback reports the first panel's height in this layout.")],{orientation:"vertical",sizes:["45%",undefined,"*"],style:"height:300px;border:1px solid var(--jsl-color-border);border-radius:.5rem;overflow:hidden"}),
29
- text("h3","Responsive layout"),new StackPanelComponent([panel("First","Panels stack on smaller screens."),panel("Second","No resize handle is needed here.")],{responsive:true})
30
- ],"Existing orientation, sizes, valign, wrap, responsive, and flexForChildren options remain. Splitter preserves min/max sizes and resize callbacks, and supports mouse, touch, pen, and keyboard. Responsive horizontal panels stack below 70em; splitters hide in that layout.");
31
- const treeStatus=text("p","Select a node to explore.");treeStatus.attr={role:"status"};
32
- const makeTree=()=>({id:"workspace",content:"Workspace",children:[{id:"projects",content:"Projects",children:[{id:"design",content:"Design system"},{id:"website",content:"Website refresh"}]},{id:"archive",content:"Archive",collapsed:true,children:[{id:"last-year",content:"Last year's work"}]},{id:"notes",content:"Notes"}]});
33
- export const treeShowcase=section("trees","19","Tree views","A calm hierarchy with clear expansion and selection states.",[
34
- new TreeViewComponent({data:makeTree(),ariaLabel:"Workspace files",onSelect:item=>{treeStatus.content="Selected: "+item.id;}}),treeStatus,
35
- text("h3","Custom row content"),new TreeViewComponent({data:makeTree(),ariaLabel:"Rich file tree",renderItem:item=>group([text("span",item.children?.length ? "▱" : "·"),text("span",String(item.content))],"tree-demo-content")})
36
- ],"The data, collapsed, content, and renderItem options remain. Expansion updates collapsed on the data node. onSelect and ariaLabel are optional additions. Use arrows, Home/End, Enter, or Space; node IDs are data identifiers and do not collide across trees.");
37
- const overlayCopy=()=>group([text("h2","Workspace settings"),text("p","A little room for secondary tasks, without leaving your current view."),new ButtonComponent({content:"Save settings",type:"button",click:()=>overlay.close()})]);
38
- let overlay:OverlayComponent;
39
- let allowClose=false;
40
- export const overlayShowcase=section("overlays","20","Overlays","Focused panels that slide in from the side or the top.",[
41
- group([button("Open side panel",()=>{overlay=OverlayComponent.show({content:overlayCopy(),ariaLabel:"Workspace settings",size:"26rem"});}),button("Open top panel",()=>{overlay=OverlayComponent.show({content:overlayCopy(),direction:"top",size:"20rem",ariaLabel:"Workspace settings"});}),button("Try close guard",()=>{allowClose=false;overlay=OverlayComponent.show({ariaLabel:"Protected panel",onClose:()=>allowClose,content:group([text("h2","A protected panel"),text("p","Closing is blocked until you choose Allow close."),button("Allow close",()=>{allowClose=true;overlay.close();})])});})],"sample-row")
42
- ],"show(), close(), content, direction, size, animation, dismissal flags, and callbacks remain. onClose returning false vetoes dismissal. Native modal dialogs contain keyboard focus, support nested panels, and restore focus on close. ariaLabel and closeButtonLabel provide accessible names.");
43
- const ribbonStatus=text("p","Choose an action.");ribbonStatus.attr={role:"status"};
44
- const ribbonAction=(content:string)=>button(content,()=>{ribbonStatus.content=content+" selected.";});
45
- export const ribbonShowcase=section("ribbons","21","Ribbon menus","Related actions grouped in a flexible, themed toolbar.",[
46
- new RibbonMenuComponent([{title:"Project",children:[ribbonAction("New"),ribbonAction("Open"),ribbonAction("Save")]},{title:"Edit",children:[ribbonAction("Undo"),ribbonAction("Redo")]},{title:"View",children:[new ButtonComponent({content:"Details",toggle:true,outlined:true,type:"button"}),new ButtonComponent({content:"Unavailable",enabled:false,type:"button"})]}]),ribbonStatus
1
+ import { IJSLComponent, IJSLVNode } from "jsl-render";
2
+ import { ProgressComponent } from "../../components/progress/ProgressComponent";
3
+ import { StackPanelComponent } from "../../components/stack-panel/StackPanelComponent";
4
+ import { SplitterComponent } from "../../components/stack-panel/SplitterComponent";
5
+ import { TreeViewComponent } from "../../components/tree-view/TreeViewComponent";
6
+ import { OverlayComponent } from "../../components/overlay/OverlayComponent";
7
+ import { RibbonMenuComponent } from "../../components/ribbon-menu/RibbonMenuComponent";
8
+ import { ButtonComponent } from "../../components/button/ButtonComponent";
9
+ type Content=IJSLVNode|IJSLComponent;
10
+ const text=(tag:string,content:string):IJSLVNode=>({tag,content});
11
+ const group=(children:Content[],className?:string):IJSLVNode=>({tag:"div",attr:{class:className},children});
12
+ const button=(content:string,click:()=>void)=>new ButtonComponent({content,click,type:"button",outlined:true,size:"small"});
13
+ const panel=(title:string,copy:string)=>group([text("h3",title),text("p",copy)],"layout-demo-panel");
14
+ function section(id:string,number:string,title:string,copy:string,children:Content[],usage:string):IJSLVNode {
15
+ return {tag:"section",attr:{id,class:"component-section","aria-labelledby":id+"-title"},children:[
16
+ group([text("p","THE ESSENTIALS / "+number),{tag:"h2",content:title,attr:{id:id+"-title",class:"section-title"}},text("p",copy)],"hero-copy"),
17
+ group(children,"sample-card remaining-demo"),
18
+ {tag:"details",attr:{class:"usage"},children:[text("summary",title+" usage & compatibility"),text("p",usage)]}
19
+ ]};
20
+ }
21
+ const progress=new ProgressComponent(45,{showPercent:true,ariaLabel:"Upload progress"});
22
+ export const progressShowcase=section("progress","17","Progress","A clear measure of how far a task has come.",[
23
+ progress,group([button("Advance",()=>progress.setProgress(Math.min(100,progress.getProgress()+10))),button("Reset",()=>progress.setProgress(0))],"sample-row"),
24
+ new ProgressComponent(72,{ariaLabel:"Processing progress"}),text("p","A slim indicator without a percentage label.")
25
+ ],"The numeric constructor, color override, formatting, getProgress(), and setProgress() remain available. Displayed values are clamped to 0–100. ariaLabel names the progress bar.");
26
+ export const stackShowcase=section("stack-panels","18","Stack panels & splitters","Comfortable layouts with a small, precise resize handle.",[
27
+ text("h3","Side by side"),new StackPanelComponent([panel("Library","Drag the handle or focus it and use the arrow keys."),new SplitterComponent({minSizesInPX:[90,90]}),panel("Workspace","Shift + arrow moves faster. Home and End move to the allowed limits.")],{sizes:["40%",undefined,"*"],style:"height:220px;border:1px solid var(--jsl-color-border);border-radius:.5rem;overflow:hidden"}),
28
+ text("h3","One above another"),new StackPanelComponent([panel("Preview","Vertical layouts resize by height."),new SplitterComponent({minSizesInPX:[60,60]}),panel("Details","The completion callback reports the first panel's height in this layout.")],{orientation:"vertical",sizes:["45%",undefined,"*"],style:"height:300px;border:1px solid var(--jsl-color-border);border-radius:.5rem;overflow:hidden"}),
29
+ text("h3","Responsive layout"),new StackPanelComponent([panel("First","Panels stack on smaller screens."),panel("Second","No resize handle is needed here.")],{responsive:true})
30
+ ],"Existing orientation, sizes, valign, wrap, responsive, and flexForChildren options remain. Splitter preserves min/max sizes and resize callbacks, and supports mouse, touch, pen, and keyboard. Responsive horizontal panels stack below 70em; splitters hide in that layout.");
31
+ const treeStatus=text("p","Select a node to explore.");treeStatus.attr={role:"status"};
32
+ const makeTree=()=>({id:"workspace",content:"Workspace",children:[{id:"projects",content:"Projects",children:[{id:"design",content:"Design system"},{id:"website",content:"Website refresh"}]},{id:"archive",content:"Archive",collapsed:true,children:[{id:"last-year",content:"Last year's work"}]},{id:"notes",content:"Notes"}]});
33
+ export const treeShowcase=section("trees","19","Tree views","A calm hierarchy with clear expansion and selection states.",[
34
+ new TreeViewComponent({data:makeTree(),ariaLabel:"Workspace files",onSelect:item=>{treeStatus.content="Selected: "+item.id;}}),treeStatus,
35
+ text("h3","Custom row content"),new TreeViewComponent({data:makeTree(),ariaLabel:"Rich file tree",renderItem:item=>group([text("span",item.children?.length ? "▱" : "·"),text("span",String(item.content))],"tree-demo-content")})
36
+ ],"The data, collapsed, content, and renderItem options remain. Expansion updates collapsed on the data node. onSelect and ariaLabel are optional additions. Use arrows, Home/End, Enter, or Space; node IDs are data identifiers and do not collide across trees.");
37
+ const overlayCopy=()=>group([text("h2","Workspace settings"),text("p","A little room for secondary tasks, without leaving your current view."),new ButtonComponent({content:"Save settings",type:"button",click:()=>overlay.close()})]);
38
+ let overlay:OverlayComponent;
39
+ let allowClose=false;
40
+ export const overlayShowcase=section("overlays","20","Overlays","Focused panels that slide in from the side or the top.",[
41
+ group([button("Open side panel",()=>{overlay=OverlayComponent.show({content:overlayCopy(),ariaLabel:"Workspace settings",size:"26rem"});}),button("Open top panel",()=>{overlay=OverlayComponent.show({content:overlayCopy(),direction:"top",size:"20rem",ariaLabel:"Workspace settings"});}),button("Try close guard",()=>{allowClose=false;overlay=OverlayComponent.show({ariaLabel:"Protected panel",onClose:()=>allowClose,content:group([text("h2","A protected panel"),text("p","Closing is blocked until you choose Allow close."),button("Allow close",()=>{allowClose=true;overlay.close();})])});})],"sample-row")
42
+ ],"show(), close(), content, direction, size, animation, dismissal flags, and callbacks remain. onClose returning false vetoes dismissal. Native modal dialogs contain keyboard focus, support nested panels, and restore focus on close. ariaLabel and closeButtonLabel provide accessible names.");
43
+ const ribbonStatus=text("p","Choose an action.");ribbonStatus.attr={role:"status"};
44
+ const ribbonAction=(content:string)=>button(content,()=>{ribbonStatus.content=content+" selected.";});
45
+ export const ribbonShowcase=section("ribbons","21","Ribbon menus","Related actions grouped in a flexible, themed toolbar.",[
46
+ new RibbonMenuComponent([{title:"Project",children:[ribbonAction("New"),ribbonAction("Open"),ribbonAction("Save")]},{title:"Edit",children:[ribbonAction("Undo"),ribbonAction("Redo")]},{title:"View",children:[new ButtonComponent({content:"Details",toggle:true,outlined:true,type:"button"}),new ButtonComponent({content:"Unavailable",enabled:false,type:"button"})]}]),ribbonStatus
47
47
  ],"The groups constructor and group title/children interface remain unchanged. Groups wrap with available space and use the normal ButtonComponent styles, including toggles and disabled actions.");
@@ -1,98 +1,98 @@
1
- /* NIVONA Retailer Brandbook, April 2026, v1.0; printed pages 14–21.
2
- Use the specified HEX values (the RGB/print swatches differ slightly).
3
- Light Beige is the foundation, Grey is functional text, and Red is restrained
4
- interaction color. Hover, border, and disabled tones are UI derivatives.
5
- This theme belongs to the showcase; the library's neutral defaults stay shared. */
6
- @font-face {
7
- font-family: "Jost";
8
- src: url("./fonts/Jost-Variable.ttf") format("truetype");
9
- font-style: normal;
10
- font-weight: 100 900;
11
- font-display: swap;
12
- }
13
-
14
- :root[data-showcase-theme="nivona"] {
15
- color-scheme: light;
16
- font-family: "Jost", "Segoe UI", sans-serif;
17
-
18
- --nivona-red: #e4032d;
19
- --nivona-aubergine: #3d2a55;
20
- --nivona-dark-blue: #15022d;
21
- --nivona-grey: #3c3c3b;
22
- --nivona-beige: #cdb1a3;
23
- --nivona-light-beige: #f4efed;
24
-
25
- --jsl-color-canvas: var(--nivona-light-beige);
26
- --jsl-color-surface: #ffffff;
27
- --jsl-color-surface-subtle: var(--nivona-light-beige);
28
- --jsl-color-surface-hover: #eee4df;
29
- --jsl-color-surface-selected: #e8d8cf;
30
- --jsl-color-border: #a48d81;
31
- --jsl-color-border-subtle: #dfd2cc;
32
- --jsl-color-text: var(--nivona-grey);
33
- --jsl-color-text-secondary: #5e504b;
34
- --jsl-color-text-muted: #75665f;
35
- --jsl-color-accent: var(--nivona-red);
36
- --jsl-color-accent-hover: #c00327;
37
- --jsl-color-accent-active: #a00321;
38
- --jsl-color-on-accent: #ffffff;
39
- --jsl-color-focus: var(--nivona-aubergine);
40
- --jsl-color-disabled-surface: #eee6e2;
41
- --jsl-color-disabled-text: #75665f;
42
- --jsl-color-overlay: rgba(21, 2, 45, 0.48);
43
- --jsl-shadow-dialog: 0 24px 64px rgba(21, 2, 45, 0.18), 0 4px 16px rgba(21, 2, 45, 0.08);
44
- --jsl-button-radius: 0.25rem;
45
- --jsl-dialog-radius: 0.375rem;
46
- }
47
-
48
- /* Ethos is proprietary and is not distributed here. Use an installed licensed
49
- copy when available; Georgia preserves the brand's serif headline hierarchy. */
50
- :root[data-showcase-theme="nivona"] :is(h1, h2, h3, h4) {
51
- font-family: "Ethos", Georgia, "Times New Roman", serif;
52
- color: var(--nivona-dark-blue);
53
- font-weight: 500;
54
- }
55
-
56
- :root[data-showcase-theme="nivona"] .sidebar {
57
- /* Local tokens keep navigation text and interaction states readable. */
58
- --jsl-color-surface: var(--nivona-dark-blue);
59
- --jsl-color-text: var(--nivona-light-beige);
60
- --jsl-color-text-secondary: #e3d5ce;
61
- --jsl-color-text-muted: var(--nivona-beige);
62
- --jsl-color-surface-hover: #29183d;
63
- --jsl-color-surface-selected: var(--nivona-aubergine);
64
- --jsl-color-border-subtle: #4e3e60;
65
- --jsl-color-focus: var(--nivona-beige);
66
- color: var(--jsl-color-text);
67
- }
68
-
69
- :root[data-showcase-theme="nivona"] .brand-mark {
70
- background: var(--nivona-light-beige);
71
- color: var(--nivona-dark-blue);
72
- border-radius: 4px;
73
- }
74
-
75
- :root[data-showcase-theme="nivona"] .nav-item[aria-current] {
76
- box-shadow: inset 2px 0 var(--nivona-red);
77
- }
78
-
79
- :root[data-showcase-theme="nivona"] .eyebrow {
80
- color: var(--nivona-red);
81
- }
82
-
83
- :root[data-showcase-theme="nivona"] :is(.sample-card, .usage, .context-panel) {
84
- border-radius: 6px;
85
- }
86
-
87
- :root[data-showcase-theme="nivona"] .sample-number {
88
- color: var(--nivona-aubergine);
89
- border-color: var(--nivona-beige);
90
- }
91
-
92
- :root[data-showcase-theme="nivona"] .status-dot {
93
- background: var(--jsl-color-success);
94
- }
95
-
96
- :root[data-showcase-theme="nivona"] .sidebar .status-dot {
97
- background: var(--nivona-beige);
98
- }
1
+ /* NIVONA Retailer Brandbook, April 2026, v1.0; printed pages 14–21.
2
+ Use the specified HEX values (the RGB/print swatches differ slightly).
3
+ Light Beige is the foundation, Grey is functional text, and Red is restrained
4
+ interaction color. Hover, border, and disabled tones are UI derivatives.
5
+ This theme belongs to the showcase; the library's neutral defaults stay shared. */
6
+ @font-face {
7
+ font-family: "Jost";
8
+ src: url("./fonts/Jost-Variable.ttf") format("truetype");
9
+ font-style: normal;
10
+ font-weight: 100 900;
11
+ font-display: swap;
12
+ }
13
+
14
+ :root[data-showcase-theme="nivona"] {
15
+ color-scheme: light;
16
+ font-family: "Jost", "Segoe UI", sans-serif;
17
+
18
+ --nivona-red: #e4032d;
19
+ --nivona-aubergine: #3d2a55;
20
+ --nivona-dark-blue: #15022d;
21
+ --nivona-grey: #3c3c3b;
22
+ --nivona-beige: #cdb1a3;
23
+ --nivona-light-beige: #f4efed;
24
+
25
+ --jsl-color-canvas: var(--nivona-light-beige);
26
+ --jsl-color-surface: #ffffff;
27
+ --jsl-color-surface-subtle: var(--nivona-light-beige);
28
+ --jsl-color-surface-hover: #eee4df;
29
+ --jsl-color-surface-selected: #e8d8cf;
30
+ --jsl-color-border: #a48d81;
31
+ --jsl-color-border-subtle: #dfd2cc;
32
+ --jsl-color-text: var(--nivona-grey);
33
+ --jsl-color-text-secondary: #5e504b;
34
+ --jsl-color-text-muted: #75665f;
35
+ --jsl-color-accent: var(--nivona-red);
36
+ --jsl-color-accent-hover: #c00327;
37
+ --jsl-color-accent-active: #a00321;
38
+ --jsl-color-on-accent: #ffffff;
39
+ --jsl-color-focus: var(--nivona-aubergine);
40
+ --jsl-color-disabled-surface: #eee6e2;
41
+ --jsl-color-disabled-text: #75665f;
42
+ --jsl-color-overlay: rgba(21, 2, 45, 0.48);
43
+ --jsl-shadow-dialog: 0 24px 64px rgba(21, 2, 45, 0.18), 0 4px 16px rgba(21, 2, 45, 0.08);
44
+ --jsl-button-radius: 0.25rem;
45
+ --jsl-dialog-radius: 0.375rem;
46
+ }
47
+
48
+ /* Ethos is proprietary and is not distributed here. Use an installed licensed
49
+ copy when available; Georgia preserves the brand's serif headline hierarchy. */
50
+ :root[data-showcase-theme="nivona"] :is(h1, h2, h3, h4) {
51
+ font-family: "Ethos", Georgia, "Times New Roman", serif;
52
+ color: var(--nivona-dark-blue);
53
+ font-weight: 500;
54
+ }
55
+
56
+ :root[data-showcase-theme="nivona"] .sidebar {
57
+ /* Local tokens keep navigation text and interaction states readable. */
58
+ --jsl-color-surface: var(--nivona-dark-blue);
59
+ --jsl-color-text: var(--nivona-light-beige);
60
+ --jsl-color-text-secondary: #e3d5ce;
61
+ --jsl-color-text-muted: var(--nivona-beige);
62
+ --jsl-color-surface-hover: #29183d;
63
+ --jsl-color-surface-selected: var(--nivona-aubergine);
64
+ --jsl-color-border-subtle: #4e3e60;
65
+ --jsl-color-focus: var(--nivona-beige);
66
+ color: var(--jsl-color-text);
67
+ }
68
+
69
+ :root[data-showcase-theme="nivona"] .brand-mark {
70
+ background: var(--nivona-light-beige);
71
+ color: var(--nivona-dark-blue);
72
+ border-radius: 4px;
73
+ }
74
+
75
+ :root[data-showcase-theme="nivona"] .nav-item[aria-current] {
76
+ box-shadow: inset 2px 0 var(--nivona-red);
77
+ }
78
+
79
+ :root[data-showcase-theme="nivona"] .eyebrow {
80
+ color: var(--nivona-red);
81
+ }
82
+
83
+ :root[data-showcase-theme="nivona"] :is(.sample-card, .usage, .context-panel) {
84
+ border-radius: 6px;
85
+ }
86
+
87
+ :root[data-showcase-theme="nivona"] .sample-number {
88
+ color: var(--nivona-aubergine);
89
+ border-color: var(--nivona-beige);
90
+ }
91
+
92
+ :root[data-showcase-theme="nivona"] .status-dot {
93
+ background: var(--jsl-color-success);
94
+ }
95
+
96
+ :root[data-showcase-theme="nivona"] .sidebar .status-dot {
97
+ background: var(--nivona-beige);
98
+ }
@@ -1,10 +1,10 @@
1
- {
2
- "private": true,
3
- "source": "index.html",
4
- "targets": {
5
- "showcase": {
6
- "context": "browser",
7
- "distDir": "../../dist/showcase"
8
- }
9
- }
10
- }
1
+ {
2
+ "private": true,
3
+ "source": "index.html",
4
+ "targets": {
5
+ "showcase": {
6
+ "context": "browser",
7
+ "distDir": "../../dist/showcase"
8
+ }
9
+ }
10
+ }