@genexus/mercury 0.8.10 → 0.9.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.
@@ -0,0 +1 @@
1
+ .widget{--spacing-body-block-start: var(--mer-spacing--md);--spacing-body-block-end: var(--mer-spacing--md);--spacing-body-inline-start: var(--mer-spacing--md);--spacing-body-inline-end: var(--mer-spacing--md)}
@@ -0,0 +1,3 @@
1
+ @import "../../../mercury.scss";
2
+
3
+ @include mercury-only($components: true, $widget: true);
package/dist/bundles.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import { ThemeModel } from "@genexus/chameleon-controls-library";
1
2
  export type MercuryBundles = [MercuryBundleReset, ...MercuryBundleOptimized[]] | [MercuryBundleReset, ...MercuryBundleFull[]];
2
3
  export type MercuryBundleOptimized = MercuryBundleComponent | MercuryBundleComponentForm | MercuryBundleUtil;
3
4
  export type MercuryBundleFull = MercuryBundleComponent | MercuryBundleUtil | MercuryBundleUtilFormFull;
4
5
  export type MercuryBundleBase = "base/base" | "base/icons";
5
- export type MercuryBundleComponent = "components/accordion" | "components/chat" | "components/code" | "components/dialog" | "components/flexible-layout" | "components/list-box" | "components/markdown-viewer" | "components/navigation-list" | "components/segmented-control" | "components/sidebar" | "components/tab" | "components/tabular-grid" | "components/ticket-list" | "components/tree-view" | "components/tooltip";
6
+ export type MercuryBundleComponent = "components/accordion" | "components/chat" | "components/code" | "components/dialog" | "components/flexible-layout" | "components/list-box" | "components/markdown-viewer" | "components/navigation-list" | "components/segmented-control" | "components/sidebar" | "components/tab" | "components/tabular-grid" | "components/ticket-list" | "components/tooltip" | "components/tree-view" | "components/widget";
6
7
  export type MercuryBundleComponentForm = "components/button" | "components/checkbox" | "components/combo-box" | "components/edit" | "components/icon" | "components/radio-group" | "components/slider";
7
8
  export type MercuryBundleReset = "resets/box-sizing";
8
9
  export type MercuryBundleUtil = "utils/form" | "utils/layout" | "utils/typography" | "chameleon/scrollbar";
@@ -200,6 +201,14 @@ export declare const getThemeBundles: (basePath: string) => [{
200
201
  readonly name: BundleNames;
201
202
  readonly url: `${string}components/tree-view.css`;
202
203
  readonly attachStyleSheet: boolean;
204
+ }, {
205
+ readonly name: BundleNames;
206
+ readonly url: `${string}components/widget.css`;
207
+ readonly attachStyleSheet?: undefined;
208
+ } | {
209
+ readonly name: BundleNames;
210
+ readonly url: `${string}components/widget.css`;
211
+ readonly attachStyleSheet: boolean;
203
212
  }, {
204
213
  readonly name: BundleNames;
205
214
  readonly url: `${string}resets/box-sizing.css`;
@@ -249,4 +258,33 @@ export declare const getThemeBundles: (basePath: string) => [{
249
258
  readonly url: `${string}chameleon/scrollbar.css`;
250
259
  readonly attachStyleSheet: boolean;
251
260
  }];
261
+ /**
262
+ * Given the bundles array and the basePath (optional), returns the given
263
+ * bundles in the format of type `ThemeModel`.
264
+ *
265
+ * This is useful for defining the following in a dialog:
266
+ *
267
+ * ```tsx
268
+ * const CSS_BUNDLES: ThemeModel = getBundles(
269
+ * [
270
+ * "components/accordion",
271
+ * "components/button",
272
+ * "components/checkbox",
273
+ * "components/combo-box",
274
+ * "components/edit",
275
+ * "components/tree-view",
276
+ * "utils/form",
277
+ * "utils/layout",
278
+ * ],
279
+ * "./assets/css/"
280
+ * );
281
+ *
282
+ * HTML/render/template:
283
+ * <Host>
284
+ * <ch-theme model={CSS_BUNDLES}></ch-theme>
285
+ * ...
286
+ * </Host>
287
+ * ```
288
+ */
289
+ export declare const getBundles: (bundles: MercuryBundleOptimized[] | MercuryBundleFull[], basePath?: string) => ThemeModel;
252
290
  export {};
package/dist/bundles.js CHANGED
@@ -48,6 +48,7 @@ export const getThemeBundles = (basePath) => [
48
48
  getThemeModelItem(basePath, "components/ticket-list"),
49
49
  getThemeModelItem(basePath, "components/tooltip"),
50
50
  getThemeModelItem(basePath, "components/tree-view"),
51
+ getThemeModelItem(basePath, "components/widget"),
51
52
  // Resets
52
53
  getThemeModelItem(basePath, "resets/box-sizing"),
53
54
  // Utils
@@ -57,3 +58,34 @@ export const getThemeBundles = (basePath) => [
57
58
  getThemeModelItem(basePath, "utils/typography"),
58
59
  getThemeModelItem(basePath, "chameleon/scrollbar")
59
60
  ];
61
+ /**
62
+ * Given the bundles array and the basePath (optional), returns the given
63
+ * bundles in the format of type `ThemeModel`.
64
+ *
65
+ * This is useful for defining the following in a dialog:
66
+ *
67
+ * ```tsx
68
+ * const CSS_BUNDLES: ThemeModel = getBundles(
69
+ * [
70
+ * "components/accordion",
71
+ * "components/button",
72
+ * "components/checkbox",
73
+ * "components/combo-box",
74
+ * "components/edit",
75
+ * "components/tree-view",
76
+ * "utils/form",
77
+ * "utils/layout",
78
+ * ],
79
+ * "./assets/css/"
80
+ * );
81
+ *
82
+ * HTML/render/template:
83
+ * <Host>
84
+ * <ch-theme model={CSS_BUNDLES}></ch-theme>
85
+ * ...
86
+ * </Host>
87
+ * ```
88
+ */
89
+ export const getBundles = (bundles, basePath) => basePath
90
+ ? bundles.map(bundle => getThemeModelItem(basePath, bundle))
91
+ : bundles;
package/dist/mercury.scss CHANGED
@@ -8613,6 +8613,21 @@
8613
8613
  );
8614
8614
  }
8615
8615
 
8616
+ %widget {
8617
+ --spacing-body-block-start: var(--mer-spacing--md);
8618
+ --spacing-body-block-end: var(--mer-spacing--md);
8619
+ --spacing-body-inline-start: var(--mer-spacing--md);
8620
+ --spacing-body-inline-end: var(--mer-spacing--md);
8621
+ }
8622
+
8623
+ /// @group Widget
8624
+ /// @param {String} $selector [".widget"] -
8625
+ @mixin widget($selector: ".widget") {
8626
+ #{$selector} {
8627
+ @extend %widget;
8628
+ }
8629
+ }
8630
+
8616
8631
 
8617
8632
  @mixin mercury(
8618
8633
  // Resets
@@ -8681,7 +8696,8 @@
8681
8696
  $tabular-grid: true,
8682
8697
  $ticket-list: true,
8683
8698
  $tooltip: true,
8684
- $tree-view: true
8699
+ $tree-view: true,
8700
+ $widget: true
8685
8701
  ) {
8686
8702
  // - - - - - - - - - - - - - - - - - - - -
8687
8703
  // Icons
@@ -16991,6 +17007,10 @@
16991
17007
  @if $tree-view {
16992
17008
  @include tree-view();
16993
17009
  }
17010
+
17011
+ @if $widget {
17012
+ @include widget();
17013
+ }
16994
17014
  }
16995
17015
 
16996
17016
  @mixin mercury-only(
@@ -17060,7 +17080,8 @@
17060
17080
  $tabular-grid: false,
17061
17081
  $ticket-list: false,
17062
17082
  $tooltip: false,
17063
- $tree-view: false
17083
+ $tree-view: false,
17084
+ $widget: false
17064
17085
  ) {
17065
17086
  @include mercury(
17066
17087
  // Resets
@@ -17129,6 +17150,7 @@
17129
17150
  $tabular-grid: $tabular-grid,
17130
17151
  $ticket-list: $ticket-list,
17131
17152
  $tooltip: $tooltip,
17132
- $tree-view: $tree-view
17153
+ $tree-view: $tree-view,
17154
+ $widget: $widget
17133
17155
  );
17134
17156
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genexus/mercury",
3
- "version": "0.8.10",
3
+ "version": "0.9.0",
4
4
  "description": "Mercury is the design system designed for GeneXus IDE Web and GeneXus Next",
5
5
  "main": "dist/mercury.scss",
6
6
  "module": "dist/assets-manager.js",