@kubex/zinc 1.1.156 → 1.1.157

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.
@@ -51767,86 +51767,42 @@
51767
51767
  },
51768
51768
  {
51769
51769
  "kind": "javascript-module",
51770
- "path": "components/translation-group/translation-group.js",
51770
+ "path": "components/translations/translations.js",
51771
51771
  "declarations": [
51772
51772
  {
51773
51773
  "kind": "class",
51774
51774
  "description": "",
51775
- "name": "ZnTranslationGroup",
51775
+ "name": "ZnTranslations",
51776
51776
  "cssParts": [
51777
51777
  {
51778
- "description": "The component's base wrapper.",
51779
- "name": "base",
51780
- "inheritedFrom": {
51781
- "name": "ZnPanel",
51782
- "module": "src/components/panel/panel.component.ts"
51783
- }
51778
+ "description": "The form control that wraps the label, the language select, the field and the help text.",
51779
+ "name": "form-control"
51784
51780
  },
51785
51781
  {
51786
- "description": "The form group holding the caption, the language select and the fields.",
51787
- "name": "form-group"
51782
+ "description": "The label's wrapper.",
51783
+ "name": "form-control-label"
51788
51784
  },
51789
51785
  {
51790
- "description": "The row of buttons at the bottom of the body.",
51791
- "name": "actions"
51786
+ "description": "The wrapper around the field being edited.",
51787
+ "name": "form-control-input"
51792
51788
  },
51793
51789
  {
51794
- "description": "The select that chooses the language every child is editing, in the group's chip slot.",
51795
- "name": "language-field"
51790
+ "description": "The help text's wrapper.",
51791
+ "name": "form-control-help-text"
51796
51792
  },
51797
51793
  {
51798
- "description": "The select itself.",
51794
+ "description": "The select that chooses the language being edited.",
51799
51795
  "name": "language-select"
51800
- },
51801
- {
51802
- "description": "The header region, when a caption or actions are given.",
51803
- "name": "header",
51804
- "inheritedFrom": {
51805
- "name": "ZnPanel",
51806
- "module": "src/components/panel/panel.component.ts"
51807
- }
51808
- },
51809
- {
51810
- "description": "The padded row inside the header, forwarded from zn-header.",
51811
- "name": "header-content",
51812
- "inheritedFrom": {
51813
- "name": "ZnPanel",
51814
- "module": "src/components/panel/panel.component.ts"
51815
- }
51816
- },
51817
- {
51818
- "description": "The footer region, when the footer slot is filled.",
51819
- "name": "footer",
51820
- "inheritedFrom": {
51821
- "name": "ZnPanel",
51822
- "module": "src/components/panel/panel.component.ts"
51823
- }
51824
51796
  }
51825
51797
  ],
51826
51798
  "slots": [
51827
51799
  {
51828
- "description": "The `zn-translations` fields the select drives.",
51829
- "name": "",
51830
- "inheritedFrom": {
51831
- "name": "ZnPanel",
51832
- "module": "src/components/panel/panel.component.ts"
51833
- }
51834
- },
51835
- {
51836
- "description": "Buttons for the bottom of the panel, on the white body rather than the grey footer. They sit on the right, as zinc's form action rows do; `align=\"start\"` moves one to the left. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.",
51837
- "name": "actions",
51838
- "inheritedFrom": {
51839
- "name": "ZnPanel",
51840
- "module": "src/components/panel/panel.component.ts"
51841
- }
51800
+ "description": "The field's label. Alternatively, use the `label` attribute.",
51801
+ "name": "label"
51842
51802
  },
51843
51803
  {
51844
- "description": "Content displayed in the grey panel footer.",
51845
- "name": "footer",
51846
- "inheritedFrom": {
51847
- "name": "ZnPanel",
51848
- "module": "src/components/panel/panel.component.ts"
51849
- }
51804
+ "description": "Text describing how to fill the field in, shown below it and shared by every language. Alternatively, use the `help-text` attribute.",
51805
+ "name": "help-text"
51850
51806
  }
51851
51807
  ],
51852
51808
  "members": [
@@ -51857,14 +51813,44 @@
51857
51813
  "text": "object"
51858
51814
  },
51859
51815
  "static": true,
51860
- "default": "{ 'zn-chip': ZnChip, 'zn-form-group': ZnFormGroup, 'zn-option': ZnOption, 'zn-select': ZnSelect }"
51816
+ "default": "{ 'zn-chip': ZnChip, 'zn-inline-edit': ZnInlineEdit, 'zn-input': ZnInput, 'zn-option': ZnOption, 'zn-remarkd-editor': ZnRemarkdEditor, 'zn-select': ZnSelect, 'zn-textarea': ZnTextarea }"
51861
51817
  },
51862
51818
  {
51863
51819
  "kind": "field",
51864
- "name": "_slotController",
51820
+ "name": "formControlController",
51821
+ "type": {
51822
+ "text": "FormControlController"
51823
+ },
51865
51824
  "privacy": "private",
51866
51825
  "readonly": true,
51867
- "default": "new HasSlotController(this, 'actions', 'footer')"
51826
+ "default": "new FormControlController(this)"
51827
+ },
51828
+ {
51829
+ "kind": "field",
51830
+ "name": "hasSlotController",
51831
+ "privacy": "private",
51832
+ "readonly": true,
51833
+ "default": "new HasSlotController(this, 'label', 'help-text')"
51834
+ },
51835
+ {
51836
+ "kind": "field",
51837
+ "name": "name",
51838
+ "type": {
51839
+ "text": "string"
51840
+ },
51841
+ "default": "''",
51842
+ "description": "The name submitted with the form.",
51843
+ "attribute": "name"
51844
+ },
51845
+ {
51846
+ "kind": "field",
51847
+ "name": "value",
51848
+ "type": {
51849
+ "text": "string"
51850
+ },
51851
+ "default": "'{\"en\":\"\"}'",
51852
+ "description": "The translations as a JSON object keyed by language code. The mirror of `values` in attribute form.",
51853
+ "attribute": "value"
51868
51854
  },
51869
51855
  {
51870
51856
  "kind": "field",
@@ -51873,7 +51859,7 @@
51873
51859
  "text": "string"
51874
51860
  },
51875
51861
  "default": "''",
51876
- "description": "The form group's label. An alias for the inherited `caption`, which wins where both are set.",
51862
+ "description": "The label shown above the field. If you need HTML, use the `label` slot instead.",
51877
51863
  "attribute": "label"
51878
51864
  },
51879
51865
  {
@@ -51883,921 +51869,861 @@
51883
51869
  "text": "string"
51884
51870
  },
51885
51871
  "default": "''",
51886
- "description": "Sits under the label, above the language select, as help text does in any other form group.",
51872
+ "description": "Text shown below the field, describing how to fill it in. Applies to every language. If you need HTML, use the\n`help-text` slot instead.",
51887
51873
  "attribute": "help-text"
51888
51874
  },
51889
51875
  {
51890
51876
  "kind": "field",
51891
- "name": "inline",
51877
+ "name": "disabled",
51892
51878
  "type": {
51893
51879
  "text": "boolean"
51894
51880
  },
51895
51881
  "default": "false",
51896
- "description": "Drops the panel chrome — border, background and padding — so the group reads as a section of the surrounding form\nrather than a panel of its own. For groups nested inside another panel, where the fields would otherwise sit\nindented behind a second border.",
51897
- "attribute": "inline",
51882
+ "description": "Disables editing in every language.",
51883
+ "attribute": "disabled",
51898
51884
  "reflects": true
51899
51885
  },
51900
51886
  {
51901
51887
  "kind": "field",
51902
- "name": "languageLabel",
51888
+ "name": "required",
51903
51889
  "type": {
51904
- "text": "string"
51890
+ "text": "boolean"
51905
51891
  },
51906
- "default": "'Edit Languages'",
51907
- "description": "The select's accessible name. Not shown — the caption is what names the section on screen — but read out by a\nscreen reader, which has nothing else to go on once the visible label is gone.",
51908
- "attribute": "language-label"
51892
+ "default": "false",
51893
+ "description": "Marks the label required. Validity is not enforced per language.",
51894
+ "attribute": "required",
51895
+ "reflects": true
51909
51896
  },
51910
51897
  {
51911
51898
  "kind": "field",
51912
- "name": "languages",
51899
+ "name": "flush",
51913
51900
  "type": {
51914
- "text": "Record<string, string>"
51901
+ "text": "boolean"
51915
51902
  },
51916
- "default": "{ 'en': 'EN' }",
51917
- "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to. Set on every\nchild, so they do not need their own copy.",
51918
- "attribute": "languages"
51903
+ "default": "false",
51904
+ "description": "Removes the component's own padding.",
51905
+ "attribute": "flush",
51906
+ "reflects": true
51919
51907
  },
51920
51908
  {
51921
51909
  "kind": "field",
51922
- "name": "_activeLanguage",
51910
+ "name": "inputType",
51923
51911
  "type": {
51924
- "text": "string"
51912
+ "text": "'text' | 'number' | 'textarea' | 'remarkd'"
51925
51913
  },
51926
- "privacy": "private",
51927
- "default": "'en'",
51928
- "description": "The language every child is currently editing."
51914
+ "default": "'text'",
51915
+ "description": "The control each translation is edited through.",
51916
+ "attribute": "input-type"
51929
51917
  },
51930
51918
  {
51931
51919
  "kind": "field",
51932
- "name": "_form",
51920
+ "name": "textareaRows",
51933
51921
  "type": {
51934
- "text": "HTMLFormElement | null"
51922
+ "text": "number | undefined"
51935
51923
  },
51936
- "privacy": "private",
51937
- "default": "null"
51924
+ "description": "Rows of the textarea, when `input-type` is `textarea`.",
51925
+ "attribute": "textarea-rows"
51938
51926
  },
51939
51927
  {
51940
- "kind": "method",
51941
- "name": "getAllTranslations",
51942
- "privacy": "private",
51943
- "return": {
51944
- "type": {
51945
- "text": "ZnTranslations[]"
51946
- }
51928
+ "kind": "field",
51929
+ "name": "allowRaw",
51930
+ "type": {
51931
+ "text": "boolean"
51947
51932
  },
51948
- "description": "The children the select drives. Read live rather than cached, so markup added later is picked up."
51933
+ "default": "false",
51934
+ "description": "Allows raw HTML blocks, when `input-type` is `remarkd`.",
51935
+ "attribute": "allow-raw"
51949
51936
  },
51950
51937
  {
51951
- "kind": "method",
51952
- "name": "syncChildren",
51953
- "privacy": "private",
51954
- "description": "Sync grouped state, languages, and active language to all children."
51938
+ "kind": "field",
51939
+ "name": "attachmentUrl",
51940
+ "type": {
51941
+ "text": "string"
51942
+ },
51943
+ "default": "''",
51944
+ "description": "Where the remarkd editor uploads images, when `input-type` is `remarkd`.",
51945
+ "attribute": "attachment-url"
51955
51946
  },
51956
51947
  {
51957
- "kind": "method",
51958
- "name": "languageState",
51959
- "privacy": "private",
51960
- "return": {
51961
- "type": {
51962
- "text": "{ type: 'success' | 'warning' | 'error'; label: string }"
51963
- }
51948
+ "kind": "field",
51949
+ "name": "includeUrl",
51950
+ "type": {
51951
+ "text": "string"
51964
51952
  },
51965
- "parameters": [
51966
- {
51967
- "name": "language",
51968
- "type": {
51969
- "text": "string"
51970
- }
51971
- }
51972
- ],
51973
- "description": "A language is translated once every child carries a value for it, partial while only some do. The chips and the\ncount are read off the children, so a child's edit has to bring the group back round."
51953
+ "default": "''",
51954
+ "description": "Where the remarkd editor lists embeddable includes, when `input-type` is `remarkd`.",
51955
+ "attribute": "include-url"
51974
51956
  },
51975
51957
  {
51976
- "kind": "method",
51977
- "name": "displayName",
51978
- "privacy": "private",
51979
- "return": {
51980
- "type": {
51981
- "text": "string"
51982
- }
51958
+ "kind": "field",
51959
+ "name": "linkUrl",
51960
+ "type": {
51961
+ "text": "string"
51983
51962
  },
51984
- "parameters": [
51985
- {
51986
- "name": "language",
51987
- "type": {
51988
- "text": "string"
51989
- }
51990
- }
51991
- ],
51992
- "description": "The configured name, or the code where `languages` does not name the language."
51963
+ "default": "''",
51964
+ "description": "Where the remarkd editor searches link targets, when `input-type` is `remarkd`.",
51965
+ "attribute": "link-url"
51993
51966
  },
51994
51967
  {
51995
- "kind": "method",
51996
- "name": "syncChildLanguages",
51997
- "privacy": "private",
51998
- "description": "Children take their language list from the group, so a change to `languages` has to reach them."
51968
+ "kind": "field",
51969
+ "name": "inlineEdit",
51970
+ "type": {
51971
+ "text": "boolean"
51972
+ },
51973
+ "default": "false",
51974
+ "description": "Edits the translation through a `zn-inline-edit` — the value reads as text until it is clicked — rather than a\nplain input or textarea.",
51975
+ "attribute": "inline-edit",
51976
+ "reflects": true
51999
51977
  },
52000
51978
  {
52001
51979
  "kind": "field",
52002
- "name": "handleSlotChange",
52003
- "privacy": "private"
52004
- },
52005
- {
52006
- "kind": "method",
52007
- "name": "switchLanguage",
52008
- "privacy": "private",
52009
- "parameters": [
52010
- {
52011
- "name": "lang",
52012
- "type": {
52013
- "text": "string"
52014
- }
52015
- }
52016
- ],
52017
- "description": "Moves every child onto `lang` and announces it. Does not touch their values."
52018
- },
52019
- {
52020
- "kind": "field",
52021
- "name": "handleLanguageSelect",
52022
- "privacy": "private",
52023
- "description": "The select's own change and input events describe the language being browsed, not a translation being edited, so\nthey are stopped rather than allowed to reach a consumer listening for a child's value change."
52024
- },
52025
- {
52026
- "kind": "field",
52027
- "name": "handleLanguageInput",
52028
- "privacy": "private"
52029
- },
52030
- {
52031
- "kind": "field",
52032
- "name": "handleChildChange",
52033
- "privacy": "private",
52034
- "description": "A child's edit changes which chips the select shows, and the translated count above it."
52035
- },
52036
- {
52037
- "kind": "field",
52038
- "name": "handleFormReset",
52039
- "privacy": "private",
52040
- "description": "The children restore their own values on the form's reset event without announcing it, and the chips and the\ncount are read off them — so re-read once every listener on that event has run."
52041
- },
52042
- {
52043
- "kind": "field",
52044
- "name": "hasSlotController",
52045
- "privacy": "private",
52046
- "readonly": true,
52047
- "default": "new HasSlotController(this, '[default]', 'actions', 'footer')",
52048
- "inheritedFrom": {
52049
- "name": "ZnPanel",
52050
- "module": "components/panel/panel.js"
52051
- }
51980
+ "name": "slashItems",
51981
+ "type": {
51982
+ "text": "SlashMenuItem[]"
51983
+ },
51984
+ "default": "[]",
51985
+ "description": "Quick insertions offered by the slash menu on `text` and `textarea` inputs. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
51986
+ "attribute": "slash-items"
52052
51987
  },
52053
51988
  {
52054
51989
  "kind": "field",
52055
- "name": "basis",
51990
+ "name": "slashPreset",
52056
51991
  "type": {
52057
- "text": "number"
51992
+ "text": "string"
52058
51993
  },
52059
- "attribute": "basis-px",
52060
- "inheritedFrom": {
52061
- "name": "ZnPanel",
52062
- "module": "components/panel/panel.js"
52063
- }
51994
+ "default": "''",
51995
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
51996
+ "attribute": "slash-preset"
52064
51997
  },
52065
51998
  {
52066
51999
  "kind": "field",
52067
- "name": "caption",
52000
+ "name": "slashTrigger",
52068
52001
  "type": {
52069
52002
  "text": "string"
52070
52003
  },
52071
- "attribute": "caption",
52072
- "inheritedFrom": {
52073
- "name": "ZnPanel",
52074
- "module": "components/panel/panel.js"
52075
- }
52004
+ "default": "'/'",
52005
+ "description": "The characters that open the slash menu.",
52006
+ "attribute": "slash-trigger"
52076
52007
  },
52077
52008
  {
52078
52009
  "kind": "field",
52079
- "name": "icon",
52010
+ "name": "slashHeading",
52080
52011
  "type": {
52081
52012
  "text": "string"
52082
52013
  },
52083
- "attribute": "icon",
52084
- "inheritedFrom": {
52085
- "name": "ZnPanel",
52086
- "module": "components/panel/panel.js"
52087
- }
52014
+ "default": "'Insert'",
52015
+ "description": "The name the slash menu's list is announced by.",
52016
+ "attribute": "slash-heading"
52088
52017
  },
52089
52018
  {
52090
52019
  "kind": "field",
52091
- "name": "tabbed",
52020
+ "name": "slashHideKeys",
52092
52021
  "type": {
52093
52022
  "text": "boolean"
52094
52023
  },
52095
- "attribute": "tabbed",
52096
- "inheritedFrom": {
52097
- "name": "ZnPanel",
52098
- "module": "components/panel/panel.js"
52099
- }
52024
+ "default": "false",
52025
+ "description": "Hides the insertion keys normally shown against the slash menu's items.",
52026
+ "attribute": "slash-hide-keys"
52100
52027
  },
52101
52028
  {
52102
52029
  "kind": "field",
52103
- "name": "headerBorderless",
52030
+ "name": "slashRecentKey",
52104
52031
  "type": {
52105
- "text": "boolean"
52032
+ "text": "string"
52106
52033
  },
52107
- "attribute": "header-borderless",
52108
- "inheritedFrom": {
52109
- "name": "ZnPanel",
52110
- "module": "components/panel/panel.js"
52111
- }
52034
+ "default": "''",
52035
+ "description": "Lists the slash menu items most recently chosen here above the rest, remembered under this key.",
52036
+ "attribute": "slash-recent-key"
52112
52037
  },
52113
52038
  {
52114
52039
  "kind": "field",
52115
- "name": "cosmic",
52040
+ "name": "slashItemsProvider",
52116
52041
  "type": {
52117
- "text": "boolean"
52042
+ "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
52118
52043
  },
52119
- "attribute": "cosmic",
52120
- "inheritedFrom": {
52121
- "name": "ZnPanel",
52122
- "module": "components/panel/panel.js"
52123
- }
52044
+ "description": "Resolves additional slash menu items each time the menu opens. JavaScript only."
52124
52045
  },
52125
52046
  {
52126
52047
  "kind": "field",
52127
- "name": "flush",
52048
+ "name": "grouped",
52128
52049
  "type": {
52129
52050
  "text": "boolean"
52130
52051
  },
52131
- "attribute": "flush",
52132
- "inheritedFrom": {
52133
- "name": "ZnPanel",
52134
- "module": "components/panel/panel.js"
52135
- }
52052
+ "default": "false",
52053
+ "description": "Hides this component's own language select and defers the choice to a parent zn-translation-group. The group sets\nthis on its children itself.",
52054
+ "attribute": "grouped",
52055
+ "reflects": true
52136
52056
  },
52137
52057
  {
52138
52058
  "kind": "field",
52139
- "name": "flushX",
52059
+ "name": "languages",
52140
52060
  "type": {
52141
- "text": "boolean"
52061
+ "text": "Record<string, string>"
52142
52062
  },
52143
- "attribute": "flush-x",
52144
- "inheritedFrom": {
52145
- "name": "ZnPanel",
52146
- "module": "components/panel/panel.js"
52147
- }
52063
+ "default": "{ 'en': 'EN' }",
52064
+ "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to.",
52065
+ "attribute": "languages"
52148
52066
  },
52149
52067
  {
52150
52068
  "kind": "field",
52151
- "name": "flushY",
52069
+ "name": "values",
52152
52070
  "type": {
52153
- "text": "boolean"
52071
+ "text": "Record<string, string>"
52154
52072
  },
52155
- "attribute": "flush-y",
52156
- "inheritedFrom": {
52157
- "name": "ZnPanel",
52158
- "module": "components/panel/panel.js"
52159
- }
52073
+ "default": "{}",
52074
+ "description": "The translations as an object keyed by language code. The mirror of `value` in property form.",
52075
+ "attribute": "values"
52160
52076
  },
52161
52077
  {
52162
52078
  "kind": "field",
52163
- "name": "flushFooter",
52079
+ "name": "defaultValue",
52164
52080
  "type": {
52165
- "text": "boolean"
52081
+ "text": "string"
52166
52082
  },
52167
- "attribute": "flush-footer",
52168
- "inheritedFrom": {
52169
- "name": "ZnPanel",
52170
- "module": "components/panel/panel.js"
52171
- }
52083
+ "default": "'{\"en\":\"\"}'",
52084
+ "description": "The serialized translations a form reset restores. Taken from the `value` attribute where there is one."
52172
52085
  },
52173
52086
  {
52174
52087
  "kind": "field",
52175
- "name": "transparent",
52088
+ "name": "_activeLanguage",
52176
52089
  "type": {
52177
- "text": "boolean"
52090
+ "text": "string"
52178
52091
  },
52179
- "attribute": "transparent",
52180
- "inheritedFrom": {
52181
- "name": "ZnPanel",
52182
- "module": "components/panel/panel.js"
52183
- }
52092
+ "privacy": "private",
52093
+ "default": "'en'"
52184
52094
  },
52185
52095
  {
52186
52096
  "kind": "field",
52187
- "name": "shadow",
52097
+ "name": "validity",
52188
52098
  "type": {
52189
- "text": "boolean"
52099
+ "text": "ValidityState"
52190
52100
  },
52191
- "attribute": "shadow",
52192
- "inheritedFrom": {
52193
- "name": "ZnPanel",
52194
- "module": "components/panel/panel.js"
52195
- }
52101
+ "readonly": true
52196
52102
  },
52197
52103
  {
52198
52104
  "kind": "field",
52199
- "name": "bodyEmpty",
52200
- "type": {
52201
- "text": "boolean"
52202
- },
52203
- "privacy": "private",
52204
- "default": "false",
52205
- "inheritedFrom": {
52206
- "name": "ZnPanel",
52207
- "module": "components/panel/panel.js"
52208
- }
52105
+ "name": "validationMessage",
52106
+ "readonly": true
52209
52107
  },
52210
52108
  {
52211
- "kind": "field",
52212
- "name": "resizeObserver",
52213
- "type": {
52214
- "text": "ResizeObserver | null"
52215
- },
52216
- "privacy": "private",
52217
- "default": "null",
52218
- "inheritedFrom": {
52219
- "name": "ZnPanel",
52220
- "module": "components/panel/panel.js"
52221
- }
52109
+ "kind": "method",
52110
+ "name": "checkValidity"
52222
52111
  },
52223
52112
  {
52224
52113
  "kind": "method",
52225
- "name": "observeBodyContent",
52226
- "privacy": "private",
52227
- "inheritedFrom": {
52228
- "name": "ZnPanel",
52229
- "module": "components/panel/panel.js"
52230
- }
52114
+ "name": "getForm"
52231
52115
  },
52232
52116
  {
52233
52117
  "kind": "method",
52234
- "name": "measureBodyContent",
52235
- "privacy": "private",
52236
- "inheritedFrom": {
52237
- "name": "ZnPanel",
52238
- "module": "components/panel/panel.js"
52239
- }
52240
- }
52241
- ],
52242
- "events": [
52243
- {
52244
- "description": "Emitted when the active language changes. Detail: `{ language: string }`.",
52245
- "name": "zn-language-change"
52246
- }
52247
- ],
52248
- "attributes": [
52118
+ "name": "reportValidity"
52119
+ },
52249
52120
  {
52250
- "name": "label",
52251
- "type": {
52252
- "text": "string"
52253
- },
52254
- "default": "''",
52255
- "description": "The form group's label. An alias for the inherited `caption`, which wins where both are set.",
52256
- "fieldName": "label"
52121
+ "kind": "method",
52122
+ "name": "setCustomValidity"
52257
52123
  },
52258
52124
  {
52259
- "name": "help-text",
52260
- "type": {
52261
- "text": "string"
52262
- },
52263
- "default": "''",
52264
- "description": "Sits under the label, above the language select, as help text does in any other form group.",
52265
- "fieldName": "helpText"
52125
+ "kind": "method",
52126
+ "name": "setActiveLanguage",
52127
+ "privacy": "public",
52128
+ "parameters": [
52129
+ {
52130
+ "name": "language",
52131
+ "type": {
52132
+ "text": "string"
52133
+ }
52134
+ }
52135
+ ],
52136
+ "description": "Sets the active language externally. Used by zn-translation-group. Browsing to a language does not create a key\nfor it — an untouched language stays absent from `values` so it is not submitted as an empty translation."
52266
52137
  },
52267
52138
  {
52268
- "name": "inline",
52269
- "type": {
52270
- "text": "boolean"
52271
- },
52272
- "default": "false",
52273
- "description": "Drops the panel chrome — border, background and padding — so the group reads as a section of the surrounding form\nrather than a panel of its own. For groups nested inside another panel, where the fields would otherwise sit\nindented behind a second border.",
52274
- "fieldName": "inline"
52275
- },
52276
- {
52277
- "name": "language-label",
52278
- "type": {
52279
- "text": "string"
52280
- },
52281
- "default": "'Edit Languages'",
52282
- "description": "The select's accessible name. Not shown — the caption is what names the section on screen — but read out by a\nscreen reader, which has nothing else to go on once the visible label is gone.",
52283
- "fieldName": "languageLabel"
52284
- },
52285
- {
52286
- "name": "languages",
52287
- "type": {
52288
- "text": "Record<string, string>"
52289
- },
52290
- "default": "{ 'en': 'EN' }",
52291
- "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to. Set on every\nchild, so they do not need their own copy.",
52292
- "fieldName": "languages"
52293
- },
52294
- {
52295
- "name": "basis-px",
52296
- "type": {
52297
- "text": "number"
52298
- },
52299
- "fieldName": "basis",
52300
- "inheritedFrom": {
52301
- "name": "ZnPanel",
52302
- "module": "src/components/panel/panel.component.ts"
52303
- }
52304
- },
52305
- {
52306
- "name": "caption",
52307
- "type": {
52308
- "text": "string"
52309
- },
52310
- "fieldName": "caption",
52311
- "inheritedFrom": {
52312
- "name": "ZnPanel",
52313
- "module": "src/components/panel/panel.component.ts"
52314
- }
52315
- },
52316
- {
52317
- "name": "icon",
52318
- "type": {
52319
- "text": "string"
52320
- },
52321
- "fieldName": "icon",
52322
- "inheritedFrom": {
52323
- "name": "ZnPanel",
52324
- "module": "src/components/panel/panel.component.ts"
52325
- }
52326
- },
52327
- {
52328
- "name": "tabbed",
52329
- "type": {
52330
- "text": "boolean"
52139
+ "kind": "method",
52140
+ "name": "getActiveLanguage",
52141
+ "privacy": "public",
52142
+ "return": {
52143
+ "type": {
52144
+ "text": "string"
52145
+ }
52331
52146
  },
52332
- "fieldName": "tabbed",
52333
- "inheritedFrom": {
52334
- "name": "ZnPanel",
52335
- "module": "src/components/panel/panel.component.ts"
52336
- }
52147
+ "description": "Returns the currently active language."
52337
52148
  },
52338
52149
  {
52339
- "name": "header-borderless",
52340
- "type": {
52341
- "text": "boolean"
52342
- },
52343
- "fieldName": "headerBorderless",
52344
- "inheritedFrom": {
52345
- "name": "ZnPanel",
52346
- "module": "src/components/panel/panel.component.ts"
52347
- }
52150
+ "kind": "method",
52151
+ "name": "addLanguageKey",
52152
+ "privacy": "public",
52153
+ "parameters": [
52154
+ {
52155
+ "name": "languageCode",
52156
+ "type": {
52157
+ "text": "string"
52158
+ }
52159
+ }
52160
+ ],
52161
+ "description": "Adds a language key to this component's values if not already present. Used by zn-translation-group."
52348
52162
  },
52349
52163
  {
52350
- "name": "cosmic",
52351
- "type": {
52352
- "text": "boolean"
52164
+ "kind": "method",
52165
+ "name": "getValueLanguages",
52166
+ "privacy": "public",
52167
+ "return": {
52168
+ "type": {
52169
+ "text": "string[]"
52170
+ }
52353
52171
  },
52354
- "fieldName": "cosmic",
52355
- "inheritedFrom": {
52356
- "name": "ZnPanel",
52357
- "module": "src/components/panel/panel.component.ts"
52358
- }
52172
+ "description": "Returns all language codes that have values."
52359
52173
  },
52360
52174
  {
52361
- "name": "flush",
52362
- "type": {
52363
- "text": "boolean"
52175
+ "kind": "method",
52176
+ "name": "hasTranslation",
52177
+ "privacy": "public",
52178
+ "return": {
52179
+ "type": {
52180
+ "text": "boolean"
52181
+ }
52364
52182
  },
52365
- "fieldName": "flush",
52366
- "inheritedFrom": {
52367
- "name": "ZnPanel",
52368
- "module": "src/components/panel/panel.component.ts"
52369
- }
52183
+ "parameters": [
52184
+ {
52185
+ "name": "language",
52186
+ "type": {
52187
+ "text": "string"
52188
+ }
52189
+ }
52190
+ ],
52191
+ "description": "Whether the language carries a translation of its own, rather than falling back to English."
52370
52192
  },
52371
52193
  {
52372
- "name": "flush-x",
52373
- "type": {
52374
- "text": "boolean"
52194
+ "kind": "method",
52195
+ "name": "languageState",
52196
+ "privacy": "private",
52197
+ "return": {
52198
+ "type": {
52199
+ "text": "{ type: 'success' | 'error'; label: string }"
52200
+ }
52375
52201
  },
52376
- "fieldName": "flushX",
52377
- "inheritedFrom": {
52378
- "name": "ZnPanel",
52379
- "module": "src/components/panel/panel.component.ts"
52380
- }
52202
+ "parameters": [
52203
+ {
52204
+ "name": "language",
52205
+ "type": {
52206
+ "text": "string"
52207
+ }
52208
+ }
52209
+ ],
52210
+ "description": "The chip shown against a language, in the select's value and against each of its options."
52381
52211
  },
52382
52212
  {
52383
- "name": "flush-y",
52384
- "type": {
52385
- "text": "boolean"
52213
+ "kind": "method",
52214
+ "name": "languageLabel",
52215
+ "privacy": "private",
52216
+ "return": {
52217
+ "type": {
52218
+ "text": "string"
52219
+ }
52386
52220
  },
52387
- "fieldName": "flushY",
52388
- "inheritedFrom": {
52389
- "name": "ZnPanel",
52390
- "module": "src/components/panel/panel.component.ts"
52391
- }
52221
+ "parameters": [
52222
+ {
52223
+ "name": "language",
52224
+ "type": {
52225
+ "text": "string"
52226
+ }
52227
+ }
52228
+ ],
52229
+ "description": "The configured name, or the code where `languages` does not name the language."
52392
52230
  },
52393
52231
  {
52394
- "name": "flush-footer",
52395
- "type": {
52396
- "text": "boolean"
52232
+ "kind": "method",
52233
+ "name": "pendingValues",
52234
+ "privacy": "private",
52235
+ "return": {
52236
+ "type": {
52237
+ "text": "Record<string, string>"
52238
+ }
52397
52239
  },
52398
- "fieldName": "flushFooter",
52399
- "inheritedFrom": {
52400
- "name": "ZnPanel",
52401
- "module": "src/components/panel/panel.component.ts"
52402
- }
52240
+ "description": "`values`, falling back to the `value` attribute it is built from while that is still pending. A parent\nzn-translation-group syncs its children from its own first update, which runs before theirs, so reading\n`values` alone would see it empty and overwrite the value the server rendered."
52403
52241
  },
52404
52242
  {
52405
- "name": "transparent",
52406
- "type": {
52407
- "text": "boolean"
52408
- },
52409
- "fieldName": "transparent",
52410
- "inheritedFrom": {
52411
- "name": "ZnPanel",
52412
- "module": "src/components/panel/panel.component.ts"
52413
- }
52243
+ "kind": "field",
52244
+ "name": "handleLanguageSelect",
52245
+ "privacy": "private",
52246
+ "description": "The select's own change and input events are stopped here: they describe the language being browsed, not the\ntranslation being edited, and a consumer listening on zn-translations reads either as a value change."
52414
52247
  },
52415
52248
  {
52416
- "name": "shadow",
52417
- "type": {
52418
- "text": "boolean"
52419
- },
52420
- "fieldName": "shadow",
52421
- "inheritedFrom": {
52422
- "name": "ZnPanel",
52423
- "module": "src/components/panel/panel.component.ts"
52424
- }
52425
- }
52426
- ],
52427
- "superclass": {
52428
- "name": "ZnPanel",
52429
- "module": "/src/components/panel/panel.component"
52430
- },
52431
- "summary": "Puts several zn-translations fields behind one language select, so a whole form's worth of copy is\ntranslated a language at a time.",
52432
- "tagNameWithoutPrefix": "translation-group",
52433
- "tagName": "zn-translation-group",
52434
- "customElement": true,
52435
- "jsDoc": "/**\n * @summary Puts several zn-translations fields behind one language select, so a whole form's worth of copy is\n * translated a language at a time.\n * @documentation https://zinc.style/components/translation-group\n * @status experimental\n * @since 1.0\n *\n * The fields sit in a `zn-form-group`, so the caption, help text and the language select share its label column and\n * the fields line up with every other form group around them. Choosing a language switches every child at once, and\n * each child hides its own select while it is in a group — `grouped` is set on them here.\n *\n * The select is searchable. Each option holds its language code as its value, so typing `de` finds German without the\n * code being on show.\n *\n * Closed, the select carries how many target languages are done — `1/5`. Its options each carry a chip aggregated\n * across the children:\n *\n * - `Translated` — every child has a value for it\n * - `Partial` — only some children do\n * - `English` — none do, so all of them fall back to the English text\n *\n * `Empty` replaces the last of those for English itself, which has nothing to fall back to. English counts towards\n * the `n of m` beside the label like any other language.\n *\n * The children own their values; this component only chooses which language is shown and reports on what they hold.\n * It reads them back on every child `zn-change`, so the chips and the count follow an edit as it is typed.\n *\n * Extends `zn-panel`, so `caption`, `flush`, `transparent` and the `footer` slot behave as they do there. Nested\n * inside another panel, add `inline` to drop the chrome and keep the fields aligned with the surrounding form.\n *\n * @dependency zn-chip\n * @dependency zn-form-group\n * @dependency zn-option\n * @dependency zn-select\n *\n * @event zn-language-change - Emitted when the active language changes. Detail: `{ language: string }`.\n *\n * @slot - The `zn-translations` fields the select drives.\n * @slot actions - Buttons for the bottom of the panel, on the white body rather than the grey footer. They sit on\n * the right, as zinc's form action rows do; `align=\"start\"` moves one to the left. Write them in the order they\n * should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.\n * @slot footer - Content displayed in the grey panel footer.\n *\n * @csspart base - The component's base wrapper.\n * @csspart form-group - The form group holding the caption, the language select and the fields.\n * @csspart actions - The row of buttons at the bottom of the body.\n * @csspart language-field - The select that chooses the language every child is editing, in the group's chip slot.\n * @csspart language-select - The select itself.\n */",
52436
- "documentation": "https://zinc.style/components/translation-group",
52437
- "status": "experimental",
52438
- "since": "1.0",
52439
- "dependencies": [
52440
- "zn-chip",
52441
- "zn-form-group",
52442
- "zn-option",
52443
- "zn-select"
52444
- ],
52445
- "cssProperties": [
52446
- {
52447
- "description": "The flex-basis of the panel. Can be set using the basis-px attribute.",
52448
- "name": "--zn-panel-basis",
52449
- "inheritedFrom": {
52450
- "name": "ZnPanel",
52451
- "module": "src/components/panel/panel.component.ts"
52452
- }
52249
+ "kind": "field",
52250
+ "name": "handleLanguageInput",
52251
+ "privacy": "private"
52453
52252
  },
52454
52253
  {
52455
- "description": "Padding around the header row. Defaults to `--zn-base-gap`.",
52456
- "name": "--zn-panel-header-padding",
52457
- "inheritedFrom": {
52458
- "name": "ZnPanel",
52459
- "module": "src/components/panel/panel.component.ts"
52460
- }
52254
+ "kind": "field",
52255
+ "name": "switchLanguage",
52256
+ "privacy": "private",
52257
+ "description": "The language shown in the field, without touching `values`."
52461
52258
  },
52462
52259
  {
52463
- "description": "Padding around the footer row.",
52464
- "name": "--zn-panel-footer-padding",
52465
- "inheritedFrom": {
52466
- "name": "ZnPanel",
52467
- "module": "src/components/panel/panel.component.ts"
52468
- }
52469
- }
52470
- ]
52471
- }
52472
- ],
52473
- "exports": [
52474
- {
52475
- "kind": "js",
52476
- "name": "default",
52477
- "declaration": {
52478
- "name": "ZnTranslationGroup",
52479
- "module": "components/translation-group/translation-group.js"
52480
- }
52481
- }
52482
- ]
52483
- },
52484
- {
52485
- "kind": "javascript-module",
52486
- "path": "components/translations/translations.js",
52487
- "declarations": [
52488
- {
52489
- "kind": "class",
52490
- "description": "",
52491
- "name": "ZnTranslations",
52492
- "cssParts": [
52493
- {
52494
- "description": "The form control that wraps the label, the language select, the field and the help text.",
52495
- "name": "form-control"
52260
+ "kind": "field",
52261
+ "name": "handleValueUpdate",
52262
+ "privacy": "private"
52496
52263
  },
52497
52264
  {
52498
- "description": "The label's wrapper.",
52499
- "name": "form-control-label"
52265
+ "kind": "method",
52266
+ "name": "updateValue",
52267
+ "privacy": "private"
52500
52268
  },
52501
52269
  {
52502
- "description": "The wrapper around the field being edited.",
52503
- "name": "form-control-input"
52270
+ "kind": "field",
52271
+ "name": "handleKeyDown",
52272
+ "privacy": "private"
52504
52273
  },
52505
52274
  {
52506
- "description": "The help text's wrapper.",
52507
- "name": "form-control-help-text"
52275
+ "kind": "field",
52276
+ "name": "handleSubmit",
52277
+ "privacy": "private"
52508
52278
  },
52509
52279
  {
52510
- "description": "The select that chooses the language being edited.",
52511
- "name": "language-select"
52512
- }
52513
- ],
52514
- "slots": [
52515
- {
52516
- "description": "The field's label. Alternatively, use the `label` attribute.",
52517
- "name": "label"
52280
+ "kind": "method",
52281
+ "name": "renderField",
52282
+ "privacy": "private",
52283
+ "parameters": [
52284
+ {
52285
+ "name": "value",
52286
+ "type": {
52287
+ "text": "string"
52288
+ }
52289
+ },
52290
+ {
52291
+ "name": "placeholder",
52292
+ "type": {
52293
+ "text": "string"
52294
+ }
52295
+ },
52296
+ {
52297
+ "name": "isRTL",
52298
+ "type": {
52299
+ "text": "boolean"
52300
+ }
52301
+ }
52302
+ ],
52303
+ "description": "The control the active language's translation is edited through."
52518
52304
  },
52519
52305
  {
52520
- "description": "Text describing how to fill the field in, shown below it and shared by every language. Alternatively, use the `help-text` attribute.",
52521
- "name": "help-text"
52522
- }
52523
- ],
52524
- "members": [
52525
- {
52526
- "kind": "field",
52527
- "name": "dependencies",
52528
- "type": {
52529
- "text": "object"
52306
+ "kind": "method",
52307
+ "name": "isRTLLanguage",
52308
+ "privacy": "private",
52309
+ "return": {
52310
+ "type": {
52311
+ "text": "boolean"
52312
+ }
52530
52313
  },
52531
- "static": true,
52532
- "default": "{ 'zn-chip': ZnChip, 'zn-inline-edit': ZnInlineEdit, 'zn-input': ZnInput, 'zn-option': ZnOption, 'zn-remarkd-editor': ZnRemarkdEditor, 'zn-select': ZnSelect, 'zn-textarea': ZnTextarea }"
52533
- },
52314
+ "parameters": [
52315
+ {
52316
+ "name": "languageCode",
52317
+ "type": {
52318
+ "text": "string"
52319
+ }
52320
+ }
52321
+ ],
52322
+ "description": "Arabic and Hebrew read right to left, so the field's `dir` follows the language being edited."
52323
+ }
52324
+ ],
52325
+ "events": [
52534
52326
  {
52535
- "kind": "field",
52536
- "name": "formControlController",
52537
- "type": {
52538
- "text": "FormControlController"
52539
- },
52540
- "privacy": "private",
52541
- "readonly": true,
52542
- "default": "new FormControlController(this)"
52327
+ "description": "Emitted when a translation's value changes.",
52328
+ "name": "zn-change"
52543
52329
  },
52544
52330
  {
52545
- "kind": "field",
52546
- "name": "hasSlotController",
52547
- "privacy": "private",
52548
- "readonly": true,
52549
- "default": "new HasSlotController(this, 'label', 'help-text')"
52550
- },
52331
+ "description": "Emitted when a translation receives input.",
52332
+ "name": "zn-input"
52333
+ }
52334
+ ],
52335
+ "attributes": [
52551
52336
  {
52552
- "kind": "field",
52553
52337
  "name": "name",
52554
52338
  "type": {
52555
52339
  "text": "string"
52556
52340
  },
52557
52341
  "default": "''",
52558
52342
  "description": "The name submitted with the form.",
52559
- "attribute": "name"
52343
+ "fieldName": "name"
52560
52344
  },
52561
52345
  {
52562
- "kind": "field",
52563
52346
  "name": "value",
52564
52347
  "type": {
52565
52348
  "text": "string"
52566
52349
  },
52567
52350
  "default": "'{\"en\":\"\"}'",
52568
52351
  "description": "The translations as a JSON object keyed by language code. The mirror of `values` in attribute form.",
52569
- "attribute": "value"
52352
+ "fieldName": "value"
52570
52353
  },
52571
52354
  {
52572
- "kind": "field",
52573
52355
  "name": "label",
52574
52356
  "type": {
52575
52357
  "text": "string"
52576
52358
  },
52577
52359
  "default": "''",
52578
52360
  "description": "The label shown above the field. If you need HTML, use the `label` slot instead.",
52579
- "attribute": "label"
52361
+ "fieldName": "label"
52580
52362
  },
52581
52363
  {
52582
- "kind": "field",
52583
- "name": "helpText",
52364
+ "name": "help-text",
52584
52365
  "type": {
52585
52366
  "text": "string"
52586
52367
  },
52587
52368
  "default": "''",
52588
52369
  "description": "Text shown below the field, describing how to fill it in. Applies to every language. If you need HTML, use the\n`help-text` slot instead.",
52589
- "attribute": "help-text"
52370
+ "fieldName": "helpText"
52590
52371
  },
52591
52372
  {
52592
- "kind": "field",
52593
52373
  "name": "disabled",
52594
52374
  "type": {
52595
52375
  "text": "boolean"
52596
52376
  },
52597
52377
  "default": "false",
52598
52378
  "description": "Disables editing in every language.",
52599
- "attribute": "disabled",
52600
- "reflects": true
52379
+ "fieldName": "disabled"
52601
52380
  },
52602
52381
  {
52603
- "kind": "field",
52604
52382
  "name": "required",
52605
52383
  "type": {
52606
52384
  "text": "boolean"
52607
52385
  },
52608
52386
  "default": "false",
52609
52387
  "description": "Marks the label required. Validity is not enforced per language.",
52610
- "attribute": "required",
52611
- "reflects": true
52388
+ "fieldName": "required"
52612
52389
  },
52613
52390
  {
52614
- "kind": "field",
52615
52391
  "name": "flush",
52616
52392
  "type": {
52617
52393
  "text": "boolean"
52618
52394
  },
52619
52395
  "default": "false",
52620
52396
  "description": "Removes the component's own padding.",
52621
- "attribute": "flush",
52622
- "reflects": true
52397
+ "fieldName": "flush"
52623
52398
  },
52624
52399
  {
52625
- "kind": "field",
52626
- "name": "inputType",
52400
+ "name": "input-type",
52627
52401
  "type": {
52628
52402
  "text": "'text' | 'number' | 'textarea' | 'remarkd'"
52629
52403
  },
52630
52404
  "default": "'text'",
52631
52405
  "description": "The control each translation is edited through.",
52632
- "attribute": "input-type"
52406
+ "fieldName": "inputType"
52633
52407
  },
52634
52408
  {
52635
- "kind": "field",
52636
- "name": "textareaRows",
52409
+ "name": "textarea-rows",
52637
52410
  "type": {
52638
52411
  "text": "number | undefined"
52639
52412
  },
52640
52413
  "description": "Rows of the textarea, when `input-type` is `textarea`.",
52641
- "attribute": "textarea-rows"
52414
+ "fieldName": "textareaRows"
52642
52415
  },
52643
52416
  {
52644
- "kind": "field",
52645
- "name": "allowRaw",
52417
+ "name": "allow-raw",
52646
52418
  "type": {
52647
52419
  "text": "boolean"
52648
52420
  },
52649
52421
  "default": "false",
52650
52422
  "description": "Allows raw HTML blocks, when `input-type` is `remarkd`.",
52651
- "attribute": "allow-raw"
52423
+ "fieldName": "allowRaw"
52652
52424
  },
52653
52425
  {
52654
- "kind": "field",
52655
- "name": "attachmentUrl",
52426
+ "name": "attachment-url",
52656
52427
  "type": {
52657
52428
  "text": "string"
52658
52429
  },
52659
52430
  "default": "''",
52660
52431
  "description": "Where the remarkd editor uploads images, when `input-type` is `remarkd`.",
52661
- "attribute": "attachment-url"
52432
+ "fieldName": "attachmentUrl"
52662
52433
  },
52663
52434
  {
52664
- "kind": "field",
52665
- "name": "includeUrl",
52435
+ "name": "include-url",
52666
52436
  "type": {
52667
52437
  "text": "string"
52668
52438
  },
52669
52439
  "default": "''",
52670
52440
  "description": "Where the remarkd editor lists embeddable includes, when `input-type` is `remarkd`.",
52671
- "attribute": "include-url"
52441
+ "fieldName": "includeUrl"
52672
52442
  },
52673
52443
  {
52674
- "kind": "field",
52675
- "name": "linkUrl",
52444
+ "name": "link-url",
52676
52445
  "type": {
52677
52446
  "text": "string"
52678
52447
  },
52679
52448
  "default": "''",
52680
52449
  "description": "Where the remarkd editor searches link targets, when `input-type` is `remarkd`.",
52681
- "attribute": "link-url"
52450
+ "fieldName": "linkUrl"
52682
52451
  },
52683
52452
  {
52684
- "kind": "field",
52685
- "name": "inlineEdit",
52453
+ "name": "inline-edit",
52686
52454
  "type": {
52687
52455
  "text": "boolean"
52688
52456
  },
52689
52457
  "default": "false",
52690
52458
  "description": "Edits the translation through a `zn-inline-edit` — the value reads as text until it is clicked — rather than a\nplain input or textarea.",
52691
- "attribute": "inline-edit",
52692
- "reflects": true
52459
+ "fieldName": "inlineEdit"
52693
52460
  },
52694
52461
  {
52695
- "kind": "field",
52696
- "name": "slashItems",
52462
+ "name": "slash-items",
52697
52463
  "type": {
52698
52464
  "text": "SlashMenuItem[]"
52699
52465
  },
52700
52466
  "default": "[]",
52701
52467
  "description": "Quick insertions offered by the slash menu on `text` and `textarea` inputs. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
52702
- "attribute": "slash-items"
52468
+ "fieldName": "slashItems"
52469
+ },
52470
+ {
52471
+ "name": "slash-preset",
52472
+ "type": {
52473
+ "text": "string"
52474
+ },
52475
+ "default": "''",
52476
+ "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
52477
+ "fieldName": "slashPreset"
52478
+ },
52479
+ {
52480
+ "name": "slash-trigger",
52481
+ "type": {
52482
+ "text": "string"
52483
+ },
52484
+ "default": "'/'",
52485
+ "description": "The characters that open the slash menu.",
52486
+ "fieldName": "slashTrigger"
52487
+ },
52488
+ {
52489
+ "name": "slash-heading",
52490
+ "type": {
52491
+ "text": "string"
52492
+ },
52493
+ "default": "'Insert'",
52494
+ "description": "The name the slash menu's list is announced by.",
52495
+ "fieldName": "slashHeading"
52496
+ },
52497
+ {
52498
+ "name": "slash-hide-keys",
52499
+ "type": {
52500
+ "text": "boolean"
52501
+ },
52502
+ "default": "false",
52503
+ "description": "Hides the insertion keys normally shown against the slash menu's items.",
52504
+ "fieldName": "slashHideKeys"
52703
52505
  },
52704
52506
  {
52705
- "kind": "field",
52706
- "name": "slashPreset",
52707
- "type": {
52708
- "text": "string"
52709
- },
52710
- "default": "''",
52711
- "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
52712
- "attribute": "slash-preset"
52507
+ "name": "slash-recent-key",
52508
+ "type": {
52509
+ "text": "string"
52510
+ },
52511
+ "default": "''",
52512
+ "description": "Lists the slash menu items most recently chosen here above the rest, remembered under this key.",
52513
+ "fieldName": "slashRecentKey"
52514
+ },
52515
+ {
52516
+ "name": "grouped",
52517
+ "type": {
52518
+ "text": "boolean"
52519
+ },
52520
+ "default": "false",
52521
+ "description": "Hides this component's own language select and defers the choice to a parent zn-translation-group. The group sets\nthis on its children itself.",
52522
+ "fieldName": "grouped"
52523
+ },
52524
+ {
52525
+ "name": "languages",
52526
+ "type": {
52527
+ "text": "Record<string, string>"
52528
+ },
52529
+ "default": "{ 'en': 'EN' }",
52530
+ "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to.",
52531
+ "fieldName": "languages"
52532
+ },
52533
+ {
52534
+ "name": "values",
52535
+ "type": {
52536
+ "text": "Record<string, string>"
52537
+ },
52538
+ "default": "{}",
52539
+ "description": "The translations as an object keyed by language code. The mirror of `value` in property form.",
52540
+ "fieldName": "values"
52541
+ }
52542
+ ],
52543
+ "superclass": {
52544
+ "name": "ZincElement",
52545
+ "module": "/src/internal/zinc-element"
52546
+ },
52547
+ "summary": "Collects one piece of text in several languages, one language at a time.",
52548
+ "tagNameWithoutPrefix": "translations",
52549
+ "tagName": "zn-translations",
52550
+ "customElement": true,
52551
+ "jsDoc": "/**\n * @summary Collects one piece of text in several languages, one language at a time.\n * @documentation https://zinc.style/components/translations\n * @status experimental\n * @since 1.0\n *\n * A select above the field chooses the language being edited. Closed, it carries how many languages are translated —\n * `1/5`; open, every language it offers carries a chip saying whether it has a translation of its own or falls back\n * to English. Blank languages fall back to English at render\n * time, so a blank field shows the English text as its placeholder rather than looking empty.\n *\n * The value submitted is a JSON object keyed by language code. A language stays out of it until it is typed into, so\n * browsing the languages does not pad the payload with empty translations.\n *\n * Put several of these in a `zn-translation-group` to have one select drive all of them.\n *\n * @dependency zn-chip\n * @dependency zn-inline-edit\n * @dependency zn-input\n * @dependency zn-option\n * @dependency zn-select\n * @dependency zn-textarea\n *\n * @slot label - The field's label. Alternatively, use the `label` attribute.\n * @slot help-text - Text describing how to fill the field in, shown below it and shared by every language.\n * Alternatively, use the `help-text` attribute.\n *\n * @event zn-change - Emitted when a translation's value changes.\n * @event zn-input - Emitted when a translation receives input.\n *\n * @csspart form-control - The form control that wraps the label, the language select, the field and the help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The wrapper around the field being edited.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart language-select - The select that chooses the language being edited.\n */",
52552
+ "documentation": "https://zinc.style/components/translations",
52553
+ "status": "experimental",
52554
+ "since": "1.0",
52555
+ "dependencies": [
52556
+ "zn-chip",
52557
+ "zn-inline-edit",
52558
+ "zn-input",
52559
+ "zn-option",
52560
+ "zn-select",
52561
+ "zn-textarea"
52562
+ ]
52563
+ }
52564
+ ],
52565
+ "exports": [
52566
+ {
52567
+ "kind": "js",
52568
+ "name": "default",
52569
+ "declaration": {
52570
+ "name": "ZnTranslations",
52571
+ "module": "components/translations/translations.js"
52572
+ }
52573
+ }
52574
+ ]
52575
+ },
52576
+ {
52577
+ "kind": "javascript-module",
52578
+ "path": "components/translation-group/translation-group.js",
52579
+ "declarations": [
52580
+ {
52581
+ "kind": "class",
52582
+ "description": "",
52583
+ "name": "ZnTranslationGroup",
52584
+ "cssParts": [
52585
+ {
52586
+ "description": "The component's base wrapper.",
52587
+ "name": "base",
52588
+ "inheritedFrom": {
52589
+ "name": "ZnPanel",
52590
+ "module": "src/components/panel/panel.component.ts"
52591
+ }
52592
+ },
52593
+ {
52594
+ "description": "The form group holding the caption, the language select and the fields.",
52595
+ "name": "form-group"
52596
+ },
52597
+ {
52598
+ "description": "The row of buttons at the bottom of the body.",
52599
+ "name": "actions"
52600
+ },
52601
+ {
52602
+ "description": "The select that chooses the language every child is editing, in the group's chip slot.",
52603
+ "name": "language-field"
52604
+ },
52605
+ {
52606
+ "description": "The select itself.",
52607
+ "name": "language-select"
52608
+ },
52609
+ {
52610
+ "description": "The header region, when a caption or actions are given.",
52611
+ "name": "header",
52612
+ "inheritedFrom": {
52613
+ "name": "ZnPanel",
52614
+ "module": "src/components/panel/panel.component.ts"
52615
+ }
52616
+ },
52617
+ {
52618
+ "description": "The padded row inside the header, forwarded from zn-header.",
52619
+ "name": "header-content",
52620
+ "inheritedFrom": {
52621
+ "name": "ZnPanel",
52622
+ "module": "src/components/panel/panel.component.ts"
52623
+ }
52624
+ },
52625
+ {
52626
+ "description": "The footer region, when the footer slot is filled.",
52627
+ "name": "footer",
52628
+ "inheritedFrom": {
52629
+ "name": "ZnPanel",
52630
+ "module": "src/components/panel/panel.component.ts"
52631
+ }
52632
+ }
52633
+ ],
52634
+ "slots": [
52635
+ {
52636
+ "description": "The `zn-translations` fields the select drives.",
52637
+ "name": "",
52638
+ "inheritedFrom": {
52639
+ "name": "ZnPanel",
52640
+ "module": "src/components/panel/panel.component.ts"
52641
+ }
52713
52642
  },
52714
52643
  {
52715
- "kind": "field",
52716
- "name": "slashTrigger",
52717
- "type": {
52718
- "text": "string"
52719
- },
52720
- "default": "'/'",
52721
- "description": "The characters that open the slash menu.",
52722
- "attribute": "slash-trigger"
52644
+ "description": "Buttons for the bottom of the panel, on the white body rather than the grey footer. They sit on the right, as zinc's form action rows do; `align=\"start\"` moves one to the left. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.",
52645
+ "name": "actions",
52646
+ "inheritedFrom": {
52647
+ "name": "ZnPanel",
52648
+ "module": "src/components/panel/panel.component.ts"
52649
+ }
52723
52650
  },
52651
+ {
52652
+ "description": "Content displayed in the grey panel footer.",
52653
+ "name": "footer",
52654
+ "inheritedFrom": {
52655
+ "name": "ZnPanel",
52656
+ "module": "src/components/panel/panel.component.ts"
52657
+ }
52658
+ }
52659
+ ],
52660
+ "members": [
52724
52661
  {
52725
52662
  "kind": "field",
52726
- "name": "slashHeading",
52663
+ "name": "dependencies",
52727
52664
  "type": {
52728
- "text": "string"
52665
+ "text": "object"
52729
52666
  },
52730
- "default": "'Insert'",
52731
- "description": "The name the slash menu's list is announced by.",
52732
- "attribute": "slash-heading"
52667
+ "static": true,
52668
+ "default": "{ 'zn-chip': ZnChip, 'zn-form-group': ZnFormGroup, 'zn-option': ZnOption, 'zn-select': ZnSelect }"
52733
52669
  },
52734
52670
  {
52735
52671
  "kind": "field",
52736
- "name": "slashHideKeys",
52737
- "type": {
52738
- "text": "boolean"
52739
- },
52740
- "default": "false",
52741
- "description": "Hides the insertion keys normally shown against the slash menu's items.",
52742
- "attribute": "slash-hide-keys"
52672
+ "name": "_slotController",
52673
+ "privacy": "private",
52674
+ "readonly": true,
52675
+ "default": "new HasSlotController(this, 'actions', 'footer')"
52743
52676
  },
52744
52677
  {
52745
52678
  "kind": "field",
52746
- "name": "slashRecentKey",
52679
+ "name": "label",
52747
52680
  "type": {
52748
52681
  "text": "string"
52749
52682
  },
52750
52683
  "default": "''",
52751
- "description": "Lists the slash menu items most recently chosen here above the rest, remembered under this key.",
52752
- "attribute": "slash-recent-key"
52684
+ "description": "The form group's label. An alias for the inherited `caption`, which wins where both are set.",
52685
+ "attribute": "label"
52753
52686
  },
52754
52687
  {
52755
52688
  "kind": "field",
52756
- "name": "slashItemsProvider",
52689
+ "name": "helpText",
52757
52690
  "type": {
52758
- "text": "(query: string) => SlashMenuItem[] | Promise<SlashMenuItem[]> | undefined"
52691
+ "text": "string"
52759
52692
  },
52760
- "description": "Resolves additional slash menu items each time the menu opens. JavaScript only."
52693
+ "default": "''",
52694
+ "description": "Sits under the label, above the language select, as help text does in any other form group.",
52695
+ "attribute": "help-text"
52761
52696
  },
52762
52697
  {
52763
52698
  "kind": "field",
52764
- "name": "grouped",
52699
+ "name": "inline",
52765
52700
  "type": {
52766
52701
  "text": "boolean"
52767
52702
  },
52768
52703
  "default": "false",
52769
- "description": "Hides this component's own language select and defers the choice to a parent zn-translation-group. The group sets\nthis on its children itself.",
52770
- "attribute": "grouped",
52704
+ "description": "Drops the panel chrome — border, background and padding — so the group reads as a section of the surrounding form\nrather than a panel of its own. For groups nested inside another panel, where the fields would otherwise sit\nindented behind a second border.",
52705
+ "attribute": "inline",
52771
52706
  "reflects": true
52772
52707
  },
52773
52708
  {
52774
52709
  "kind": "field",
52775
- "name": "languages",
52710
+ "name": "languageLabel",
52776
52711
  "type": {
52777
- "text": "Record<string, string>"
52712
+ "text": "string"
52778
52713
  },
52779
- "default": "{ 'en': 'EN' }",
52780
- "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to.",
52781
- "attribute": "languages"
52714
+ "default": "'Edit Languages'",
52715
+ "description": "The select's accessible name. Not shown — the caption is what names the section on screen — but read out by a\nscreen reader, which has nothing else to go on once the visible label is gone.",
52716
+ "attribute": "language-label"
52782
52717
  },
52783
52718
  {
52784
52719
  "kind": "field",
52785
- "name": "values",
52720
+ "name": "languages",
52786
52721
  "type": {
52787
52722
  "text": "Record<string, string>"
52788
52723
  },
52789
- "default": "{}",
52790
- "description": "The translations as an object keyed by language code. The mirror of `value` in property form.",
52791
- "attribute": "values"
52792
- },
52793
- {
52794
- "kind": "field",
52795
- "name": "defaultValue",
52796
- "type": {
52797
- "text": "string"
52798
- },
52799
- "default": "'{\"en\":\"\"}'",
52800
- "description": "The serialized translations a form reset restores. Taken from the `value` attribute where there is one."
52724
+ "default": "{ 'en': 'EN' }",
52725
+ "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to. Set on every\nchild, so they do not need their own copy.",
52726
+ "attribute": "languages"
52801
52727
  },
52802
52728
  {
52803
52729
  "kind": "field",
@@ -52806,41 +52732,44 @@
52806
52732
  "text": "string"
52807
52733
  },
52808
52734
  "privacy": "private",
52809
- "default": "'en'"
52735
+ "default": "'en'",
52736
+ "description": "The language every child is currently editing."
52810
52737
  },
52811
52738
  {
52812
52739
  "kind": "field",
52813
- "name": "validity",
52740
+ "name": "_form",
52814
52741
  "type": {
52815
- "text": "ValidityState"
52742
+ "text": "HTMLFormElement | null"
52816
52743
  },
52817
- "readonly": true
52818
- },
52819
- {
52820
- "kind": "field",
52821
- "name": "validationMessage",
52822
- "readonly": true
52823
- },
52824
- {
52825
- "kind": "method",
52826
- "name": "checkValidity"
52827
- },
52828
- {
52829
- "kind": "method",
52830
- "name": "getForm"
52744
+ "privacy": "private",
52745
+ "default": "null"
52831
52746
  },
52832
52747
  {
52833
52748
  "kind": "method",
52834
- "name": "reportValidity"
52749
+ "name": "getAllTranslations",
52750
+ "privacy": "private",
52751
+ "return": {
52752
+ "type": {
52753
+ "text": "ZnTranslations[]"
52754
+ }
52755
+ },
52756
+ "description": "The children the select drives. Read live rather than cached, so markup added later is picked up."
52835
52757
  },
52836
52758
  {
52837
52759
  "kind": "method",
52838
- "name": "setCustomValidity"
52760
+ "name": "syncChildren",
52761
+ "privacy": "private",
52762
+ "description": "Sync grouped state, languages, and active language to all children."
52839
52763
  },
52840
52764
  {
52841
52765
  "kind": "method",
52842
- "name": "setActiveLanguage",
52843
- "privacy": "public",
52766
+ "name": "languageState",
52767
+ "privacy": "private",
52768
+ "return": {
52769
+ "type": {
52770
+ "text": "{ type: 'success' | 'warning' | 'error'; label: string }"
52771
+ }
52772
+ },
52844
52773
  "parameters": [
52845
52774
  {
52846
52775
  "name": "language",
@@ -52849,231 +52778,289 @@
52849
52778
  }
52850
52779
  }
52851
52780
  ],
52852
- "description": "Sets the active language externally. Used by zn-translation-group. Browsing to a language does not create a key\nfor it — an untouched language stays absent from `values` so it is not submitted as an empty translation."
52781
+ "description": "A language is translated once every child carries a value for it, partial while only some do. The chips and the\ncount are read off the children, so a child's edit has to bring the group back round."
52853
52782
  },
52854
52783
  {
52855
52784
  "kind": "method",
52856
- "name": "getActiveLanguage",
52857
- "privacy": "public",
52785
+ "name": "displayName",
52786
+ "privacy": "private",
52858
52787
  "return": {
52859
52788
  "type": {
52860
52789
  "text": "string"
52861
52790
  }
52862
52791
  },
52863
- "description": "Returns the currently active language."
52792
+ "parameters": [
52793
+ {
52794
+ "name": "language",
52795
+ "type": {
52796
+ "text": "string"
52797
+ }
52798
+ }
52799
+ ],
52800
+ "description": "The configured name, or the code where `languages` does not name the language."
52864
52801
  },
52865
52802
  {
52866
52803
  "kind": "method",
52867
- "name": "addLanguageKey",
52868
- "privacy": "public",
52804
+ "name": "syncChildLanguages",
52805
+ "privacy": "private",
52806
+ "description": "Children take their language list from the group, so a change to `languages` has to reach them."
52807
+ },
52808
+ {
52809
+ "kind": "field",
52810
+ "name": "handleSlotChange",
52811
+ "privacy": "private"
52812
+ },
52813
+ {
52814
+ "kind": "method",
52815
+ "name": "switchLanguage",
52816
+ "privacy": "private",
52869
52817
  "parameters": [
52870
52818
  {
52871
- "name": "languageCode",
52819
+ "name": "lang",
52872
52820
  "type": {
52873
52821
  "text": "string"
52874
52822
  }
52875
52823
  }
52876
52824
  ],
52877
- "description": "Adds a language key to this component's values if not already present. Used by zn-translation-group."
52825
+ "description": "Moves every child onto `lang` and announces it. Does not touch their values."
52878
52826
  },
52879
52827
  {
52880
- "kind": "method",
52881
- "name": "getValueLanguages",
52882
- "privacy": "public",
52883
- "return": {
52884
- "type": {
52885
- "text": "string[]"
52886
- }
52828
+ "kind": "field",
52829
+ "name": "handleLanguageSelect",
52830
+ "privacy": "private",
52831
+ "description": "The select's own change and input events describe the language being browsed, not a translation being edited, so\nthey are stopped rather than allowed to reach a consumer listening for a child's value change."
52832
+ },
52833
+ {
52834
+ "kind": "field",
52835
+ "name": "handleLanguageInput",
52836
+ "privacy": "private"
52837
+ },
52838
+ {
52839
+ "kind": "field",
52840
+ "name": "handleChildChange",
52841
+ "privacy": "private",
52842
+ "description": "A child's edit changes which chips the select shows, and the translated count above it."
52843
+ },
52844
+ {
52845
+ "kind": "field",
52846
+ "name": "handleFormReset",
52847
+ "privacy": "private",
52848
+ "description": "The children restore their own values on the form's reset event without announcing it, and the chips and the\ncount are read off them — so re-read once every listener on that event has run."
52849
+ },
52850
+ {
52851
+ "kind": "field",
52852
+ "name": "hasSlotController",
52853
+ "privacy": "private",
52854
+ "readonly": true,
52855
+ "default": "new HasSlotController(this, '[default]', 'actions', 'footer')",
52856
+ "inheritedFrom": {
52857
+ "name": "ZnPanel",
52858
+ "module": "components/panel/panel.js"
52859
+ }
52860
+ },
52861
+ {
52862
+ "kind": "field",
52863
+ "name": "basis",
52864
+ "type": {
52865
+ "text": "number"
52887
52866
  },
52888
- "description": "Returns all language codes that have values."
52867
+ "attribute": "basis-px",
52868
+ "inheritedFrom": {
52869
+ "name": "ZnPanel",
52870
+ "module": "components/panel/panel.js"
52871
+ }
52872
+ },
52873
+ {
52874
+ "kind": "field",
52875
+ "name": "caption",
52876
+ "type": {
52877
+ "text": "string"
52878
+ },
52879
+ "attribute": "caption",
52880
+ "inheritedFrom": {
52881
+ "name": "ZnPanel",
52882
+ "module": "components/panel/panel.js"
52883
+ }
52884
+ },
52885
+ {
52886
+ "kind": "field",
52887
+ "name": "icon",
52888
+ "type": {
52889
+ "text": "string"
52890
+ },
52891
+ "attribute": "icon",
52892
+ "inheritedFrom": {
52893
+ "name": "ZnPanel",
52894
+ "module": "components/panel/panel.js"
52895
+ }
52889
52896
  },
52890
52897
  {
52891
- "kind": "method",
52892
- "name": "hasTranslation",
52893
- "privacy": "public",
52894
- "return": {
52895
- "type": {
52896
- "text": "boolean"
52897
- }
52898
+ "kind": "field",
52899
+ "name": "tabbed",
52900
+ "type": {
52901
+ "text": "boolean"
52898
52902
  },
52899
- "parameters": [
52900
- {
52901
- "name": "language",
52902
- "type": {
52903
- "text": "string"
52904
- }
52905
- }
52906
- ],
52907
- "description": "Whether the language carries a translation of its own, rather than falling back to English."
52903
+ "attribute": "tabbed",
52904
+ "inheritedFrom": {
52905
+ "name": "ZnPanel",
52906
+ "module": "components/panel/panel.js"
52907
+ }
52908
52908
  },
52909
52909
  {
52910
- "kind": "method",
52911
- "name": "languageState",
52912
- "privacy": "private",
52913
- "return": {
52914
- "type": {
52915
- "text": "{ type: 'success' | 'error'; label: string }"
52916
- }
52910
+ "kind": "field",
52911
+ "name": "headerBorderless",
52912
+ "type": {
52913
+ "text": "boolean"
52917
52914
  },
52918
- "parameters": [
52919
- {
52920
- "name": "language",
52921
- "type": {
52922
- "text": "string"
52923
- }
52924
- }
52925
- ],
52926
- "description": "The chip shown against a language, in the select's value and against each of its options."
52915
+ "attribute": "header-borderless",
52916
+ "inheritedFrom": {
52917
+ "name": "ZnPanel",
52918
+ "module": "components/panel/panel.js"
52919
+ }
52927
52920
  },
52928
52921
  {
52929
- "kind": "method",
52930
- "name": "languageLabel",
52931
- "privacy": "private",
52932
- "return": {
52933
- "type": {
52934
- "text": "string"
52935
- }
52922
+ "kind": "field",
52923
+ "name": "cosmic",
52924
+ "type": {
52925
+ "text": "boolean"
52936
52926
  },
52937
- "parameters": [
52938
- {
52939
- "name": "language",
52940
- "type": {
52941
- "text": "string"
52942
- }
52943
- }
52944
- ],
52945
- "description": "The configured name, or the code where `languages` does not name the language."
52927
+ "attribute": "cosmic",
52928
+ "inheritedFrom": {
52929
+ "name": "ZnPanel",
52930
+ "module": "components/panel/panel.js"
52931
+ }
52946
52932
  },
52947
52933
  {
52948
- "kind": "method",
52949
- "name": "pendingValues",
52950
- "privacy": "private",
52951
- "return": {
52952
- "type": {
52953
- "text": "Record<string, string>"
52954
- }
52934
+ "kind": "field",
52935
+ "name": "flush",
52936
+ "type": {
52937
+ "text": "boolean"
52955
52938
  },
52956
- "description": "`values`, falling back to the `value` attribute it is built from while that is still pending. A parent\nzn-translation-group syncs its children from its own first update, which runs before theirs, so reading\n`values` alone would see it empty and overwrite the value the server rendered."
52939
+ "attribute": "flush",
52940
+ "inheritedFrom": {
52941
+ "name": "ZnPanel",
52942
+ "module": "components/panel/panel.js"
52943
+ }
52957
52944
  },
52958
52945
  {
52959
52946
  "kind": "field",
52960
- "name": "handleLanguageSelect",
52961
- "privacy": "private",
52962
- "description": "The select's own change and input events are stopped here: they describe the language being browsed, not the\ntranslation being edited, and a consumer listening on zn-translations reads either as a value change."
52947
+ "name": "flushX",
52948
+ "type": {
52949
+ "text": "boolean"
52950
+ },
52951
+ "attribute": "flush-x",
52952
+ "inheritedFrom": {
52953
+ "name": "ZnPanel",
52954
+ "module": "components/panel/panel.js"
52955
+ }
52963
52956
  },
52964
52957
  {
52965
52958
  "kind": "field",
52966
- "name": "handleLanguageInput",
52967
- "privacy": "private"
52959
+ "name": "flushY",
52960
+ "type": {
52961
+ "text": "boolean"
52962
+ },
52963
+ "attribute": "flush-y",
52964
+ "inheritedFrom": {
52965
+ "name": "ZnPanel",
52966
+ "module": "components/panel/panel.js"
52967
+ }
52968
52968
  },
52969
52969
  {
52970
52970
  "kind": "field",
52971
- "name": "switchLanguage",
52972
- "privacy": "private",
52973
- "description": "The language shown in the field, without touching `values`."
52971
+ "name": "flushFooter",
52972
+ "type": {
52973
+ "text": "boolean"
52974
+ },
52975
+ "attribute": "flush-footer",
52976
+ "inheritedFrom": {
52977
+ "name": "ZnPanel",
52978
+ "module": "components/panel/panel.js"
52979
+ }
52974
52980
  },
52975
52981
  {
52976
52982
  "kind": "field",
52977
- "name": "handleValueUpdate",
52978
- "privacy": "private"
52983
+ "name": "transparent",
52984
+ "type": {
52985
+ "text": "boolean"
52986
+ },
52987
+ "attribute": "transparent",
52988
+ "inheritedFrom": {
52989
+ "name": "ZnPanel",
52990
+ "module": "components/panel/panel.js"
52991
+ }
52979
52992
  },
52980
52993
  {
52981
- "kind": "method",
52982
- "name": "updateValue",
52983
- "privacy": "private"
52994
+ "kind": "field",
52995
+ "name": "shadow",
52996
+ "type": {
52997
+ "text": "boolean"
52998
+ },
52999
+ "attribute": "shadow",
53000
+ "inheritedFrom": {
53001
+ "name": "ZnPanel",
53002
+ "module": "components/panel/panel.js"
53003
+ }
52984
53004
  },
52985
53005
  {
52986
53006
  "kind": "field",
52987
- "name": "handleKeyDown",
52988
- "privacy": "private"
53007
+ "name": "bodyEmpty",
53008
+ "type": {
53009
+ "text": "boolean"
53010
+ },
53011
+ "privacy": "private",
53012
+ "default": "false",
53013
+ "inheritedFrom": {
53014
+ "name": "ZnPanel",
53015
+ "module": "components/panel/panel.js"
53016
+ }
52989
53017
  },
52990
53018
  {
52991
53019
  "kind": "field",
52992
- "name": "handleSubmit",
52993
- "privacy": "private"
53020
+ "name": "resizeObserver",
53021
+ "type": {
53022
+ "text": "ResizeObserver | null"
53023
+ },
53024
+ "privacy": "private",
53025
+ "default": "null",
53026
+ "inheritedFrom": {
53027
+ "name": "ZnPanel",
53028
+ "module": "components/panel/panel.js"
53029
+ }
52994
53030
  },
52995
53031
  {
52996
53032
  "kind": "method",
52997
- "name": "renderField",
53033
+ "name": "observeBodyContent",
52998
53034
  "privacy": "private",
52999
- "parameters": [
53000
- {
53001
- "name": "value",
53002
- "type": {
53003
- "text": "string"
53004
- }
53005
- },
53006
- {
53007
- "name": "placeholder",
53008
- "type": {
53009
- "text": "string"
53010
- }
53011
- },
53012
- {
53013
- "name": "isRTL",
53014
- "type": {
53015
- "text": "boolean"
53016
- }
53017
- }
53018
- ],
53019
- "description": "The control the active language's translation is edited through."
53035
+ "inheritedFrom": {
53036
+ "name": "ZnPanel",
53037
+ "module": "components/panel/panel.js"
53038
+ }
53020
53039
  },
53021
53040
  {
53022
53041
  "kind": "method",
53023
- "name": "isRTLLanguage",
53042
+ "name": "measureBodyContent",
53024
53043
  "privacy": "private",
53025
- "return": {
53026
- "type": {
53027
- "text": "boolean"
53028
- }
53029
- },
53030
- "parameters": [
53031
- {
53032
- "name": "languageCode",
53033
- "type": {
53034
- "text": "string"
53035
- }
53036
- }
53037
- ],
53038
- "description": "Arabic and Hebrew read right to left, so the field's `dir` follows the language being edited."
53039
- }
53040
- ],
53041
- "events": [
53042
- {
53043
- "description": "Emitted when a translation's value changes.",
53044
- "name": "zn-change"
53045
- },
53046
- {
53047
- "description": "Emitted when a translation receives input.",
53048
- "name": "zn-input"
53044
+ "inheritedFrom": {
53045
+ "name": "ZnPanel",
53046
+ "module": "components/panel/panel.js"
53047
+ }
53049
53048
  }
53050
53049
  ],
53051
- "attributes": [
53052
- {
53053
- "name": "name",
53054
- "type": {
53055
- "text": "string"
53056
- },
53057
- "default": "''",
53058
- "description": "The name submitted with the form.",
53059
- "fieldName": "name"
53060
- },
53061
- {
53062
- "name": "value",
53063
- "type": {
53064
- "text": "string"
53065
- },
53066
- "default": "'{\"en\":\"\"}'",
53067
- "description": "The translations as a JSON object keyed by language code. The mirror of `values` in attribute form.",
53068
- "fieldName": "value"
53069
- },
53050
+ "events": [
53051
+ {
53052
+ "description": "Emitted when the active language changes. Detail: `{ language: string }`.",
53053
+ "name": "zn-language-change"
53054
+ }
53055
+ ],
53056
+ "attributes": [
53070
53057
  {
53071
53058
  "name": "label",
53072
53059
  "type": {
53073
53060
  "text": "string"
53074
53061
  },
53075
53062
  "default": "''",
53076
- "description": "The label shown above the field. If you need HTML, use the `label` slot instead.",
53063
+ "description": "The form group's label. An alias for the inherited `caption`, which wins where both are set.",
53077
53064
  "fieldName": "label"
53078
53065
  },
53079
53066
  {
@@ -53082,199 +53069,212 @@
53082
53069
  "text": "string"
53083
53070
  },
53084
53071
  "default": "''",
53085
- "description": "Text shown below the field, describing how to fill it in. Applies to every language. If you need HTML, use the\n`help-text` slot instead.",
53072
+ "description": "Sits under the label, above the language select, as help text does in any other form group.",
53086
53073
  "fieldName": "helpText"
53087
53074
  },
53088
53075
  {
53089
- "name": "disabled",
53090
- "type": {
53091
- "text": "boolean"
53092
- },
53093
- "default": "false",
53094
- "description": "Disables editing in every language.",
53095
- "fieldName": "disabled"
53096
- },
53097
- {
53098
- "name": "required",
53099
- "type": {
53100
- "text": "boolean"
53101
- },
53102
- "default": "false",
53103
- "description": "Marks the label required. Validity is not enforced per language.",
53104
- "fieldName": "required"
53105
- },
53106
- {
53107
- "name": "flush",
53076
+ "name": "inline",
53108
53077
  "type": {
53109
53078
  "text": "boolean"
53110
53079
  },
53111
53080
  "default": "false",
53112
- "description": "Removes the component's own padding.",
53113
- "fieldName": "flush"
53114
- },
53115
- {
53116
- "name": "input-type",
53117
- "type": {
53118
- "text": "'text' | 'number' | 'textarea' | 'remarkd'"
53119
- },
53120
- "default": "'text'",
53121
- "description": "The control each translation is edited through.",
53122
- "fieldName": "inputType"
53081
+ "description": "Drops the panel chrome — border, background and padding — so the group reads as a section of the surrounding form\nrather than a panel of its own. For groups nested inside another panel, where the fields would otherwise sit\nindented behind a second border.",
53082
+ "fieldName": "inline"
53123
53083
  },
53124
53084
  {
53125
- "name": "textarea-rows",
53085
+ "name": "language-label",
53126
53086
  "type": {
53127
- "text": "number | undefined"
53087
+ "text": "string"
53128
53088
  },
53129
- "description": "Rows of the textarea, when `input-type` is `textarea`.",
53130
- "fieldName": "textareaRows"
53089
+ "default": "'Edit Languages'",
53090
+ "description": "The select's accessible name. Not shown — the caption is what names the section on screen — but read out by a\nscreen reader, which has nothing else to go on once the visible label is gone.",
53091
+ "fieldName": "languageLabel"
53131
53092
  },
53132
53093
  {
53133
- "name": "allow-raw",
53094
+ "name": "languages",
53134
53095
  "type": {
53135
- "text": "boolean"
53096
+ "text": "Record<string, string>"
53136
53097
  },
53137
- "default": "false",
53138
- "description": "Allows raw HTML blocks, when `input-type` is `remarkd`.",
53139
- "fieldName": "allowRaw"
53098
+ "default": "{ 'en': 'EN' }",
53099
+ "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to. Set on every\nchild, so they do not need their own copy.",
53100
+ "fieldName": "languages"
53140
53101
  },
53141
53102
  {
53142
- "name": "attachment-url",
53103
+ "name": "basis-px",
53143
53104
  "type": {
53144
- "text": "string"
53105
+ "text": "number"
53145
53106
  },
53146
- "default": "''",
53147
- "description": "Where the remarkd editor uploads images, when `input-type` is `remarkd`.",
53148
- "fieldName": "attachmentUrl"
53107
+ "fieldName": "basis",
53108
+ "inheritedFrom": {
53109
+ "name": "ZnPanel",
53110
+ "module": "src/components/panel/panel.component.ts"
53111
+ }
53149
53112
  },
53150
53113
  {
53151
- "name": "include-url",
53114
+ "name": "caption",
53152
53115
  "type": {
53153
53116
  "text": "string"
53154
53117
  },
53155
- "default": "''",
53156
- "description": "Where the remarkd editor lists embeddable includes, when `input-type` is `remarkd`.",
53157
- "fieldName": "includeUrl"
53118
+ "fieldName": "caption",
53119
+ "inheritedFrom": {
53120
+ "name": "ZnPanel",
53121
+ "module": "src/components/panel/panel.component.ts"
53122
+ }
53158
53123
  },
53159
53124
  {
53160
- "name": "link-url",
53125
+ "name": "icon",
53161
53126
  "type": {
53162
53127
  "text": "string"
53163
53128
  },
53164
- "default": "''",
53165
- "description": "Where the remarkd editor searches link targets, when `input-type` is `remarkd`.",
53166
- "fieldName": "linkUrl"
53129
+ "fieldName": "icon",
53130
+ "inheritedFrom": {
53131
+ "name": "ZnPanel",
53132
+ "module": "src/components/panel/panel.component.ts"
53133
+ }
53167
53134
  },
53168
53135
  {
53169
- "name": "inline-edit",
53136
+ "name": "tabbed",
53170
53137
  "type": {
53171
53138
  "text": "boolean"
53172
53139
  },
53173
- "default": "false",
53174
- "description": "Edits the translation through a `zn-inline-edit` — the value reads as text until it is clicked — rather than a\nplain input or textarea.",
53175
- "fieldName": "inlineEdit"
53176
- },
53177
- {
53178
- "name": "slash-items",
53179
- "type": {
53180
- "text": "SlashMenuItem[]"
53181
- },
53182
- "default": "[]",
53183
- "description": "Quick insertions offered by the slash menu on `text` and `textarea` inputs. Accepts a JSON array of items, or\nthe shorthand `Brand name={{BRAND_NAME}}, Support email={{SUPPORT_EMAIL}}`. Every language shares the list.",
53184
- "fieldName": "slashItems"
53140
+ "fieldName": "tabbed",
53141
+ "inheritedFrom": {
53142
+ "name": "ZnPanel",
53143
+ "module": "src/components/panel/panel.component.ts"
53144
+ }
53185
53145
  },
53186
53146
  {
53187
- "name": "slash-preset",
53147
+ "name": "header-borderless",
53188
53148
  "type": {
53189
- "text": "string"
53149
+ "text": "boolean"
53190
53150
  },
53191
- "default": "''",
53192
- "description": "Names of item sets registered with `registerSlashMenuPreset`, comma separated.",
53193
- "fieldName": "slashPreset"
53151
+ "fieldName": "headerBorderless",
53152
+ "inheritedFrom": {
53153
+ "name": "ZnPanel",
53154
+ "module": "src/components/panel/panel.component.ts"
53155
+ }
53194
53156
  },
53195
53157
  {
53196
- "name": "slash-trigger",
53158
+ "name": "cosmic",
53197
53159
  "type": {
53198
- "text": "string"
53160
+ "text": "boolean"
53199
53161
  },
53200
- "default": "'/'",
53201
- "description": "The characters that open the slash menu.",
53202
- "fieldName": "slashTrigger"
53162
+ "fieldName": "cosmic",
53163
+ "inheritedFrom": {
53164
+ "name": "ZnPanel",
53165
+ "module": "src/components/panel/panel.component.ts"
53166
+ }
53203
53167
  },
53204
53168
  {
53205
- "name": "slash-heading",
53169
+ "name": "flush",
53206
53170
  "type": {
53207
- "text": "string"
53171
+ "text": "boolean"
53208
53172
  },
53209
- "default": "'Insert'",
53210
- "description": "The name the slash menu's list is announced by.",
53211
- "fieldName": "slashHeading"
53173
+ "fieldName": "flush",
53174
+ "inheritedFrom": {
53175
+ "name": "ZnPanel",
53176
+ "module": "src/components/panel/panel.component.ts"
53177
+ }
53212
53178
  },
53213
53179
  {
53214
- "name": "slash-hide-keys",
53180
+ "name": "flush-x",
53215
53181
  "type": {
53216
53182
  "text": "boolean"
53217
53183
  },
53218
- "default": "false",
53219
- "description": "Hides the insertion keys normally shown against the slash menu's items.",
53220
- "fieldName": "slashHideKeys"
53184
+ "fieldName": "flushX",
53185
+ "inheritedFrom": {
53186
+ "name": "ZnPanel",
53187
+ "module": "src/components/panel/panel.component.ts"
53188
+ }
53221
53189
  },
53222
53190
  {
53223
- "name": "slash-recent-key",
53191
+ "name": "flush-y",
53224
53192
  "type": {
53225
- "text": "string"
53193
+ "text": "boolean"
53226
53194
  },
53227
- "default": "''",
53228
- "description": "Lists the slash menu items most recently chosen here above the rest, remembered under this key.",
53229
- "fieldName": "slashRecentKey"
53195
+ "fieldName": "flushY",
53196
+ "inheritedFrom": {
53197
+ "name": "ZnPanel",
53198
+ "module": "src/components/panel/panel.component.ts"
53199
+ }
53230
53200
  },
53231
53201
  {
53232
- "name": "grouped",
53202
+ "name": "flush-footer",
53233
53203
  "type": {
53234
53204
  "text": "boolean"
53235
53205
  },
53236
- "default": "false",
53237
- "description": "Hides this component's own language select and defers the choice to a parent zn-translation-group. The group sets\nthis on its children itself.",
53238
- "fieldName": "grouped"
53206
+ "fieldName": "flushFooter",
53207
+ "inheritedFrom": {
53208
+ "name": "ZnPanel",
53209
+ "module": "src/components/panel/panel.component.ts"
53210
+ }
53239
53211
  },
53240
53212
  {
53241
- "name": "languages",
53213
+ "name": "transparent",
53242
53214
  "type": {
53243
- "text": "Record<string, string>"
53215
+ "text": "boolean"
53244
53216
  },
53245
- "default": "{ 'en': 'EN' }",
53246
- "description": "The languages on offer, as language code to display name — `{\"en\": \"English\", \"fr\": \"French\"}`. Writing the code\nas the name (`{\"en\": \"EN\"}`) is also accepted. `en` is the language every other one falls back to.",
53247
- "fieldName": "languages"
53217
+ "fieldName": "transparent",
53218
+ "inheritedFrom": {
53219
+ "name": "ZnPanel",
53220
+ "module": "src/components/panel/panel.component.ts"
53221
+ }
53248
53222
  },
53249
53223
  {
53250
- "name": "values",
53224
+ "name": "shadow",
53251
53225
  "type": {
53252
- "text": "Record<string, string>"
53226
+ "text": "boolean"
53253
53227
  },
53254
- "default": "{}",
53255
- "description": "The translations as an object keyed by language code. The mirror of `value` in property form.",
53256
- "fieldName": "values"
53228
+ "fieldName": "shadow",
53229
+ "inheritedFrom": {
53230
+ "name": "ZnPanel",
53231
+ "module": "src/components/panel/panel.component.ts"
53232
+ }
53257
53233
  }
53258
53234
  ],
53259
53235
  "superclass": {
53260
- "name": "ZincElement",
53261
- "module": "/src/internal/zinc-element"
53236
+ "name": "ZnPanel",
53237
+ "module": "/src/components/panel/panel.component"
53262
53238
  },
53263
- "summary": "Collects one piece of text in several languages, one language at a time.",
53264
- "tagNameWithoutPrefix": "translations",
53265
- "tagName": "zn-translations",
53239
+ "summary": "Puts several zn-translations fields behind one language select, so a whole form's worth of copy is\ntranslated a language at a time.",
53240
+ "tagNameWithoutPrefix": "translation-group",
53241
+ "tagName": "zn-translation-group",
53266
53242
  "customElement": true,
53267
- "jsDoc": "/**\n * @summary Collects one piece of text in several languages, one language at a time.\n * @documentation https://zinc.style/components/translations\n * @status experimental\n * @since 1.0\n *\n * A select above the field chooses the language being edited. Closed, it carries how many languages are translated —\n * `1/5`; open, every language it offers carries a chip saying whether it has a translation of its own or falls back\n * to English. Blank languages fall back to English at render\n * time, so a blank field shows the English text as its placeholder rather than looking empty.\n *\n * The value submitted is a JSON object keyed by language code. A language stays out of it until it is typed into, so\n * browsing the languages does not pad the payload with empty translations.\n *\n * Put several of these in a `zn-translation-group` to have one select drive all of them.\n *\n * @dependency zn-chip\n * @dependency zn-inline-edit\n * @dependency zn-input\n * @dependency zn-option\n * @dependency zn-select\n * @dependency zn-textarea\n *\n * @slot label - The field's label. Alternatively, use the `label` attribute.\n * @slot help-text - Text describing how to fill the field in, shown below it and shared by every language.\n * Alternatively, use the `help-text` attribute.\n *\n * @event zn-change - Emitted when a translation's value changes.\n * @event zn-input - Emitted when a translation receives input.\n *\n * @csspart form-control - The form control that wraps the label, the language select, the field and the help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The wrapper around the field being edited.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart language-select - The select that chooses the language being edited.\n */",
53268
- "documentation": "https://zinc.style/components/translations",
53243
+ "jsDoc": "/**\n * @summary Puts several zn-translations fields behind one language select, so a whole form's worth of copy is\n * translated a language at a time.\n * @documentation https://zinc.style/components/translation-group\n * @status experimental\n * @since 1.0\n *\n * The fields sit in a `zn-form-group`, so the caption, help text and the language select share its label column and\n * the fields line up with every other form group around them. Choosing a language switches every child at once, and\n * each child hides its own select while it is in a group — `grouped` is set on them here.\n *\n * The select is searchable. Each option holds its language code as its value, so typing `de` finds German without the\n * code being on show.\n *\n * Closed, the select carries how many target languages are done — `1/5`. Its options each carry a chip aggregated\n * across the children:\n *\n * - `Translated` — every child has a value for it\n * - `Partial` — only some children do\n * - `English` — none do, so all of them fall back to the English text\n *\n * `Empty` replaces the last of those for English itself, which has nothing to fall back to. English counts towards\n * the `n of m` beside the label like any other language.\n *\n * The children own their values; this component only chooses which language is shown and reports on what they hold.\n * It reads them back on every child `zn-change`, so the chips and the count follow an edit as it is typed.\n *\n * Extends `zn-panel`, so `caption`, `flush`, `transparent` and the `footer` slot behave as they do there. Nested\n * inside another panel, add `inline` to drop the chrome and keep the fields aligned with the surrounding form.\n *\n * @dependency zn-chip\n * @dependency zn-form-group\n * @dependency zn-option\n * @dependency zn-select\n *\n * @event zn-language-change - Emitted when the active language changes. Detail: `{ language: string }`.\n *\n * @slot - The `zn-translations` fields the select drives.\n * @slot actions - Buttons for the bottom of the panel, on the white body rather than the grey footer. They sit on\n * the right, as zinc's form action rows do; `align=\"start\"` moves one to the left. Write them in the order they\n * should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows.\n * @slot footer - Content displayed in the grey panel footer.\n *\n * @csspart base - The component's base wrapper.\n * @csspart form-group - The form group holding the caption, the language select and the fields.\n * @csspart actions - The row of buttons at the bottom of the body.\n * @csspart language-field - The select that chooses the language every child is editing, in the group's chip slot.\n * @csspart language-select - The select itself.\n */",
53244
+ "documentation": "https://zinc.style/components/translation-group",
53269
53245
  "status": "experimental",
53270
53246
  "since": "1.0",
53271
53247
  "dependencies": [
53272
53248
  "zn-chip",
53273
- "zn-inline-edit",
53274
- "zn-input",
53249
+ "zn-form-group",
53275
53250
  "zn-option",
53276
- "zn-select",
53277
- "zn-textarea"
53251
+ "zn-select"
53252
+ ],
53253
+ "cssProperties": [
53254
+ {
53255
+ "description": "The flex-basis of the panel. Can be set using the basis-px attribute.",
53256
+ "name": "--zn-panel-basis",
53257
+ "inheritedFrom": {
53258
+ "name": "ZnPanel",
53259
+ "module": "src/components/panel/panel.component.ts"
53260
+ }
53261
+ },
53262
+ {
53263
+ "description": "Padding around the header row. Defaults to `--zn-base-gap`.",
53264
+ "name": "--zn-panel-header-padding",
53265
+ "inheritedFrom": {
53266
+ "name": "ZnPanel",
53267
+ "module": "src/components/panel/panel.component.ts"
53268
+ }
53269
+ },
53270
+ {
53271
+ "description": "Padding around the footer row.",
53272
+ "name": "--zn-panel-footer-padding",
53273
+ "inheritedFrom": {
53274
+ "name": "ZnPanel",
53275
+ "module": "src/components/panel/panel.component.ts"
53276
+ }
53277
+ }
53278
53278
  ]
53279
53279
  }
53280
53280
  ],
@@ -53283,8 +53283,8 @@
53283
53283
  "kind": "js",
53284
53284
  "name": "default",
53285
53285
  "declaration": {
53286
- "name": "ZnTranslations",
53287
- "module": "components/translations/translations.js"
53286
+ "name": "ZnTranslationGroup",
53287
+ "module": "components/translation-group/translation-group.js"
53288
53288
  }
53289
53289
  }
53290
53290
  ]
@@ -53585,7 +53585,7 @@
53585
53585
  "package": {
53586
53586
  "name": "@kubex/zinc",
53587
53587
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
53588
- "version": "1.1.156",
53588
+ "version": "1.1.157",
53589
53589
  "author": "",
53590
53590
  "license": "MIT"
53591
53591
  }