@limetech/lime-elements 40.21.1 → 40.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/language-s0bKUCvO.js +58 -0
  3. package/dist/cjs/lime-elements.cjs.js +1 -1
  4. package/dist/cjs/limel-action-bar_3.cjs.entry.js +2 -2
  5. package/dist/cjs/limel-ai-avatar.cjs.entry.js +2 -2
  6. package/dist/cjs/limel-badge_7.cjs.entry.js +2 -2
  7. package/dist/cjs/limel-callout.cjs.entry.js +2 -2
  8. package/dist/cjs/limel-chart.cjs.entry.js +524 -76
  9. package/dist/cjs/limel-chip-set.cjs.entry.js +2 -2
  10. package/dist/cjs/limel-chip_2.cjs.entry.js +2 -2
  11. package/dist/cjs/limel-code-diff.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-code-editor.cjs.entry.js +2 -2
  13. package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
  14. package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
  15. package/dist/cjs/limel-dock.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-drag-handle_2.cjs.entry.js +2 -2
  17. package/dist/cjs/limel-email-viewer.cjs.entry.js +2 -2
  18. package/dist/cjs/limel-file-viewer.cjs.entry.js +2 -2
  19. package/dist/cjs/limel-file.cjs.entry.js +2 -2
  20. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-form.cjs.entry.js +202 -15
  22. package/dist/cjs/limel-list-item.cjs.entry.js +2 -2
  23. package/dist/cjs/limel-pagination-jump.cjs.entry.js +2 -2
  24. package/dist/cjs/limel-pagination.cjs.entry.js +14 -26
  25. package/dist/cjs/limel-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/limel-profile-picture.cjs.entry.js +2 -2
  27. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
  28. package/dist/cjs/limel-resize-handle.cjs.entry.js +2 -2
  29. package/dist/cjs/limel-side-panel.cjs.entry.js +2 -2
  30. package/dist/cjs/limel-slider.cjs.entry.js +2 -2
  31. package/dist/cjs/limel-snackbar.cjs.entry.js +2 -2
  32. package/dist/cjs/limel-table.cjs.entry.js +2 -2
  33. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +2 -2
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/cjs/{translations-CqJEWcfw.js → translations-JLP5icQ9.js} +1 -1
  36. package/dist/collection/components/chart/chart.js +116 -45
  37. package/dist/collection/components/chart/format.js +302 -0
  38. package/dist/collection/components/chart/options.js +26 -14
  39. package/dist/collection/components/chart/scale.js +132 -19
  40. package/dist/collection/components/form/filled-defaults.js +132 -0
  41. package/dist/collection/components/form/form.js +93 -15
  42. package/dist/collection/components/form/form.test-schemas.js +50 -0
  43. package/dist/collection/components/pagination/pagination.js +13 -25
  44. package/dist/collection/util/language.js +29 -0
  45. package/dist/esm/language-VamkUr90.js +55 -0
  46. package/dist/esm/lime-elements.js +1 -1
  47. package/dist/esm/limel-action-bar_3.entry.js +2 -2
  48. package/dist/esm/limel-ai-avatar.entry.js +2 -2
  49. package/dist/esm/limel-badge_7.entry.js +2 -2
  50. package/dist/esm/limel-callout.entry.js +2 -2
  51. package/dist/esm/limel-chart.entry.js +524 -76
  52. package/dist/esm/limel-chip-set.entry.js +2 -2
  53. package/dist/esm/limel-chip_2.entry.js +2 -2
  54. package/dist/esm/limel-code-diff.entry.js +2 -2
  55. package/dist/esm/limel-code-editor.entry.js +2 -2
  56. package/dist/esm/limel-collapsible-section.entry.js +2 -2
  57. package/dist/esm/limel-date-picker.entry.js +1 -1
  58. package/dist/esm/limel-dock.entry.js +2 -2
  59. package/dist/esm/limel-drag-handle_2.entry.js +2 -2
  60. package/dist/esm/limel-email-viewer.entry.js +2 -2
  61. package/dist/esm/limel-file-viewer.entry.js +2 -2
  62. package/dist/esm/limel-file.entry.js +2 -2
  63. package/dist/esm/limel-flatpickr-adapter.entry.js +2 -2
  64. package/dist/esm/limel-form.entry.js +202 -15
  65. package/dist/esm/limel-list-item.entry.js +2 -2
  66. package/dist/esm/limel-pagination-jump.entry.js +2 -2
  67. package/dist/esm/limel-pagination.entry.js +14 -26
  68. package/dist/esm/limel-picker.entry.js +2 -2
  69. package/dist/esm/limel-profile-picture.entry.js +2 -2
  70. package/dist/esm/limel-prosemirror-adapter.entry.js +2 -2
  71. package/dist/esm/limel-resize-handle.entry.js +2 -2
  72. package/dist/esm/limel-side-panel.entry.js +2 -2
  73. package/dist/esm/limel-slider.entry.js +2 -2
  74. package/dist/esm/limel-snackbar.entry.js +2 -2
  75. package/dist/esm/limel-table.entry.js +2 -2
  76. package/dist/esm/limel-text-editor-link-menu.entry.js +2 -2
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/esm/{translations-kct5Kybu.js → translations-D9ZGrMhe.js} +1 -1
  79. package/dist/lime-elements/lime-elements.esm.js +1 -1
  80. package/dist/lime-elements/{p-6e9eeb0a.entry.js → p-0a7cbdc3.entry.js} +1 -1
  81. package/dist/lime-elements/{p-d35d2859.entry.js → p-0f96e94d.entry.js} +1 -1
  82. package/dist/lime-elements/{p-a7be03e1.entry.js → p-1a0c5e45.entry.js} +1 -1
  83. package/dist/lime-elements/{p-5e408c27.entry.js → p-401d5c92.entry.js} +1 -1
  84. package/dist/lime-elements/{p-6d2d25b9.entry.js → p-430db3b9.entry.js} +1 -1
  85. package/dist/lime-elements/{p-a6c6a31b.entry.js → p-43b62587.entry.js} +1 -1
  86. package/dist/lime-elements/{p-958396b5.entry.js → p-48dccb83.entry.js} +1 -1
  87. package/dist/lime-elements/{p-814b4934.entry.js → p-5c918155.entry.js} +1 -1
  88. package/dist/lime-elements/{p-22e9e327.entry.js → p-66101ed6.entry.js} +1 -1
  89. package/dist/lime-elements/{p-d8559847.entry.js → p-7ab72b52.entry.js} +1 -1
  90. package/dist/lime-elements/{p-7af83877.entry.js → p-8d9a2a22.entry.js} +1 -1
  91. package/dist/lime-elements/{p-55fa19ae.entry.js → p-8de4f0f3.entry.js} +1 -1
  92. package/dist/lime-elements/p-8e80a884.entry.js +56 -0
  93. package/dist/lime-elements/{p-bffb5ed2.entry.js → p-99984c66.entry.js} +1 -1
  94. package/dist/lime-elements/{p-56e2fa48.entry.js → p-9d46f720.entry.js} +1 -1
  95. package/dist/lime-elements/{p-68bbb8dd.entry.js → p-9e2b426c.entry.js} +1 -1
  96. package/dist/lime-elements/{p-Dzp8dXTo.js → p-C9dBa_Im.js} +1 -1
  97. package/dist/lime-elements/p-VamkUr90.js +1 -0
  98. package/dist/lime-elements/{p-3ac39bd5.entry.js → p-b1c7033b.entry.js} +2 -2
  99. package/dist/lime-elements/{p-47fe76a8.entry.js → p-b5451350.entry.js} +1 -1
  100. package/dist/lime-elements/{p-9edd79a8.entry.js → p-c75f3b0d.entry.js} +1 -1
  101. package/dist/lime-elements/{p-4c080cd9.entry.js → p-ca4247c4.entry.js} +1 -1
  102. package/dist/lime-elements/{p-1a7d1d2b.entry.js → p-d53421af.entry.js} +1 -1
  103. package/dist/lime-elements/{p-6d9b89db.entry.js → p-d8901e39.entry.js} +1 -1
  104. package/dist/lime-elements/{p-933ffaa8.entry.js → p-d89553b3.entry.js} +1 -1
  105. package/dist/lime-elements/{p-496b2437.entry.js → p-d93b8ce0.entry.js} +1 -1
  106. package/dist/lime-elements/{p-23067836.entry.js → p-e97340c4.entry.js} +1 -1
  107. package/dist/lime-elements/{p-7b87e547.entry.js → p-ec0c113d.entry.js} +1 -1
  108. package/dist/lime-elements/{p-9f0575fd.entry.js → p-f197000b.entry.js} +4 -4
  109. package/dist/lime-elements/{p-07f3565b.entry.js → p-f6bc6658.entry.js} +1 -1
  110. package/dist/lime-elements/{p-9b2623fe.entry.js → p-f71fbc9e.entry.js} +1 -1
  111. package/dist/lime-elements/{p-7fcd48c6.entry.js → p-fa1aa440.entry.js} +1 -1
  112. package/dist/types/components/chart/chart.d.ts +32 -7
  113. package/dist/types/components/chart/chart.types.d.ts +15 -1
  114. package/dist/types/components/chart/format.d.ts +54 -0
  115. package/dist/types/components/chart/options.d.ts +3 -4
  116. package/dist/types/components/chart/scale.d.ts +39 -7
  117. package/dist/types/components/form/filled-defaults.d.ts +12 -0
  118. package/dist/types/components/form/form.d.ts +17 -0
  119. package/dist/types/components/form/form.test-schemas.d.ts +2 -0
  120. package/dist/types/components/pagination/pagination.d.ts +6 -12
  121. package/dist/types/components.d.ts +51 -8
  122. package/dist/types/util/language.d.ts +19 -0
  123. package/package.json +3 -3
  124. package/dist/cjs/language-v-MMS6ym.js +0 -28
  125. package/dist/esm/language-ChagAaNf.js +0 -26
  126. package/dist/lime-elements/p-7d6a12fe.entry.js +0 -56
  127. package/dist/lime-elements/p-ChagAaNf.js +0 -1
@@ -345,21 +345,15 @@ export declare class Pagination {
345
345
  private formatNumber;
346
346
  /**
347
347
  * What the jump form is given, so that the one warning about a language
348
- * this browser cannot write numbers in describes both of us. A tag it
349
- * accepts but does not support, `zz`, resolves to the viewer's own locale
350
- * rather than throwing, so asking the formatter is the only way to know.
348
+ * this browser cannot write numbers in describes both of us.
351
349
  */
352
350
  private get languageForNumbers();
353
351
  /**
354
- * `Intl.NumberFormat` throws on a language it cannot parse, and this is
355
- * called from `render`, so an unusable one would leave the control drawing
356
- * nothing at all — the single state a user cannot click their way out of.
357
- * `src/util/language.ts` states the rule this keeps.
358
- *
359
- * A tag it cannot parse throws; a well-formed tag it does not support, like
360
- * `zz`, does not — it quietly resolves to whatever locale the machine runs
361
- * in. Both end up formatting numbers in something other than what was
362
- * asked for, so both are worth saying out loud.
352
+ * This is called from `render`, so a language that `Intl` cannot write
353
+ * numbers in must not throw, or the control would draw nothing at all —
354
+ * the single state a user cannot click their way out of.
355
+ * `getSupportedLocale` in `src/util/language.ts` decides which languages
356
+ * those are.
363
357
  *
364
358
  * @returns a formatter, in the given language where that is possible
365
359
  */
@@ -16,7 +16,7 @@ import { Button } from "./components/button/button.types";
16
16
  import { CalloutType } from "./components/callout/callout.types";
17
17
  import { Image } from "./global/shared-types/image.types";
18
18
  import { ListSeparator as ListSeparator1 } from "./global/shared-types/separator.types";
19
- import { ChartItem, ChartType } from "./components/chart/chart.types";
19
+ import { ChartItem, ChartType, ChartValueFormat } from "./components/chart/chart.types";
20
20
  import { Label, LabelValue } from "./components/dynamic-label/label.types";
21
21
  import { Link } from "./global/shared-types/link.types";
22
22
  import { Chip, ChipType } from "./components/chip-set/chip.types";
@@ -68,7 +68,7 @@ export { Button } from "./components/button/button.types";
68
68
  export { CalloutType } from "./components/callout/callout.types";
69
69
  export { Image } from "./global/shared-types/image.types";
70
70
  export { ListSeparator as ListSeparator1 } from "./global/shared-types/separator.types";
71
- export { ChartItem, ChartType } from "./components/chart/chart.types";
71
+ export { ChartItem, ChartType, ChartValueFormat } from "./components/chart/chart.types";
72
72
  export { Label, LabelValue } from "./components/dynamic-label/label.types";
73
73
  export { Link } from "./global/shared-types/link.types";
74
74
  export { Chip, ChipType } from "./components/chip-set/chip.types";
@@ -528,6 +528,8 @@ export namespace Components {
528
528
  * @exampleComponent limel-example-chart-orientation
529
529
  * @exampleComponent limel-example-chart-max-value
530
530
  * @exampleComponent limel-example-chart-display-item-percentage
531
+ * @exampleComponent limel-example-chart-value-format
532
+ * @exampleComponent limel-example-chart-value-format-date
531
533
  * @exampleComponent limel-example-chart-type-bar
532
534
  * @exampleComponent limel-example-chart-type-dot
533
535
  * @exampleComponent limel-example-chart-type-area
@@ -563,9 +565,13 @@ export namespace Components {
563
565
  */
564
566
  "accessibleValuesLabel"?: string;
565
567
  /**
566
- * Sets the axis increment for `bar`, `dot`, `area`, and `line` charts. When it is not set, or not above zero, the chart works out a step from the values. It also does that when the step would divide the axis into more than 100 parts, so that it does not draw too many lines. Has no effect on other chart types.
568
+ * Sets the axis increment for `bar`, `dot`, `area`, and `line` charts. When it is not set, or not above zero, the chart works out a step from the values. It also does that when the step would divide the axis into more than 100 parts, so that it does not draw too many lines. Has no effect on other chart types, or when `valueFormat` is `date`, where the axis steps through days, weeks, months or years by itself.
567
569
  */
568
570
  "axisIncrement"?: number;
571
+ /**
572
+ * The currency of the values when `valueFormat` is `currency`, as a three-letter code such as `SEK`. Without one, the values are written as numbers.
573
+ */
574
+ "currency"?: string;
569
575
  /**
570
576
  * When set to true, renders visible labels for X and Y axes. Only affects chart types with X and Y axes, such as area, bar, and line charts.
571
577
  * @default false
@@ -591,7 +597,7 @@ export namespace Components {
591
597
  */
592
598
  "items": ChartItem[];
593
599
  /**
594
- * Defines the language for translations. Will translate the translatable strings on the components.
600
+ * Defines the language for translations, and for the way values are written, such as `1 234,5` in Swedish.
595
601
  * @default 'en'
596
602
  */
597
603
  "language": Languages;
@@ -601,7 +607,7 @@ export namespace Components {
601
607
  */
602
608
  "loading": boolean;
603
609
  /**
604
- * Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`. Has no effect on `nps` or `scatter`.
610
+ * Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`, or to the end of its day when `valueFormat` is `date`. Has no effect on `nps` or `scatter`.
605
611
  */
606
612
  "maxValue"?: number;
607
613
  /**
@@ -614,6 +620,11 @@ export namespace Components {
614
620
  * @default 'proportion-bar'
615
621
  */
616
622
  "type"?: ChartType;
623
+ /**
624
+ * Defines how values are written: as numbers, as percentages where `0.25` is `25 %`, as amounts of `currency`, or as dates. With `date`, each value is a date in milliseconds since 1970, and the value axis steps through days, weeks, months or years. The axes, the values shown with `displayItemValue`, the tooltips, and the screen reader table all follow it, in the chart's `language`. An item's `formattedValue` is shown as it is.
625
+ * @default 'number'
626
+ */
627
+ "valueFormat": ChartValueFormat;
617
628
  }
618
629
  /**
619
630
  * The Checkbox component is a classic and essential element in UI design that allows
@@ -1913,6 +1924,7 @@ export namespace Components {
1913
1924
  * @exampleComponent limel-example-code-editor-form
1914
1925
  * @exampleComponent limel-example-form-highlighted-field
1915
1926
  * @exampleComponent limel-example-form-heading-level
1927
+ * @exampleComponent limel-example-form-include-defaults
1916
1928
  */
1917
1929
  interface LimelForm {
1918
1930
  /**
@@ -1934,6 +1946,11 @@ export namespace Components {
1934
1946
  * @beta
1935
1947
  */
1936
1948
  "highlightedField"?: Array<string | number>;
1949
+ /**
1950
+ * Set to `false` to leave the defaults of the schema out of the value, so that it stays as it was given until the user changes something. The form still shows the defaults. A default the user changes is in the value from then on, and so are the defaults that a change brings in, such as those of a new list item or of fields that depend on the changed one. Pass the value the form emits back in as `value`. The form validates what it shows, defaults included. When the user changes everything back, the value is what the form was given, also when that is `null` or `undefined`.
1951
+ * @default true
1952
+ */
1953
+ "includeDefaults": boolean;
1937
1954
  /**
1938
1955
  * Factory for creating properties for custom form components When using custom components in the form some properties might have to be set dynamically. If this factory is set, it will be called with the current schema for the field for each custom component in the form. The factory must return an object where each key is the name of the property that should be set, along with its value.
1939
1956
  */
@@ -4989,6 +5006,8 @@ declare global {
4989
5006
  * @exampleComponent limel-example-chart-orientation
4990
5007
  * @exampleComponent limel-example-chart-max-value
4991
5008
  * @exampleComponent limel-example-chart-display-item-percentage
5009
+ * @exampleComponent limel-example-chart-value-format
5010
+ * @exampleComponent limel-example-chart-value-format-date
4992
5011
  * @exampleComponent limel-example-chart-type-bar
4993
5012
  * @exampleComponent limel-example-chart-type-dot
4994
5013
  * @exampleComponent limel-example-chart-type-area
@@ -5771,6 +5790,7 @@ declare global {
5771
5790
  * @exampleComponent limel-example-code-editor-form
5772
5791
  * @exampleComponent limel-example-form-highlighted-field
5773
5792
  * @exampleComponent limel-example-form-heading-level
5793
+ * @exampleComponent limel-example-form-include-defaults
5774
5794
  */
5775
5795
  interface HTMLLimelFormElement extends Components.LimelForm, HTMLStencilElement {
5776
5796
  addEventListener<K extends keyof HTMLLimelFormElementEventMap>(type: K, listener: (this: HTMLLimelFormElement, ev: LimelFormCustomEvent<HTMLLimelFormElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -7762,6 +7782,8 @@ declare namespace LocalJSX {
7762
7782
  * @exampleComponent limel-example-chart-orientation
7763
7783
  * @exampleComponent limel-example-chart-max-value
7764
7784
  * @exampleComponent limel-example-chart-display-item-percentage
7785
+ * @exampleComponent limel-example-chart-value-format
7786
+ * @exampleComponent limel-example-chart-value-format-date
7765
7787
  * @exampleComponent limel-example-chart-type-bar
7766
7788
  * @exampleComponent limel-example-chart-type-dot
7767
7789
  * @exampleComponent limel-example-chart-type-area
@@ -7797,9 +7819,13 @@ declare namespace LocalJSX {
7797
7819
  */
7798
7820
  "accessibleValuesLabel"?: string;
7799
7821
  /**
7800
- * Sets the axis increment for `bar`, `dot`, `area`, and `line` charts. When it is not set, or not above zero, the chart works out a step from the values. It also does that when the step would divide the axis into more than 100 parts, so that it does not draw too many lines. Has no effect on other chart types.
7822
+ * Sets the axis increment for `bar`, `dot`, `area`, and `line` charts. When it is not set, or not above zero, the chart works out a step from the values. It also does that when the step would divide the axis into more than 100 parts, so that it does not draw too many lines. Has no effect on other chart types, or when `valueFormat` is `date`, where the axis steps through days, weeks, months or years by itself.
7801
7823
  */
7802
7824
  "axisIncrement"?: number;
7825
+ /**
7826
+ * The currency of the values when `valueFormat` is `currency`, as a three-letter code such as `SEK`. Without one, the values are written as numbers.
7827
+ */
7828
+ "currency"?: string;
7803
7829
  /**
7804
7830
  * When set to true, renders visible labels for X and Y axes. Only affects chart types with X and Y axes, such as area, bar, and line charts.
7805
7831
  * @default false
@@ -7825,7 +7851,7 @@ declare namespace LocalJSX {
7825
7851
  */
7826
7852
  "items": ChartItem[];
7827
7853
  /**
7828
- * Defines the language for translations. Will translate the translatable strings on the components.
7854
+ * Defines the language for translations, and for the way values are written, such as `1 234,5` in Swedish.
7829
7855
  * @default 'en'
7830
7856
  */
7831
7857
  "language"?: Languages;
@@ -7835,7 +7861,7 @@ declare namespace LocalJSX {
7835
7861
  */
7836
7862
  "loading"?: boolean;
7837
7863
  /**
7838
- * Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`. Has no effect on `nps` or `scatter`.
7864
+ * Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`, or to the end of its day when `valueFormat` is `date`. Has no effect on `nps` or `scatter`.
7839
7865
  */
7840
7866
  "maxValue"?: number;
7841
7867
  /**
@@ -7852,6 +7878,11 @@ declare namespace LocalJSX {
7852
7878
  * @default 'proportion-bar'
7853
7879
  */
7854
7880
  "type"?: ChartType;
7881
+ /**
7882
+ * Defines how values are written: as numbers, as percentages where `0.25` is `25 %`, as amounts of `currency`, or as dates. With `date`, each value is a date in milliseconds since 1970, and the value axis steps through days, weeks, months or years. The axes, the values shown with `displayItemValue`, the tooltips, and the screen reader table all follow it, in the chart's `language`. An item's `formattedValue` is shown as it is.
7883
+ * @default 'number'
7884
+ */
7885
+ "valueFormat"?: ChartValueFormat;
7855
7886
  }
7856
7887
  /**
7857
7888
  * The Checkbox component is a classic and essential element in UI design that allows
@@ -9260,6 +9291,7 @@ declare namespace LocalJSX {
9260
9291
  * @exampleComponent limel-example-code-editor-form
9261
9292
  * @exampleComponent limel-example-form-highlighted-field
9262
9293
  * @exampleComponent limel-example-form-heading-level
9294
+ * @exampleComponent limel-example-form-include-defaults
9263
9295
  */
9264
9296
  interface LimelForm {
9265
9297
  /**
@@ -9281,6 +9313,11 @@ declare namespace LocalJSX {
9281
9313
  * @beta
9282
9314
  */
9283
9315
  "highlightedField"?: Array<string | number>;
9316
+ /**
9317
+ * Set to `false` to leave the defaults of the schema out of the value, so that it stays as it was given until the user changes something. The form still shows the defaults. A default the user changes is in the value from then on, and so are the defaults that a change brings in, such as those of a new list item or of fields that depend on the changed one. Pass the value the form emits back in as `value`. The form validates what it shows, defaults included. When the user changes everything back, the value is what the form was given, also when that is `null` or `undefined`.
9318
+ * @default true
9319
+ */
9320
+ "includeDefaults"?: boolean;
9284
9321
  /**
9285
9322
  * Emitted when a change is made within the form
9286
9323
  */
@@ -12087,6 +12124,8 @@ declare namespace LocalJSX {
12087
12124
  "orientation": 'landscape' | 'portrait';
12088
12125
  "maxValue": number;
12089
12126
  "axisIncrement": number;
12127
+ "valueFormat": ChartValueFormat;
12128
+ "currency": string;
12090
12129
  "loading": boolean;
12091
12130
  }
12092
12131
  interface LimelCheckboxAttributes {
@@ -12293,6 +12332,7 @@ declare namespace LocalJSX {
12293
12332
  "disabled": boolean;
12294
12333
  "headingLevel": HeadingLevel;
12295
12334
  "revealErrors": boolean;
12335
+ "includeDefaults": boolean;
12296
12336
  }
12297
12337
  interface LimelFormHeaderAttributes {
12298
12338
  "heading": string;
@@ -12969,6 +13009,8 @@ declare module "@stencil/core" {
12969
13009
  * @exampleComponent limel-example-chart-orientation
12970
13010
  * @exampleComponent limel-example-chart-max-value
12971
13011
  * @exampleComponent limel-example-chart-display-item-percentage
13012
+ * @exampleComponent limel-example-chart-value-format
13013
+ * @exampleComponent limel-example-chart-value-format-date
12972
13014
  * @exampleComponent limel-example-chart-type-bar
12973
13015
  * @exampleComponent limel-example-chart-type-dot
12974
13016
  * @exampleComponent limel-example-chart-type-area
@@ -13417,6 +13459,7 @@ declare module "@stencil/core" {
13417
13459
  * @exampleComponent limel-example-code-editor-form
13418
13460
  * @exampleComponent limel-example-form-highlighted-field
13419
13461
  * @exampleComponent limel-example-form-heading-level
13462
+ * @exampleComponent limel-example-form-include-defaults
13420
13463
  */
13421
13464
  "limel-form": LocalJSX.IntrinsicElements["limel-form"] & JSXBase.HTMLAttributes<HTMLLimelFormElement>;
13422
13465
  /**
@@ -17,4 +17,23 @@
17
17
  * @returns the lower-cased primary subtag, or an empty string
18
18
  */
19
19
  export declare function getPrimarySubtag(language: unknown): string;
20
+ /**
21
+ * The locale that `Intl` writes numbers and dates in for `language`, or
22
+ * `undefined` when it cannot write in that language. `Intl` throws on a
23
+ * tag it cannot read, such as `sv_SE`, and quietly uses the viewer's own
24
+ * locale for one it does not know, such as `zz`. A component that writes in
25
+ * its `language` while it renders checks it here, and falls back to English
26
+ * when this gives `undefined`.
27
+ *
28
+ * Examples:
29
+ * - "sv" => "sv"
30
+ * - "SV-se" => "sv-SE"
31
+ * - "sv_SE" => undefined
32
+ * - "zz" => undefined
33
+ * - undefined => undefined
34
+ *
35
+ * @param language - the language to write in
36
+ * @returns the locale, or `undefined`
37
+ */
38
+ export declare function getSupportedLocale(language: unknown): string | undefined;
20
39
  //# sourceMappingURL=language.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "40.21.1",
3
+ "version": "40.23.0",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -77,9 +77,9 @@
77
77
  "dayjs": "^1.11.23",
78
78
  "diff": "^9.0.0",
79
79
  "echarts": "^6.1.0",
80
- "eslint": "^10.13.0",
80
+ "eslint": "^10.14.0",
81
81
  "flatpickr": "^4.6.13",
82
- "glob": "^13.0.6",
82
+ "glob": "^14.0.3",
83
83
  "globals": "^17.13.0",
84
84
  "hast-util-from-dom": "^5.0.1",
85
85
  "hast-util-to-mdast": "^10.1.2",
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Reduce a language to the primary subtag that our language maps are keyed by.
5
- *
6
- * A `language` prop is typed, but a custom element takes whatever string an
7
- * attribute carries — commonly a full BCP 47 tag such as `nb-NO`, since a host
8
- * application often derives the language from `document.documentElement.lang`.
9
- * Anything that is not a string must resolve rather than throw, so that an
10
- * unexpected value can never break a component's render.
11
- *
12
- * Examples:
13
- * - "nb" => "nb"
14
- * - "nb-NO" => "nb"
15
- * - "SV-SE" => "sv"
16
- * - undefined => ""
17
- *
18
- * @param language - the language to reduce
19
- * @returns the lower-cased primary subtag, or an empty string
20
- */
21
- function getPrimarySubtag(language) {
22
- if (typeof language !== 'string') {
23
- return '';
24
- }
25
- return language.toLowerCase().split('-', 1)[0];
26
- }
27
-
28
- exports.getPrimarySubtag = getPrimarySubtag;
@@ -1,26 +0,0 @@
1
- /**
2
- * Reduce a language to the primary subtag that our language maps are keyed by.
3
- *
4
- * A `language` prop is typed, but a custom element takes whatever string an
5
- * attribute carries — commonly a full BCP 47 tag such as `nb-NO`, since a host
6
- * application often derives the language from `document.documentElement.lang`.
7
- * Anything that is not a string must resolve rather than throw, so that an
8
- * unexpected value can never break a component's render.
9
- *
10
- * Examples:
11
- * - "nb" => "nb"
12
- * - "nb-NO" => "nb"
13
- * - "SV-SE" => "sv"
14
- * - undefined => ""
15
- *
16
- * @param language - the language to reduce
17
- * @returns the lower-cased primary subtag, or an empty string
18
- */
19
- function getPrimarySubtag(language) {
20
- if (typeof language !== 'string') {
21
- return '';
22
- }
23
- return language.toLowerCase().split('-', 1)[0];
24
- }
25
-
26
- export { getPrimarySubtag as g };