jsl-ui 10.4.4 → 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.
- package/docs/AutoSuggestComponent.md +17 -17
- package/docs/ButtonComponent.md +22 -22
- package/docs/CheckBoxComponent.md +12 -12
- package/docs/DataBinding.md +19 -19
- package/docs/DateComponent.md +12 -12
- package/docs/DateRangeComponent.md +13 -13
- package/docs/DateTimeComponent.md +14 -14
- package/docs/DialogComponent.md +15 -15
- package/docs/DropdownMenuComponent.md +22 -22
- package/docs/ExpanderComponent.md +13 -13
- package/docs/FormComponent.md +15 -15
- package/docs/FormFieldComponent.md +15 -15
- package/docs/GridComponent.md +39 -39
- package/docs/InputComponent.md +15 -15
- package/docs/IntervalComponent.md +13 -13
- package/docs/LoadingComponent.md +12 -12
- package/docs/NavigationComponent.md +17 -17
- package/docs/Notification.md +14 -14
- package/docs/NotificationComponent.md +13 -13
- package/docs/NumberComponent.md +12 -12
- package/docs/OverlayComponent.md +13 -13
- package/docs/ProgressComponent.md +12 -12
- package/docs/README.md +27 -27
- package/docs/RibbonMenuComponent.md +14 -14
- package/docs/SelectComponent.md +36 -36
- package/docs/SliderComponent.md +20 -20
- package/docs/SplitterComponent.md +14 -14
- package/docs/StackPanelComponent.md +13 -13
- package/docs/TabsComponent.md +16 -16
- package/docs/TimeComponent.md +13 -13
- package/docs/TreeViewComponent.md +16 -16
- package/examples/showcase/checks-and-expanders.ts +148 -148
- package/examples/showcase/cultures.ts +39 -39
- package/examples/showcase/data-binding.ts +138 -138
- package/examples/showcase/dates.ts +168 -168
- package/examples/showcase/dialogs.ts +184 -184
- package/examples/showcase/dropdown-menus.ts +99 -99
- package/examples/showcase/feedback-and-navigation.ts +173 -173
- package/examples/showcase/fields.ts +166 -166
- package/examples/showcase/fonts/OFL-BricolageGrotesque.txt +93 -93
- package/examples/showcase/fonts/OFL-Figtree.txt +93 -93
- package/examples/showcase/fonts/OFL-Jost.txt +93 -93
- package/examples/showcase/generate-sources.cjs +104 -104
- package/examples/showcase/grids.ts +484 -484
- package/examples/showcase/index.html +71 -71
- package/examples/showcase/layout-and-navigation.ts +46 -46
- package/examples/showcase/nivona.css +98 -98
- package/examples/showcase/package.json +10 -10
- package/examples/showcase/selects.ts +184 -184
- package/examples/showcase/showcase-sources.ts +94 -94
- package/examples/showcase/showcase.css +281 -281
- package/examples/showcase/showcase.ts +244 -244
- package/examples/showcase/tabs.ts +161 -161
- package/examples/showcase/themes.css +83 -83
- package/examples/showcase/themes.ts +56 -56
- package/examples/showcase/wirtshans.css +65 -65
- package/lib/components/checkbox/CheckBoxStyle.scss +73 -73
- package/lib/components/date-range/DateRangeStyle.scss +35 -35
- package/lib/components/date-time/DateTimeStyle.scss +9 -9
- package/lib/components/dialog/DialogComponent.d.ts +9 -2
- package/lib/components/dialog/DialogComponent.js +17 -51
- package/lib/components/dropdown-menu/DropdownMenuStyle.scss +48 -48
- package/lib/components/expander/ExpanderStyle.scss +61 -61
- package/lib/components/form-field/FormFieldStyle.scss +36 -36
- package/lib/components/host/RenderHost.d.ts +25 -0
- package/lib/components/host/RenderHost.js +63 -0
- package/lib/components/loading/LoadingStyle.css +18 -18
- package/lib/components/navigation/NavigationStyle.scss +61 -61
- package/lib/components/notification/Notification.scss +102 -102
- package/lib/components/overlay/OverlayComponent.d.ts +9 -1
- package/lib/components/overlay/OverlayComponent.js +22 -13
- package/lib/components/overlay/overlay.css +15 -15
- package/lib/components/progress/ProgressStyle.scss +4 -4
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +5 -5
- package/lib/components/select/SelectStyle.scss +207 -207
- package/lib/components/slider/SliderStyle.scss +21 -21
- package/lib/components/slider/nouislider.css +15 -15
- package/lib/components/stack-panel/SplitterStyle.scss +8 -8
- package/lib/components/stack-panel/StackPanelStyle.scss +10 -10
- package/lib/components/tabs/TabsStyle.scss +139 -139
- package/lib/components/time/TimeComponent.scss +3 -3
- package/lib/components/tree-view/TreeViewStyle.scss +14 -14
- package/lib/grid/plugins/slick.headermenu.css +98 -98
- package/lib/grid.css +841 -3514
- package/lib/index.css.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/ui/auto.suggest.css +30 -30
- package/lib/ui/button.css +147 -147
- package/lib/ui/date-input.css +10 -10
- package/lib/ui/date.picker/css/tiny-date-picker.css +124 -124
- package/lib/ui/dialog.css +144 -144
- package/lib/ui/input.css +35 -35
- package/lib/ui/theme.css +28 -28
- package/package.json +1 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
/* Wirtshans website palette and typography; interaction shades are UI derivatives. */
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: "Figtree";
|
|
4
|
-
src: url("./fonts/Figtree-Variable.ttf") format("truetype");
|
|
5
|
-
font-style: normal;
|
|
6
|
-
font-weight: 300 900;
|
|
7
|
-
font-display: swap;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@font-face {
|
|
11
|
-
font-family: "Bricolage Grotesque";
|
|
12
|
-
src: url("./fonts/BricolageGrotesque-Variable.ttf") format("truetype");
|
|
13
|
-
font-style: normal;
|
|
14
|
-
font-weight: 200 800;
|
|
15
|
-
font-display: swap;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:root[data-showcase-theme="wirtshans"] {
|
|
19
|
-
color-scheme: light;
|
|
20
|
-
font-family: "Figtree", Arial, sans-serif;
|
|
21
|
-
|
|
22
|
-
--jsl-color-canvas: #f7f5f0;
|
|
23
|
-
--jsl-color-surface: #ffffff;
|
|
24
|
-
--jsl-color-surface-subtle: #f7f5f0;
|
|
25
|
-
--jsl-color-surface-hover: #efebe3;
|
|
26
|
-
--jsl-color-surface-selected: #fbf1dc;
|
|
27
|
-
--jsl-color-border: #b9b2a5;
|
|
28
|
-
--jsl-color-border-subtle: #e2ded5;
|
|
29
|
-
--jsl-color-text: #141312;
|
|
30
|
-
--jsl-color-text-secondary: #5c5a55;
|
|
31
|
-
--jsl-color-text-muted: #68645c;
|
|
32
|
-
--jsl-color-accent: #e3a72f;
|
|
33
|
-
--jsl-color-accent-hover: #cf9220;
|
|
34
|
-
--jsl-color-accent-active: #b47b16;
|
|
35
|
-
--jsl-color-on-accent: #141312;
|
|
36
|
-
--jsl-color-focus: #8a5a00;
|
|
37
|
-
--jsl-color-disabled-surface: #efebe3;
|
|
38
|
-
--jsl-color-disabled-text: #777168;
|
|
39
|
-
--jsl-color-overlay: rgba(20, 19, 18, 0.55);
|
|
40
|
-
--jsl-shadow-dialog: 0 18px 44px rgba(20, 19, 18, 0.18);
|
|
41
|
-
--jsl-button-radius: 999px;
|
|
42
|
-
--jsl-dialog-radius: 22px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:root[data-showcase-theme="wirtshans"] :is(h1, h2, h3, h4) {
|
|
46
|
-
font-family: "Bricolage Grotesque", "Figtree", Arial, sans-serif;
|
|
47
|
-
color: var(--jsl-color-text);
|
|
48
|
-
font-weight: 700;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:root[data-showcase-theme="wirtshans"] :is(.sample-card, .usage, .context-panel, .hero-preview) {
|
|
52
|
-
border-radius: 16px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:root[data-showcase-theme="wirtshans"] .nav-item[aria-current] {
|
|
56
|
-
box-shadow: inset 3px 0 #e3a72f;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:root[data-showcase-theme="wirtshans"] .eyebrow {
|
|
60
|
-
color: #8a5a00;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:root[data-showcase-theme="wirtshans"] .status-dot {
|
|
64
|
-
background: #8a5a00;
|
|
65
|
-
}
|
|
1
|
+
/* Wirtshans website palette and typography; interaction shades are UI derivatives. */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: "Figtree";
|
|
4
|
+
src: url("./fonts/Figtree-Variable.ttf") format("truetype");
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 300 900;
|
|
7
|
+
font-display: swap;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: "Bricolage Grotesque";
|
|
12
|
+
src: url("./fonts/BricolageGrotesque-Variable.ttf") format("truetype");
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 200 800;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:root[data-showcase-theme="wirtshans"] {
|
|
19
|
+
color-scheme: light;
|
|
20
|
+
font-family: "Figtree", Arial, sans-serif;
|
|
21
|
+
|
|
22
|
+
--jsl-color-canvas: #f7f5f0;
|
|
23
|
+
--jsl-color-surface: #ffffff;
|
|
24
|
+
--jsl-color-surface-subtle: #f7f5f0;
|
|
25
|
+
--jsl-color-surface-hover: #efebe3;
|
|
26
|
+
--jsl-color-surface-selected: #fbf1dc;
|
|
27
|
+
--jsl-color-border: #b9b2a5;
|
|
28
|
+
--jsl-color-border-subtle: #e2ded5;
|
|
29
|
+
--jsl-color-text: #141312;
|
|
30
|
+
--jsl-color-text-secondary: #5c5a55;
|
|
31
|
+
--jsl-color-text-muted: #68645c;
|
|
32
|
+
--jsl-color-accent: #e3a72f;
|
|
33
|
+
--jsl-color-accent-hover: #cf9220;
|
|
34
|
+
--jsl-color-accent-active: #b47b16;
|
|
35
|
+
--jsl-color-on-accent: #141312;
|
|
36
|
+
--jsl-color-focus: #8a5a00;
|
|
37
|
+
--jsl-color-disabled-surface: #efebe3;
|
|
38
|
+
--jsl-color-disabled-text: #777168;
|
|
39
|
+
--jsl-color-overlay: rgba(20, 19, 18, 0.55);
|
|
40
|
+
--jsl-shadow-dialog: 0 18px 44px rgba(20, 19, 18, 0.18);
|
|
41
|
+
--jsl-button-radius: 999px;
|
|
42
|
+
--jsl-dialog-radius: 22px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:root[data-showcase-theme="wirtshans"] :is(h1, h2, h3, h4) {
|
|
46
|
+
font-family: "Bricolage Grotesque", "Figtree", Arial, sans-serif;
|
|
47
|
+
color: var(--jsl-color-text);
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:root[data-showcase-theme="wirtshans"] :is(.sample-card, .usage, .context-panel, .hero-preview) {
|
|
52
|
+
border-radius: 16px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:root[data-showcase-theme="wirtshans"] .nav-item[aria-current] {
|
|
56
|
+
box-shadow: inset 3px 0 #e3a72f;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:root[data-showcase-theme="wirtshans"] .eyebrow {
|
|
60
|
+
color: #8a5a00;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:root[data-showcase-theme="wirtshans"] .status-dot {
|
|
64
|
+
background: #8a5a00;
|
|
65
|
+
}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
@import "../../ui/theme.css";
|
|
2
|
-
|
|
3
|
-
.jsl-checkbox {
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
gap: .625rem;
|
|
7
|
-
max-width: 100%;
|
|
8
|
-
color: var(--jsl-color-text);
|
|
9
|
-
font: inherit;
|
|
10
|
-
// font-size: .875rem;
|
|
11
|
-
line-height: 1.5;
|
|
12
|
-
vertical-align: middle;
|
|
13
|
-
}
|
|
14
|
-
.checkbox-comp {
|
|
15
|
-
appearance: none;
|
|
16
|
-
-webkit-appearance: none;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
position: relative;
|
|
19
|
-
display: inline-grid;
|
|
20
|
-
place-content: center;
|
|
21
|
-
flex: 0 0 1.125rem;
|
|
22
|
-
width: 1.125rem;
|
|
23
|
-
height: 1.125rem;
|
|
24
|
-
margin: calc((1.5em - 1.125rem) / 2) 0 0;
|
|
25
|
-
border: 1px solid var(--jsl-color-border);
|
|
26
|
-
border-radius: .25rem;
|
|
27
|
-
background: var(--jsl-color-surface);
|
|
28
|
-
color: var(--jsl-color-on-accent);
|
|
29
|
-
font: inherit;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
transition: background-color .12s, border-color .12s;
|
|
32
|
-
}
|
|
33
|
-
.checkbox-comp::after {
|
|
34
|
-
content: "";
|
|
35
|
-
width: 4px;
|
|
36
|
-
height: 8px;
|
|
37
|
-
margin-top: -2px;
|
|
38
|
-
border: solid currentColor;
|
|
39
|
-
border-width: 0 1.5px 1.5px 0;
|
|
40
|
-
transform: rotate(45deg);
|
|
41
|
-
opacity: 0;
|
|
42
|
-
}
|
|
43
|
-
.checkbox-comp:checked, .checkbox-comp:indeterminate {
|
|
44
|
-
border-color: var(--jsl-color-accent);
|
|
45
|
-
background: var(--jsl-color-accent);
|
|
46
|
-
}
|
|
47
|
-
.checkbox-comp:checked::after, .checkbox-comp:indeterminate::after { opacity: 1; }
|
|
48
|
-
.checkbox-comp:indeterminate::after {
|
|
49
|
-
width: 8px;
|
|
50
|
-
height: 0;
|
|
51
|
-
margin-top: 0;
|
|
52
|
-
border-width: 0 0 2px;
|
|
53
|
-
transform: none;
|
|
54
|
-
}
|
|
55
|
-
.checkbox-comp:focus-visible { outline: 2px solid var(--jsl-color-focus); outline-offset: 3px; }
|
|
56
|
-
.jsl-checkbox:has(.checkbox-comp:not(:disabled)):hover .checkbox-comp { border-color: var(--jsl-color-text-muted); }
|
|
57
|
-
.jsl-checkbox:has(.checkbox-comp:checked:not(:disabled)):hover .checkbox-comp,
|
|
58
|
-
.jsl-checkbox:has(.checkbox-comp:indeterminate:not(:disabled)):hover .checkbox-comp {
|
|
59
|
-
border-color: var(--jsl-color-accent-hover);
|
|
60
|
-
background: var(--jsl-color-accent-hover);
|
|
61
|
-
}
|
|
62
|
-
.checkbox-copy { min-width: 0; }
|
|
63
|
-
.checkbox-label { display: block; cursor: pointer; overflow-wrap: anywhere; }
|
|
64
|
-
.checkbox-description { display: block; margin-top: .1875rem; color: var(--jsl-color-text-muted); font-size: .75rem; line-height: 1.5; }
|
|
65
|
-
.checkbox-description[hidden] { display: none; }
|
|
66
|
-
.checkbox-comp:disabled { background: var(--jsl-color-disabled-surface); border-color: var(--jsl-color-border-subtle); cursor: not-allowed; }
|
|
67
|
-
.checkbox-comp:disabled:checked, .checkbox-comp:disabled:indeterminate { background: var(--jsl-color-disabled-text); border-color: var(--jsl-color-disabled-text); color: var(--jsl-color-disabled-surface); opacity: .65; }
|
|
68
|
-
.jsl-checkbox.disabled .checkbox-label { color: var(--jsl-color-disabled-text); cursor: not-allowed; }
|
|
69
|
-
@media (prefers-reduced-motion: reduce) { .checkbox-comp { transition: none; } }
|
|
70
|
-
@media (forced-colors: active) {
|
|
71
|
-
.checkbox-comp { appearance: auto; }
|
|
72
|
-
.checkbox-comp::after { display: none; }
|
|
73
|
-
}
|
|
1
|
+
@import "../../ui/theme.css";
|
|
2
|
+
|
|
3
|
+
.jsl-checkbox {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
gap: .625rem;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
color: var(--jsl-color-text);
|
|
9
|
+
font: inherit;
|
|
10
|
+
// font-size: .875rem;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
}
|
|
14
|
+
.checkbox-comp {
|
|
15
|
+
appearance: none;
|
|
16
|
+
-webkit-appearance: none;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
position: relative;
|
|
19
|
+
display: inline-grid;
|
|
20
|
+
place-content: center;
|
|
21
|
+
flex: 0 0 1.125rem;
|
|
22
|
+
width: 1.125rem;
|
|
23
|
+
height: 1.125rem;
|
|
24
|
+
margin: calc((1.5em - 1.125rem) / 2) 0 0;
|
|
25
|
+
border: 1px solid var(--jsl-color-border);
|
|
26
|
+
border-radius: .25rem;
|
|
27
|
+
background: var(--jsl-color-surface);
|
|
28
|
+
color: var(--jsl-color-on-accent);
|
|
29
|
+
font: inherit;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
transition: background-color .12s, border-color .12s;
|
|
32
|
+
}
|
|
33
|
+
.checkbox-comp::after {
|
|
34
|
+
content: "";
|
|
35
|
+
width: 4px;
|
|
36
|
+
height: 8px;
|
|
37
|
+
margin-top: -2px;
|
|
38
|
+
border: solid currentColor;
|
|
39
|
+
border-width: 0 1.5px 1.5px 0;
|
|
40
|
+
transform: rotate(45deg);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
.checkbox-comp:checked, .checkbox-comp:indeterminate {
|
|
44
|
+
border-color: var(--jsl-color-accent);
|
|
45
|
+
background: var(--jsl-color-accent);
|
|
46
|
+
}
|
|
47
|
+
.checkbox-comp:checked::after, .checkbox-comp:indeterminate::after { opacity: 1; }
|
|
48
|
+
.checkbox-comp:indeterminate::after {
|
|
49
|
+
width: 8px;
|
|
50
|
+
height: 0;
|
|
51
|
+
margin-top: 0;
|
|
52
|
+
border-width: 0 0 2px;
|
|
53
|
+
transform: none;
|
|
54
|
+
}
|
|
55
|
+
.checkbox-comp:focus-visible { outline: 2px solid var(--jsl-color-focus); outline-offset: 3px; }
|
|
56
|
+
.jsl-checkbox:has(.checkbox-comp:not(:disabled)):hover .checkbox-comp { border-color: var(--jsl-color-text-muted); }
|
|
57
|
+
.jsl-checkbox:has(.checkbox-comp:checked:not(:disabled)):hover .checkbox-comp,
|
|
58
|
+
.jsl-checkbox:has(.checkbox-comp:indeterminate:not(:disabled)):hover .checkbox-comp {
|
|
59
|
+
border-color: var(--jsl-color-accent-hover);
|
|
60
|
+
background: var(--jsl-color-accent-hover);
|
|
61
|
+
}
|
|
62
|
+
.checkbox-copy { min-width: 0; }
|
|
63
|
+
.checkbox-label { display: block; cursor: pointer; overflow-wrap: anywhere; }
|
|
64
|
+
.checkbox-description { display: block; margin-top: .1875rem; color: var(--jsl-color-text-muted); font-size: .75rem; line-height: 1.5; }
|
|
65
|
+
.checkbox-description[hidden] { display: none; }
|
|
66
|
+
.checkbox-comp:disabled { background: var(--jsl-color-disabled-surface); border-color: var(--jsl-color-border-subtle); cursor: not-allowed; }
|
|
67
|
+
.checkbox-comp:disabled:checked, .checkbox-comp:disabled:indeterminate { background: var(--jsl-color-disabled-text); border-color: var(--jsl-color-disabled-text); color: var(--jsl-color-disabled-surface); opacity: .65; }
|
|
68
|
+
.jsl-checkbox.disabled .checkbox-label { color: var(--jsl-color-disabled-text); cursor: not-allowed; }
|
|
69
|
+
@media (prefers-reduced-motion: reduce) { .checkbox-comp { transition: none; } }
|
|
70
|
+
@media (forced-colors: active) {
|
|
71
|
+
.checkbox-comp { appearance: auto; }
|
|
72
|
+
.checkbox-comp::after { display: none; }
|
|
73
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
.date-range-comp {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
width: 25rem;
|
|
4
|
-
max-width: 100%;
|
|
5
|
-
color: var(--jsl-color-text);
|
|
6
|
-
}
|
|
7
|
-
.date-range-fields {
|
|
8
|
-
display: grid;
|
|
9
|
-
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
10
|
-
align-items: end;
|
|
11
|
-
gap: .625rem;
|
|
12
|
-
}
|
|
13
|
-
.date-range-field { min-width: 0; }
|
|
14
|
-
.date-range-field label {
|
|
15
|
-
display: block;
|
|
16
|
-
margin-bottom: .375rem;
|
|
17
|
-
color: var(--jsl-color-text-secondary);
|
|
18
|
-
font: inherit;
|
|
19
|
-
font-size: .75rem;
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
}
|
|
22
|
-
.date-range-field input { width: 100%; }
|
|
23
|
-
.date-range-separator { line-height: 2.5rem; color: var(--jsl-color-text-muted); }
|
|
24
|
-
.date-range-track { padding: 1.5rem .625rem .875rem; }
|
|
25
|
-
.date-range-limits {
|
|
26
|
-
display: flex;
|
|
27
|
-
justify-content: space-between;
|
|
28
|
-
gap: .5rem;
|
|
29
|
-
color: var(--jsl-color-text-muted);
|
|
30
|
-
font-size: .6875rem;
|
|
31
|
-
font-variant-numeric: tabular-nums;
|
|
32
|
-
}
|
|
33
|
-
@media (max-width: 380px) {
|
|
34
|
-
.date-range-fields { gap: .375rem; }
|
|
35
|
-
.date-range-field input { font-size: .75rem; padding-left: .5rem; padding-right: 1.75rem; background-position: right .3rem center; background-size: 15px; }
|
|
1
|
+
.date-range-comp {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
width: 25rem;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
color: var(--jsl-color-text);
|
|
6
|
+
}
|
|
7
|
+
.date-range-fields {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
10
|
+
align-items: end;
|
|
11
|
+
gap: .625rem;
|
|
12
|
+
}
|
|
13
|
+
.date-range-field { min-width: 0; }
|
|
14
|
+
.date-range-field label {
|
|
15
|
+
display: block;
|
|
16
|
+
margin-bottom: .375rem;
|
|
17
|
+
color: var(--jsl-color-text-secondary);
|
|
18
|
+
font: inherit;
|
|
19
|
+
font-size: .75rem;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
}
|
|
22
|
+
.date-range-field input { width: 100%; }
|
|
23
|
+
.date-range-separator { line-height: 2.5rem; color: var(--jsl-color-text-muted); }
|
|
24
|
+
.date-range-track { padding: 1.5rem .625rem .875rem; }
|
|
25
|
+
.date-range-limits {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
gap: .5rem;
|
|
29
|
+
color: var(--jsl-color-text-muted);
|
|
30
|
+
font-size: .6875rem;
|
|
31
|
+
font-variant-numeric: tabular-nums;
|
|
32
|
+
}
|
|
33
|
+
@media (max-width: 380px) {
|
|
34
|
+
.date-range-fields { gap: .375rem; }
|
|
35
|
+
.date-range-field input { font-size: .75rem; padding-left: .5rem; padding-right: 1.75rem; background-position: right .3rem center; background-size: 15px; }
|
|
36
36
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.date-time-comp {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
flex-wrap: wrap;
|
|
5
|
-
gap: .5rem;
|
|
6
|
-
max-width: 100%;
|
|
7
|
-
}
|
|
8
|
-
.date-time-comp .date-comp { flex: 1 1 10rem; }
|
|
9
|
-
.date-time-comp .time-comp { flex: 0 0 6rem; }
|
|
1
|
+
.date-time-comp {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
gap: .5rem;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
}
|
|
8
|
+
.date-time-comp .date-comp { flex: 1 1 10rem; }
|
|
9
|
+
.date-time-comp .time-comp { flex: 0 0 6rem; }
|
|
10
10
|
.date-time-comp .time-comp-seconds { flex-basis: 7.5rem; }
|
|
@@ -28,8 +28,12 @@ export interface IDialogButtonOptions {
|
|
|
28
28
|
onClick?: () => void | boolean | Promise<any>;
|
|
29
29
|
raw?: boolean;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
/** A component on its own layer (dialog, overlay) that DialogComponent.Button can close and refresh. */
|
|
32
|
+
interface ILayerComponent {
|
|
33
|
+
getRef(): JSLDialog;
|
|
34
|
+
refresh(): void;
|
|
35
|
+
}
|
|
36
|
+
export declare class DialogComponent implements IJSLComponent, ILayerComponent {
|
|
33
37
|
static Button(options: IDialogButtonOptions): {
|
|
34
38
|
tag: string;
|
|
35
39
|
attr: {
|
|
@@ -75,7 +79,10 @@ export declare class DialogComponent implements IJSLComponent {
|
|
|
75
79
|
onCreate(node: IJSLVNode): void;
|
|
76
80
|
onRemove(): void;
|
|
77
81
|
getRef(): JSLDialog;
|
|
82
|
+
/** Re-render the dialog and its content. */
|
|
83
|
+
refresh(): void;
|
|
78
84
|
private normalizePosition;
|
|
79
85
|
private keepInViewport;
|
|
80
86
|
private toNode;
|
|
81
87
|
}
|
|
88
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { JSLRender } from "jsl-render";
|
|
2
1
|
import { Dialog } from "../../ui/dialog";
|
|
3
2
|
import { Moveable } from "../../interaction/moveable";
|
|
4
3
|
import { EventHandler } from "../../interaction/eventhandler";
|
|
5
4
|
import { Resizable } from "../../interaction/resizable";
|
|
6
5
|
import { UILang } from "../../core/lang";
|
|
7
6
|
import { helper } from "../../core/helper";
|
|
7
|
+
import { RenderHost } from "../host/RenderHost";
|
|
8
8
|
export class DialogComponent {
|
|
9
9
|
static Button(options) {
|
|
10
10
|
var _a, _b, _c;
|
|
@@ -13,13 +13,13 @@ export class DialogComponent {
|
|
|
13
13
|
type: "button",
|
|
14
14
|
class: "jsl-button " + ((_a = options.class) !== null && _a !== void 0 ? _a : ""),
|
|
15
15
|
click: async (event) => {
|
|
16
|
-
var _a, _b
|
|
16
|
+
var _a, _b;
|
|
17
17
|
const button = event === null || event === void 0 ? void 0 : event.currentTarget;
|
|
18
18
|
if (button === null || button === void 0 ? void 0 : button.disabled) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
const owner =
|
|
21
|
+
const layer = button === null || button === void 0 ? void 0 : button.closest(".jsl-dialog-overlay, .jsl-overlay-overlay");
|
|
22
|
+
const owner = layer === null || layer === void 0 ? void 0 : layer._component;
|
|
23
23
|
// Capture the owner before a callback opens another dialog or awaits.
|
|
24
24
|
const reference = (_a = (owner || DialogComponent.lastRenderedDlg)) === null || _a === void 0 ? void 0 : _a.getRef();
|
|
25
25
|
let pending = false;
|
|
@@ -42,7 +42,7 @@ export class DialogComponent {
|
|
|
42
42
|
button.disabled = false;
|
|
43
43
|
button.removeAttribute("aria-busy");
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
owner === null || owner === void 0 ? void 0 : owner.refresh();
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}, content: (_b = options.content) !== null && _b !== void 0 ? _b : "OK", raw: (_c = options.raw) !== null && _c !== void 0 ? _c : false
|
|
@@ -56,62 +56,24 @@ export class DialogComponent {
|
|
|
56
56
|
}
|
|
57
57
|
static show(options) {
|
|
58
58
|
var _a;
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const renderer = new JSLRender(container, false);
|
|
62
|
-
const entry = {
|
|
63
|
-
dialog: undefined,
|
|
64
|
-
renderer,
|
|
65
|
-
previousRenderer: JSLRender.lastCreatedRenderer
|
|
66
|
-
};
|
|
67
|
-
let disposed = false;
|
|
68
|
-
const cleanup = (renderContent = true) => {
|
|
69
|
-
var _a;
|
|
70
|
-
if (disposed) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
disposed = true;
|
|
74
|
-
const index = DialogComponent.renderedDialogs.indexOf(entry);
|
|
75
|
-
if (index >= 0) {
|
|
76
|
-
DialogComponent.renderedDialogs.splice(index, 1);
|
|
77
|
-
}
|
|
78
|
-
// A parent can close while a nested or asynchronous dialog is still open.
|
|
79
|
-
for (const other of DialogComponent.renderedDialogs) {
|
|
80
|
-
if (other.previousRenderer === renderer) {
|
|
81
|
-
other.previousRenderer = entry.previousRenderer;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (JSLRender.lastCreatedRenderer === renderer) {
|
|
85
|
-
JSLRender.lastCreatedRenderer = entry.previousRenderer;
|
|
86
|
-
}
|
|
87
|
-
if (renderContent) {
|
|
88
|
-
renderer.render({ tag: "div" }); // Run onRemove for all dialog content.
|
|
89
|
-
}
|
|
90
|
-
container.remove();
|
|
91
|
-
(_a = JSLRender.lastCreatedRenderer) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
92
|
-
};
|
|
93
|
-
const dlg = entry.dialog = new DialogComponent({
|
|
59
|
+
const host = new RenderHost();
|
|
60
|
+
const dlg = new DialogComponent({
|
|
94
61
|
...options,
|
|
95
62
|
autoOpen: (_a = options.autoOpen) !== null && _a !== void 0 ? _a : true,
|
|
96
63
|
onClose: () => {
|
|
97
64
|
var _a;
|
|
98
65
|
if (((_a = options.onClose) === null || _a === void 0 ? void 0 : _a.call(options)) === false) {
|
|
99
|
-
renderer.refresh();
|
|
66
|
+
host.renderer.refresh();
|
|
100
67
|
return false;
|
|
101
68
|
}
|
|
102
|
-
|
|
69
|
+
host.dispose();
|
|
103
70
|
}
|
|
104
71
|
});
|
|
105
|
-
dlg.onDispose = () =>
|
|
106
|
-
|
|
107
|
-
JSLRender.lastCreatedRenderer = renderer;
|
|
108
|
-
renderer.render(dlg);
|
|
109
|
-
return dlg;
|
|
72
|
+
dlg.onDispose = () => host.dispose(false);
|
|
73
|
+
return host.render(dlg);
|
|
110
74
|
}
|
|
111
75
|
static get lastRenderedDlg() {
|
|
112
|
-
|
|
113
|
-
const entries = DialogComponent.renderedDialogs;
|
|
114
|
-
return (_a = entries[entries.length - 1]) === null || _a === void 0 ? void 0 : _a.dialog;
|
|
76
|
+
return RenderHost.findLast((component) => component instanceof DialogComponent);
|
|
115
77
|
}
|
|
116
78
|
constructor(options) {
|
|
117
79
|
this.titleId = helper.newDomGuid();
|
|
@@ -235,6 +197,11 @@ export class DialogComponent {
|
|
|
235
197
|
getRef() {
|
|
236
198
|
return this.ref;
|
|
237
199
|
}
|
|
200
|
+
/** Re-render the dialog and its content. */
|
|
201
|
+
refresh() {
|
|
202
|
+
var _a;
|
|
203
|
+
(_a = this.renderer) === null || _a === void 0 ? void 0 : _a.refresh();
|
|
204
|
+
}
|
|
238
205
|
normalizePosition(element) {
|
|
239
206
|
const rect = element.getBoundingClientRect();
|
|
240
207
|
const overlayRect = this.ref.getOverlay().getBoundingClientRect();
|
|
@@ -246,4 +213,3 @@ export class DialogComponent {
|
|
|
246
213
|
return typeof content === "string" ? { tag: "div", content } : content;
|
|
247
214
|
}
|
|
248
215
|
}
|
|
249
|
-
DialogComponent.renderedDialogs = [];
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
@import "../../ui/theme.css";
|
|
2
|
-
|
|
3
|
-
.jsl-dropdown-trigger:not(.jsl-dropdown-trigger--no-indicator)::after {
|
|
4
|
-
content: "";
|
|
5
|
-
display: inline-block;
|
|
6
|
-
flex: 0 0 auto;
|
|
7
|
-
width: .42em;
|
|
8
|
-
height: .42em;
|
|
9
|
-
margin-inline-start: .55em;
|
|
10
|
-
border-right: 1.5px solid currentColor;
|
|
11
|
-
border-bottom: 1.5px solid currentColor;
|
|
12
|
-
transform: translateY(-.12em) rotate(45deg);
|
|
13
|
-
transition: transform .15s ease;
|
|
14
|
-
}
|
|
15
|
-
.jsl-dropdown-trigger[aria-expanded="true"]::after { transform: translateY(.08em) rotate(225deg); }
|
|
16
|
-
.jsl-dropdown-portal { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }
|
|
17
|
-
.jsl-dropdown-menu {
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
overflow: auto;
|
|
20
|
-
padding: .2rem;
|
|
21
|
-
border: 1px solid var(--jsl-color-border);
|
|
22
|
-
border-radius: .5rem;
|
|
23
|
-
background: var(--jsl-color-surface);
|
|
24
|
-
color: var(--jsl-color-text);
|
|
25
|
-
box-shadow: 0 8px 24px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
|
|
26
|
-
pointer-events: auto;
|
|
27
|
-
outline: none;
|
|
28
|
-
}
|
|
29
|
-
.dd-menu-comp > * { display: block; width: calc(100% - .2rem); margin: .1rem; }
|
|
30
|
-
.dd-menu-comp {
|
|
31
|
-
--jsl-button-primary: var(--jsl-color-surface);
|
|
32
|
-
--jsl-button-on-primary: var(--jsl-color-text);
|
|
33
|
-
--jsl-button-primary-hover: var(--jsl-color-surface-hover);
|
|
34
|
-
--jsl-button-primary-active: var(--jsl-color-surface-selected);
|
|
35
|
-
--jsl-button-radius: .25rem;
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
}
|
|
39
|
-
.dd-menu-comp > .jsl-button {
|
|
40
|
-
--jsl-button-height: 2.2rem;
|
|
41
|
-
display: flex;
|
|
42
|
-
flex: 0 0 auto;
|
|
43
|
-
align-items: center;
|
|
44
|
-
justify-content: flex-start;
|
|
45
|
-
text-align: left;
|
|
46
|
-
}
|
|
47
|
-
.jsl-dropdown-menu [role^="menuitem"]:focus-visible { outline: 2px solid var(--jsl-color-focus); outline-offset: -2px; }
|
|
48
|
-
@media (prefers-reduced-motion: reduce) { .jsl-dropdown-trigger::after { transition: none; } }
|
|
1
|
+
@import "../../ui/theme.css";
|
|
2
|
+
|
|
3
|
+
.jsl-dropdown-trigger:not(.jsl-dropdown-trigger--no-indicator)::after {
|
|
4
|
+
content: "";
|
|
5
|
+
display: inline-block;
|
|
6
|
+
flex: 0 0 auto;
|
|
7
|
+
width: .42em;
|
|
8
|
+
height: .42em;
|
|
9
|
+
margin-inline-start: .55em;
|
|
10
|
+
border-right: 1.5px solid currentColor;
|
|
11
|
+
border-bottom: 1.5px solid currentColor;
|
|
12
|
+
transform: translateY(-.12em) rotate(45deg);
|
|
13
|
+
transition: transform .15s ease;
|
|
14
|
+
}
|
|
15
|
+
.jsl-dropdown-trigger[aria-expanded="true"]::after { transform: translateY(.08em) rotate(225deg); }
|
|
16
|
+
.jsl-dropdown-portal { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }
|
|
17
|
+
.jsl-dropdown-menu {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
overflow: auto;
|
|
20
|
+
padding: .2rem;
|
|
21
|
+
border: 1px solid var(--jsl-color-border);
|
|
22
|
+
border-radius: .5rem;
|
|
23
|
+
background: var(--jsl-color-surface);
|
|
24
|
+
color: var(--jsl-color-text);
|
|
25
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
outline: none;
|
|
28
|
+
}
|
|
29
|
+
.dd-menu-comp > * { display: block; width: calc(100% - .2rem); margin: .1rem; }
|
|
30
|
+
.dd-menu-comp {
|
|
31
|
+
--jsl-button-primary: var(--jsl-color-surface);
|
|
32
|
+
--jsl-button-on-primary: var(--jsl-color-text);
|
|
33
|
+
--jsl-button-primary-hover: var(--jsl-color-surface-hover);
|
|
34
|
+
--jsl-button-primary-active: var(--jsl-color-surface-selected);
|
|
35
|
+
--jsl-button-radius: .25rem;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
}
|
|
39
|
+
.dd-menu-comp > .jsl-button {
|
|
40
|
+
--jsl-button-height: 2.2rem;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex: 0 0 auto;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: flex-start;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
47
|
+
.jsl-dropdown-menu [role^="menuitem"]:focus-visible { outline: 2px solid var(--jsl-color-focus); outline-offset: -2px; }
|
|
48
|
+
@media (prefers-reduced-motion: reduce) { .jsl-dropdown-trigger::after { transition: none; } }
|