elbe-ui 1.0.8 → 2.0.1

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 (149) hide show
  1. package/dist/bit/_bit_provider.d.ts +1 -1
  2. package/dist/bit/_bit_provider.js +4 -4
  3. package/dist/bit/bit.d.ts +1 -1
  4. package/dist/bit/bit.js +1 -0
  5. package/dist/elbe.css +150 -562
  6. package/dist/elbe.css.map +1 -1
  7. package/dist/index.d.ts +188 -46
  8. package/dist/index.js +8 -6
  9. package/dist/ui/app/app.d.ts +13 -0
  10. package/dist/ui/app/app.js +81 -0
  11. package/dist/ui/app/app_ctxt.d.ts +35 -0
  12. package/dist/ui/app/app_ctxt.js +10 -0
  13. package/dist/ui/components/badge.d.ts +3 -3
  14. package/dist/ui/components/badge.js +16 -5
  15. package/dist/ui/components/banner.d.ts +3 -3
  16. package/dist/ui/components/banner.js +1 -1
  17. package/dist/ui/components/base/box.d.ts +82 -35
  18. package/dist/ui/components/base/box.js +56 -8
  19. package/dist/ui/components/base/card.d.ts +11 -12
  20. package/dist/ui/components/base/card.js +41 -19
  21. package/dist/ui/components/base/padded.d.ts +2 -4
  22. package/dist/ui/components/base/state_builder.d.ts +9 -0
  23. package/dist/ui/components/base/state_builder.js +33 -0
  24. package/dist/ui/components/button/button.d.ts +8 -6
  25. package/dist/ui/components/button/button.js +27 -16
  26. package/dist/ui/components/button/choose_button.d.ts +5 -3
  27. package/dist/ui/components/button/choose_button.js +9 -6
  28. package/dist/ui/components/button/icon_button.d.ts +6 -5
  29. package/dist/ui/components/button/icon_button.js +33 -23
  30. package/dist/ui/components/button/toggle_button.d.ts +5 -5
  31. package/dist/ui/components/button/toggle_button.js +13 -7
  32. package/dist/ui/components/dialog/dialog.d.ts +13 -0
  33. package/dist/ui/components/dialog/dialog.js +69 -0
  34. package/dist/ui/components/dialog/dialog_ctx.d.ts +34 -0
  35. package/dist/ui/components/dialog/dialog_ctx.js +44 -0
  36. package/dist/ui/components/dialog/dialogs/_alert.d.ts +7 -0
  37. package/dist/ui/components/dialog/dialogs/_alert.js +9 -0
  38. package/dist/ui/components/dialog/dialogs/_confirm.d.ts +9 -0
  39. package/dist/ui/components/dialog/dialogs/_confirm.js +21 -0
  40. package/dist/ui/components/error_view.js +3 -3
  41. package/dist/ui/components/footer.js +7 -7
  42. package/dist/ui/components/input/_labeled_input.d.ts +21 -0
  43. package/dist/ui/components/input/_labeled_input.js +21 -0
  44. package/dist/ui/components/input/checkbox.d.ts +4 -2
  45. package/dist/ui/components/input/checkbox.js +16 -8
  46. package/dist/ui/components/input/range.d.ts +5 -3
  47. package/dist/ui/components/input/range.js +19 -18
  48. package/dist/ui/components/input/select.d.ts +4 -3
  49. package/dist/ui/components/input/select.js +13 -40
  50. package/dist/ui/components/input/switch.d.ts +4 -2
  51. package/dist/ui/components/input/switch.js +30 -40
  52. package/dist/ui/components/input/text/input_field.d.ts +14 -19
  53. package/dist/ui/components/input/text/input_field.js +59 -61
  54. package/dist/ui/components/input/text/single_line.d.ts +11 -9
  55. package/dist/ui/components/input/text/single_line.js +15 -21
  56. package/dist/ui/components/layout/flex.d.ts +7 -3
  57. package/dist/ui/components/layout/flex.js +15 -12
  58. package/dist/ui/components/layout/header.d.ts +2 -2
  59. package/dist/ui/components/layout/header.js +26 -18
  60. package/dist/ui/components/layout/menu.d.ts +1 -1
  61. package/dist/ui/components/layout/menu.js +80 -49
  62. package/dist/ui/components/layout/scroll.d.ts +1 -0
  63. package/dist/ui/components/layout/scroll.js +3 -1
  64. package/dist/ui/components/layout/toolbar.js +9 -6
  65. package/dist/ui/components/link.d.ts +4 -2
  66. package/dist/ui/components/link.js +24 -11
  67. package/dist/ui/components/progress_bar.d.ts +2 -2
  68. package/dist/ui/components/progress_bar.js +12 -9
  69. package/dist/ui/components/spinner.d.ts +2 -7
  70. package/dist/ui/components/spinner.js +15 -16
  71. package/dist/ui/components/text.d.ts +5 -6
  72. package/dist/ui/components/text.js +34 -21
  73. package/dist/ui/components/tooltip.d.ts +5 -0
  74. package/dist/ui/components/tooltip.js +48 -0
  75. package/dist/ui/theme/subthemes/_theme_geometry.d.ts +9 -0
  76. package/dist/ui/theme/subthemes/_theme_geometry.js +22 -0
  77. package/dist/ui/theme/subthemes/_theme_menu.d.ts +9 -0
  78. package/dist/ui/theme/subthemes/_theme_menu.js +12 -0
  79. package/dist/ui/theme/subthemes/_theme_motion.d.ts +9 -0
  80. package/dist/ui/theme/subthemes/_theme_motion.js +13 -0
  81. package/dist/ui/theme/subthemes/_theme_toast.d.ts +8 -0
  82. package/dist/ui/theme/subthemes/_theme_toast.js +11 -0
  83. package/dist/ui/theme/subthemes/_theme_type.d.ts +49 -0
  84. package/dist/ui/theme/subthemes/_theme_type.js +73 -0
  85. package/dist/ui/theme/subthemes/color/_seed.d.ts +2 -0
  86. package/dist/ui/theme/subthemes/color/_seed.js +105 -0
  87. package/dist/ui/theme/subthemes/color/_theme_color.d.ts +865 -0
  88. package/dist/ui/theme/subthemes/color/_theme_color.js +83 -0
  89. package/dist/ui/theme/subthemes/color/colors/_color_contrast.d.ts +284 -0
  90. package/dist/ui/theme/subthemes/color/colors/_color_contrast.js +17 -0
  91. package/dist/ui/theme/subthemes/color/colors/_color_kind.d.ts +242 -0
  92. package/dist/ui/theme/subthemes/color/colors/_color_kind.js +45 -0
  93. package/dist/ui/theme/subthemes/color/colors/_color_layer.d.ts +226 -0
  94. package/dist/ui/theme/subthemes/color/colors/_color_layer.js +95 -0
  95. package/dist/ui/theme/subthemes/color/colors/_color_manner.d.ts +280 -0
  96. package/dist/ui/theme/subthemes/color/colors/_color_manner.js +17 -0
  97. package/dist/ui/theme/subthemes/color/colors/_color_mode.d.ts +269 -0
  98. package/dist/ui/theme/subthemes/color/colors/_color_mode.js +16 -0
  99. package/dist/ui/theme/subthemes/color/colors/_color_rgba.d.ts +166 -0
  100. package/dist/ui/theme/subthemes/color/colors/_color_rgba.js +86 -0
  101. package/dist/ui/theme/subthemes/color/colors/_color_scheme.d.ts +256 -0
  102. package/dist/ui/theme/subthemes/color/colors/_color_scheme.js +17 -0
  103. package/dist/ui/theme/subthemes/color/colors/_color_state.d.ts +252 -0
  104. package/dist/ui/theme/subthemes/color/colors/_color_state.js +49 -0
  105. package/dist/ui/theme/subthemes/color/colors/_colordef.d.ts +22 -0
  106. package/dist/ui/theme/subthemes/color/colors/_colordef.js +34 -0
  107. package/dist/ui/theme/subthemes/color/colors/colors.d.ts +511 -0
  108. package/dist/ui/theme/subthemes/color/colors/colors.js +24 -0
  109. package/dist/ui/theme/theme.d.ts +984 -30
  110. package/dist/ui/theme/theme.js +14 -82
  111. package/dist/ui/theme/theme_context.d.ts +15 -17
  112. package/dist/ui/theme/theme_context.js +79 -18
  113. package/dist/ui/util/_util.d.ts +8 -0
  114. package/dist/ui/util/_util.js +42 -0
  115. package/dist/ui/util/error_view.js +3 -3
  116. package/dist/ui/util/merge_deep.d.ts +1 -0
  117. package/dist/ui/util/merge_deep.js +18 -0
  118. package/dist/ui/util/root.d.ts +17 -0
  119. package/dist/ui/util/root.js +23 -0
  120. package/dist/ui/util/toast/_toast.d.ts +5 -0
  121. package/dist/ui/util/toast/_toast.js +7 -0
  122. package/dist/ui/util/toast/toast_ctx.d.ts +28 -0
  123. package/dist/ui/util/toast/toast_ctx.js +62 -0
  124. package/dist/ui/util/toast/toast_legacy.d.ts +5 -0
  125. package/dist/ui/util/{toast.js → toast/toast_legacy.js} +4 -4
  126. package/dist/ui/util/util.d.ts +15 -0
  127. package/dist/ui/util/util.js +69 -1
  128. package/package.json +11 -9
  129. package/dist/ui/components/dialog.d.ts +0 -10
  130. package/dist/ui/components/dialog.js +0 -35
  131. package/dist/ui/components/layout/app_base.d.ts +0 -15
  132. package/dist/ui/components/layout/app_base.js +0 -76
  133. package/dist/ui/components/layout/ctx_app_base.d.ts +0 -19
  134. package/dist/ui/components/layout/ctx_app_base.js +0 -12
  135. package/dist/ui/theme/color_theme.d.ts +0 -2
  136. package/dist/ui/theme/color_theme.js +0 -92
  137. package/dist/ui/theme/colors.d.ts +0 -133
  138. package/dist/ui/theme/colors.js +0 -309
  139. package/dist/ui/theme/geometry_theme.d.ts +0 -16
  140. package/dist/ui/theme/geometry_theme.js +0 -28
  141. package/dist/ui/theme/seed.d.ts +0 -53
  142. package/dist/ui/theme/seed.js +0 -4
  143. package/dist/ui/theme/type_theme.d.ts +0 -38
  144. package/dist/ui/theme/type_theme.js +0 -73
  145. package/dist/ui/util/confirm_dialog.d.ts +0 -10
  146. package/dist/ui/util/confirm_dialog.js +0 -46
  147. package/dist/ui/util/toast.d.ts +0 -5
  148. /package/dist/bit/{_bit_utils.d.ts → _bit_types.d.ts} +0 -0
  149. /package/dist/bit/{_bit_utils.js → _bit_types.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { Context } from "react";
2
2
  import { BitParams, BitUseInterface } from "..";
3
- import { _BitCtrlMaker, _BitProvider } from "./_bit_utils";
3
+ import { _BitCtrlMaker, _BitProvider } from "./_bit_types";
4
4
  export declare function _makeBitProvider<D, P, I>(context: Context<BitUseInterface<D, P, I>>, bitP: BitParams<D, P, I> & {
5
5
  control: _BitCtrlMaker<D, P, I>;
6
6
  }): _BitProvider<P>;
@@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- import { useEffect, useMemo, useState } from "react";
11
+ import { useEffect, useState } from "react";
12
12
  import { Column, ErrorView, Spinner, } from "..";
13
- import { _isFn } from "./_bit_utils";
13
+ import { _isFn } from "./_bit_types";
14
14
  function _LoadView({}) {
15
15
  return (_jsx(Column, { cross: "center", children: _jsx(Spinner, {}) }));
16
16
  }
@@ -128,7 +128,7 @@ export function _makeBitProvider(context, bitP) {
128
128
  const userCtrl = bitP.control(Object.assign(Object.assign({}, baseCtrl), { parameters: p, reload: _reload, consider: consider }));
129
129
  return Object.assign(Object.assign(Object.assign({}, baseCtrl), userCtrl), { reload: _reload, parameters: p, consider: consider });
130
130
  }
131
- const ctrl = useMemo(() => _make(), [state]);
131
+ const ctrl = _make();
132
132
  useEffect(() => {
133
133
  ctrl.reload(true);
134
134
  return () => {
@@ -147,7 +147,7 @@ export function _makeBitProvider(context, bitP) {
147
147
  };
148
148
  }, []);
149
149
  // ========== DEFINE THE JSX ELEMENT ==========
150
- return _jsx(context.Provider, { value: ctrl, children: p.children });
150
+ return (_jsx(context.Provider, { value: Object.assign({}, ctrl), children: p.children }));
151
151
  }
152
152
  return _BitProvider;
153
153
  }
package/dist/bit/bit.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Context } from "react";
2
2
  import { Maybe, PromiseOr } from "..";
3
- import { _BitCtrlInput, _BitCtrlMaker, _BitData, _BitGetInterface, _BitInterface } from "./_bit_utils";
3
+ import { _BitCtrlInput, _BitCtrlMaker, _BitData, _BitGetInterface, _BitInterface } from "./_bit_types";
4
4
  export type BitStates = "loading" | "error" | "data";
5
5
  export type BitContext<D> = Context<_BitData<D> | null>;
6
6
  export type BitTriMap<T, D> = {
package/dist/bit/bit.js CHANGED
@@ -14,6 +14,7 @@ import { _makeBitProvider } from "./_bit_provider";
14
14
  export function createBit(_a) {
15
15
  var { control = () => ({}) } = _a, p = __rest(_a, ["control"]);
16
16
  const context = createContext(null);
17
+ context.displayName = p.debugLabel || "BitContext";
17
18
  {
18
19
  return {
19
20
  Provider: _makeBitProvider(context, Object.assign(Object.assign({}, p), { control })),