@syware/jlib 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -3
- package/dist/all.js +6 -3
- package/dist/atoms/jl-app-icon.css.js +3 -0
- package/dist/atoms/jl-app-icon.js +1 -1
- package/dist/atoms/jl-avatar.css.js +3 -0
- package/dist/atoms/jl-avatar.js +1 -1
- package/dist/atoms/jl-badge.css.js +3 -0
- package/dist/atoms/jl-badge.js +1 -1
- package/dist/atoms/jl-button.css.js +3 -0
- package/dist/atoms/jl-button.js +1 -1
- package/dist/atoms/jl-checkbox.css.js +3 -0
- package/dist/atoms/jl-checkbox.js +1 -1
- package/dist/atoms/jl-chip.css.js +3 -0
- package/dist/atoms/jl-chip.d.ts +1 -0
- package/dist/atoms/jl-chip.js +5 -3
- package/dist/atoms/jl-divider.css.js +3 -0
- package/dist/atoms/jl-divider.js +1 -1
- package/dist/atoms/jl-icon.css.js +3 -0
- package/dist/atoms/jl-icon.js +1 -1
- package/dist/atoms/jl-input.css.js +3 -0
- package/dist/atoms/jl-input.d.ts +2 -0
- package/dist/atoms/jl-input.js +10 -4
- package/dist/atoms/jl-kbd.css.js +3 -0
- package/dist/atoms/jl-kbd.js +1 -1
- package/dist/atoms/jl-link.css.js +3 -0
- package/dist/atoms/jl-link.js +1 -1
- package/dist/atoms/jl-loading-bar.css.js +3 -0
- package/dist/atoms/jl-loading-bar.d.ts +38 -0
- package/dist/atoms/jl-loading-bar.js +121 -0
- package/dist/atoms/jl-progress-ring.css.js +3 -0
- package/dist/atoms/jl-progress-ring.js +1 -1
- package/dist/atoms/jl-progress.css.js +3 -0
- package/dist/atoms/jl-progress.js +1 -1
- package/dist/atoms/jl-rating.css.js +3 -0
- package/dist/atoms/jl-rating.d.ts +2 -0
- package/dist/atoms/jl-rating.js +14 -6
- package/dist/atoms/jl-select.css.js +3 -0
- package/dist/atoms/jl-select.js +1 -1
- package/dist/atoms/jl-skeleton.css.js +3 -0
- package/dist/atoms/jl-skeleton.js +1 -1
- package/dist/atoms/jl-slider.css.js +3 -0
- package/dist/atoms/jl-slider.js +1 -1
- package/dist/atoms/jl-spinner.css.js +3 -0
- package/dist/atoms/jl-spinner.d.ts +2 -0
- package/dist/atoms/jl-spinner.js +7 -3
- package/dist/atoms/jl-switch.css.js +3 -0
- package/dist/atoms/jl-switch.js +1 -1
- package/dist/atoms/jl-textarea.css.js +3 -0
- package/dist/atoms/jl-textarea.js +1 -1
- package/dist/base/jl-element.d.ts +8 -0
- package/dist/base/jl-element.js +5 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -2
- package/dist/lib/flow.js +23 -6
- package/dist/lib/texts-de.d.ts +111 -0
- package/dist/lib/texts-de.js +114 -0
- package/dist/lib/texts-fr.d.ts +111 -0
- package/dist/lib/texts-fr.js +114 -0
- package/dist/lib/texts.d.ts +180 -91
- package/dist/lib/texts.js +177 -9
- package/dist/molecules/jl-accordion-item.css.js +3 -0
- package/dist/molecules/jl-accordion-item.js +1 -1
- package/dist/molecules/jl-accordion.css.js +3 -0
- package/dist/molecules/jl-accordion.js +1 -1
- package/dist/molecules/jl-account-button.css.js +3 -0
- package/dist/molecules/jl-account-button.js +1 -1
- package/dist/molecules/jl-alert.css.js +3 -0
- package/dist/molecules/jl-alert.d.ts +1 -0
- package/dist/molecules/jl-alert.js +5 -3
- package/dist/molecules/jl-avatar-group.css.js +3 -0
- package/dist/molecules/jl-avatar-group.js +1 -1
- package/dist/molecules/jl-breadcrumb.css.js +3 -0
- package/dist/molecules/jl-breadcrumb.d.ts +2 -0
- package/dist/molecules/jl-breadcrumb.js +13 -7
- package/dist/molecules/jl-calendar.css.js +3 -0
- package/dist/molecules/jl-calendar.d.ts +1 -0
- package/dist/molecules/jl-calendar.js +8 -5
- package/dist/molecules/jl-card.css.js +3 -0
- package/dist/molecules/jl-card.js +1 -1
- package/dist/molecules/jl-chip-group.css.js +3 -0
- package/dist/molecules/jl-chip-group.d.ts +1 -0
- package/dist/molecules/jl-chip-group.js +5 -2
- package/dist/molecules/jl-code-block.css.js +3 -0
- package/dist/molecules/jl-code-block.js +2 -2
- package/dist/molecules/jl-combobox.css.js +3 -0
- package/dist/molecules/jl-combobox.d.ts +3 -1
- package/dist/molecules/jl-combobox.js +13 -8
- package/dist/molecules/jl-copy-button.css.js +3 -0
- package/dist/molecules/jl-copy-button.d.ts +1 -0
- package/dist/molecules/jl-copy-button.js +8 -6
- package/dist/molecules/jl-date-picker.css.js +3 -0
- package/dist/molecules/jl-date-picker.d.ts +1 -0
- package/dist/molecules/jl-date-picker.js +11 -8
- package/dist/molecules/jl-empty.css.js +3 -0
- package/dist/molecules/jl-empty.js +1 -1
- package/dist/molecules/jl-facts.css.js +3 -0
- package/dist/molecules/jl-facts.js +1 -1
- package/dist/molecules/jl-field.css.js +3 -0
- package/dist/molecules/jl-field.js +1 -1
- package/dist/molecules/jl-file-drop.css.js +3 -0
- package/dist/molecules/jl-file-drop.d.ts +1 -0
- package/dist/molecules/jl-file-drop.js +16 -7
- package/dist/molecules/jl-input-list.css.js +3 -0
- package/dist/molecules/jl-input-list.d.ts +3 -2
- package/dist/molecules/jl-input-list.js +11 -8
- package/dist/molecules/jl-list-item.css.js +3 -0
- package/dist/molecules/jl-list-item.js +1 -1
- package/dist/molecules/jl-load-more.css.js +3 -0
- package/dist/molecules/jl-load-more.d.ts +4 -2
- package/dist/molecules/jl-load-more.js +16 -9
- package/dist/molecules/jl-load-state.css.js +3 -0
- package/dist/molecules/jl-load-state.d.ts +13 -0
- package/dist/molecules/jl-load-state.js +63 -12
- package/dist/molecules/jl-menu.css.js +3 -0
- package/dist/molecules/jl-menu.js +1 -1
- package/dist/molecules/jl-number-input.css.js +3 -0
- package/dist/molecules/jl-number-input.d.ts +1 -0
- package/dist/molecules/jl-number-input.js +7 -4
- package/dist/molecules/jl-pagination.css.js +3 -0
- package/dist/molecules/jl-pagination.d.ts +2 -0
- package/dist/molecules/jl-pagination.js +18 -10
- package/dist/molecules/jl-popover.css.js +3 -0
- package/dist/molecules/jl-popover.js +1 -1
- package/dist/molecules/jl-radio-group.css.js +3 -0
- package/dist/molecules/jl-radio-group.d.ts +1 -0
- package/dist/molecules/jl-radio-group.js +5 -2
- package/dist/molecules/jl-search-button.css.js +3 -0
- package/dist/molecules/jl-search-button.d.ts +2 -1
- package/dist/molecules/jl-search-button.js +7 -5
- package/dist/molecules/jl-search.css.js +3 -0
- package/dist/molecules/jl-search.d.ts +2 -0
- package/dist/molecules/jl-search.js +10 -4
- package/dist/molecules/jl-segmented.css.js +3 -0
- package/dist/molecules/jl-segmented.js +1 -1
- package/dist/molecules/jl-stat.css.js +3 -0
- package/dist/molecules/jl-stat.js +1 -1
- package/dist/molecules/jl-steps.css.js +3 -0
- package/dist/molecules/jl-steps.d.ts +2 -0
- package/dist/molecules/jl-steps.js +10 -5
- package/dist/molecules/jl-tab-panel.css.js +3 -0
- package/dist/molecules/jl-tab-panel.js +1 -1
- package/dist/molecules/jl-tabs.css.js +3 -0
- package/dist/molecules/jl-tabs.js +1 -1
- package/dist/molecules/jl-tag-input.css.js +3 -0
- package/dist/molecules/jl-tag-input.d.ts +1 -0
- package/dist/molecules/jl-tag-input.js +9 -5
- package/dist/molecules/jl-timeline.css.js +3 -0
- package/dist/molecules/jl-timeline.js +1 -1
- package/dist/molecules/jl-toast.css.js +3 -0
- package/dist/molecules/jl-toast.d.ts +1 -0
- package/dist/molecules/jl-toast.js +5 -3
- package/dist/molecules/jl-tooltip.css.js +3 -0
- package/dist/molecules/jl-tooltip.js +1 -1
- package/dist/organisms/jl-command-palette.css.js +3 -0
- package/dist/organisms/jl-command-palette.d.ts +3 -1
- package/dist/organisms/jl-command-palette.js +23 -15
- package/dist/organisms/jl-confirm.css.js +3 -0
- package/dist/organisms/jl-confirm.d.ts +3 -0
- package/dist/organisms/jl-confirm.js +13 -12
- package/dist/organisms/jl-dialog.css.js +3 -0
- package/dist/organisms/jl-dialog.d.ts +1 -0
- package/dist/organisms/jl-dialog.js +5 -3
- package/dist/organisms/jl-drawer.css.js +3 -0
- package/dist/organisms/jl-drawer.d.ts +1 -0
- package/dist/organisms/jl-drawer.js +5 -3
- package/dist/organisms/jl-flow.css.js +3 -0
- package/dist/organisms/jl-flow.d.ts +2 -0
- package/dist/organisms/jl-flow.js +26 -17
- package/dist/organisms/jl-navbar.css.js +3 -0
- package/dist/organisms/jl-navbar.d.ts +3 -0
- package/dist/organisms/jl-navbar.js +17 -8
- package/dist/organisms/jl-page-header.css.js +3 -0
- package/dist/organisms/jl-page-header.js +1 -1
- package/dist/organisms/jl-page-outlet.css.js +3 -0
- package/dist/organisms/jl-page-outlet.d.ts +34 -0
- package/dist/organisms/jl-page-outlet.js +107 -0
- package/dist/organisms/jl-side-nav.css.js +3 -0
- package/dist/organisms/jl-side-nav.d.ts +4 -2
- package/dist/organisms/jl-side-nav.js +18 -12
- package/dist/organisms/jl-tab-bar.css.js +3 -0
- package/dist/organisms/jl-tab-bar.d.ts +1 -0
- package/dist/organisms/jl-tab-bar.js +6 -3
- package/dist/organisms/jl-table.css.js +3 -0
- package/dist/organisms/jl-table.d.ts +2 -1
- package/dist/organisms/jl-table.js +10 -7
- package/dist/organisms/jl-toaster.css.js +3 -0
- package/dist/organisms/jl-toaster.d.ts +2 -1
- package/dist/organisms/jl-toaster.js +13 -10
- package/dist/organisms/jl-tree.css.js +3 -0
- package/dist/organisms/jl-tree.d.ts +6 -4
- package/dist/organisms/jl-tree.js +22 -16
- package/dist/styles/base.css.js +3 -0
- package/dist/styles/control.css.js +3 -0
- package/dist/styles/floating.css.js +3 -0
- package/dist/styles/shared.js +4 -4
- package/dist/styles/tokens.css.js +3 -0
- package/dist/templates/jl-app-shell.css.js +3 -0
- package/dist/templates/jl-app-shell.d.ts +1 -0
- package/dist/templates/jl-app-shell.js +5 -3
- package/dist/templates/jl-auth-layout.css.js +3 -0
- package/dist/templates/jl-auth-layout.d.ts +4 -3
- package/dist/templates/jl-auth-layout.js +14 -12
- package/dist/templates/jl-page.css.js +3 -0
- package/dist/templates/jl-page.d.ts +1 -0
- package/dist/templates/jl-page.js +5 -2
- package/dist/templates/jl-split-view.css.js +3 -0
- package/dist/templates/jl-split-view.d.ts +1 -0
- package/dist/templates/jl-split-view.js +6 -5
- package/dist/templates/jl-stack.css.js +3 -0
- package/dist/templates/jl-stack.d.ts +17 -0
- package/dist/templates/jl-stack.js +36 -0
- package/dist/types/jl-stack.types.d.ts +2 -0
- package/dist/types/texts.types.d.ts +29 -4
- package/package.json +5 -4
- package/dist/atoms/jl-app-icon.css_raw.js +0 -3
- package/dist/atoms/jl-avatar.css_raw.js +0 -3
- package/dist/atoms/jl-badge.css_raw.js +0 -3
- package/dist/atoms/jl-button.css_raw.js +0 -3
- package/dist/atoms/jl-checkbox.css_raw.js +0 -3
- package/dist/atoms/jl-chip.css_raw.js +0 -3
- package/dist/atoms/jl-divider.css_raw.js +0 -3
- package/dist/atoms/jl-icon.css_raw.js +0 -3
- package/dist/atoms/jl-input.css_raw.js +0 -3
- package/dist/atoms/jl-kbd.css_raw.js +0 -3
- package/dist/atoms/jl-link.css_raw.js +0 -3
- package/dist/atoms/jl-progress-ring.css_raw.js +0 -3
- package/dist/atoms/jl-progress.css_raw.js +0 -3
- package/dist/atoms/jl-rating.css_raw.js +0 -3
- package/dist/atoms/jl-select.css_raw.js +0 -3
- package/dist/atoms/jl-skeleton.css_raw.js +0 -3
- package/dist/atoms/jl-slider.css_raw.js +0 -3
- package/dist/atoms/jl-spinner.css_raw.js +0 -3
- package/dist/atoms/jl-switch.css_raw.js +0 -3
- package/dist/atoms/jl-textarea.css_raw.js +0 -3
- package/dist/molecules/jl-accordion-item.css_raw.js +0 -3
- package/dist/molecules/jl-accordion.css_raw.js +0 -3
- package/dist/molecules/jl-account-button.css_raw.js +0 -3
- package/dist/molecules/jl-alert.css_raw.js +0 -3
- package/dist/molecules/jl-avatar-group.css_raw.js +0 -3
- package/dist/molecules/jl-breadcrumb.css_raw.js +0 -3
- package/dist/molecules/jl-calendar.css_raw.js +0 -3
- package/dist/molecules/jl-card.css_raw.js +0 -3
- package/dist/molecules/jl-chip-group.css_raw.js +0 -3
- package/dist/molecules/jl-code-block.css_raw.js +0 -3
- package/dist/molecules/jl-combobox.css_raw.js +0 -3
- package/dist/molecules/jl-copy-button.css_raw.js +0 -3
- package/dist/molecules/jl-date-picker.css_raw.js +0 -3
- package/dist/molecules/jl-empty.css_raw.js +0 -3
- package/dist/molecules/jl-facts.css_raw.js +0 -3
- package/dist/molecules/jl-field.css_raw.js +0 -3
- package/dist/molecules/jl-file-drop.css_raw.js +0 -3
- package/dist/molecules/jl-input-list.css_raw.js +0 -3
- package/dist/molecules/jl-list-item.css_raw.js +0 -3
- package/dist/molecules/jl-load-more.css_raw.js +0 -3
- package/dist/molecules/jl-load-state.css_raw.js +0 -3
- package/dist/molecules/jl-menu.css_raw.js +0 -3
- package/dist/molecules/jl-number-input.css_raw.js +0 -3
- package/dist/molecules/jl-pagination.css_raw.js +0 -3
- package/dist/molecules/jl-popover.css_raw.js +0 -3
- package/dist/molecules/jl-radio-group.css_raw.js +0 -3
- package/dist/molecules/jl-search-button.css_raw.js +0 -3
- package/dist/molecules/jl-search.css_raw.js +0 -3
- package/dist/molecules/jl-segmented.css_raw.js +0 -3
- package/dist/molecules/jl-stat.css_raw.js +0 -3
- package/dist/molecules/jl-steps.css_raw.js +0 -3
- package/dist/molecules/jl-tab-panel.css_raw.js +0 -3
- package/dist/molecules/jl-tabs.css_raw.js +0 -3
- package/dist/molecules/jl-tag-input.css_raw.js +0 -3
- package/dist/molecules/jl-timeline.css_raw.js +0 -3
- package/dist/molecules/jl-toast.css_raw.js +0 -3
- package/dist/molecules/jl-tooltip.css_raw.js +0 -3
- package/dist/organisms/jl-command-palette.css_raw.js +0 -3
- package/dist/organisms/jl-confirm.css_raw.js +0 -3
- package/dist/organisms/jl-dialog.css_raw.js +0 -3
- package/dist/organisms/jl-drawer.css_raw.js +0 -3
- package/dist/organisms/jl-flow.css_raw.js +0 -3
- package/dist/organisms/jl-navbar.css_raw.js +0 -3
- package/dist/organisms/jl-page-header.css_raw.js +0 -3
- package/dist/organisms/jl-side-nav.css_raw.js +0 -3
- package/dist/organisms/jl-tab-bar.css_raw.js +0 -3
- package/dist/organisms/jl-table.css_raw.js +0 -3
- package/dist/organisms/jl-toaster.css_raw.js +0 -3
- package/dist/organisms/jl-tree.css_raw.js +0 -3
- package/dist/styles/base.css_raw.js +0 -3
- package/dist/styles/control.css_raw.js +0 -3
- package/dist/styles/floating.css_raw.js +0 -3
- package/dist/styles/tokens.css_raw.js +0 -3
- package/dist/templates/jl-app-shell.css_raw.js +0 -3
- package/dist/templates/jl-auth-layout.css_raw.js +0 -3
- package/dist/templates/jl-page.css_raw.js +0 -3
- package/dist/templates/jl-split-view.css_raw.js +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-accordion-item.css?inline
|
|
2
|
+
var jl_accordion_item_default = ":host{border-bottom:1px solid var(--jl-line);interpolate-size:allow-keywords;--pad-x:0px;display:block}summary{min-height:48px;padding:12px var(--pad-x);border-radius:var(--jl-radius-xs);color:var(--jl-text);font-size:var(--jl-font-md);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:10px;font-weight:600;line-height:1.4;list-style:none;display:flex}summary::-webkit-details-marker{display:none}.titles{flex:1;min-width:0;display:grid}.description{color:var(--jl-muted);font-size:var(--jl-font-sm);text-overflow:ellipsis;white-space:nowrap;font-weight:400;overflow:hidden}.icon{color:var(--jl-muted)}.chevron{color:var(--jl-faint);transition:rotate var(--jl-slow) var(--jl-ease)}summary:hover .chevron{color:var(--jl-text)}details[open] .chevron{rotate:180deg}summary:focus-visible{box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--jl-brand) 60%, transparent)}details::details-content{box-sizing:inherit;block-size:0;transition:block-size var(--jl-slow) var(--jl-ease), content-visibility var(--jl-slow) allow-discrete;overflow:clip}details[open]::details-content{block-size:auto}.content{padding:0 var(--pad-x) 16px;color:var(--jl-text-2);font-size:var(--jl-font-md);line-height:1.6}:host([disabled]) summary{color:var(--jl-faint);cursor:not-allowed}:host([disabled]) summary:hover .chevron{color:var(--jl-faint)}";
|
|
3
|
+
export { jl_accordion_item_default as default };
|
|
@@ -2,7 +2,7 @@ import { BASE_STYLES } from "../styles/shared.js";
|
|
|
2
2
|
import { JlElement } from "../base/jl-element.js";
|
|
3
3
|
import { registerIcons } from "../lib/icons.js";
|
|
4
4
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
5
|
-
import jl_accordion_item_default from "./jl-accordion-item.
|
|
5
|
+
import jl_accordion_item_default from "./jl-accordion-item.css.js";
|
|
6
6
|
import { css } from "@jadis/core";
|
|
7
7
|
import { ChevronDown } from "lucide";
|
|
8
8
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-accordion.css?inline
|
|
2
|
+
var jl_accordion_default = ":host{display:block}:host([variant=bordered]) .accordion{border:1px solid var(--jl-line);border-radius:var(--jl-radius);background:var(--jl-surface)}:host([variant=bordered]) ::slotted(*){--pad-x:16px}:host([variant=bordered]) ::slotted(:last-child){border-bottom:none}";
|
|
3
|
+
export { jl_accordion_default as default };
|
|
@@ -3,7 +3,7 @@ import { JlElement } from "../base/jl-element.js";
|
|
|
3
3
|
import { oneOf } from "../lib/attributes.js";
|
|
4
4
|
import { define } from "../lib/define.js";
|
|
5
5
|
import { JlAccordionItem } from "./jl-accordion-item.js";
|
|
6
|
-
import jl_accordion_default from "./jl-accordion.
|
|
6
|
+
import jl_accordion_default from "./jl-accordion.css.js";
|
|
7
7
|
import { css } from "@jadis/core";
|
|
8
8
|
import { jsx } from "@jadis/core/jsx-runtime";
|
|
9
9
|
// src/molecules/jl-accordion.tsx
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-account-button.css?inline
|
|
2
|
+
var jl_account_button_default = ":host{display:block}.base{border-radius:var(--jl-radius-sm);width:100%;color:var(--jl-text);text-align:left;cursor:pointer;transition:background var(--jl-fast) var(--jl-ease);background:0 0;border:0;padding:6px 8px;text-decoration:none;display:flex}.base:hover{background:var(--jl-surface-2)}.content{flex:1;align-items:center;gap:10px;min-width:0;display:flex}jl-avatar{flex:none}.text{min-width:0;line-height:1.3;display:grid}.name,.description{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.name{font-size:var(--jl-font-sm);font-weight:650}.description{color:var(--jl-muted);font-size:var(--jl-font-xs)}:host([compact]){display:inline-block}:host([compact]) .base{border-radius:var(--jl-radius-pill);width:auto;padding:2px}:host([compact]) .text{display:none}:host([current]) .base{background:var(--jl-accent-soft)}:host([current]) .name{color:var(--jl-accent)}:host([current][compact]) .base{box-shadow:0 0 0 2px var(--jl-accent)}";
|
|
3
|
+
export { jl_account_button_default as default };
|
|
@@ -2,7 +2,7 @@ import { BASE_STYLES } from "../styles/shared.js";
|
|
|
2
2
|
import { JlElement } from "../base/jl-element.js";
|
|
3
3
|
import { setOrRemove } from "../lib/dom.js";
|
|
4
4
|
import { JlAvatar } from "../atoms/jl-avatar.js";
|
|
5
|
-
import jl_account_button_default from "./jl-account-button.
|
|
5
|
+
import jl_account_button_default from "./jl-account-button.css.js";
|
|
6
6
|
import { css } from "@jadis/core";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
8
8
|
// src/molecules/jl-account-button.tsx
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-alert.css?inline
|
|
2
|
+
var jl_alert_default = ":host{--fg:var(--jl-info);--bg:var(--jl-info-soft);--border:color-mix(in srgb, var(--fg) 24%, var(--bg));display:block}:host([tone=accent]){--fg:var(--jl-accent);--bg:var(--jl-accent-soft)}:host([tone=ok]){--fg:var(--jl-ok);--bg:var(--jl-ok-soft)}:host([tone=warn]){--fg:var(--jl-warn);--bg:var(--jl-warn-soft)}:host([tone=danger]){--fg:var(--jl-danger);--bg:var(--jl-danger-soft)}:host([tone=neutral]){--fg:var(--jl-muted);--bg:var(--jl-surface-2);--border:var(--jl-line)}.alert{border:1px solid var(--border);border-radius:var(--jl-radius);background:var(--bg);color:var(--jl-text-2);font-size:var(--jl-font-md);align-items:flex-start;gap:12px;padding:12px 14px;line-height:1.5;display:flex}:host([dismissible]) .alert{padding-right:8px}.icon{color:var(--fg);margin-top:1.5px}.content{flex:1;gap:2px;min-width:0;display:grid}.heading{color:var(--jl-text);font-weight:650}.actions{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.close{--jl-accent:var(--fg);--jl-accent-soft:color-mix(in srgb, var(--fg) 12%, transparent);margin:-5px 0}::slotted(a){color:inherit;font-weight:600}";
|
|
3
|
+
export { jl_alert_default as default };
|
|
@@ -38,6 +38,7 @@ export declare class JlAlert extends JlElement {
|
|
|
38
38
|
dismiss(): void;
|
|
39
39
|
templateHtml(): Node;
|
|
40
40
|
templateCss(): string;
|
|
41
|
+
protected drawTexts(): void;
|
|
41
42
|
onConnect(): void;
|
|
42
43
|
/** Empty parts take no room: an alert with only a description has no blank line under it. */
|
|
43
44
|
private renderSlots;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { jlText } from "../lib/texts.js";
|
|
1
2
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlElement } from "../base/jl-element.js";
|
|
3
4
|
import { oneOf } from "../lib/attributes.js";
|
|
4
5
|
import { registerIcons } from "../lib/icons.js";
|
|
5
6
|
import { TONES, TONE_ICONS, TONE_ICON_FILLED } from "../lib/options.js";
|
|
6
|
-
import { jlText } from "../lib/texts.js";
|
|
7
7
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
8
8
|
import { hasSlotted } from "../lib/slots.js";
|
|
9
9
|
import { JlButton } from "../atoms/jl-button.js";
|
|
10
|
-
import jl_alert_default from "./jl-alert.
|
|
10
|
+
import jl_alert_default from "./jl-alert.css.js";
|
|
11
11
|
import { css } from "@jadis/core";
|
|
12
12
|
import { CircleCheck, CircleX, Info, Sparkles, TriangleAlert, X } from "lucide";
|
|
13
13
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -116,7 +116,6 @@ var JlAlert = class extends JlElement {
|
|
|
116
116
|
class: "close",
|
|
117
117
|
variant: "ghost",
|
|
118
118
|
icon: "x",
|
|
119
|
-
hint: jlText("dismiss"),
|
|
120
119
|
size: "sm",
|
|
121
120
|
hidden: true
|
|
122
121
|
})
|
|
@@ -126,6 +125,9 @@ var JlAlert = class extends JlElement {
|
|
|
126
125
|
templateCss() {
|
|
127
126
|
return css`${BASE_STYLES}${jl_alert_default}`;
|
|
128
127
|
}
|
|
128
|
+
drawTexts() {
|
|
129
|
+
this._refs.close.hint.set(jlText("dismiss"));
|
|
130
|
+
}
|
|
129
131
|
onConnect() {
|
|
130
132
|
this._refs.close.events.register("press", () => this.dismiss());
|
|
131
133
|
this.renderSlots();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-avatar-group.css?inline
|
|
2
|
+
var jl_avatar_group_default = ":host{vertical-align:middle;--overlap:6px;--ring-color:var(--jl-surface);display:inline-flex}:host([size=sm]){--overlap:4px}:host([size=lg]){--overlap:8px}:host([size=xl]){--overlap:10px}.group{padding-left:var(--overlap);align-items:center;display:inline-flex}jl-avatar{margin-left:calc(var(--overlap) * -1);--ring:2px;--ring-color:inherit}.more{font-variant-numeric:tabular-nums}";
|
|
3
|
+
export { jl_avatar_group_default as default };
|
|
@@ -3,7 +3,7 @@ import { JlElement } from "../base/jl-element.js";
|
|
|
3
3
|
import { jsonOf, oneOf } from "../lib/attributes.js";
|
|
4
4
|
import { splitVisible } from "../lib/avatar.js";
|
|
5
5
|
import { AVATAR_SIZES, JlAvatar } from "../atoms/jl-avatar.js";
|
|
6
|
-
import jl_avatar_group_default from "./jl-avatar-group.
|
|
6
|
+
import jl_avatar_group_default from "./jl-avatar-group.css.js";
|
|
7
7
|
import { css } from "@jadis/core";
|
|
8
8
|
import { jsx } from "@jadis/core/jsx-runtime";
|
|
9
9
|
// src/molecules/jl-avatar-group.tsx
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-breadcrumb.css?inline
|
|
2
|
+
var jl_breadcrumb_default = ":host{display:block}ol{font-size:var(--jl-font-sm);flex-wrap:wrap;align-items:center;gap:4px 0;padding:0;line-height:20px;list-style:none;display:flex}li{align-items:center;min-width:0;display:inline-flex}.separator{color:var(--jl-faint);margin:0 6px}.crumb{border-radius:var(--jl-radius-xs);min-width:0;color:var(--jl-muted);align-items:center;gap:6px;padding:2px 4px;text-decoration:none;display:inline-flex}a.crumb:hover{color:var(--jl-text);text-underline-offset:3px;text-decoration:underline}.crumb[aria-current=page]{color:var(--jl-text);font-weight:600}.label{text-overflow:ellipsis;white-space:nowrap;max-width:24ch;overflow:hidden}.more{border-radius:var(--jl-radius-xs);width:26px;height:22px;color:var(--jl-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.more:hover{background:var(--jl-surface-3);color:var(--jl-text)}li:first-child .crumb{margin-left:-4px}";
|
|
3
|
+
export { jl_breadcrumb_default as default };
|
|
@@ -25,6 +25,8 @@ export declare class JlBreadcrumb extends JlElement {
|
|
|
25
25
|
templateHtml(): Node;
|
|
26
26
|
templateCss(): string;
|
|
27
27
|
onConnect(): void;
|
|
28
|
+
protected drawTexts(): void;
|
|
29
|
+
private renderLabel;
|
|
28
30
|
/** A new trail starts folded. */
|
|
29
31
|
private renderTrail;
|
|
30
32
|
private render;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jlText } from "../lib/texts.js";
|
|
1
2
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlElement } from "../base/jl-element.js";
|
|
3
4
|
import { jsonOf } from "../lib/attributes.js";
|
|
4
5
|
import { registerIcons } from "../lib/icons.js";
|
|
5
|
-
import { jlText } from "../lib/texts.js";
|
|
6
6
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
7
|
-
import jl_breadcrumb_default from "./jl-breadcrumb.
|
|
7
|
+
import jl_breadcrumb_default from "./jl-breadcrumb.css.js";
|
|
8
8
|
import { css } from "@jadis/core";
|
|
9
9
|
import { ChevronRight, Ellipsis } from "lucide";
|
|
10
10
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -43,9 +43,7 @@ var JlBreadcrumb = class extends JlElement {
|
|
|
43
43
|
/** The most items shown before the middle folds; 0 never folds. */
|
|
44
44
|
max = this.useChange(0, () => this.render(), { attribute: "max" });
|
|
45
45
|
/** The trail's name for screen readers. */
|
|
46
|
-
label = this.useChange(
|
|
47
|
-
this._refs.nav.setAttribute("aria-label", value || jlText("breadcrumb"));
|
|
48
|
-
}, { attribute: "label" });
|
|
46
|
+
label = this.useChange("", () => this.renderLabel(), { attribute: "label" });
|
|
49
47
|
_state = { expanded: false };
|
|
50
48
|
_refs = this.useRefs((ref) => ({
|
|
51
49
|
list: ref("ol"),
|
|
@@ -65,6 +63,13 @@ var JlBreadcrumb = class extends JlElement {
|
|
|
65
63
|
if (event.target.closest(".more") !== null) this.expand();
|
|
66
64
|
});
|
|
67
65
|
}
|
|
66
|
+
drawTexts() {
|
|
67
|
+
this.renderLabel();
|
|
68
|
+
this.render();
|
|
69
|
+
}
|
|
70
|
+
renderLabel() {
|
|
71
|
+
this._refs.nav.setAttribute("aria-label", this.label.get() || jlText("breadcrumb"));
|
|
72
|
+
}
|
|
68
73
|
/** A new trail starts folded. */
|
|
69
74
|
renderTrail() {
|
|
70
75
|
this._state.expanded = false;
|
|
@@ -104,11 +109,12 @@ var JlBreadcrumb = class extends JlElement {
|
|
|
104
109
|
});
|
|
105
110
|
}
|
|
106
111
|
moreButton(hidden) {
|
|
112
|
+
const label = jlText("showMoreCount", { count: hidden });
|
|
107
113
|
return /* @__PURE__ */ jsx("button", {
|
|
108
114
|
type: "button",
|
|
109
115
|
class: "more",
|
|
110
|
-
"aria-label":
|
|
111
|
-
title:
|
|
116
|
+
"aria-label": label,
|
|
117
|
+
title: label,
|
|
112
118
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
113
119
|
name: "ellipsis",
|
|
114
120
|
size: ICON_SIZE
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-calendar.css?inline
|
|
2
|
+
var jl_calendar_default = ":host{vertical-align:top;--cell:36px;display:inline-block}:host([size=sm]){--cell:32px}:host([size=lg]){--cell:42px}.calendar{border:1px solid var(--jl-line);border-radius:var(--jl-radius-lg);background:var(--jl-surface);color:var(--jl-text);gap:6px;padding:12px;display:inline-grid}:host([invalid]) .calendar{border-color:var(--jl-danger)}header{align-items:center;gap:8px;display:flex}.title{font-size:var(--jl-font-md);text-align:center;flex:1;font-weight:650}.title:first-letter{text-transform:uppercase}.nav{border-radius:var(--jl-radius-sm);width:30px;height:30px;color:var(--jl-text-2);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.nav:hover{background:var(--jl-surface-3);color:var(--jl-text)}.nav:disabled{color:var(--jl-faint);cursor:not-allowed;opacity:.5;background:0 0}table{border-collapse:collapse;border-spacing:0}th{width:var(--cell);height:28px;color:var(--jl-muted);text-align:center;padding:0;font-size:11px;font-weight:600}td{width:var(--cell);height:var(--cell);text-align:center;cursor:pointer;padding:2px}.number{border-radius:var(--jl-radius-sm);width:100%;height:100%;font-size:var(--jl-font-sm);font-variant-numeric:tabular-nums;transition:background var(--jl-fast) var(--jl-ease), color var(--jl-fast) var(--jl-ease);justify-content:center;align-items:center;display:inline-flex}td:hover .number{background:var(--jl-surface-3)}td:focus-visible{box-shadow:none}td:focus-visible .number{box-shadow:var(--jl-focus-ring)}td.outside .number{color:var(--jl-muted)}td[aria-current=date] .number{color:var(--jl-accent);box-shadow:inset 0 0 0 1px var(--jl-accent-line);font-weight:700}td[aria-disabled=true]{cursor:not-allowed}td[aria-disabled=true] .number{color:var(--jl-faint);text-decoration:line-through;-webkit-text-decoration-color:color-mix(in srgb, var(--jl-faint) 60%, transparent);text-decoration-color:color-mix(in srgb, var(--jl-faint) 60%, transparent);background:0 0}td[aria-selected=true] .number{background:var(--jl-accent);color:var(--jl-on-accent);font-weight:650}:host([disabled]) .calendar{opacity:.55}:host([disabled]) td{cursor:not-allowed}:host([disabled]) td:hover .number{background:0 0}";
|
|
3
|
+
export { jl_calendar_default as default };
|
|
@@ -70,6 +70,7 @@ export declare class JlCalendar extends JlFormControl {
|
|
|
70
70
|
showMonth(iso: string): void;
|
|
71
71
|
templateHtml(): Node;
|
|
72
72
|
templateCss(): string;
|
|
73
|
+
protected drawTexts(): void;
|
|
73
74
|
onConnect(): void;
|
|
74
75
|
protected resetValue(): void;
|
|
75
76
|
protected setDisabledByForm(disabled: boolean): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { pageLocale } from "../lib/locale.js";
|
|
2
|
+
import { jlText } from "../lib/texts.js";
|
|
1
3
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
4
|
import { JlFormControl } from "../base/jl-form-control.js";
|
|
3
5
|
import { clampedNumber, oneOf } from "../lib/attributes.js";
|
|
4
6
|
import { registerIcons } from "../lib/icons.js";
|
|
5
7
|
import { CONTROL_SIZES } from "../lib/options.js";
|
|
6
|
-
import { jlText } from "../lib/texts.js";
|
|
7
8
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
8
9
|
import { setOrRemove, uniqueId } from "../lib/dom.js";
|
|
9
10
|
import { addMonths, calendarDateOf, clampDate, dateAfterKey, dateFormatter, formatMonthTitle, isSameDate, isSameMonth, isWithin, monthGrid, monthHasDaysWithin, parseIsoDate, toIsoDate, weekdayNames } from "../lib/calendar.js";
|
|
10
|
-
import
|
|
11
|
-
import jl_calendar_default from "./jl-calendar.css_raw.js";
|
|
11
|
+
import jl_calendar_default from "./jl-calendar.css.js";
|
|
12
12
|
import { css } from "@jadis/core";
|
|
13
13
|
import { ChevronLeft, ChevronRight } from "lucide";
|
|
14
14
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -95,7 +95,6 @@ var JlCalendar = class extends JlFormControl {
|
|
|
95
95
|
/* @__PURE__ */ jsx("button", {
|
|
96
96
|
class: "nav previous",
|
|
97
97
|
type: "button",
|
|
98
|
-
"aria-label": jlText("previousMonth"),
|
|
99
98
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
100
99
|
name: "chevron-left",
|
|
101
100
|
size: NAV_ICON_SIZE
|
|
@@ -109,7 +108,6 @@ var JlCalendar = class extends JlFormControl {
|
|
|
109
108
|
/* @__PURE__ */ jsx("button", {
|
|
110
109
|
class: "nav next",
|
|
111
110
|
type: "button",
|
|
112
|
-
"aria-label": jlText("nextMonth"),
|
|
113
111
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
114
112
|
name: "chevron-right",
|
|
115
113
|
size: NAV_ICON_SIZE
|
|
@@ -125,6 +123,11 @@ var JlCalendar = class extends JlFormControl {
|
|
|
125
123
|
templateCss() {
|
|
126
124
|
return css`${BASE_STYLES}${jl_calendar_default}`;
|
|
127
125
|
}
|
|
126
|
+
drawTexts() {
|
|
127
|
+
this._refs.previous.setAttribute("aria-label", jlText("previousMonth"));
|
|
128
|
+
this._refs.next.setAttribute("aria-label", jlText("nextMonth"));
|
|
129
|
+
this.renderValidity();
|
|
130
|
+
}
|
|
128
131
|
onConnect() {
|
|
129
132
|
this.on(this._refs.previous, "click", () => this.turnPage(-1));
|
|
130
133
|
this.on(this._refs.next, "click", () => this.turnPage(1));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-card.css?inline
|
|
2
|
+
var jl_card_default = ":host{--pad:20px;--edge:20px;--gap:12px;--radius:var(--jl-radius-lg);display:block}:host([padding=none]){--pad:0px;--edge:16px}:host([padding=sm]){--pad:12px;--edge:12px;--gap:8px}:host([padding=lg]){--pad:28px;--edge:28px;--gap:16px}.card{border:1px solid var(--jl-line);border-radius:var(--radius);background:var(--jl-surface);height:100%;color:var(--jl-text);font-size:var(--jl-font-md);transition:border-color var(--jl-fast) var(--jl-ease);flex-direction:column;line-height:1.55;display:flex;position:relative;overflow:hidden}:host([clickable]) .card{cursor:pointer}:host([clickable]) .card:hover{border-color:var(--jl-accent-line)}.link{z-index:1;border-radius:inherit;position:absolute;inset:0}.link:focus-visible{box-shadow:none}.card:has(.link:focus-visible){box-shadow:var(--jl-focus-ring)}.actions,footer{z-index:2;position:relative}.media ::slotted(*){width:100%;display:block}.media ::slotted(img){object-fit:cover}header{padding:var(--edge) var(--edge) 0;align-items:flex-start;gap:12px;display:flex}:host([floating-actions]) header{z-index:2;position:absolute;top:0;right:0}:host([has-header]:not([has-body])) header{padding-bottom:var(--edge)}.titles{flex:1;gap:2px;min-width:0;display:grid}h3{font-size:var(--jl-font-lg);letter-spacing:-.01em;font-weight:650;line-height:1.35}.description{color:var(--jl-muted);font-size:var(--jl-font-sm);line-height:1.5}.actions{flex:none;align-items:center;gap:6px;margin:-4px -6px -4px 0;display:flex}.body{padding:var(--pad);flex:1}:host([has-header]) .body{padding-top:var(--gap)}:host([has-header][padding=none]) .body{margin-top:var(--gap);border-top:1px solid var(--jl-line);padding-top:0}footer{padding:12px var(--edge);border-top:1px solid var(--jl-line);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}:host(:not([has-body]):not([has-header])) footer{border-top:0}";
|
|
3
|
+
export { jl_card_default as default };
|
|
@@ -4,7 +4,7 @@ import { oneOf } from "../lib/attributes.js";
|
|
|
4
4
|
import { setOrRemove } from "../lib/dom.js";
|
|
5
5
|
import { hasSlotted } from "../lib/slots.js";
|
|
6
6
|
import { isActivationKey, startedOnControl } from "../lib/surface.js";
|
|
7
|
-
import jl_card_default from "./jl-card.
|
|
7
|
+
import jl_card_default from "./jl-card.css.js";
|
|
8
8
|
import { css } from "@jadis/core";
|
|
9
9
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
10
10
|
// src/molecules/jl-card.tsx
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-chip-group.css?inline
|
|
2
|
+
var jl_chip_group_default = ":host{--height:28px;--pad:10px;--font-size:var(--jl-font-sm);min-width:0;display:block}:host([size=sm]){--height:24px;--pad:8px;--font-size:var(--jl-font-xs)}:host([size=lg]){--height:36px;--pad:14px;--font-size:var(--jl-font-md)}.group{scrollbar-width:none;contain:inline-size;gap:8px;min-width:0;margin:-3px;padding:3px;display:flex;overflow-x:auto}.group::-webkit-scrollbar{display:none}:host([wrap]) .group{contain:none;flex-wrap:wrap;overflow:visible}.chip{max-width:100%;height:var(--height);padding:0 var(--pad);border:1px solid var(--jl-line-strong);border-radius:var(--jl-radius-pill);background:var(--jl-surface);color:var(--jl-text-2);font-size:var(--font-size);white-space:nowrap;cursor:pointer;transition:background var(--jl-fast) var(--jl-ease), border-color var(--jl-fast) var(--jl-ease), color var(--jl-fast) var(--jl-ease);flex:none;align-items:center;gap:6px;font-weight:600;line-height:1;display:inline-flex}.chip:hover:not(:disabled){background:var(--jl-surface-2)}.chip.selected,.chip.selected:hover:not(:disabled){border-color:var(--jl-accent-line);background:var(--jl-accent-soft);color:var(--jl-accent)}.chip:disabled{cursor:not-allowed;opacity:.5}.label{text-overflow:ellipsis;line-height:1.4;overflow:hidden}.badge{border-radius:var(--jl-radius-pill);background:var(--jl-surface-3);min-width:18px;color:var(--jl-muted);font-size:var(--jl-font-xs);font-variant-numeric:tabular-nums;text-align:center;margin-right:-4px;padding:0 6px;font-weight:650;line-height:18px}.chip.selected .badge{background:color-mix(in srgb, var(--jl-accent) 14%, transparent);color:var(--jl-accent)}";
|
|
3
|
+
export { jl_chip_group_default as default };
|
|
@@ -78,5 +78,6 @@ export declare class JlChipGroup<Value extends string = string> extends JlFormCo
|
|
|
78
78
|
private renderTabStop;
|
|
79
79
|
/** One choice gives one entry; several give one entry each under the field's name, as checkboxes would. */
|
|
80
80
|
private renderFormValue;
|
|
81
|
+
protected drawTexts(): void;
|
|
81
82
|
private renderValidity;
|
|
82
83
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { jlText } from "../lib/texts.js";
|
|
1
2
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlFormControl } from "../base/jl-form-control.js";
|
|
3
4
|
import { jsonOf, oneOf, textListOf } from "../lib/attributes.js";
|
|
4
5
|
import { registerIcons } from "../lib/icons.js";
|
|
5
6
|
import { CONTROL_SIZES } from "../lib/options.js";
|
|
6
|
-
import { jlText } from "../lib/texts.js";
|
|
7
7
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
8
8
|
import { setOrRemove } from "../lib/dom.js";
|
|
9
9
|
import { rovingIndex } from "../lib/roving-index.js";
|
|
10
|
-
import jl_chip_group_default from "./jl-chip-group.
|
|
10
|
+
import jl_chip_group_default from "./jl-chip-group.css.js";
|
|
11
11
|
import { css } from "@jadis/core";
|
|
12
12
|
import { Check } from "lucide";
|
|
13
13
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -249,6 +249,9 @@ var JlChipGroup = class extends JlFormControl {
|
|
|
249
249
|
for (const value of chosen) data.append(name, value);
|
|
250
250
|
this.internals.setFormValue(data);
|
|
251
251
|
}
|
|
252
|
+
drawTexts() {
|
|
253
|
+
this.renderValidity();
|
|
254
|
+
}
|
|
252
255
|
renderValidity() {
|
|
253
256
|
if (!(this.required.get() && this.chosen().length === 0)) {
|
|
254
257
|
this.internals.setValidity({});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-code-block.css?inline
|
|
2
|
+
var jl_code_block_default = ":host{--max-height:none;min-width:0;display:block}figure{border:1px solid var(--jl-line);border-radius:var(--jl-radius);background:var(--jl-surface-2);position:relative;overflow:hidden}header{border-bottom:1px solid var(--jl-line);height:38px;color:var(--jl-muted);font-size:var(--jl-font-xs);justify-content:space-between;align-items:center;gap:12px;padding:0 52px 0 14px;display:flex}.heading{color:var(--jl-text-2);font-family:var(--jl-font-mono);text-overflow:ellipsis;white-space:nowrap;font-weight:500;overflow:hidden}.language{letter-spacing:.06em;text-transform:uppercase;font-weight:600}.body{min-width:0;max-height:var(--max-height);display:flex;overflow-y:auto}.gutter,pre{font-family:var(--jl-font-mono);font-variant-ligatures:no-contextual;padding:14px 16px;font-size:12.5px;line-height:1.7}.gutter{color:var(--jl-faint);text-align:right;white-space:pre;-webkit-user-select:none;user-select:none;flex:none;padding-right:4px}pre{min-width:0;color:var(--jl-text);tab-size:2;flex:1;margin:0;padding-right:48px;overflow-x:auto}:host([wrap]) pre{white-space:pre-wrap;overflow-wrap:anywhere}.copy{background:var(--jl-surface-2);border-radius:var(--jl-radius-sm);position:absolute;top:6px;right:6px}:host(:not([has-header])) .copy{opacity:.6;transition:opacity var(--jl-fast) var(--jl-ease)}:host(:not([has-header])) figure:hover .copy,.copy:focus-within{opacity:1}.tok-comment{color:var(--jl-code-comment);font-style:italic}.tok-string{color:var(--jl-code-string)}.tok-number{color:var(--jl-code-number)}.tok-keyword{color:var(--jl-code-keyword)}.tok-tag{color:var(--jl-code-tag)}.tok-attribute{color:var(--jl-code-attribute)}.tok-property{color:var(--jl-code-property)}.tok-function{color:var(--jl-code-function)}.tok-punctuation{color:var(--jl-muted)}";
|
|
3
|
+
export { jl_code_block_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { dedent } from "../lib/text.js";
|
|
1
2
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlElement } from "../base/jl-element.js";
|
|
3
4
|
import { oneOf } from "../lib/attributes.js";
|
|
4
|
-
import { dedent } from "../lib/text.js";
|
|
5
5
|
import { cssLength } from "../lib/css-length.js";
|
|
6
6
|
import { highlightedNodes } from "../lib/highlight.js";
|
|
7
|
-
import jl_code_block_default from "./jl-code-block.
|
|
7
|
+
import jl_code_block_default from "./jl-code-block.css.js";
|
|
8
8
|
import { JlCopyButton } from "./jl-copy-button.js";
|
|
9
9
|
import { css } from "@jadis/core";
|
|
10
10
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-combobox.css?inline
|
|
2
|
+
var jl_combobox_default = ":host{min-width:0;display:block}.toggle jl-icon{transition:transform var(--jl-fast) var(--jl-ease)}:host([open]) .toggle jl-icon{transform:rotate(180deg)}.toggle:disabled{cursor:not-allowed}.popup{padding:4px}.listbox{max-height:264px;margin:0;padding:0;list-style:none;position:relative;overflow-y:auto}.option{border-radius:var(--jl-radius-xs);min-height:34px;color:var(--jl-text);font-size:var(--jl-font-md);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:10px;padding:6px 10px;line-height:1.35;display:flex}.option.active{background:var(--jl-surface-3)}.option-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.option.chosen .option-label{font-weight:600}.option[aria-disabled=true]{color:var(--jl-faint);cursor:not-allowed}.text{flex:1;gap:1px;min-width:0;display:grid}.description{color:var(--jl-muted);font-size:var(--jl-font-xs)}.check{color:var(--jl-accent);visibility:hidden}.option.chosen .check{visibility:visible}mark{color:var(--jl-accent);background:0 0;font-weight:700}.empty{color:var(--jl-muted);font-size:var(--jl-font-sm);padding:8px 10px}";
|
|
3
|
+
export { jl_combobox_default as default };
|
|
@@ -40,7 +40,7 @@ export declare class JlCombobox extends JlFormControl {
|
|
|
40
40
|
get(): boolean;
|
|
41
41
|
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
42
42
|
}>>;
|
|
43
|
-
/** What the list says when no option matches. */
|
|
43
|
+
/** What the list says when no option matches; jlib's own when empty. */
|
|
44
44
|
readonly emptyText: Readonly<Readonly<{
|
|
45
45
|
get(): string;
|
|
46
46
|
set(setter: string | ((prevState: string) => string)): void;
|
|
@@ -72,6 +72,8 @@ export declare class JlCombobox extends JlFormControl {
|
|
|
72
72
|
onDisconnect(): void;
|
|
73
73
|
protected resetValue(): void;
|
|
74
74
|
protected setDisabledByForm(disabled: boolean): void;
|
|
75
|
+
protected drawTexts(): void;
|
|
76
|
+
private renderEmptyText;
|
|
75
77
|
private isOpen;
|
|
76
78
|
private onType;
|
|
77
79
|
private onKey;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { jlText } from "../lib/texts.js";
|
|
1
2
|
import { BASE_STYLES, CONTROL_STYLES, FLOATING_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlFormControl } from "../base/jl-form-control.js";
|
|
3
4
|
import { jsonOf, oneOf } from "../lib/attributes.js";
|
|
4
5
|
import { followAnchor } from "../lib/floating.js";
|
|
5
6
|
import { registerIcons } from "../lib/icons.js";
|
|
6
7
|
import { CONTROL_SIZES } from "../lib/options.js";
|
|
7
|
-
import { jlText } from "../lib/texts.js";
|
|
8
8
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
9
9
|
import { setOrRemove, uniqueId } from "../lib/dom.js";
|
|
10
10
|
import { keepInView } from "../lib/keep-in-view.js";
|
|
11
11
|
import { edgeEnabledIndex, filterOptions, foldText, matchParts, nextEnabledIndex } from "../lib/option-filter.js";
|
|
12
|
-
import jl_combobox_default from "./jl-combobox.
|
|
12
|
+
import jl_combobox_default from "./jl-combobox.css.js";
|
|
13
13
|
import { css } from "@jadis/core";
|
|
14
14
|
import { Check, ChevronDown, X } from "lucide";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -55,10 +55,8 @@ var JlCombobox = class extends JlFormControl {
|
|
|
55
55
|
allowCustom = this.useChange(false, () => this.renderValue(), { attribute: "allow-custom" });
|
|
56
56
|
/** Shows a button that empties the field while it holds text. */
|
|
57
57
|
clearable = this.useChange(false, () => this.renderClear(), { attribute: "clearable" });
|
|
58
|
-
/** What the list says when no option matches. */
|
|
59
|
-
emptyText = this.useChange(
|
|
60
|
-
this._refs.empty.textContent = value;
|
|
61
|
-
}, { attribute: "empty-text" });
|
|
58
|
+
/** What the list says when no option matches; jlib's own when empty. */
|
|
59
|
+
emptyText = this.useChange("", () => this.renderEmptyText(), { attribute: "empty-text" });
|
|
62
60
|
required = this.useChange(false, (value) => {
|
|
63
61
|
this._refs.native.toggleAttribute("aria-required", value);
|
|
64
62
|
this.reflect("required", value);
|
|
@@ -111,7 +109,6 @@ var JlCombobox = class extends JlFormControl {
|
|
|
111
109
|
/* @__PURE__ */ jsx("button", {
|
|
112
110
|
class: "action clear",
|
|
113
111
|
type: "button",
|
|
114
|
-
"aria-label": jlText("clear"),
|
|
115
112
|
tabIndex: -1,
|
|
116
113
|
hidden: true,
|
|
117
114
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
@@ -122,7 +119,6 @@ var JlCombobox = class extends JlFormControl {
|
|
|
122
119
|
/* @__PURE__ */ jsx("button", {
|
|
123
120
|
class: "action toggle",
|
|
124
121
|
type: "button",
|
|
125
|
-
"aria-label": jlText("showOptions"),
|
|
126
122
|
tabIndex: -1,
|
|
127
123
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
128
124
|
name: "chevron-down",
|
|
@@ -178,6 +174,15 @@ var JlCombobox = class extends JlFormControl {
|
|
|
178
174
|
this._refs.native.disabled = disabled || this.disabled.get();
|
|
179
175
|
});
|
|
180
176
|
}
|
|
177
|
+
drawTexts() {
|
|
178
|
+
this._refs.clear.setAttribute("aria-label", jlText("clear"));
|
|
179
|
+
this._refs.toggle.setAttribute("aria-label", jlText("showOptions"));
|
|
180
|
+
this.renderEmptyText();
|
|
181
|
+
this.renderValidity();
|
|
182
|
+
}
|
|
183
|
+
renderEmptyText() {
|
|
184
|
+
this._refs.empty.textContent = this.emptyText.get() || jlText("noResults");
|
|
185
|
+
}
|
|
181
186
|
isOpen() {
|
|
182
187
|
return this._refs.popup.matches(":popover-open");
|
|
183
188
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { jlText } from "../lib/texts.js";
|
|
1
2
|
import { BASE_STYLES } from "../styles/shared.js";
|
|
2
3
|
import { JlElement } from "../base/jl-element.js";
|
|
3
4
|
import { oneOf } from "../lib/attributes.js";
|
|
4
5
|
import { registerIcons } from "../lib/icons.js";
|
|
5
6
|
import { CONTROL_SIZES } from "../lib/options.js";
|
|
6
|
-
import { jlText } from "../lib/texts.js";
|
|
7
7
|
import { JlButton } from "../atoms/jl-button.js";
|
|
8
|
-
import jl_copy_button_default from "./jl-copy-button.
|
|
8
|
+
import jl_copy_button_default from "./jl-copy-button.css.js";
|
|
9
9
|
import { css } from "@jadis/core";
|
|
10
10
|
import { Check, Copy } from "lucide";
|
|
11
11
|
import { jsx } from "@jadis/core/jsx-runtime";
|
|
@@ -33,8 +33,7 @@ var JlCopyButton = class extends JlElement {
|
|
|
33
33
|
templateHtml() {
|
|
34
34
|
return /* @__PURE__ */ jsx(JlButton, {
|
|
35
35
|
variant: "ghost",
|
|
36
|
-
icon: COPY_ICON
|
|
37
|
-
hint: jlText("copy")
|
|
36
|
+
icon: COPY_ICON
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
39
|
templateCss() {
|
|
@@ -53,16 +52,19 @@ var JlCopyButton = class extends JlElement {
|
|
|
53
52
|
this.events.emit("copy", text);
|
|
54
53
|
this.confirm();
|
|
55
54
|
}
|
|
55
|
+
drawTexts() {
|
|
56
|
+
this._refs.button.hint.set(jlText(this.hasAttribute("copied") ? "copied" : "copy"));
|
|
57
|
+
}
|
|
56
58
|
confirm() {
|
|
57
59
|
const button = this._refs.button;
|
|
58
60
|
button.icon.set(DONE_ICON);
|
|
59
|
-
button.hint.set(jlText("copied"));
|
|
60
61
|
this.reflect("copied", true);
|
|
62
|
+
this.drawTexts();
|
|
61
63
|
window.clearTimeout(this._timer.id);
|
|
62
64
|
this._timer.id = window.setTimeout(() => {
|
|
63
65
|
button.icon.set(COPY_ICON);
|
|
64
|
-
button.hint.set(jlText("copy"));
|
|
65
66
|
this.reflect("copied", false);
|
|
67
|
+
this.drawTexts();
|
|
66
68
|
}, CONFIRM_MS);
|
|
67
69
|
}
|
|
68
70
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-date-picker.css?inline
|
|
2
|
+
var jl_date_picker_default = ":host{min-width:0;display:block}.open:disabled{cursor:not-allowed}:host([open]) .open{background:var(--jl-surface-3);color:var(--jl-text)}.popup{padding:0}.calendar::part(base){border:none}";
|
|
3
|
+
export { jl_date_picker_default as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { pageLocale } from "../lib/locale.js";
|
|
2
|
+
import { jlText } from "../lib/texts.js";
|
|
1
3
|
import { BASE_STYLES, CONTROL_STYLES, FLOATING_STYLES } from "../styles/shared.js";
|
|
2
4
|
import { JlFormControl } from "../base/jl-form-control.js";
|
|
3
5
|
import { clampedNumber, oneOf } from "../lib/attributes.js";
|
|
4
6
|
import { followAnchor } from "../lib/floating.js";
|
|
5
7
|
import { registerIcons } from "../lib/icons.js";
|
|
6
8
|
import { CONTROL_SIZES } from "../lib/options.js";
|
|
7
|
-
import { jlText } from "../lib/texts.js";
|
|
8
9
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
9
10
|
import { setOrRemove, uniqueId } from "../lib/dom.js";
|
|
10
11
|
import { NUMERIC_DATE, compareDates, dateOrder, datePattern, formatDate, isDateText, parseIsoDate, parseTypedDate, toIsoDate } from "../lib/calendar.js";
|
|
11
|
-
import { pageLocale } from "../lib/locale.js";
|
|
12
12
|
import { JlCalendar } from "./jl-calendar.js";
|
|
13
|
-
import jl_date_picker_default from "./jl-date-picker.
|
|
13
|
+
import jl_date_picker_default from "./jl-date-picker.css.js";
|
|
14
14
|
import { css } from "@jadis/core";
|
|
15
15
|
import { Calendar, X } from "lucide";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -116,7 +116,6 @@ var JlDatePicker = class extends JlFormControl {
|
|
|
116
116
|
/* @__PURE__ */ jsx("button", {
|
|
117
117
|
class: "action clear",
|
|
118
118
|
type: "button",
|
|
119
|
-
"aria-label": jlText("clear"),
|
|
120
119
|
tabIndex: -1,
|
|
121
120
|
hidden: true,
|
|
122
121
|
children: /* @__PURE__ */ jsx(JlIcon, {
|
|
@@ -127,7 +126,6 @@ var JlDatePicker = class extends JlFormControl {
|
|
|
127
126
|
/* @__PURE__ */ jsx("button", {
|
|
128
127
|
class: "action open",
|
|
129
128
|
type: "button",
|
|
130
|
-
"aria-label": jlText("chooseDate"),
|
|
131
129
|
"aria-haspopup": "dialog",
|
|
132
130
|
"aria-expanded": "false",
|
|
133
131
|
"aria-controls": this._popupId,
|
|
@@ -142,7 +140,6 @@ var JlDatePicker = class extends JlFormControl {
|
|
|
142
140
|
id: this._popupId,
|
|
143
141
|
popover: "auto",
|
|
144
142
|
role: "dialog",
|
|
145
|
-
"aria-label": jlText("chooseDate"),
|
|
146
143
|
attrs: { part: "popup" },
|
|
147
144
|
children: /* @__PURE__ */ jsx(JlCalendar, { class: "calendar" })
|
|
148
145
|
})] });
|
|
@@ -150,6 +147,12 @@ var JlDatePicker = class extends JlFormControl {
|
|
|
150
147
|
templateCss() {
|
|
151
148
|
return css`${BASE_STYLES}${CONTROL_STYLES}${FLOATING_STYLES}${jl_date_picker_default}`;
|
|
152
149
|
}
|
|
150
|
+
drawTexts() {
|
|
151
|
+
this._refs.clear.setAttribute("aria-label", jlText("clear"));
|
|
152
|
+
this._refs.open.setAttribute("aria-label", jlText("chooseDate"));
|
|
153
|
+
this._refs.popup.setAttribute("aria-label", jlText("chooseDate"));
|
|
154
|
+
this.renderValidity();
|
|
155
|
+
}
|
|
153
156
|
onConnect() {
|
|
154
157
|
const native = this._refs.native;
|
|
155
158
|
const open = this._refs.open;
|
|
@@ -302,11 +305,11 @@ var JlDatePicker = class extends JlFormControl {
|
|
|
302
305
|
const max = parseIsoDate(this.max.get());
|
|
303
306
|
const locale = pageLocale(this.locale.get());
|
|
304
307
|
if (min !== null && compareDates(date, min) < 0) {
|
|
305
|
-
this.internals.setValidity({ rangeUnderflow: true },
|
|
308
|
+
this.internals.setValidity({ rangeUnderflow: true }, jlText("chooseDateFrom", { date: formatDate(min, locale) }), anchor);
|
|
306
309
|
return;
|
|
307
310
|
}
|
|
308
311
|
if (max !== null && compareDates(date, max) > 0) {
|
|
309
|
-
this.internals.setValidity({ rangeOverflow: true },
|
|
312
|
+
this.internals.setValidity({ rangeOverflow: true }, jlText("chooseDateUntil", { date: formatDate(max, locale) }), anchor);
|
|
310
313
|
return;
|
|
311
314
|
}
|
|
312
315
|
this.internals.setValidity({});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-empty.css?inline
|
|
2
|
+
var jl_empty_default = ":host{--pad:40px 24px;--medallion:48px;--heading:var(--jl-font-lg);display:block}:host([size=sm]){--pad:24px 16px;--medallion:40px;--heading:var(--jl-font-md)}.empty{padding:var(--pad);text-align:center;flex-direction:column;align-items:center;display:flex}.medallion{width:var(--medallion);height:var(--medallion);border:1px solid var(--jl-line);background:var(--jl-surface-2);color:var(--jl-muted);border-radius:50%;justify-content:center;align-items:center;margin-bottom:14px;display:inline-flex}:host([size=sm]) .medallion{margin-bottom:10px}.heading{color:var(--jl-text);font-size:var(--heading);letter-spacing:-.01em;font-weight:650;line-height:1.35}.description{max-width:44ch;color:var(--jl-muted);font-size:var(--jl-font-sm);margin-top:4px;line-height:1.55}.actions{flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px;display:flex}:host([size=sm]) .actions{margin-top:14px}";
|
|
3
|
+
export { jl_empty_default as default };
|
|
@@ -4,7 +4,7 @@ import { oneOf } from "../lib/attributes.js";
|
|
|
4
4
|
import { registerIcons } from "../lib/icons.js";
|
|
5
5
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
6
6
|
import { hasSlotted } from "../lib/slots.js";
|
|
7
|
-
import jl_empty_default from "./jl-empty.
|
|
7
|
+
import jl_empty_default from "./jl-empty.css.js";
|
|
8
8
|
import { css } from "@jadis/core";
|
|
9
9
|
import { Inbox } from "lucide";
|
|
10
10
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-facts.css?inline
|
|
2
|
+
var jl_facts_default = ":host{display:block;container-type:inline-size}:host([empty]){display:none}.facts{font-size:var(--jl-font-md);grid-template-columns:max-content minmax(0,1fr);gap:6px 24px;margin:0;display:grid}.fact{display:contents}dt{color:var(--jl-muted)}dd{min-width:0;color:var(--jl-text);overflow-wrap:anywhere;margin:0}code{font-family:var(--jl-font-mono);font-size:var(--jl-font-sm);word-break:break-all}a{color:var(--jl-accent);text-decoration:none}a:hover{color:var(--jl-accent-strong);text-decoration:underline}:host([orientation=vertical]) .facts{grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:16px 24px}:host([orientation=vertical]) .fact{align-content:start;gap:2px;display:grid}@container (width<420px){.facts{grid-template-columns:minmax(0,1fr);gap:12px}.fact{gap:2px;display:grid}}";
|
|
3
|
+
export { jl_facts_default as default };
|
|
@@ -2,7 +2,7 @@ import { BASE_STYLES } from "../styles/shared.js";
|
|
|
2
2
|
import { JlElement } from "../base/jl-element.js";
|
|
3
3
|
import { jsonOf, oneOf } from "../lib/attributes.js";
|
|
4
4
|
import { setOrRemove } from "../lib/dom.js";
|
|
5
|
-
import jl_facts_default from "./jl-facts.
|
|
5
|
+
import jl_facts_default from "./jl-facts.css.js";
|
|
6
6
|
import { css } from "@jadis/core";
|
|
7
7
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|
|
8
8
|
// src/molecules/jl-facts.tsx
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/molecules/jl-field.css?inline
|
|
2
|
+
var jl_field_default = ":host{--label-width:160px;display:block;container-type:inline-size}.field{gap:6px;display:grid}.label-row{color:var(--jl-text);font-size:var(--jl-font-sm);gap:3px;font-weight:600;line-height:20px;display:flex}.asterisk{color:var(--jl-danger)}.body{grid-template-columns:minmax(0,1fr);gap:6px;min-width:0;display:grid}.hint{color:var(--jl-muted);font-size:var(--jl-font-sm);line-height:18px}.error-region:empty{display:contents}.error{color:var(--jl-danger);font-size:var(--jl-font-sm);align-items:flex-start;gap:6px;line-height:18px;display:flex}.error jl-icon{flex:none;margin-top:2px}:host([orientation=horizontal]) .field{grid-template-columns:var(--label-width) minmax(0, 1fr);align-items:baseline;gap:6px 16px}@container (width<=420px){:host([orientation=horizontal]) .field{grid-template-columns:minmax(0,1fr)}}";
|
|
3
|
+
export { jl_field_default as default };
|
|
@@ -3,7 +3,7 @@ import { JlElement } from "../base/jl-element.js";
|
|
|
3
3
|
import { oneOf } from "../lib/attributes.js";
|
|
4
4
|
import { registerIcons } from "../lib/icons.js";
|
|
5
5
|
import { JlIcon } from "../atoms/jl-icon.js";
|
|
6
|
-
import jl_field_default from "./jl-field.
|
|
6
|
+
import jl_field_default from "./jl-field.css.js";
|
|
7
7
|
import { css } from "@jadis/core";
|
|
8
8
|
import { CircleAlert } from "lucide";
|
|
9
9
|
import { jsx, jsxs } from "@jadis/core/jsx-runtime";
|