@kubex/zinc 1.0.119 → 1.1.1

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 (100) hide show
  1. package/dist/custom-elements.json +453 -20
  2. package/dist/vscode.html-custom-data.json +87 -11
  3. package/dist/web-types.json +168 -12
  4. package/dist/zn.d.ts +153 -27
  5. package/dist/zn.min.css +1 -1
  6. package/dist/zn.min.js +904 -867
  7. package/docs/assets/styles/docs.css +1 -1
  8. package/docs/pages/components/button.md +25 -7
  9. package/docs/pages/components/chat-message.md +62 -0
  10. package/docs/pages/components/data-table-search.md +6 -6
  11. package/docs/pages/components/editor.md +1 -1
  12. package/docs/pages/components/file.md +1 -1
  13. package/docs/pages/components/form-group.md +1 -1
  14. package/docs/pages/components/icon.md +19 -2
  15. package/docs/pages/components/menu.md +23 -2
  16. package/docs/pages/components/select.md +2 -2
  17. package/docs/pages/components/tile-group.md +92 -0
  18. package/docs/pages/components/tile.md +80 -25
  19. package/package.json +1 -1
  20. package/scss/_root.scss +1 -1
  21. package/scss/mixins/_spacing-mixins.scss +20 -0
  22. package/scss/mixins/_typography-mixins.scss +22 -0
  23. package/scss/mixins/index.scss +2 -1
  24. package/scss/shared/_base.scss +18 -20
  25. package/scss/shared/_button.scss +5 -3
  26. package/scss/shared/_table.scss +4 -1
  27. package/scss/shared/layout.scss +2 -2
  28. package/scss/themes/_index.scss +2 -0
  29. package/scss/themes/_light.scss +22 -45
  30. package/scss/themes/_spacing.scss +44 -0
  31. package/scss/themes/_typography.scss +62 -0
  32. package/src/components/animated-button/README.md +1 -1
  33. package/src/components/button/button.component.ts +27 -5
  34. package/src/components/button/button.scss +86 -30
  35. package/src/components/button-menu/button-menu.component.ts +22 -9
  36. package/src/components/button-menu/button-menu.scss +1 -2
  37. package/src/components/button-menu/button-menu.test.ts +18 -0
  38. package/src/components/chat-message/chat-message.component.ts +73 -0
  39. package/src/components/chat-message/chat-message.scss +60 -0
  40. package/src/components/chat-message/index.ts +12 -0
  41. package/src/components/checkbox/checkbox.scss +2 -2
  42. package/src/components/chip/chip.component.ts +0 -5
  43. package/src/components/chip/chip.scss +14 -35
  44. package/src/components/collapsible/collapsible.scss +4 -0
  45. package/src/components/content-block/content-block.component.ts +46 -45
  46. package/src/components/content-block/content-block.scss +58 -27
  47. package/src/components/data-table/data-table.scss +10 -7
  48. package/src/components/data-table-sort/data-table-sort.scss +1 -1
  49. package/src/components/dialog/dialog.component.ts +3 -3
  50. package/src/components/dialog/dialog.scss +2 -2
  51. package/src/components/dropdown/dropdown.component.ts +1 -0
  52. package/src/components/editor/editor.component.ts +3 -1
  53. package/src/components/editor/editor.scss +9 -2
  54. package/src/components/editor/modules/ai/panel/ai-panel.scss +2 -2
  55. package/src/components/editor/modules/ai/tooltip/ai-tooltip.scss +1 -1
  56. package/src/components/editor/modules/context-menu/context-menu.ts +20 -20
  57. package/src/components/editor/modules/dialog/dialog.component.ts +3 -4
  58. package/src/components/editor/modules/dialog/dialog.scss +2 -1
  59. package/src/components/editor/modules/dialog/dialog.ts +12 -8
  60. package/src/components/editor/modules/toolbar/tool/tool.component.ts +1 -5
  61. package/src/components/editor/modules/toolbar/toolbar.component.ts +54 -50
  62. package/src/components/editor/modules/toolbar/toolbar.scss +4 -29
  63. package/src/components/editor/modules/toolbar/toolbar.ts +15 -17
  64. package/src/components/expanding-action/expanding-action.component.ts +14 -7
  65. package/src/components/expanding-action/expanding-action.scss +44 -2
  66. package/src/components/file/file.scss +2 -2
  67. package/src/components/header/header.component.ts +1 -1
  68. package/src/components/header/header.scss +3 -3
  69. package/src/components/hover-container/hover-container.scss +1 -1
  70. package/src/components/icon/icon.component.ts +6 -1
  71. package/src/components/icon/icon.scss +31 -0
  72. package/src/components/icon-picker/icon-picker.scss +3 -3
  73. package/src/components/input/input.scss +3 -3
  74. package/src/components/input-group/input-group.scss +16 -16
  75. package/src/components/markdown-editor/markdown-editor.scss +2 -2
  76. package/src/components/menu/menu.component.ts +32 -1
  77. package/src/components/menu/menu.scss +28 -5
  78. package/src/components/menu-item/menu-item.component.ts +6 -2
  79. package/src/components/menu-item/menu-item.scss +49 -5
  80. package/src/components/navbar/navbar.component.ts +7 -4
  81. package/src/components/navbar/navbar.scss +93 -21
  82. package/src/components/page/page.component.ts +1 -1
  83. package/src/components/page/page.scss +7 -26
  84. package/src/components/panel/panel.scss +5 -8
  85. package/src/components/priority-list/priority-list.scss +1 -1
  86. package/src/components/rating/rating.scss +1 -1
  87. package/src/components/scroll-container/scroll-container.scss +2 -1
  88. package/src/components/select/select.scss +1 -1
  89. package/src/components/settings-container/settings-container.scss +2 -2
  90. package/src/components/stat/stat.scss +8 -5
  91. package/src/components/tile/tile.component.ts +10 -2
  92. package/src/components/tile/tile.scss +108 -67
  93. package/src/components/tile-group/index.ts +12 -0
  94. package/src/components/tile-group/tile-group.component.ts +66 -0
  95. package/src/components/tile-group/tile-group.scss +23 -0
  96. package/src/form-control.scss +2 -1
  97. package/src/internal/zinc-element.ts +6 -1
  98. package/src/wc.scss +1 -0
  99. package/src/zinc.ts +2 -0
  100. package/src/components/editor/modules/toolbar/tool/tool.scss +0 -5
package/dist/zn.d.ts CHANGED
@@ -61,8 +61,10 @@ declare module "internal/event" {
61
61
  declare module "internal/zinc-element" {
62
62
  import { LitElement, type PropertyValues } from "lit";
63
63
  import type { EventTypeDoesNotRequireDetail, EventTypeRequiresDetail, EventTypesWithoutRequiredDetail, EventTypesWithRequiredDetail, GetCustomEventType, ZincEventInit } from "internal/event";
64
- const ZincElement_base: typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
65
- export default class ZincElement extends ZincElement_base {
64
+ import type { SignalWatcherApi } from "@lit-labs/signals";
65
+ type Constructor<T = NonNullable<unknown>> = new (...args: any[]) => T;
66
+ const ZincElementBase: typeof LitElement & Constructor<SignalWatcherApi>;
67
+ export default class ZincElement extends ZincElementBase {
66
68
  dir: string;
67
69
  lang: string;
68
70
  t: string;
@@ -516,7 +518,7 @@ declare module "utilities/sha256" {
516
518
  declare module "components/icon/icon.component" {
517
519
  import { type CSSResultGroup } from 'lit';
518
520
  import ZincElement from "internal/zinc-element";
519
- type IconLibrary = "src" | "material" | "material-outlined" | "material-round" | "material-sharp" | "material-two-tone" | "material-symbols-outlined" | "gravatar" | "libravatar" | "avatar" | "brands" | "line" | "lucide";
521
+ export type IconLibrary = "src" | "material" | "material-outlined" | "material-round" | "material-sharp" | "material-two-tone" | "material-symbols-outlined" | "gravatar" | "libravatar" | "avatar" | "brands" | "line" | "lucide";
520
522
  export type IconColor = "default" | "primary" | "accent" | "info" | "warning" | "error" | "success" | "white" | "disabled" | "red" | "blue" | "green" | "orange" | "yellow" | "indigo" | "violet" | "pink" | "grey" | (string & Record<never, never>);
521
523
  /**
522
524
  * @summary Short summary of the component's intended use.
@@ -545,6 +547,7 @@ declare module "components/icon/icon.component" {
545
547
  depth: boolean;
546
548
  library: IconLibrary;
547
549
  color: IconColor;
550
+ fill: IconColor;
548
551
  padded: boolean;
549
552
  blink: boolean;
550
553
  squared: boolean;
@@ -610,6 +613,9 @@ declare module "components/menu-item/menu-item.component" {
610
613
  menuItem: HTMLElement;
611
614
  /** The type of menu item to render. To use `checked`, this value must be set to `checkbox`. */
612
615
  type: 'normal' | 'checkbox';
616
+ /** The item's visual style. A standalone item defaults to navigation styling;
617
+ * a parent zn-menu sets this to `dropdown` or `shell` automatically. */
618
+ variant: 'default' | 'dropdown' | 'shell';
613
619
  /** Draws the item in a checked state. */
614
620
  checked: boolean;
615
621
  checkedPosition: 'left' | 'right';
@@ -983,6 +989,10 @@ declare module "components/menu/menu.component" {
983
989
  };
984
990
  defaultSlot: HTMLSlotElement;
985
991
  actions: never[];
992
+ /** The menu's visual style. `shell` renders the app-shell header dropdown
993
+ * look: a padded panel with floating rounded items. Propagated to the
994
+ * menu's items. */
995
+ variant: 'default' | 'shell';
986
996
  connectedCallback(): void;
987
997
  /** @internal Gets all slotted menu items, ignoring dividers, headers, and other elements. */
988
998
  getAllItems(): ZnMenuItem[];
@@ -1001,6 +1011,15 @@ declare module "components/menu/menu.component" {
1001
1011
  private handleKeyDown;
1002
1012
  private handleMouseDown;
1003
1013
  private handleSlotChange;
1014
+ protected updated(changedProperties: Map<string, unknown>): void;
1015
+ /**
1016
+ * @internal The variant applied to slotted items. A `default` menu still gives
1017
+ * its items the `dropdown` look (muted hover, no separators) — distinct from a
1018
+ * bare standalone menu item, which keeps the navigation styling.
1019
+ */
1020
+ get itemVariant(): 'dropdown' | 'shell';
1021
+ /** Keeps slotted menu items in sync with the menu's variant. */
1022
+ private propagateVariant;
1004
1023
  private isMenuItem;
1005
1024
  }
1006
1025
  }
@@ -1107,7 +1126,7 @@ declare module "components/button/button.component" {
1107
1126
  import ZincElement from "internal/zinc-element";
1108
1127
  import ZnIcon from "components/icon/index";
1109
1128
  import ZnTooltip from "components/tooltip/index";
1110
- import type { IconColor } from "components/icon/index";
1129
+ import type { IconColor, IconLibrary } from "components/icon/index";
1111
1130
  import type { ZincFormControl } from "internal/zinc-element";
1112
1131
  /**
1113
1132
  * @summary Buttons represent actions that are available to the user.
@@ -1153,7 +1172,15 @@ declare module "components/button/button.component" {
1153
1172
  disabled: boolean;
1154
1173
  grow: boolean;
1155
1174
  square: boolean;
1156
- iconButton: boolean;
1175
+ /** Renders the button as an icon button (40x36). Pass `small` for the
1176
+ * 36x36 variant or `round` for a 36x36 circle: `icon-button`,
1177
+ * `icon-button="small"` or `icon-button="round"`. */
1178
+ iconButton: boolean | 'small' | 'round';
1179
+ /** With `icon-button`, removes the white background and border while
1180
+ * keeping the button's size. */
1181
+ plain: boolean;
1182
+ /** Disables the hover background, for contexts where the tint doesn't fit. */
1183
+ noHover: boolean;
1157
1184
  panelBackground: boolean;
1158
1185
  dropdownCloser: boolean;
1159
1186
  notification: number;
@@ -1165,6 +1192,8 @@ declare module "components/button/button.component" {
1165
1192
  iconPosition: 'left' | 'right';
1166
1193
  iconSize: string;
1167
1194
  iconColor: IconColor;
1195
+ iconFill: IconColor;
1196
+ iconLibrary: IconLibrary;
1168
1197
  type: 'button' | 'submit' | 'reset';
1169
1198
  name: string;
1170
1199
  value: string;
@@ -1464,6 +1493,56 @@ declare module "components/button-group/index" {
1464
1493
  }
1465
1494
  }
1466
1495
  }
1496
+ declare module "components/chat-message/chat-message.component" {
1497
+ import { type CSSResultGroup } from 'lit';
1498
+ import ZincElement from "internal/zinc-element";
1499
+ import ZnIcon from "components/icon/index";
1500
+ /**
1501
+ * @summary A single message in a chat-style conversation: avatar, sender,
1502
+ * time, optional badge, and a message bubble with optional actions.
1503
+ * @documentation https://zinc.style/components/chat-message
1504
+ * @status experimental
1505
+ * @since 1.0
1506
+ *
1507
+ * @dependency zn-icon
1508
+ *
1509
+ * @slot - The message content.
1510
+ * @slot badge - Rendered in the header after the sender and time (e.g. an INTERNAL NOTE chip).
1511
+ * @slot edit-dialog-trigger - Action rendered at the end of the bubble (e.g. a remove icon button).
1512
+ * @slot edit-dialog - Pass-through for an associated dialog element.
1513
+ *
1514
+ * @csspart base - The component's base wrapper.
1515
+ * @csspart avatar - The avatar column.
1516
+ * @csspart body - The header and bubble column.
1517
+ * @csspart header - The sender/time/badge row.
1518
+ * @csspart bubble - The message bubble.
1519
+ * @csspart content - The message content within the bubble.
1520
+ *
1521
+ * @cssproperty --message-background - The bubble's background colour.
1522
+ */
1523
+ export default class ZnChatMessage extends ZincElement {
1524
+ static styles: CSSResultGroup;
1525
+ static dependencies: {
1526
+ 'zn-icon': typeof ZnIcon;
1527
+ };
1528
+ /** The sender's name, also used for the avatar initials. */
1529
+ sender: string;
1530
+ /** Unix timestamp (seconds) of the message, shown as HH:MM. */
1531
+ time: string;
1532
+ private getTime;
1533
+ protected render(): import("lit-html").TemplateResult<1>;
1534
+ }
1535
+ }
1536
+ declare module "components/chat-message/index" {
1537
+ import ZnChatMessage from "components/chat-message/chat-message.component";
1538
+ export * from "components/chat-message/chat-message.component";
1539
+ export default ZnChatMessage;
1540
+ global {
1541
+ interface HTMLElementTagNameMap {
1542
+ 'zn-chat-message': ZnChatMessage;
1543
+ }
1544
+ }
1545
+ }
1467
1546
  declare module "components/chip/chip.component" {
1468
1547
  import { type CSSResultGroup } from 'lit';
1469
1548
  import ZincElement from "internal/zinc-element";
@@ -1490,7 +1569,6 @@ declare module "components/chip/chip.component" {
1490
1569
  caption: string;
1491
1570
  iconSize: number;
1492
1571
  type: 'info' | 'success' | 'warning' | 'error' | 'primary' | 'transparent' | 'custom' | 'neutral';
1493
- size: 'small' | 'medium' | 'large';
1494
1572
  flush: boolean;
1495
1573
  flushX: boolean;
1496
1574
  flushY: boolean;
@@ -3400,6 +3478,10 @@ declare module "components/tile/tile.component" {
3400
3478
  flushX: boolean;
3401
3479
  flushY: boolean;
3402
3480
  inline: boolean;
3481
+ /** Renders the caption in the normal table-content weight instead of bold. */
3482
+ plain: boolean;
3483
+ /** Set by `zn-tile-group` to lay the tile out as a shared-column subgrid row. */
3484
+ grouped: boolean;
3403
3485
  private _isLink;
3404
3486
  private _handleActionsClick;
3405
3487
  render(): import("lit-html").TemplateResult;
@@ -3415,6 +3497,46 @@ declare module "components/tile/index" {
3415
3497
  }
3416
3498
  }
3417
3499
  }
3500
+ declare module "components/tile-group/tile-group.component" {
3501
+ import { type CSSResultGroup } from 'lit';
3502
+ import ZincElement from "internal/zinc-element";
3503
+ /**
3504
+ * @summary Aligns a list of `zn-tile` rows into shared, content-driven columns so values
3505
+ * and actions line up across every row, with optional dividing borders.
3506
+ * @documentation https://zinc.style/components/tile-group
3507
+ * @status experimental
3508
+ * @since 1.0
3509
+ *
3510
+ * @dependency zn-tile
3511
+ *
3512
+ * @slot - One or more `zn-tile` elements.
3513
+ *
3514
+ * @csspart base - The component's base wrapper (the grid container).
3515
+ *
3516
+ * @cssproperty --zn-tile-cols - The number of value/action columns (set automatically).
3517
+ */
3518
+ export default class ZnTileGroup extends ZincElement {
3519
+ static styles: CSSResultGroup;
3520
+ /** Draws a dividing border between rows. */
3521
+ divide: boolean;
3522
+ private _mutationObserver;
3523
+ connectedCallback(): void;
3524
+ disconnectedCallback(): void;
3525
+ private _handleSlotChange;
3526
+ private _sync;
3527
+ protected render(): unknown;
3528
+ }
3529
+ }
3530
+ declare module "components/tile-group/index" {
3531
+ import ZnTileGroup from "components/tile-group/tile-group.component";
3532
+ export * from "components/tile-group/tile-group.component";
3533
+ export default ZnTileGroup;
3534
+ global {
3535
+ interface HTMLElementTagNameMap {
3536
+ 'zn-tile-group': ZnTileGroup;
3537
+ }
3538
+ }
3539
+ }
3418
3540
  declare module "components/tile-property/tile-property.component" {
3419
3541
  import { type CSSResultGroup } from 'lit';
3420
3542
  import ZincElement from "internal/zinc-element";
@@ -3622,11 +3744,13 @@ declare module "components/navbar/navbar.component" {
3622
3744
  border: boolean;
3623
3745
  hideOne: boolean;
3624
3746
  flush: boolean;
3747
+ gutter: boolean;
3625
3748
  stacked: boolean;
3626
3749
  dropdown: never[];
3627
3750
  noPad: false;
3628
3751
  manualAddItems: boolean;
3629
3752
  isolated: boolean;
3753
+ color: string;
3630
3754
  masterId: string;
3631
3755
  storeKey: string;
3632
3756
  storeTtl: number;
@@ -5073,10 +5197,8 @@ declare module "components/bulk-actions/index" {
5073
5197
  }
5074
5198
  }
5075
5199
  declare module "components/editor/modules/toolbar/tool/tool.component" {
5076
- import { type CSSResultGroup } from "lit";
5077
5200
  import ZincElement from "internal/zinc-element";
5078
5201
  export default class ZnEditorTool extends ZincElement {
5079
- static styles: CSSResultGroup;
5080
5202
  uri: string;
5081
5203
  label: string;
5082
5204
  key: string;
@@ -5160,6 +5282,26 @@ declare module "components/editor/modules/dialog/dialog.component" {
5160
5282
  render(): import("lit-html").TemplateResult<1>;
5161
5283
  }
5162
5284
  }
5285
+ declare module "components/editor/modules/dialog/dialog" {
5286
+ import type DialogComponent from "components/editor/modules/dialog/dialog.component";
5287
+ import type Quill from "quill";
5288
+ class Dialog {
5289
+ private readonly _quill;
5290
+ private readonly _editorId;
5291
+ private readonly _document;
5292
+ private _component;
5293
+ constructor(quill: Quill, options: {
5294
+ editorId: string;
5295
+ });
5296
+ private _initDialog;
5297
+ get component(): DialogComponent;
5298
+ private _mountPoint;
5299
+ private createComponent;
5300
+ isOpen(): boolean;
5301
+ close(): void;
5302
+ }
5303
+ export default Dialog;
5304
+ }
5163
5305
  declare module "components/editor/modules/emoji/emoji" {
5164
5306
  import Quill from 'quill';
5165
5307
  export interface EmojiResult {
@@ -5191,7 +5333,6 @@ declare module "components/editor/modules/toolbar/toolbar" {
5191
5333
  class Toolbar extends QuillToolbar {
5192
5334
  private readonly _quill;
5193
5335
  private readonly _component;
5194
- private _lastDialogUri?;
5195
5336
  private _formatters;
5196
5337
  constructor(quill: Quill, options: {
5197
5338
  container: ToolbarComponent;
@@ -5343,23 +5484,6 @@ declare module "components/editor/modules/date-picker/date-picker" {
5343
5484
  }
5344
5485
  export default DatePicker;
5345
5486
  }
5346
- declare module "components/editor/modules/dialog/dialog" {
5347
- import type Quill from "quill";
5348
- class Dialog {
5349
- private readonly _quill;
5350
- private readonly _editorId;
5351
- private readonly _document;
5352
- private _component;
5353
- constructor(quill: Quill, options: {
5354
- editorId: string;
5355
- });
5356
- private _initDialog;
5357
- private createComponent;
5358
- isOpen(): boolean;
5359
- close(): void;
5360
- }
5361
- export default Dialog;
5362
- }
5363
5487
  declare module "components/editor/modules/drag-drop/drag-drop" {
5364
5488
  import type Quill from 'quill';
5365
5489
  interface DragAndDropOptions {
@@ -7251,8 +7375,8 @@ declare module "components/split-button/index" {
7251
7375
  }
7252
7376
  }
7253
7377
  declare module "components/content-block/content-block.component" {
7254
- import type { PropertyValues } from 'lit';
7255
7378
  import ZincElement from "internal/zinc-element";
7379
+ import type { PropertyValues } from 'lit';
7256
7380
  interface TextRow {
7257
7381
  lines: string[];
7258
7382
  type: 'reply' | 'text';
@@ -8202,6 +8326,7 @@ declare module "zinc" {
8202
8326
  export { default as Collapsible } from "components/collapsible/index";
8203
8327
  export { default as Alert } from "components/alert/index";
8204
8328
  export { default as ButtonGroup } from "components/button-group/index";
8329
+ export { default as ChatMessage } from "components/chat-message/index";
8205
8330
  export { default as Chip } from "components/chip/index";
8206
8331
  export { default as Well } from "components/well/index";
8207
8332
  export { default as CopyButton } from "components/copy-button/index";
@@ -8216,6 +8341,7 @@ declare module "zinc" {
8216
8341
  export { default as EmptyState } from "components/empty-state/index";
8217
8342
  export { default as Note } from "components/note/index";
8218
8343
  export { default as Tile } from "components/tile/index";
8344
+ export { default as TileGroup } from "components/tile-group/index";
8219
8345
  export { default as TileProperty } from "components/tile-property/index";
8220
8346
  export { default as Chart } from "components/chart/index";
8221
8347
  export { default as SimpleChart } from "components/simple-chart/index";