@ponchia/ui 0.6.7 → 0.6.9

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 (111) hide show
  1. package/CHANGELOG.md +129 -4
  2. package/README.md +4 -4
  3. package/annotations/index.d.ts.map +1 -1
  4. package/annotations/index.js +26 -9
  5. package/behaviors/carousel.d.ts.map +1 -1
  6. package/behaviors/carousel.js +145 -49
  7. package/behaviors/combobox.d.ts.map +1 -1
  8. package/behaviors/combobox.js +220 -92
  9. package/behaviors/command.d.ts.map +1 -1
  10. package/behaviors/command.js +74 -14
  11. package/behaviors/connectors.d.ts.map +1 -1
  12. package/behaviors/connectors.js +131 -32
  13. package/behaviors/crosshair.d.ts.map +1 -1
  14. package/behaviors/crosshair.js +47 -1
  15. package/behaviors/dialog.d.ts.map +1 -1
  16. package/behaviors/dialog.js +24 -9
  17. package/behaviors/disclosure.d.ts.map +1 -1
  18. package/behaviors/disclosure.js +33 -3
  19. package/behaviors/dismissible.d.ts.map +1 -1
  20. package/behaviors/dismissible.js +3 -2
  21. package/behaviors/forms.d.ts.map +1 -1
  22. package/behaviors/forms.js +211 -140
  23. package/behaviors/glyph.d.ts.map +1 -1
  24. package/behaviors/glyph.js +172 -132
  25. package/behaviors/inert.d.ts +1 -1
  26. package/behaviors/inert.d.ts.map +1 -1
  27. package/behaviors/inert.js +4 -3
  28. package/behaviors/internal.d.ts.map +1 -1
  29. package/behaviors/internal.js +4 -3
  30. package/behaviors/legend.d.ts +0 -5
  31. package/behaviors/legend.d.ts.map +1 -1
  32. package/behaviors/legend.js +45 -13
  33. package/behaviors/menu.d.ts.map +1 -1
  34. package/behaviors/menu.js +13 -8
  35. package/behaviors/modal.d.ts.map +1 -1
  36. package/behaviors/modal.js +77 -19
  37. package/behaviors/popover.d.ts +4 -3
  38. package/behaviors/popover.d.ts.map +1 -1
  39. package/behaviors/popover.js +94 -14
  40. package/behaviors/sources.d.ts.map +1 -1
  41. package/behaviors/sources.js +14 -2
  42. package/behaviors/splitter.d.ts.map +1 -1
  43. package/behaviors/splitter.js +149 -110
  44. package/behaviors/spotlight.d.ts.map +1 -1
  45. package/behaviors/spotlight.js +28 -2
  46. package/behaviors/table.d.ts +1 -1
  47. package/behaviors/table.d.ts.map +1 -1
  48. package/behaviors/table.js +108 -17
  49. package/behaviors/tabs.d.ts.map +1 -1
  50. package/behaviors/tabs.js +84 -20
  51. package/behaviors/theme.d.ts.map +1 -1
  52. package/behaviors/theme.js +25 -5
  53. package/behaviors/toast.js +5 -5
  54. package/classes/index.d.ts +15 -2
  55. package/classes/index.js +48 -35
  56. package/connectors/index.d.ts +41 -8
  57. package/connectors/index.d.ts.map +1 -1
  58. package/connectors/index.js +74 -19
  59. package/css/annotations.css +12 -0
  60. package/css/app.css +3 -4
  61. package/css/base.css +1 -1
  62. package/css/content.css +3 -3
  63. package/css/crosshair.css +27 -2
  64. package/css/disclosure.css +3 -3
  65. package/css/dots.css +4 -4
  66. package/css/feedback.css +8 -37
  67. package/css/forms.css +9 -12
  68. package/css/legend.css +1 -1
  69. package/css/marks.css +1 -1
  70. package/css/motion.css +6 -6
  71. package/css/navigation.css +12 -0
  72. package/css/overlay.css +5 -7
  73. package/css/primitives.css +14 -16
  74. package/css/sidenote.css +2 -2
  75. package/css/table.css +2 -2
  76. package/css/tokens.css +16 -0
  77. package/dist/bronto.css +1 -1
  78. package/dist/css/analytical.css +1 -1
  79. package/dist/css/annotations.css +1 -1
  80. package/dist/css/crosshair.css +1 -1
  81. package/dist/css/feedback.css +1 -1
  82. package/dist/css/navigation.css +1 -1
  83. package/dist/css/report-kit.css +1 -1
  84. package/dist/css/tokens.css +1 -1
  85. package/docs/adr/0001-color-system.md +3 -2
  86. package/docs/annotations.md +21 -1
  87. package/docs/architecture.md +74 -13
  88. package/docs/command.md +4 -1
  89. package/docs/connectors.md +16 -0
  90. package/docs/crosshair.md +1 -1
  91. package/docs/dots.md +4 -1
  92. package/docs/glyphs.md +11 -0
  93. package/docs/interop/react-flow.md +89 -0
  94. package/docs/migrations/0.2-to-0.3.md +1 -1
  95. package/docs/package-contract.md +7 -5
  96. package/docs/reporting.md +23 -12
  97. package/docs/stability.md +85 -9
  98. package/docs/theming.md +2 -2
  99. package/docs/usage.md +16 -2
  100. package/docs/vega.md +4 -4
  101. package/glyphs/glyphs.js +43 -33
  102. package/llms.txt +19 -8
  103. package/package.json +23 -4
  104. package/schemas/report-claims.v1.schema.json +1 -1
  105. package/svelte/index.d.ts +71 -45
  106. package/svelte/index.d.ts.map +1 -1
  107. package/svelte/index.js +29 -2
  108. package/tokens/index.js +2 -2
  109. package/vue/index.d.ts +42 -5
  110. package/vue/index.d.ts.map +1 -1
  111. package/vue/index.js +32 -1
package/vue/index.d.ts CHANGED
@@ -5,30 +5,50 @@
5
5
  * @returns {BrontoDirective}
6
6
  */
7
7
  export function createBrontoDirective(init: (opts?: DelegateOpts) => Cleanup | void): BrontoDirective;
8
+ /** @type {BrontoThemeDirective} */
9
+ export const vThemeToggle: BrontoThemeDirective;
8
10
  /** @type {BrontoDirective} */
9
- export const vThemeToggle: BrontoDirective;
10
11
  export const vDismissible: BrontoDirective;
12
+ /** @type {BrontoDirective} */
11
13
  export const vDisabledGuard: BrontoDirective;
14
+ /** @type {BrontoDirective} */
12
15
  export const vDisclosure: BrontoDirective;
16
+ /** @type {BrontoDirective} */
13
17
  export const vMenu: BrontoDirective;
18
+ /** @type {BrontoDirective} */
14
19
  export const vFormValidation: BrontoDirective;
20
+ /** @type {BrontoDirective} */
15
21
  export const vCombobox: BrontoDirective;
22
+ /** @type {BrontoDirective} */
16
23
  export const vPopover: BrontoDirective;
24
+ /** @type {BrontoDirective} */
17
25
  export const vTableSort: BrontoDirective;
26
+ /** @type {BrontoDirective} */
18
27
  export const vTabs: BrontoDirective;
28
+ /** @type {BrontoDirective} */
19
29
  export const vDialog: BrontoDirective;
30
+ /** @type {BrontoDirective} */
20
31
  export const vModal: BrontoDirective;
32
+ /** @type {BrontoDirective} */
21
33
  export const vCarousel: BrontoDirective;
34
+ /** @type {BrontoDirective} */
22
35
  export const vDotGlyph: BrontoDirective;
36
+ /** @type {BrontoDirective} */
23
37
  export const vLegend: BrontoDirective;
38
+ /** @type {BrontoDirective} */
24
39
  export const vConnectors: BrontoDirective;
40
+ /** @type {BrontoDirective} */
25
41
  export const vSpotlight: BrontoDirective;
42
+ /** @type {BrontoDirective} */
26
43
  export const vCrosshair: BrontoDirective;
44
+ /** @type {BrontoDirective} */
27
45
  export const vCommand: BrontoDirective;
46
+ /** @type {BrontoDirective} */
28
47
  export const vSources: BrontoDirective;
48
+ /** @type {BrontoDirective} */
29
49
  export const vSplitter: BrontoDirective;
30
50
  export const directives: Readonly<{
31
- themeToggle: BrontoDirective;
51
+ themeToggle: BrontoThemeDirective;
32
52
  dismissible: BrontoDirective;
33
53
  disabledGuard: BrontoDirective;
34
54
  disclosure: BrontoDirective;
@@ -50,9 +70,8 @@ export const directives: Readonly<{
50
70
  sources: BrontoDirective;
51
71
  splitter: BrontoDirective;
52
72
  }>;
53
- export const brontoVue: Readonly<{
54
- install(app: any): void;
55
- }>;
73
+ /** @type {BrontoVuePlugin} */
74
+ export const brontoVue: BrontoVuePlugin;
56
75
  export default brontoVue;
57
76
  export function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
58
77
  export type Cleanup = import("../behaviors/index.js").Cleanup;
@@ -63,15 +82,33 @@ export type BrontoDirectiveRoot = Document | Element | null | undefined;
63
82
  export type BrontoDirectiveOpts = Omit<DelegateOpts, "root"> & {
64
83
  root?: BrontoDirectiveRoot;
65
84
  };
85
+ export type BrontoThemeDirectiveOpts = Omit<ThemeStorageOpts & DelegateOpts, "root"> & {
86
+ root?: BrontoDirectiveRoot;
87
+ };
66
88
  export type BrontoDirectiveBinding = {
67
89
  value?: BrontoDirectiveOpts | null | undefined;
68
90
  oldValue?: BrontoDirectiveOpts | null | undefined;
69
91
  };
92
+ export type BrontoThemeDirectiveBinding = {
93
+ value?: BrontoThemeDirectiveOpts | null | undefined;
94
+ oldValue?: BrontoThemeDirectiveOpts | null | undefined;
95
+ };
70
96
  export type BrontoDirective = {
71
97
  mounted: (el: Element, binding?: BrontoDirectiveBinding) => void;
72
98
  updated: (el: Element, binding?: BrontoDirectiveBinding) => void;
73
99
  beforeUnmount: (el: Element) => void;
74
100
  };
101
+ export type BrontoThemeDirective = {
102
+ mounted: (el: Element, binding?: BrontoThemeDirectiveBinding) => void;
103
+ updated: (el: Element, binding?: BrontoThemeDirectiveBinding) => void;
104
+ beforeUnmount: (el: Element) => void;
105
+ };
106
+ export type BrontoVueApp = {
107
+ directive: (name: string, directive: BrontoDirective | BrontoThemeDirective) => unknown;
108
+ };
109
+ export type BrontoVuePlugin = {
110
+ install: (app: BrontoVueApp) => void;
111
+ };
75
112
  import { applyStoredTheme } from '../behaviors/index.js';
76
113
  import { toast } from '../behaviors/index.js';
77
114
  export { applyStoredTheme, toast };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAoFA;;;;;GAKG;AACH,4CAHW,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,GACrC,eAAe,CAgB3B;AAED,8BAA8B;AAC9B,2BADW,eAAe,CACyC;AACnE,2CAAmE;AACnE,6CAAuE;AACvE,0CAAiE;AACjE,oCAAqD;AACrD,8CAAyE;AACzE,wCAA6D;AAC7D,uCAA2D;AAC3D,yCAA+D;AAC/D,oCAAqD;AACrD,sCAAyD;AACzD,qCAAuD;AACvD,wCAA6D;AAC7D,wCAA6D;AAC7D,sCAAyD;AACzD,0CAAiE;AACjE,yCAA+D;AAC/D,yCAA+D;AAC/D,uCAA2D;AAC3D,uCAA2D;AAC3D,wCAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA4BH;;GAQG;;AAMI,4BADM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CACxB;sBAnLt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AE,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE;8BAE/G;IAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAAC,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAAC,aAAa,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE;mCAE5K;IAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAAC,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAAC,aAAa,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE;2BAEtL;IAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,GAAG,oBAAoB,KAAK,OAAO,CAAA;CAAE;8BAE3F;IAAE,OAAO,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAA;CAAE;iCA0B9C,uBAAuB;sBAAvB,uBAAuB"}
package/vue/index.js CHANGED
@@ -21,9 +21,19 @@
21
21
  *
22
22
  * @typedef {Omit<DelegateOpts, 'root'> & { root?: BrontoDirectiveRoot }} BrontoDirectiveOpts
23
23
  *
24
+ * @typedef {Omit<ThemeStorageOpts & DelegateOpts, 'root'> & { root?: BrontoDirectiveRoot }} BrontoThemeDirectiveOpts
25
+ *
24
26
  * @typedef {{ value?: BrontoDirectiveOpts | null | undefined, oldValue?: BrontoDirectiveOpts | null | undefined }} BrontoDirectiveBinding
25
27
  *
28
+ * @typedef {{ value?: BrontoThemeDirectiveOpts | null | undefined, oldValue?: BrontoThemeDirectiveOpts | null | undefined }} BrontoThemeDirectiveBinding
29
+ *
26
30
  * @typedef {{ mounted: (el: Element, binding?: BrontoDirectiveBinding) => void, updated: (el: Element, binding?: BrontoDirectiveBinding) => void, beforeUnmount: (el: Element) => void }} BrontoDirective
31
+ *
32
+ * @typedef {{ mounted: (el: Element, binding?: BrontoThemeDirectiveBinding) => void, updated: (el: Element, binding?: BrontoThemeDirectiveBinding) => void, beforeUnmount: (el: Element) => void }} BrontoThemeDirective
33
+ *
34
+ * @typedef {{ directive: (name: string, directive: BrontoDirective | BrontoThemeDirective) => unknown }} BrontoVueApp
35
+ *
36
+ * @typedef {{ install: (app: BrontoVueApp) => void }} BrontoVuePlugin
27
37
  */
28
38
  import {
29
39
  applyStoredTheme,
@@ -104,27 +114,47 @@ export function createBrontoDirective(init) {
104
114
  };
105
115
  }
106
116
 
107
- /** @type {BrontoDirective} */
117
+ /** @type {BrontoThemeDirective} */
108
118
  export const vThemeToggle = createBrontoDirective(initThemeToggle);
119
+ /** @type {BrontoDirective} */
109
120
  export const vDismissible = createBrontoDirective(initDismissible);
121
+ /** @type {BrontoDirective} */
110
122
  export const vDisabledGuard = createBrontoDirective(initDisabledGuard);
123
+ /** @type {BrontoDirective} */
111
124
  export const vDisclosure = createBrontoDirective(initDisclosure);
125
+ /** @type {BrontoDirective} */
112
126
  export const vMenu = createBrontoDirective(initMenu);
127
+ /** @type {BrontoDirective} */
113
128
  export const vFormValidation = createBrontoDirective(initFormValidation);
129
+ /** @type {BrontoDirective} */
114
130
  export const vCombobox = createBrontoDirective(initCombobox);
131
+ /** @type {BrontoDirective} */
115
132
  export const vPopover = createBrontoDirective(initPopover);
133
+ /** @type {BrontoDirective} */
116
134
  export const vTableSort = createBrontoDirective(initTableSort);
135
+ /** @type {BrontoDirective} */
117
136
  export const vTabs = createBrontoDirective(initTabs);
137
+ /** @type {BrontoDirective} */
118
138
  export const vDialog = createBrontoDirective(initDialog);
139
+ /** @type {BrontoDirective} */
119
140
  export const vModal = createBrontoDirective(initModal);
141
+ /** @type {BrontoDirective} */
120
142
  export const vCarousel = createBrontoDirective(initCarousel);
143
+ /** @type {BrontoDirective} */
121
144
  export const vDotGlyph = createBrontoDirective(initDotGlyph);
145
+ /** @type {BrontoDirective} */
122
146
  export const vLegend = createBrontoDirective(initLegend);
147
+ /** @type {BrontoDirective} */
123
148
  export const vConnectors = createBrontoDirective(initConnectors);
149
+ /** @type {BrontoDirective} */
124
150
  export const vSpotlight = createBrontoDirective(initSpotlight);
151
+ /** @type {BrontoDirective} */
125
152
  export const vCrosshair = createBrontoDirective(initCrosshair);
153
+ /** @type {BrontoDirective} */
126
154
  export const vCommand = createBrontoDirective(initCommand);
155
+ /** @type {BrontoDirective} */
127
156
  export const vSources = createBrontoDirective(initSources);
157
+ /** @type {BrontoDirective} */
128
158
  export const vSplitter = createBrontoDirective(initSplitter);
129
159
 
130
160
  export const directives = Object.freeze({
@@ -177,6 +207,7 @@ const directiveNames = {
177
207
 
178
208
  const camelizeDirectiveName = (name) => name.replace(/-([a-z])/g, (_m, ch) => ch.toUpperCase());
179
209
 
210
+ /** @type {BrontoVuePlugin} */
180
211
  export const brontoVue = Object.freeze({
181
212
  install(app) {
182
213
  for (const [key, directive] of Object.entries(directives)) {