@syware/jlib 0.5.1 → 0.7.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.
Files changed (137) hide show
  1. package/dist/all.js +11 -4
  2. package/dist/atoms/jl-app-icon.css_raw.js +3 -0
  3. package/dist/atoms/jl-app-icon.d.ts +34 -0
  4. package/dist/atoms/jl-app-icon.js +86 -0
  5. package/dist/atoms/jl-avatar.js +1 -1
  6. package/dist/atoms/jl-badge.js +9 -2
  7. package/dist/atoms/jl-button.d.ts +5 -0
  8. package/dist/atoms/jl-button.js +5 -2
  9. package/dist/atoms/jl-chip.js +3 -2
  10. package/dist/atoms/jl-input.js +5 -4
  11. package/dist/atoms/jl-link.js +2 -2
  12. package/dist/atoms/jl-rating.js +4 -5
  13. package/dist/atoms/jl-select.css_raw.js +1 -1
  14. package/dist/atoms/jl-select.d.ts +3 -2
  15. package/dist/atoms/jl-select.js +6 -5
  16. package/dist/atoms/jl-spinner.js +2 -2
  17. package/dist/base/jl-form-control.js +2 -1
  18. package/dist/index.d.ts +10 -0
  19. package/dist/index.js +10 -3
  20. package/dist/lib/app-icon.d.ts +8 -0
  21. package/dist/lib/app-icon.js +37 -0
  22. package/dist/lib/dom.d.ts +2 -0
  23. package/dist/lib/dom.js +3 -1
  24. package/dist/lib/download.d.ts +10 -0
  25. package/dist/lib/download.js +62 -0
  26. package/dist/lib/icons.d.ts +4 -0
  27. package/dist/lib/icons.js +7 -4
  28. package/dist/lib/input-list.d.ts +12 -0
  29. package/dist/lib/input-list.js +14 -0
  30. package/dist/lib/internals.d.ts +5 -0
  31. package/dist/lib/internals.js +18 -0
  32. package/dist/lib/palette.js +6 -0
  33. package/dist/lib/resize.d.ts +2 -0
  34. package/dist/lib/resize.js +10 -0
  35. package/dist/lib/table.d.ts +6 -1
  36. package/dist/lib/table.js +16 -1
  37. package/dist/lib/text.d.ts +12 -0
  38. package/dist/lib/text.js +16 -1
  39. package/dist/lib/texts.d.ts +97 -0
  40. package/dist/lib/texts.js +102 -0
  41. package/dist/lib/time.d.ts +5 -3
  42. package/dist/lib/time.js +23 -15
  43. package/dist/lib/tree.d.ts +10 -1
  44. package/dist/lib/tree.js +37 -3
  45. package/dist/lib/trigger.js +1 -1
  46. package/dist/molecules/jl-account-button.css_raw.js +1 -1
  47. package/dist/molecules/jl-account-button.d.ts +8 -1
  48. package/dist/molecules/jl-account-button.js +9 -2
  49. package/dist/molecules/jl-alert.js +3 -2
  50. package/dist/molecules/jl-breadcrumb.js +3 -3
  51. package/dist/molecules/jl-calendar.js +5 -5
  52. package/dist/molecules/jl-chip-group.js +3 -3
  53. package/dist/molecules/jl-code-block.css_raw.js +1 -1
  54. package/dist/molecules/jl-code-block.d.ts +5 -0
  55. package/dist/molecules/jl-code-block.js +5 -2
  56. package/dist/molecules/jl-combobox.js +6 -7
  57. package/dist/molecules/jl-copy-button.js +5 -4
  58. package/dist/molecules/jl-date-picker.js +7 -8
  59. package/dist/molecules/jl-empty.js +2 -2
  60. package/dist/molecules/jl-facts.css_raw.js +3 -0
  61. package/dist/molecules/jl-facts.d.ts +35 -0
  62. package/dist/molecules/jl-facts.js +64 -0
  63. package/dist/molecules/jl-file-drop.d.ts +5 -0
  64. package/dist/molecules/jl-file-drop.js +18 -15
  65. package/dist/molecules/jl-input-list.css_raw.js +3 -0
  66. package/dist/molecules/jl-input-list.d.ts +79 -0
  67. package/dist/molecules/jl-input-list.js +177 -0
  68. package/dist/molecules/jl-list-item.js +1 -1
  69. package/dist/molecules/jl-load-more.css_raw.js +3 -0
  70. package/dist/molecules/jl-load-more.d.ts +41 -0
  71. package/dist/molecules/jl-load-more.js +62 -0
  72. package/dist/molecules/jl-load-state.d.ts +4 -1
  73. package/dist/molecules/jl-load-state.js +20 -12
  74. package/dist/molecules/jl-menu.js +1 -1
  75. package/dist/molecules/jl-number-input.js +5 -5
  76. package/dist/molecules/jl-pagination.js +5 -5
  77. package/dist/molecules/jl-radio-group.js +2 -2
  78. package/dist/molecules/jl-search-button.js +5 -5
  79. package/dist/molecules/jl-search.js +5 -5
  80. package/dist/molecules/jl-segmented.js +3 -2
  81. package/dist/molecules/jl-steps.css_raw.js +1 -1
  82. package/dist/molecules/jl-steps.d.ts +2 -0
  83. package/dist/molecules/jl-steps.js +30 -14
  84. package/dist/molecules/jl-tabs.js +3 -2
  85. package/dist/molecules/jl-tag-input.js +3 -3
  86. package/dist/molecules/jl-timeline.js +1 -1
  87. package/dist/molecules/jl-toast.css_raw.js +1 -1
  88. package/dist/molecules/jl-toast.d.ts +13 -1
  89. package/dist/molecules/jl-toast.js +23 -3
  90. package/dist/molecules/jl-tooltip.d.ts +4 -1
  91. package/dist/molecules/jl-tooltip.js +27 -15
  92. package/dist/organisms/jl-command-palette.css_raw.js +1 -1
  93. package/dist/organisms/jl-command-palette.d.ts +14 -0
  94. package/dist/organisms/jl-command-palette.js +40 -10
  95. package/dist/organisms/jl-confirm.d.ts +2 -1
  96. package/dist/organisms/jl-confirm.js +18 -12
  97. package/dist/organisms/jl-dialog.js +2 -1
  98. package/dist/organisms/jl-drawer.js +2 -1
  99. package/dist/organisms/jl-flow.js +13 -13
  100. package/dist/organisms/jl-navbar.js +6 -6
  101. package/dist/organisms/jl-side-nav.css_raw.js +1 -1
  102. package/dist/organisms/jl-side-nav.d.ts +33 -1
  103. package/dist/organisms/jl-side-nav.js +71 -14
  104. package/dist/organisms/jl-tab-bar.js +3 -3
  105. package/dist/organisms/jl-table.css_raw.js +1 -1
  106. package/dist/organisms/jl-table.d.ts +9 -0
  107. package/dist/organisms/jl-table.js +36 -6
  108. package/dist/organisms/jl-toaster.css_raw.js +1 -1
  109. package/dist/organisms/jl-toaster.d.ts +9 -1
  110. package/dist/organisms/jl-toaster.js +148 -7
  111. package/dist/organisms/jl-tree.css_raw.js +1 -1
  112. package/dist/organisms/jl-tree.d.ts +71 -4
  113. package/dist/organisms/jl-tree.js +303 -40
  114. package/dist/styles/tokens.css_raw.js +1 -1
  115. package/dist/templates/jl-app-shell.css_raw.js +1 -1
  116. package/dist/templates/jl-app-shell.d.ts +16 -1
  117. package/dist/templates/jl-app-shell.js +42 -3
  118. package/dist/templates/jl-auth-layout.css_raw.js +3 -0
  119. package/dist/templates/jl-auth-layout.d.ts +35 -0
  120. package/dist/templates/jl-auth-layout.js +139 -0
  121. package/dist/templates/jl-page.css_raw.js +1 -1
  122. package/dist/templates/jl-page.js +3 -3
  123. package/dist/templates/jl-split-view.css_raw.js +1 -1
  124. package/dist/templates/jl-split-view.d.ts +21 -1
  125. package/dist/templates/jl-split-view.js +37 -4
  126. package/dist/tokens.css +2 -0
  127. package/dist/types/jl-app-icon.types.d.ts +5 -0
  128. package/dist/types/jl-command-palette.types.d.ts +7 -0
  129. package/dist/types/jl-facts.types.d.ts +17 -0
  130. package/dist/types/jl-side-nav.types.d.ts +2 -0
  131. package/dist/types/jl-split-view.types.d.ts +2 -0
  132. package/dist/types/jl-steps.types.d.ts +2 -0
  133. package/dist/types/jl-table.types.d.ts +9 -2
  134. package/dist/types/jl-toaster.types.d.ts +42 -1
  135. package/dist/types/jl-tree.types.d.ts +26 -0
  136. package/dist/types/texts.types.d.ts +5 -0
  137. package/package.json +3 -3
package/dist/all.js CHANGED
@@ -8,8 +8,11 @@ import { PLACEMENTS, computePosition, followAnchor, placeFloating } from "./lib/
8
8
  import { COMMON_ICONS } from "./lib/icon-set.js";
9
9
  import { hasIcon, iconElement, iconNames, registerIcons } from "./lib/icons.js";
10
10
  import { CONTROL_SIZES, TONES, TONE_ICONS, TONE_ICON_FILLED } from "./lib/options.js";
11
+ import { cellOf } from "./lib/table.js";
11
12
  import { formatDuration, formatRelativeTime } from "./lib/time.js";
13
+ import { DEFAULT_TEXTS, jlText, setTexts } from "./lib/texts.js";
12
14
  import { JlIcon } from "./atoms/jl-icon.js";
15
+ import { JlAppIcon, setFavicon } from "./atoms/jl-app-icon.js";
13
16
  import { AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, JlAvatar } from "./atoms/jl-avatar.js";
14
17
  import { JlBadge } from "./atoms/jl-badge.js";
15
18
  import { JlSpinner } from "./atoms/jl-spinner.js";
@@ -42,9 +45,12 @@ import { CODE_LANGUAGES, JlCodeBlock } from "./molecules/jl-code-block.js";
42
45
  import { JlCombobox } from "./molecules/jl-combobox.js";
43
46
  import { JlDatePicker } from "./molecules/jl-date-picker.js";
44
47
  import { EMPTY_SIZES, JlEmpty } from "./molecules/jl-empty.js";
48
+ import { FACTS_ORIENTATIONS, JlFacts } from "./molecules/jl-facts.js";
45
49
  import { FIELD_ORIENTATIONS, JlField } from "./molecules/jl-field.js";
46
50
  import { JlFileDrop } from "./molecules/jl-file-drop.js";
51
+ import { JlInputList } from "./molecules/jl-input-list.js";
47
52
  import { JlListItem } from "./molecules/jl-list-item.js";
53
+ import { JlLoadMore } from "./molecules/jl-load-more.js";
48
54
  import { JlLoadState, LOAD_SKELETONS, LOAD_STATES } from "./molecules/jl-load-state.js";
49
55
  import { JlMenu } from "./molecules/jl-menu.js";
50
56
  import { JlNumberInput } from "./molecules/jl-number-input.js";
@@ -72,12 +78,13 @@ import { JlPageHeader } from "./organisms/jl-page-header.js";
72
78
  import { JlSideNav } from "./organisms/jl-side-nav.js";
73
79
  import { JlTabBar } from "./organisms/jl-tab-bar.js";
74
80
  import { JlTable, TABLE_SORT_DIRECTIONS } from "./organisms/jl-table.js";
75
- import { JlToaster, TOASTER_PLACEMENTS, toast } from "./organisms/jl-toaster.js";
81
+ import { JlToaster, TOASTER_PLACEMENTS, download, downloadTexts, toast } from "./organisms/jl-toaster.js";
76
82
  import { JlTree } from "./organisms/jl-tree.js";
77
83
  import { JlAppShell } from "./templates/jl-app-shell.js";
84
+ import { JlAuthLayout } from "./templates/jl-auth-layout.js";
78
85
  import { JlPage, PAGE_WIDTHS } from "./templates/jl-page.js";
79
- import { JlSplitView, SPLIT_ORIENTATIONS } from "./templates/jl-split-view.js";
86
+ import { JlSplitView, SPLIT_ORIENTATIONS, SPLIT_PANES } from "./templates/jl-split-view.js";
80
87
  // src/all.ts
81
88
  registerIcons(COMMON_ICONS);
82
- define(JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppShell, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlEmpty, JlField, JlFileDrop, JlFlow, JlIcon, JlInput, JlKbd, JlLink, JlListItem, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTable, JlTabPanel, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree);
83
- export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppShell, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlKbd, JlLink, JlListItem, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SKELETON_SHAPES, SPLIT_ORIENTATIONS, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_SORT_DIRECTIONS, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, clampedNumber, computePosition, confirmDialog, define, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jsonOf, oneOf, placeFloating, registerIcons, toast };
89
+ define(JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadMore, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTable, JlTabPanel, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree);
90
+ export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DEFAULT_TEXTS, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FACTS_ORIENTATIONS, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadMore, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SKELETON_SHAPES, SPLIT_ORIENTATIONS, SPLIT_PANES, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_SORT_DIRECTIONS, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, cellOf, clampedNumber, computePosition, confirmDialog, define, download, downloadTexts, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jlText, jsonOf, oneOf, placeFloating, registerIcons, setFavicon, setTexts, toast };
@@ -0,0 +1,3 @@
1
+ // src/atoms/jl-app-icon.css?raw
2
+ var jl_app_icon_default = ":host {\n display: inline-flex;\n flex: none;\n vertical-align: middle;\n}\n\n/* The same in both themes, as the favicon is: the brand's blue, the glyph in white. */\n.tile {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--size, 28px);\n height: var(--size, 28px);\n border-radius: var(--corner, 7px);\n background: var(--jl-brand);\n color: var(--jl-on-brand);\n}\n";
3
+ export { jl_app_icon_default as default };
@@ -0,0 +1,34 @@
1
+ import { JlElement } from '../base/jl-element';
2
+ /**
3
+ * Makes an app's icon the page's favicon: the tile `jl-app-icon` draws, its glyph a registered icon name, in the
4
+ * theme's `--jl-brand` and `--jl-on-brand` as the document has them, so a page's own theme shows in the tab too.
5
+ */
6
+ export declare function setFavicon(icon: string): void;
7
+ /**
8
+ * An app's icon: its glyph in white on a rounded tile of the brand's blue, one family for every SyWare app. Beside
9
+ * the wordmark at the top of the side nav, alone in a folded rail or a phone's top bar; the favicon and the home
10
+ * screen icon draw the same tile. The SyWare mark stays the company's. Decorative unless it has a `label`.
11
+ */
12
+ export declare class JlAppIcon extends JlElement {
13
+ static readonly selector = "jl-app-icon";
14
+ /** The app's glyph, a registered icon name: `workflow`, `package`. */
15
+ readonly icon: Readonly<Readonly<{
16
+ get(): string;
17
+ set(setter: string | ((prevState: string) => string)): void;
18
+ }>>;
19
+ /** The tile's side, in pixels. */
20
+ readonly size: Readonly<Readonly<{
21
+ get(): number;
22
+ set(setter: number | ((prevState: number) => number)): void;
23
+ }>>;
24
+ /** The app's name, for screen readers when no wordmark beside it says it. */
25
+ readonly label: Readonly<Readonly<{
26
+ get(): string;
27
+ set(setter: string | ((prevState: string) => string)): void;
28
+ }>>;
29
+ private readonly _refs;
30
+ templateHtml(): Node;
31
+ templateCss(): string;
32
+ private renderSize;
33
+ private renderLabel;
34
+ }
@@ -0,0 +1,86 @@
1
+ import { BASE_STYLES } from "../styles/shared.js";
2
+ import { adoptTokens } from "../lib/tokens.js";
3
+ import { JlElement } from "../base/jl-element.js";
4
+ import { clampedNumber } from "../lib/attributes.js";
5
+ import { iconNode } from "../lib/icons.js";
6
+ import { CORNER_SHARE, GLYPH_SHARE, appIconSvg } from "../lib/app-icon.js";
7
+ import jl_app_icon_default from "./jl-app-icon.css_raw.js";
8
+ import { JlIcon } from "./jl-icon.js";
9
+ import { css } from "@jadis/core";
10
+ import { jsx } from "@jadis/core/jsx-runtime";
11
+ // src/atoms/jl-app-icon.tsx
12
+ var DEFAULT_SIZE = 28;
13
+ var MIN_SIZE = 12;
14
+ var MAX_SIZE = 512;
15
+ var TILE_TOKEN = "--jl-brand";
16
+ var GLYPH_TOKEN = "--jl-on-brand";
17
+ var FAVICON_SELECTOR = "link[rel=\"icon\"]";
18
+ var FAVICON_REL = "icon";
19
+ var SVG_TYPE = "image/svg+xml";
20
+ /**
21
+ * Makes an app's icon the page's favicon: the tile `jl-app-icon` draws, its glyph a registered icon name, in the
22
+ * theme's `--jl-brand` and `--jl-on-brand` as the document has them, so a page's own theme shows in the tab too.
23
+ */
24
+ function setFavicon(icon) {
25
+ adoptTokens();
26
+ const style = getComputedStyle(document.documentElement);
27
+ const svg = appIconSvg(iconNode(icon), {
28
+ glyph: style.getPropertyValue(GLYPH_TOKEN).trim(),
29
+ tile: style.getPropertyValue(TILE_TOKEN).trim()
30
+ });
31
+ const link = document.head.querySelector(FAVICON_SELECTOR) ?? document.head.appendChild(document.createElement("link"));
32
+ link.rel = FAVICON_REL;
33
+ link.type = SVG_TYPE;
34
+ link.href = `data:${SVG_TYPE},${encodeURIComponent(svg)}`;
35
+ }
36
+ /**
37
+ * An app's icon: its glyph in white on a rounded tile of the brand's blue, one family for every SyWare app. Beside
38
+ * the wordmark at the top of the side nav, alone in a folded rail or a phone's top bar; the favicon and the home
39
+ * screen icon draw the same tile. The SyWare mark stays the company's. Decorative unless it has a `label`.
40
+ */
41
+ var JlAppIcon = class extends JlElement {
42
+ static selector = "jl-app-icon";
43
+ /** The app's glyph, a registered icon name: `workflow`, `package`. */
44
+ icon = this.useChange("", (value) => this._refs.glyph.name.set(value), { attribute: "icon" });
45
+ /** The tile's side, in pixels. */
46
+ size = this.useChange(DEFAULT_SIZE, (value) => this.renderSize(value), {
47
+ attribute: "size",
48
+ parse: clampedNumber(DEFAULT_SIZE, MIN_SIZE, MAX_SIZE)
49
+ });
50
+ /** The app's name, for screen readers when no wordmark beside it says it. */
51
+ label = this.useChange("", (value) => this.renderLabel(value), { attribute: "label" });
52
+ _refs = this.useRefs((ref) => ({
53
+ glyph: ref(JlIcon),
54
+ tile: ref(".tile")
55
+ }));
56
+ templateHtml() {
57
+ return /* @__PURE__ */ jsx("span", {
58
+ class: "tile",
59
+ "aria-hidden": "true",
60
+ attrs: { part: "base" },
61
+ children: /* @__PURE__ */ jsx(JlIcon, { size: Math.round(DEFAULT_SIZE * GLYPH_SHARE) })
62
+ });
63
+ }
64
+ templateCss() {
65
+ return css`${BASE_STYLES}${jl_app_icon_default}`;
66
+ }
67
+ renderSize(size) {
68
+ this._refs.tile.style.setProperty("--size", `${size}px`);
69
+ this._refs.tile.style.setProperty("--corner", `${Math.round(size * CORNER_SHARE)}px`);
70
+ this._refs.glyph.size.set(Math.round(size * GLYPH_SHARE));
71
+ }
72
+ renderLabel(label) {
73
+ const tile = this._refs.tile;
74
+ if (label === "") {
75
+ tile.setAttribute("aria-hidden", "true");
76
+ tile.removeAttribute("role");
77
+ tile.removeAttribute("aria-label");
78
+ return;
79
+ }
80
+ tile.removeAttribute("aria-hidden");
81
+ tile.setAttribute("role", "img");
82
+ tile.setAttribute("aria-label", label);
83
+ }
84
+ };
85
+ JlAppIcon.register();
86
+ export { JlAppIcon, setFavicon };
@@ -2,11 +2,11 @@ import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { registerIcons } from "../lib/icons.js";
5
+ import { JlIcon } from "./jl-icon.js";
5
6
  import { initialsOf, pickStable } from "../lib/avatar.js";
6
7
  import { setOrRemove } from "../lib/dom.js";
7
8
  import { hasSlotted } from "../lib/slots.js";
8
9
  import jl_avatar_default from "./jl-avatar.css_raw.js";
9
- import { JlIcon } from "./jl-icon.js";
10
10
  import { css } from "@jadis/core";
11
11
  import { User } from "lucide";
12
12
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -2,8 +2,8 @@ import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { TONES } from "../lib/options.js";
5
- import { setOrRemove } from "../lib/dom.js";
6
5
  import { JlIcon } from "./jl-icon.js";
6
+ import { setOrRemove } from "../lib/dom.js";
7
7
  import jl_badge_default from "./jl-badge.css_raw.js";
8
8
  import { css } from "@jadis/core";
9
9
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -31,11 +31,18 @@ var JlBadge = class extends JlElement {
31
31
  _refs = this.useRefs((ref) => ({
32
32
  badge: ref(".badge"),
33
33
  dot: ref(".dot"),
34
- icon: ref("jl-icon"),
34
+ icon: ref(JlIcon),
35
35
  label: ref(".label")
36
36
  }));
37
37
  /** Shows a state as an app's map of states describes it: its label, tone, icon and hint. */
38
38
  showStatus(look) {
39
+ const attributes = {
40
+ hint: look.hint ?? "",
41
+ icon: look.icon ?? "",
42
+ label: look.label,
43
+ tone: look.tone
44
+ };
45
+ for (const [name, value] of Object.entries(attributes)) setOrRemove(this, name, value);
39
46
  this.label.set(look.label);
40
47
  this.tone.set(look.tone);
41
48
  this.icon.set(look.icon ?? "");
@@ -67,6 +67,11 @@ export declare class JlButton extends JlElement {
67
67
  get(): string;
68
68
  set(setter: string | ((prevState: string) => string)): void;
69
69
  }>>;
70
+ /** With an `href`, saves what it points to as a file of this name instead of opening it. */
71
+ readonly download: Readonly<Readonly<{
72
+ get(): string;
73
+ set(setter: string | ((prevState: string) => string)): void;
74
+ }>>;
70
75
  private readonly _internals;
71
76
  private readonly _refs;
72
77
  focus(options?: FocusOptions): void;
@@ -2,8 +2,8 @@ import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { CONTROL_SIZES } from "../lib/options.js";
5
- import { setOrRemove } from "../lib/dom.js";
6
5
  import { JlIcon } from "./jl-icon.js";
6
+ import { setOrRemove } from "../lib/dom.js";
7
7
  import jl_button_default from "./jl-button.css_raw.js";
8
8
  import { JlSpinner } from "./jl-spinner.js";
9
9
  import { css } from "@jadis/core";
@@ -73,6 +73,8 @@ var JlButton = class extends JlElement {
73
73
  href = this.useChange("", () => this.renderLink(), { attribute: "href" });
74
74
  /** Where the link opens (`_blank` for a new tab), with an `href`. */
75
75
  target = this.useChange("", () => this.renderLink(), { attribute: "target" });
76
+ /** With an `href`, saves what it points to as a file of this name instead of opening it. */
77
+ download = this.useChange("", () => this.renderLink(), { attribute: "download" });
76
78
  _internals = this.attachInternals();
77
79
  _refs = this.useRefs((ref) => ({
78
80
  button: ref("button"),
@@ -81,7 +83,7 @@ var JlButton = class extends JlElement {
81
83
  label: ref(".text"),
82
84
  link: ref("a"),
83
85
  slot: ref("slot"),
84
- spinner: ref("jl-spinner"),
86
+ spinner: ref(JlSpinner),
85
87
  start: ref(".start")
86
88
  }));
87
89
  focus(options) {
@@ -154,6 +156,7 @@ var JlButton = class extends JlElement {
154
156
  link.hidden = !isLink;
155
157
  setOrRemove(link, "href", isLink && !off ? href : "");
156
158
  setOrRemove(link, "target", target);
159
+ setOrRemove(link, "download", this.download.get());
157
160
  setOrRemove(link, "rel", target === NEW_TAB ? SAFE_REL : "");
158
161
  setOrRemove(link, "role", off ? "link" : "");
159
162
  setOrRemove(link, "aria-disabled", off ? "true" : "");
@@ -2,6 +2,7 @@ import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { registerIcons } from "../lib/icons.js";
5
+ import { jlText } from "../lib/texts.js";
5
6
  import { JlIcon } from "./jl-icon.js";
6
7
  import { isActivationKey } from "../lib/surface.js";
7
8
  import jl_chip_default from "./jl-chip.css_raw.js";
@@ -91,7 +92,7 @@ var JlChip = class extends JlElement {
91
92
  }), /* @__PURE__ */ jsx("button", {
92
93
  class: "dismiss",
93
94
  type: "button",
94
- "aria-label": "Remove",
95
+ "aria-label": jlText("remove"),
95
96
  hidden: true,
96
97
  children: /* @__PURE__ */ jsx(JlIcon, { name: "x" })
97
98
  })]
@@ -152,7 +153,7 @@ var JlChip = class extends JlElement {
152
153
  renderLabel() {
153
154
  const label = this.label.get();
154
155
  this._refs.label.textContent = label;
155
- this._refs.dismiss.setAttribute("aria-label", label === "" ? "Remove" : `Remove ${label}`);
156
+ this._refs.dismiss.setAttribute("aria-label", label === "" ? jlText("remove") : jlText("removeNamed", { name: label }));
156
157
  }
157
158
  renderSize(size) {
158
159
  this.reflect("size", size);
@@ -3,8 +3,9 @@ import { JlFormControl } from "../base/jl-form-control.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { registerIcons } from "../lib/icons.js";
5
5
  import { CONTROL_SIZES } from "../lib/options.js";
6
- import { setOrRemove } from "../lib/dom.js";
6
+ import { jlText } from "../lib/texts.js";
7
7
  import { JlIcon } from "./jl-icon.js";
8
+ import { setOrRemove } from "../lib/dom.js";
8
9
  import jl_input_default from "./jl-input.css_raw.js";
9
10
  import { css } from "@jadis/core";
10
11
  import { Eye, EyeOff, X } from "lucide";
@@ -107,7 +108,7 @@ var JlInput = class extends JlFormControl {
107
108
  /* @__PURE__ */ jsx("button", {
108
109
  class: "action clear",
109
110
  type: "button",
110
- "aria-label": "Clear",
111
+ "aria-label": jlText("clear"),
111
112
  tabIndex: -1,
112
113
  hidden: true,
113
114
  children: /* @__PURE__ */ jsx(JlIcon, {
@@ -118,7 +119,7 @@ var JlInput = class extends JlFormControl {
118
119
  /* @__PURE__ */ jsx("button", {
119
120
  class: "action reveal",
120
121
  type: "button",
121
- "aria-label": "Show the password",
122
+ "aria-label": jlText("showPassword"),
122
123
  hidden: true,
123
124
  children: /* @__PURE__ */ jsx(JlIcon, {
124
125
  name: "eye",
@@ -163,7 +164,7 @@ var JlInput = class extends JlFormControl {
163
164
  const revealed = native.type === PASSWORD;
164
165
  native.type = revealed ? REVEALED : PASSWORD;
165
166
  this._refs.revealIcon.name.set(revealed ? "eye-off" : "eye");
166
- this._refs.reveal.setAttribute("aria-label", revealed ? "Hide the password" : "Show the password");
167
+ this._refs.reveal.setAttribute("aria-label", revealed ? jlText("hidePassword") : jlText("showPassword"));
167
168
  }
168
169
  renderValue(value) {
169
170
  const native = this._refs.native;
@@ -2,8 +2,8 @@ import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
3
  import { oneOf } from "../lib/attributes.js";
4
4
  import { registerIcons } from "../lib/icons.js";
5
- import { setOrRemove } from "../lib/dom.js";
6
5
  import { JlIcon } from "./jl-icon.js";
6
+ import { setOrRemove } from "../lib/dom.js";
7
7
  import jl_link_default from "./jl-link.css_raw.js";
8
8
  import { css } from "@jadis/core";
9
9
  import { ExternalLink } from "lucide";
@@ -39,7 +39,7 @@ var JlLink = class extends JlElement {
39
39
  });
40
40
  _refs = this.useRefs((ref) => ({
41
41
  anchor: ref("a"),
42
- icon: ref("jl-icon"),
42
+ icon: ref(JlIcon),
43
43
  label: ref(".label"),
44
44
  newTab: ref(".new-tab")
45
45
  }));
@@ -3,6 +3,7 @@ import { JlFormControl } from "../base/jl-form-control.js";
3
3
  import { clampedNumber, oneOf } from "../lib/attributes.js";
4
4
  import { iconElement, registerIcons } from "../lib/icons.js";
5
5
  import { CONTROL_SIZES } from "../lib/options.js";
6
+ import { jlText } from "../lib/texts.js";
6
7
  import { ratingAfterChoice, ratingAfterKey } from "../lib/rating.js";
7
8
  import jl_rating_default from "./jl-rating.css_raw.js";
8
9
  import { css } from "@jadis/core";
@@ -18,8 +19,6 @@ var ICON_SIZES = {
18
19
  var DEFAULT_MAX = 5;
19
20
  var MAX_LIMIT = 10;
20
21
  var NO_PREVIEW = 0;
21
- var DEFAULT_LABEL = "Rating";
22
- var VALUE_MISSING = "Choose a rating.";
23
22
  /**
24
23
  * A row of stars (or hearts, or any icon) to give a score: a click, the arrows or a digit set it, and choosing the
25
24
  * score already given clears it. Hovering previews the score a click would give.
@@ -50,8 +49,8 @@ var JlRating = class extends JlFormControl {
50
49
  parse: oneOf(CONTROL_SIZES, "md")
51
50
  });
52
51
  /** The name screen readers give the scale. */
53
- label = this.useChange(DEFAULT_LABEL, (value) => {
54
- this._refs.slider.setAttribute("aria-label", value === "" ? DEFAULT_LABEL : value);
52
+ label = this.useChange(jlText("rating"), (value) => {
53
+ this._refs.slider.setAttribute("aria-label", value === "" ? jlText("rating") : value);
55
54
  }, { attribute: "label" });
56
55
  required = this.useChange(false, (value) => {
57
56
  this._refs.slider.toggleAttribute("aria-required", value);
@@ -167,7 +166,7 @@ var JlRating = class extends JlFormControl {
167
166
  }
168
167
  renderValidity() {
169
168
  if (this.required.get() && this.current() === 0) {
170
- this.internals.setValidity({ valueMissing: true }, VALUE_MISSING, this._refs.slider);
169
+ this.internals.setValidity({ valueMissing: true }, jlText("chooseRating"), this._refs.slider);
171
170
  return;
172
171
  }
173
172
  this.internals.setValidity({});
@@ -1,3 +1,3 @@
1
1
  // src/atoms/jl-select.css?raw
2
- var jl_select_default = ":host {\n display: block;\n}\n\n/* The select covers the whole frame, chevron included, so a click anywhere opens it. */\n.control {\n position: relative;\n padding: 0;\n}\n\n.native {\n padding: 0 36px 0 12px;\n border-radius: inherit;\n text-overflow: ellipsis;\n cursor: pointer;\n appearance: none;\n}\n\n.native:disabled {\n cursor: not-allowed;\n}\n\n:host([placeholder-shown]) .native {\n color: var(--jl-faint);\n}\n\n/* The list keeps the text colour even while the placeholder greys the closed field. */\noption,\noptgroup {\n background: var(--jl-surface);\n color: var(--jl-text);\n}\n\n.chevron {\n position: absolute;\n right: 12px;\n color: var(--jl-muted);\n pointer-events: none;\n}\n\n:host([disabled]) .chevron {\n color: var(--jl-faint);\n}\n";
2
+ var jl_select_default = ":host {\n display: block;\n}\n\n/* The select covers the whole frame, chevron included, so a click anywhere opens it. */\n.control {\n position: relative;\n padding: 0;\n}\n\n.native {\n padding: 0 36px 0 12px;\n border-radius: inherit;\n text-overflow: ellipsis;\n cursor: pointer;\n appearance: none;\n}\n\n.native:disabled {\n cursor: not-allowed;\n}\n\n:host([placeholder-shown]) .native {\n color: var(--jl-faint);\n}\n\n/* The list keeps the text colour even while the placeholder greys the closed field. */\noption,\noptgroup {\n background: var(--jl-surface);\n color: var(--jl-text);\n}\n\n.chevron {\n position: absolute;\n right: 12px;\n color: var(--jl-muted);\n pointer-events: none;\n transition: transform var(--jl-fast) var(--jl-ease);\n}\n\n.native:open + .chevron {\n transform: rotate(180deg);\n}\n\n:host([disabled]) .chevron {\n color: var(--jl-faint);\n}\n\n/*\n * Where the browser lets the page draw the list (customizable select), it is the combobox's: the same panel, rows\n * and check. Touch screens keep the platform's own sheet, and other browsers their own list.\n */\n@media (hover: hover) and (pointer: fine) {\n @supports (appearance: base-select) {\n /* The list lines up with the frame, not with the select inside its border. */\n .control {\n anchor-name: --frame;\n }\n\n .native,\n .native::picker(select) {\n appearance: base-select;\n }\n\n /*\n * The browser draws the chosen label in a box of its own, out of text-overflow's reach: clamped to one line and\n * clipped at the padding, it still ends with an ellipsis.\n */\n .native {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n padding-block: calc((var(--height, var(--jl-control-md)) - 2px - 1lh) / 2);\n overflow: clip;\n overflow-clip-margin: content-box;\n }\n\n .native::picker-icon {\n display: none;\n }\n\n .native::picker(select) {\n position-anchor: --frame;\n /* Under the field when it fits there, as the combobox's list. */\n position-try-order: normal;\n box-sizing: border-box;\n min-inline-size: anchor-size(self-inline);\n max-block-size: 274px;\n margin-block: 6px;\n padding: 4px;\n border: 1px solid var(--jl-line);\n border-radius: var(--jl-radius);\n background: var(--jl-surface);\n color: var(--jl-text);\n box-shadow: var(--jl-shadow-lg);\n animation: jl-float-in var(--jl-fast) var(--jl-ease);\n }\n\n /*\n * A heading as the command palette's. The browser draws the label itself, half an em in: text-indent reaches it\n * and lines it up with the options' text.\n */\n optgroup {\n padding-block-start: 8px;\n color: var(--jl-muted);\n font-size: var(--jl-font-xs);\n font-weight: 600;\n text-indent: calc(10px - 0.5em);\n }\n\n optgroup > option:first-of-type {\n margin-block-start: 4px;\n }\n\n option {\n box-sizing: border-box;\n gap: 10px;\n min-block-size: 34px;\n padding: 6px 10px;\n border-radius: var(--jl-radius-xs);\n font-size: var(--jl-font-md);\n font-weight: 400;\n line-height: 1.35;\n text-indent: 0;\n cursor: pointer;\n }\n\n option:enabled:is(:hover, :focus-visible) {\n background: var(--jl-surface-3);\n box-shadow: none;\n }\n\n option:checked {\n font-weight: 600;\n }\n\n option:disabled {\n color: var(--jl-faint);\n cursor: not-allowed;\n }\n\n /* Lucide's check, at the end of the row as in the combobox. */\n option::checkmark {\n order: 1;\n width: 14px;\n height: 14px;\n margin-inline-start: auto;\n background: var(--jl-accent);\n content: \"\";\n mask:\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E\")\n center / contain no-repeat;\n }\n }\n}\n";
3
3
  export { jl_select_default as default };
@@ -2,8 +2,9 @@ import { JlFormControl } from '../base/jl-form-control';
2
2
  import type { SelectOption } from '../types/jl-select.types';
3
3
  import type { ControlSize } from '../types/options.types';
4
4
  /**
5
- * A choice among a list, on the browser's own `<select>`: its list opens the way the platform does it. The choices
6
- * come from `options` (JSON) or from `<option>` and `<optgroup>` elements written inside it.
5
+ * A choice among a list, on the browser's own `<select>`: its list opens the way the platform does it on a touch
6
+ * screen, and with a mouse looks like the combobox's where the browser lets the page draw it (customizable select).
7
+ * The choices come from `options` (JSON) or from `<option>` and `<optgroup>` elements written inside it.
7
8
  */
8
9
  export declare class JlSelect extends JlFormControl {
9
10
  static readonly selector = "jl-select";
@@ -1,10 +1,10 @@
1
- import { BASE_STYLES, CONTROL_STYLES } from "../styles/shared.js";
1
+ import { BASE_STYLES, CONTROL_STYLES, FLOATING_STYLES } from "../styles/shared.js";
2
2
  import { JlFormControl } from "../base/jl-form-control.js";
3
3
  import { jsonOf, oneOf } from "../lib/attributes.js";
4
4
  import { registerIcons } from "../lib/icons.js";
5
5
  import { CONTROL_SIZES } from "../lib/options.js";
6
- import { setOrRemove } from "../lib/dom.js";
7
6
  import { JlIcon } from "./jl-icon.js";
7
+ import { setOrRemove } from "../lib/dom.js";
8
8
  import { groupOptions } from "../lib/option-groups.js";
9
9
  import jl_select_default from "./jl-select.css_raw.js";
10
10
  import { css } from "@jadis/core";
@@ -29,8 +29,9 @@ var groupNodes = (group) => {
29
29
  })];
30
30
  };
31
31
  /**
32
- * A choice among a list, on the browser's own `<select>`: its list opens the way the platform does it. The choices
33
- * come from `options` (JSON) or from `<option>` and `<optgroup>` elements written inside it.
32
+ * A choice among a list, on the browser's own `<select>`: its list opens the way the platform does it on a touch
33
+ * screen, and with a mouse looks like the combobox's where the browser lets the page draw it (customizable select).
34
+ * The choices come from `options` (JSON) or from `<option>` and `<optgroup>` elements written inside it.
34
35
  */
35
36
  var JlSelect = class extends JlFormControl {
36
37
  static selector = "jl-select";
@@ -81,7 +82,7 @@ var JlSelect = class extends JlFormControl {
81
82
  });
82
83
  }
83
84
  templateCss() {
84
- return css`${BASE_STYLES}${CONTROL_STYLES}${jl_select_default}`;
85
+ return css`${BASE_STYLES}${CONTROL_STYLES}${FLOATING_STYLES}${jl_select_default}`;
85
86
  }
86
87
  onConnect() {
87
88
  const native = this._refs.native;
@@ -1,16 +1,16 @@
1
1
  import { BASE_STYLES } from "../styles/shared.js";
2
2
  import { JlElement } from "../base/jl-element.js";
3
+ import { jlText } from "../lib/texts.js";
3
4
  import jl_spinner_default from "./jl-spinner.css_raw.js";
4
5
  import { css } from "@jadis/core";
5
6
  import { jsx } from "@jadis/core/jsx-runtime";
6
7
  // src/atoms/jl-spinner.tsx
7
8
  var DEFAULT_SIZE = 16;
8
- var DEFAULT_LABEL = "Loading";
9
9
  /** A turning ring for work in progress. It follows the text colour; `label` is what screen readers say. */
10
10
  var JlSpinner = class extends JlElement {
11
11
  static selector = "jl-spinner";
12
12
  size = this.useChange(DEFAULT_SIZE, (value) => this.style.setProperty("--size", `${value}px`), { attribute: "size" });
13
- label = this.useChange(DEFAULT_LABEL, (value) => this._refs.ring.setAttribute("aria-label", value), { attribute: "label" });
13
+ label = this.useChange(jlText("loading"), (value) => this._refs.ring.setAttribute("aria-label", value), { attribute: "label" });
14
14
  _refs = this.useRefs((ref) => ({ ring: ref(".ring") }));
15
15
  templateHtml() {
16
16
  return /* @__PURE__ */ jsx("span", {
@@ -1,4 +1,5 @@
1
1
  import { JlElement } from "./jl-element.js";
2
+ import { formInternals } from "../lib/internals.js";
2
3
  // src/base/jl-form-control.ts
3
4
  /**
4
5
  * The base of the components a form submits: they take part in `<form>` like native fields (their `name`, their
@@ -6,7 +7,7 @@ import { JlElement } from "./jl-element.js";
6
7
  */
7
8
  var JlFormControl = class extends JlElement {
8
9
  static formAssociated = true;
9
- internals = this.attachInternals();
10
+ internals = formInternals(this);
10
11
  /** The field's name in the form's data. Reflected, so a name set from JSX reaches the form too. */
11
12
  name = this.useChange("", (value) => this.reflect("name", value), { attribute: "name" });
12
13
  get form() {
package/dist/index.d.ts CHANGED
@@ -6,7 +6,9 @@ export { computePosition, followAnchor, PLACEMENTS, placeFloating } from './lib/
6
6
  export { COMMON_ICONS } from './lib/icon-set';
7
7
  export { hasIcon, iconElement, iconNames, registerIcons } from './lib/icons';
8
8
  export { CONTROL_SIZES, TONE_ICON_FILLED, TONE_ICONS, TONES } from './lib/options';
9
+ export { cellOf } from './lib/table';
9
10
  export { formatDuration, formatRelativeTime } from './lib/time';
11
+ export { DEFAULT_TEXTS, jlText, setTexts } from './lib/texts';
10
12
  export { adoptTokens } from './lib/tokens';
11
13
  export { BASE_STYLES, CONTROL_STYLES, FLOATING_STYLES, TOKEN_STYLES } from './styles/shared';
12
14
  export type * from './types/calendar.types';
@@ -16,6 +18,7 @@ export type * from './types/fuzzy.types';
16
18
  export type * from './types/highlight.types';
17
19
  export type * from './types/hotkey.types';
18
20
  export type * from './types/jl-accordion.types';
21
+ export type * from './types/jl-app-icon.types';
19
22
  export type * from './types/jl-avatar.types';
20
23
  export type * from './types/jl-badge.types';
21
24
  export type * from './types/jl-breadcrumb.types';
@@ -30,6 +33,7 @@ export type * from './types/jl-dialog.types';
30
33
  export type * from './types/jl-divider.types';
31
34
  export type * from './types/jl-drawer.types';
32
35
  export type * from './types/jl-empty.types';
36
+ export type * from './types/jl-facts.types';
33
37
  export type * from './types/jl-field.types';
34
38
  export type * from './types/jl-flow.types';
35
39
  export type * from './types/jl-input.types';
@@ -63,6 +67,8 @@ export type * from './types/options.types';
63
67
  export type * from './types/pagination.types';
64
68
  export type * from './types/roving-index.types';
65
69
  export type * from './types/sparkline.types';
70
+ export type * from './types/texts.types';
71
+ export * from './atoms/jl-app-icon';
66
72
  export * from './atoms/jl-avatar';
67
73
  export * from './atoms/jl-badge';
68
74
  export * from './atoms/jl-button';
@@ -96,9 +102,12 @@ export * from './molecules/jl-combobox';
96
102
  export * from './molecules/jl-copy-button';
97
103
  export * from './molecules/jl-date-picker';
98
104
  export * from './molecules/jl-empty';
105
+ export * from './molecules/jl-facts';
99
106
  export * from './molecules/jl-field';
100
107
  export * from './molecules/jl-file-drop';
108
+ export * from './molecules/jl-input-list';
101
109
  export * from './molecules/jl-list-item';
110
+ export * from './molecules/jl-load-more';
102
111
  export * from './molecules/jl-load-state';
103
112
  export * from './molecules/jl-menu';
104
113
  export * from './molecules/jl-number-input';
@@ -129,5 +138,6 @@ export * from './organisms/jl-table';
129
138
  export * from './organisms/jl-toaster';
130
139
  export * from './organisms/jl-tree';
131
140
  export * from './templates/jl-app-shell';
141
+ export * from './templates/jl-auth-layout';
132
142
  export * from './templates/jl-page';
133
143
  export * from './templates/jl-split-view';
package/dist/index.js CHANGED
@@ -8,8 +8,11 @@ import { PLACEMENTS, computePosition, followAnchor, placeFloating } from "./lib/
8
8
  import { COMMON_ICONS } from "./lib/icon-set.js";
9
9
  import { hasIcon, iconElement, iconNames, registerIcons } from "./lib/icons.js";
10
10
  import { CONTROL_SIZES, TONES, TONE_ICONS, TONE_ICON_FILLED } from "./lib/options.js";
11
+ import { cellOf } from "./lib/table.js";
11
12
  import { formatDuration, formatRelativeTime } from "./lib/time.js";
13
+ import { DEFAULT_TEXTS, jlText, setTexts } from "./lib/texts.js";
12
14
  import { JlIcon } from "./atoms/jl-icon.js";
15
+ import { JlAppIcon, setFavicon } from "./atoms/jl-app-icon.js";
13
16
  import { AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, JlAvatar } from "./atoms/jl-avatar.js";
14
17
  import { JlBadge } from "./atoms/jl-badge.js";
15
18
  import { JlSpinner } from "./atoms/jl-spinner.js";
@@ -42,9 +45,12 @@ import { CODE_LANGUAGES, JlCodeBlock } from "./molecules/jl-code-block.js";
42
45
  import { JlCombobox } from "./molecules/jl-combobox.js";
43
46
  import { JlDatePicker } from "./molecules/jl-date-picker.js";
44
47
  import { EMPTY_SIZES, JlEmpty } from "./molecules/jl-empty.js";
48
+ import { FACTS_ORIENTATIONS, JlFacts } from "./molecules/jl-facts.js";
45
49
  import { FIELD_ORIENTATIONS, JlField } from "./molecules/jl-field.js";
46
50
  import { JlFileDrop } from "./molecules/jl-file-drop.js";
51
+ import { JlInputList } from "./molecules/jl-input-list.js";
47
52
  import { JlListItem } from "./molecules/jl-list-item.js";
53
+ import { JlLoadMore } from "./molecules/jl-load-more.js";
48
54
  import { JlLoadState, LOAD_SKELETONS, LOAD_STATES } from "./molecules/jl-load-state.js";
49
55
  import { JlMenu } from "./molecules/jl-menu.js";
50
56
  import { JlNumberInput } from "./molecules/jl-number-input.js";
@@ -72,9 +78,10 @@ import { JlPageHeader } from "./organisms/jl-page-header.js";
72
78
  import { JlSideNav } from "./organisms/jl-side-nav.js";
73
79
  import { JlTabBar } from "./organisms/jl-tab-bar.js";
74
80
  import { JlTable, TABLE_SORT_DIRECTIONS } from "./organisms/jl-table.js";
75
- import { JlToaster, TOASTER_PLACEMENTS, toast } from "./organisms/jl-toaster.js";
81
+ import { JlToaster, TOASTER_PLACEMENTS, download, downloadTexts, toast } from "./organisms/jl-toaster.js";
76
82
  import { JlTree } from "./organisms/jl-tree.js";
77
83
  import { JlAppShell } from "./templates/jl-app-shell.js";
84
+ import { JlAuthLayout } from "./templates/jl-auth-layout.js";
78
85
  import { JlPage, PAGE_WIDTHS } from "./templates/jl-page.js";
79
- import { JlSplitView, SPLIT_ORIENTATIONS } from "./templates/jl-split-view.js";
80
- export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppShell, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlKbd, JlLink, JlListItem, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SKELETON_SHAPES, SPLIT_ORIENTATIONS, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_SORT_DIRECTIONS, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, clampedNumber, computePosition, confirmDialog, define, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jsonOf, oneOf, placeFloating, registerIcons, toast };
86
+ import { JlSplitView, SPLIT_ORIENTATIONS, SPLIT_PANES } from "./templates/jl-split-view.js";
87
+ export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DEFAULT_TEXTS, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FACTS_ORIENTATIONS, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadMore, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SKELETON_SHAPES, SPLIT_ORIENTATIONS, SPLIT_PANES, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_SORT_DIRECTIONS, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, cellOf, clampedNumber, computePosition, confirmDialog, define, download, downloadTexts, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jlText, jsonOf, oneOf, placeFloating, registerIcons, setFavicon, setTexts, toast };
@@ -0,0 +1,8 @@
1
+ import type { IconNode } from 'lucide';
2
+ import type { AppIconColors } from '../types/jl-app-icon.types';
3
+ /** The glyph's share of the tile's side, at every size. */
4
+ export declare const GLYPH_SHARE = 0.62;
5
+ /** The corner's share of the tile's side. */
6
+ export declare const CORNER_SHARE = 0.26;
7
+ /** An app's icon as the text of an SVG file: its glyph in `colors.glyph` on a rounded square of `colors.tile`. */
8
+ export declare function appIconSvg(glyph: IconNode, colors: AppIconColors): string;