@kubex/zinc 1.0.18 → 1.0.20

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 (32) hide show
  1. package/dist/custom-elements.json +721 -8
  2. package/dist/vscode.html-custom-data.json +98 -3
  3. package/dist/web-types.json +195 -5
  4. package/dist/zn.d.ts +156 -4
  5. package/dist/zn.min.js +744 -668
  6. package/docs/pages/components/input-group.md +61 -0
  7. package/docs/pages/components/translations.md +53 -0
  8. package/package.json +1 -1
  9. package/src/components/audio-select/audio-select.component.ts +131 -0
  10. package/src/components/audio-select/audio-select.scss +4 -0
  11. package/src/components/audio-select/audio-select.test.ts +10 -0
  12. package/src/components/audio-select/index.ts +12 -0
  13. package/src/components/checkbox/checkbox.component.ts +66 -11
  14. package/src/components/checkbox/checkbox.scss +102 -15
  15. package/src/components/data-table/data-table.component.ts +7 -0
  16. package/src/components/inline-edit/inline-edit.component.ts +2 -1
  17. package/src/components/input-group/index.ts +12 -0
  18. package/src/components/input-group/input-group.component.ts +73 -0
  19. package/src/components/input-group/input-group.scss +65 -0
  20. package/src/components/input-group/input-group.test.ts +98 -0
  21. package/src/components/item/item.component.ts +5 -1
  22. package/src/components/item/item.scss +4 -0
  23. package/src/components/navbar/navbar.component.ts +21 -6
  24. package/src/components/navbar/navbar.scss +17 -1
  25. package/src/components/select/select.component.ts +7 -11
  26. package/src/components/select/select.scss +3 -3
  27. package/src/components/tabs/tabs.component.ts +33 -24
  28. package/src/components/translations/index.ts +6 -0
  29. package/src/components/translations/translations.component.ts +214 -0
  30. package/src/components/translations/translations.scss +15 -0
  31. package/src/components/translations/translations.test.ts +39 -0
  32. package/src/zinc.ts +3 -0
package/dist/zn.d.ts CHANGED
@@ -2025,7 +2025,7 @@ declare module "components/select/select.component" {
2025
2025
  currentOption: ZnOption;
2026
2026
  selectedOptions: ZnOption[];
2027
2027
  private valueHasChanged;
2028
- private hasCheckboxPrefix;
2028
+ private inputPrefix;
2029
2029
  /** The name of the select, submitted as a name/value pair with form data. */
2030
2030
  name: string;
2031
2031
  private _value;
@@ -2103,7 +2103,7 @@ declare module "components/select/select.component" {
2103
2103
  /** Gets the validation message */
2104
2104
  get validationMessage(): string;
2105
2105
  connectedCallback(): void;
2106
- private updateHasCheckboxPrefix;
2106
+ private updateHasInputPrefix;
2107
2107
  private addOpenListeners;
2108
2108
  private removeOpenListeners;
2109
2109
  private handleFocus;
@@ -2639,6 +2639,7 @@ declare module "components/data-table/data-table.component" {
2639
2639
  sortValue?: string;
2640
2640
  uri?: string;
2641
2641
  target?: string;
2642
+ copyable?: boolean;
2642
2643
  }
2643
2644
  interface Row {
2644
2645
  id: string;
@@ -3198,6 +3199,7 @@ declare module "components/navbar/navbar.component" {
3198
3199
  stacked: boolean;
3199
3200
  dropdown: never[];
3200
3201
  noPad: false;
3202
+ manualAddItems: boolean;
3201
3203
  private _preItems;
3202
3204
  private _postItems;
3203
3205
  private _appended;
@@ -3213,7 +3215,7 @@ declare module "components/navbar/navbar.component" {
3213
3215
  appendItem(item: Element): void;
3214
3216
  connectedCallback(): void;
3215
3217
  handleResize: () => void;
3216
- addItem(item: any): any;
3218
+ addItem(item: Element): void;
3217
3219
  protected firstUpdated(_changedProperties: PropertyValues): void;
3218
3220
  showMore(): void;
3219
3221
  render(): import("lit").TemplateResult<1>;
@@ -4951,6 +4953,7 @@ declare module "components/checkbox/checkbox.component" {
4951
4953
  import ZincElement from "internal/zinc-element";
4952
4954
  import ZnIcon from "components/icon/index";
4953
4955
  import type { ZincFormControl } from "internal/zinc-element";
4956
+ type ColorOption = 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'transparent';
4954
4957
  /**
4955
4958
  * @summary Short summary of the component's intended use.
4956
4959
  * @documentation https://zinc.style/components/checkbox
@@ -4961,7 +4964,7 @@ declare module "components/checkbox/checkbox.component" {
4961
4964
  *
4962
4965
  * @slot - The checkbox's label.
4963
4966
  * @slot description - A description of the checkbox's label. Serves as help text for a checkbox item. Alternatively, you can use the `description` attribute.
4964
- * @slot selected-content - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.
4967
+ * @slot selected-content - Use to nest rich content (like an input) inside a selected checkbox item. Use only with the contained style.
4965
4968
  *
4966
4969
  * @event zn-blur - Emitted when the checkbox loses focus.
4967
4970
  * @event zn-change - Emitted when the checked state changes.
@@ -4974,6 +4977,7 @@ declare module "components/checkbox/checkbox.component" {
4974
4977
  * @csspart control--checked - Matches the control part when the checkbox is checked.
4975
4978
  * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.
4976
4979
  * @csspart checked-icon - The checked icon, an `<zn-icon>` element.
4980
+ * @csspart unchecked-icon - The unchecked icon, an `<zn-icon>` element.
4977
4981
  * @csspart indeterminate-icon - The indeterminate icon, an `<zn-icon>` element.
4978
4982
  * @csspart label - The container that wraps the checkbox's label.
4979
4983
  * @csspart description - The container that wraps the checkbox's description.
@@ -4993,6 +4997,8 @@ declare module "components/checkbox/checkbox.component" {
4993
4997
  name: string;
4994
4998
  /** The current value of the checkbox, submitted as a name/value pair with form data. */
4995
4999
  value: string;
5000
+ /** The unchecked value of the checkbox, submitted as a name/value pair with form data. */
5001
+ uncheckedValue: string;
4996
5002
  /** The checkbox's size. */
4997
5003
  size: 'small' | 'medium' | 'large';
4998
5004
  /** Disables the checkbox. */
@@ -5018,10 +5024,22 @@ declare module "components/checkbox/checkbox.component" {
5018
5024
  form: string;
5019
5025
  /** Makes the checkbox a required field. */
5020
5026
  required: boolean;
5027
+ /** Submits the form when checkbox is clicked. */
5028
+ submitOnClick: boolean;
5021
5029
  /** The checkbox's help text. If you need to display HTML, use the `description` slot instead. */
5022
5030
  description: string;
5023
5031
  label: string;
5024
5032
  labelTooltip: string;
5033
+ /** The icon to show when the checkbox is checked. */
5034
+ checkedIcon: string;
5035
+ /** The icon to show when the checkbox is unchecked. */
5036
+ uncheckedIcon: string;
5037
+ /** The color of the checkbox. */
5038
+ color: ColorOption;
5039
+ /** The color of the checkbox when checked. Overrides `color`. */
5040
+ checkedColor: ColorOption;
5041
+ /** The color of the checkbox when unchecked. Overrides `color`. */
5042
+ uncheckedColor: ColorOption;
5025
5043
  /** Gets the validity state object */
5026
5044
  get validity(): ValidityState;
5027
5045
  get isChecked(): boolean;
@@ -5216,6 +5234,43 @@ declare module "components/form-group/index" {
5216
5234
  }
5217
5235
  }
5218
5236
  }
5237
+ declare module "components/input-group/input-group.component" {
5238
+ import { type CSSResultGroup } from 'lit';
5239
+ import ZincElement from "internal/zinc-element";
5240
+ /**
5241
+ * @summary A wrapper component that groups inputs and selects visually.
5242
+ * @documentation https://zinc.style/components/input-group
5243
+ * @status experimental
5244
+ * @since 1.0
5245
+ *
5246
+ * @slot - The default slot for inputs and selects.
5247
+ * @slot label - The input group's label. Alternatively, you can use the `label` attribute.
5248
+ *
5249
+ * @csspart base - The component's base wrapper.
5250
+ * @csspart form-control - The form control wrapper.
5251
+ * @csspart form-control-label - The label's wrapper.
5252
+ * @csspart form-control-input - The input group container.
5253
+ */
5254
+ export default class ZnInputGroup extends ZincElement {
5255
+ static styles: CSSResultGroup;
5256
+ private readonly hasSlotController;
5257
+ defaultSlot: HTMLSlotElement;
5258
+ /** The input group's label. If you need to display HTML, use the `label` slot. */
5259
+ label: string;
5260
+ private handleSlotChange;
5261
+ render(): import("lit").TemplateResult<1>;
5262
+ }
5263
+ }
5264
+ declare module "components/input-group/index" {
5265
+ import ZnInputGroup from "components/input-group/input-group.component";
5266
+ export * from "components/input-group/input-group.component";
5267
+ export default ZnInputGroup;
5268
+ global {
5269
+ interface HTMLElementTagNameMap {
5270
+ 'zn-input-group': ZnInputGroup;
5271
+ }
5272
+ }
5273
+ }
5219
5274
  declare module "components/linked-select/linked-select.component" {
5220
5275
  import { type CSSResultGroup, type PropertyValues } from 'lit';
5221
5276
  import ZincElement from "internal/zinc-element";
@@ -5909,6 +5964,7 @@ declare module "components/item/item.component" {
5909
5964
  grid: boolean;
5910
5965
  noPadding: boolean;
5911
5966
  alignEnd: boolean;
5967
+ alignCenter: boolean;
5912
5968
  connectedCallback(): void;
5913
5969
  protected updated(_changedProperties: PropertyValues): void;
5914
5970
  protected _hasContent(): boolean;
@@ -6580,6 +6636,99 @@ declare module "components/reveal/index" {
6580
6636
  }
6581
6637
  }
6582
6638
  }
6639
+ declare module "components/audio-select/audio-select.component" {
6640
+ import { type CSSResultGroup, type PropertyValues } from 'lit';
6641
+ import ZincElement from "internal/zinc-element";
6642
+ import type { ZnChangeEvent } from "events/zn-change";
6643
+ interface AudioFile {
6644
+ name: string;
6645
+ url: string;
6646
+ }
6647
+ /**
6648
+ * @summary Short summary of the component's intended use.
6649
+ * @documentation https://zinc.style/components/audio-select
6650
+ * @status experimental
6651
+ * @since 1.0
6652
+ *
6653
+ * @slot - The default slot.
6654
+ * @slot actions - The actions slot.
6655
+ * @slot footer - The footer slot.
6656
+ *
6657
+ * @csspart base - The component's base wrapper.
6658
+ *
6659
+ * @cssproperty --example - An example CSS custom property.
6660
+ */
6661
+ export default class ZnAudioSelect extends ZincElement {
6662
+ static styles: CSSResultGroup;
6663
+ private _isPlaying;
6664
+ private readonly _audio;
6665
+ value: string;
6666
+ label: string;
6667
+ placeholder: string;
6668
+ files: AudioFile[];
6669
+ constructor();
6670
+ disconnectedCallback(): void;
6671
+ updated(changedProperties: PropertyValues): void;
6672
+ stopAudio(): void;
6673
+ handleSelectChange(e: ZnChangeEvent): void;
6674
+ togglePreview(e: CustomEvent): void;
6675
+ render(): import("lit").TemplateResult<1>;
6676
+ }
6677
+ }
6678
+ declare module "components/audio-select/index" {
6679
+ import ZnAudioSelect from "components/audio-select/audio-select.component";
6680
+ export * from "components/audio-select/audio-select.component";
6681
+ export default ZnAudioSelect;
6682
+ global {
6683
+ interface HTMLElementTagNameMap {
6684
+ 'zn-audio-select': ZnAudioSelect;
6685
+ }
6686
+ }
6687
+ }
6688
+ declare module "components/translations/translations.component" {
6689
+ import ZincElement from "internal/zinc-element";
6690
+ import ZnInlineEdit from "components/inline-edit/index";
6691
+ import ZnInput from "components/input/index";
6692
+ import ZnNavbar from "components/navbar/index";
6693
+ import type { PropertyValues } from 'lit';
6694
+ import type { ZincFormControl } from "internal/zinc-element";
6695
+ export default class ZnTranslations extends ZincElement implements ZincFormControl {
6696
+ static styles: import("lit").CSSResult;
6697
+ static dependencies: {
6698
+ 'zn-navbar': typeof ZnNavbar;
6699
+ 'zn-input': typeof ZnInput;
6700
+ 'zn-inline-edit': typeof ZnInlineEdit;
6701
+ };
6702
+ private readonly formControlController;
6703
+ private readonly hasSlotController;
6704
+ name: string;
6705
+ value: string;
6706
+ label: string;
6707
+ disabled: boolean;
6708
+ required: boolean;
6709
+ languages: Record<string, string>;
6710
+ values: Record<string, string>;
6711
+ private _activeLanguage;
6712
+ get validity(): ValidityState;
6713
+ get validationMessage(): string;
6714
+ checkValidity(): boolean;
6715
+ getForm(): HTMLFormElement | null;
6716
+ reportValidity(): boolean;
6717
+ setCustomValidity(): void;
6718
+ protected firstUpdated(): void;
6719
+ willUpdate(changedProperties: PropertyValues): void;
6720
+ private handleLanguageAdd;
6721
+ private handleNavbarClick;
6722
+ private handleValueUpdate;
6723
+ private updateValue;
6724
+ render(): import("lit").TemplateResult<1>;
6725
+ }
6726
+ }
6727
+ declare module "components/translations/index" {
6728
+ import ZnTranslations from "components/translations/translations.component";
6729
+ export * from "components/translations/translations.component";
6730
+ export default ZnTranslations;
6731
+ }
6583
6732
  declare module "events/zn-after-hide" {
6584
6733
  export type ZnAfterHideEvent = CustomEvent<Record<PropertyKey, never>>;
6585
6734
  global {
@@ -6696,6 +6845,7 @@ declare module "zinc" {
6696
6845
  export { default as Checkbox } from "components/checkbox/index";
6697
6846
  export { default as Datepicker } from "components/datepicker/index";
6698
6847
  export { default as FormGroup } from "components/form-group/index";
6848
+ export { default as InputGroup } from "components/input-group/index";
6699
6849
  export { default as LinkedSelect } from "components/linked-select/index";
6700
6850
  export { default as Radio } from "components/radio/index";
6701
6851
  export { default as Rating } from "components/rating/index";
@@ -6721,6 +6871,8 @@ declare module "zinc" {
6721
6871
  export { default as SettingsContainer } from "components/settings-container/index";
6722
6872
  export { default as FilterContainer } from "components/filter-container/index";
6723
6873
  export { default as Reveal } from "components/reveal/index";
6874
+ export { default as AudioSelect } from "components/audio-select/index";
6875
+ export { default as Translations } from "components/translations/index";
6724
6876
  export { default as ZincElement } from "internal/zinc-element";
6725
6877
  export * from "utilities/on";
6726
6878
  export * from "utilities/query";