@xaui/native 0.0.27 → 0.0.28

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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -228
  3. package/dist/alert/index.cjs +92 -166
  4. package/dist/alert/index.js +2 -1
  5. package/dist/app-bar/index.cjs +24 -98
  6. package/dist/app-bar/index.js +2 -1
  7. package/dist/autocomplete/index.cjs +192 -281
  8. package/dist/autocomplete/index.js +36 -48
  9. package/dist/avatar/index.cjs +59 -133
  10. package/dist/avatar/index.js +2 -1
  11. package/dist/badge/index.cjs +26 -99
  12. package/dist/badge/index.js +2 -1
  13. package/dist/bottom-sheet/index.cjs +5 -456
  14. package/dist/bottom-sheet/index.js +4 -363
  15. package/dist/bottom-tab-bar/index.cjs +93 -167
  16. package/dist/bottom-tab-bar/index.js +2 -2
  17. package/dist/button/index.cjs +73 -525
  18. package/dist/button/index.js +3 -2
  19. package/dist/card/index.cjs +76 -169
  20. package/dist/card/index.js +2 -2
  21. package/dist/carousel/index.cjs +68 -145
  22. package/dist/carousel/index.js +1 -1
  23. package/dist/chart/index.cjs +132 -173
  24. package/dist/checkbox/index.cjs +70 -143
  25. package/dist/checkbox/index.js +2 -1
  26. package/dist/chip/index.cjs +89 -164
  27. package/dist/chip/index.js +2 -1
  28. package/dist/chunk-BD72HIPR.cjs +75 -0
  29. package/dist/chunk-DHSTKO3K.cjs +19 -0
  30. package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
  31. package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
  32. package/dist/chunk-GBHQCAKW.js +19 -0
  33. package/dist/chunk-HC2SSHNU.js +368 -0
  34. package/dist/chunk-HSPTLUFA.cjs +7 -0
  35. package/dist/chunk-JEGEPGVU.js +287 -0
  36. package/dist/chunk-KTLGDLCB.cjs +287 -0
  37. package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
  38. package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
  39. package/dist/chunk-OQ2BLOOG.cjs +138 -0
  40. package/dist/chunk-QMYWIWSX.cjs +384 -0
  41. package/dist/chunk-XFPPR2VB.cjs +368 -0
  42. package/dist/core/index.cjs +22 -168
  43. package/dist/core/index.d.cts +1 -1
  44. package/dist/core/index.d.ts +1 -1
  45. package/dist/core/index.js +5 -3
  46. package/dist/datepicker/index.cjs +239 -320
  47. package/dist/datepicker/index.js +2 -1
  48. package/dist/divider/index.cjs +5 -145
  49. package/dist/divider/index.js +3 -2
  50. package/dist/drawer/index.cjs +39 -112
  51. package/dist/drawer/index.js +2 -1
  52. package/dist/expansion-panel/index.cjs +91 -230
  53. package/dist/expansion-panel/index.js +3 -2
  54. package/dist/fab/index.cjs +6 -722
  55. package/dist/fab/index.js +4 -3
  56. package/dist/fab-menu/index.cjs +81 -814
  57. package/dist/fab-menu/index.js +4 -3
  58. package/dist/feature-discovery/index.cjs +72 -139
  59. package/dist/feature-discovery/index.js +2 -2
  60. package/dist/index.cjs +1 -18
  61. package/dist/indicator/index.cjs +5 -445
  62. package/dist/indicator/index.js +3 -2
  63. package/dist/input/index.cjs +214 -282
  64. package/dist/input/index.js +2 -2
  65. package/dist/list/index.cjs +71 -146
  66. package/dist/list/index.js +2 -1
  67. package/dist/menu/index.cjs +59 -127
  68. package/dist/menu/index.js +2 -2
  69. package/dist/menubox/index.cjs +60 -132
  70. package/dist/menubox/index.js +2 -1
  71. package/dist/pager/index.cjs +42 -80
  72. package/dist/progress/index.cjs +43 -114
  73. package/dist/progress/index.js +2 -1
  74. package/dist/radio/index.cjs +82 -154
  75. package/dist/radio/index.js +2 -1
  76. package/dist/segment-button/index.cjs +60 -147
  77. package/dist/segment-button/index.js +2 -2
  78. package/dist/select/index.cjs +149 -224
  79. package/dist/select/index.js +10 -22
  80. package/dist/skeleton/index.cjs +23 -94
  81. package/dist/skeleton/index.js +2 -2
  82. package/dist/slider/index.cjs +77 -156
  83. package/dist/slider/index.js +2 -1
  84. package/dist/snackbar/index.cjs +420 -0
  85. package/dist/snackbar/index.d.cts +175 -0
  86. package/dist/snackbar/index.d.ts +175 -0
  87. package/dist/snackbar/index.js +420 -0
  88. package/dist/stepper/index.cjs +121 -195
  89. package/dist/stepper/index.js +2 -1
  90. package/dist/switch/index.cjs +48 -121
  91. package/dist/switch/index.js +2 -1
  92. package/dist/tabs/index.cjs +67 -151
  93. package/dist/tabs/index.js +2 -1
  94. package/dist/timepicker/index.cjs +135 -593
  95. package/dist/timepicker/index.js +24 -383
  96. package/dist/toolbar/index.cjs +59 -128
  97. package/dist/toolbar/index.js +2 -1
  98. package/dist/typography/index.cjs +37 -92
  99. package/dist/typography/index.d.cts +1 -1
  100. package/dist/typography/index.d.ts +1 -1
  101. package/dist/typography/index.js +20 -1
  102. package/dist/view/index.cjs +178 -223
  103. package/package.json +6 -1
  104. package/dist/chunk-3XSXTM3G.js +0 -661
  105. package/dist/chunk-4KSZLONZ.js +0 -79
  106. package/dist/chunk-I4V5Y5GD.js +0 -76
  107. package/dist/chunk-URBEEDFX.js +0 -79
@@ -1,89 +1,21 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-HSPTLUFA.cjs');
29
2
 
30
- // src/components/toolbar/index.ts
31
- var toolbar_exports = {};
32
- __export(toolbar_exports, {
33
- Toolbar: () => Toolbar,
34
- ToolbarAction: () => ToolbarAction
35
- });
36
- module.exports = __toCommonJS(toolbar_exports);
37
3
 
38
- // src/components/toolbar/toolbar.tsx
39
- var import_react8 = __toESM(require("react"), 1);
40
- var import_react_native5 = require("react-native");
41
- var import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1);
4
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
42
5
 
43
- // src/components/toolbar/toolbar.hook.ts
44
- var import_react6 = require("react");
45
- var import_core = require("@xaui/core");
6
+ // src/components/toolbar/toolbar.tsx
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
46
9
 
47
- // src/core/theme-context.tsx
48
- var import_react4 = __toESM(require("react"), 1);
49
- var import_react_native2 = require("react-native");
50
- var import_theme = require("@xaui/core/theme");
51
- var import_palette = require("@xaui/core/palette");
52
10
 
53
- // src/core/portal/portal.tsx
54
- var import_react2 = require("react");
55
11
 
56
- // src/core/portal/portal-context.ts
57
- var import_react = require("react");
58
- var PortalContext = (0, import_react.createContext)(null);
59
12
 
60
- // src/core/portal/portal-host.tsx
61
- var import_react3 = __toESM(require("react"), 1);
62
- var import_react_native = require("react-native");
63
- var hostStyles = import_react_native.StyleSheet.create({
64
- container: {
65
- flex: 1
66
- }
67
- });
68
13
 
69
- // src/core/theme-context.tsx
70
- var XUIThemeContext = (0, import_react4.createContext)(null);
71
-
72
- // src/core/theme-hooks.ts
73
- var import_react5 = require("react");
74
- var import_react_native3 = require("react-native");
75
- function useXUITheme() {
76
- const theme = (0, import_react5.useContext)(XUIThemeContext);
77
- if (!theme) {
78
- throw new Error("useXUITheme must be used within XUIProvider");
79
- }
80
- return theme;
81
- }
82
-
83
- // src/core/index.ts
84
- var import_theme2 = require("@xaui/core/theme");
14
+ var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
85
15
 
86
16
  // src/components/toolbar/toolbar.hook.ts
17
+
18
+ var _core = require('@xaui/core');
87
19
  var variantMap = {
88
20
  floating: {
89
21
  containerHeight: 72,
@@ -120,7 +52,7 @@ var variantMap = {
120
52
  }
121
53
  };
122
54
  var useToolbarVariantStyles = (variant, position) => {
123
- return (0, import_react6.useMemo)(() => {
55
+ return _react.useMemo.call(void 0, () => {
124
56
  const baseStyles = variantMap[variant];
125
57
  const isVertical = variant === "vertical";
126
58
  return {
@@ -131,24 +63,24 @@ var useToolbarVariantStyles = (variant, position) => {
131
63
  }, [variant, position]);
132
64
  };
133
65
  var useToolbarColors = (themeColor) => {
134
- const theme = useXUITheme();
135
- const colorScheme = theme.colors[(0, import_core.getSafeThemeColor)(themeColor)];
136
- return (0, import_react6.useMemo)(() => {
66
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
67
+ const colorScheme = theme.colors[_core.getSafeThemeColor.call(void 0, themeColor)];
68
+ return _react.useMemo.call(void 0, () => {
137
69
  return {
138
70
  background: theme.mode === "dark" ? theme.colors.default.background : theme.colors.background,
139
- divider: (0, import_core.withOpacity)(theme.colors.foreground, 0.1),
71
+ divider: _core.withOpacity.call(void 0, theme.colors.foreground, 0.1),
140
72
  title: theme.colors.foreground,
141
- subtitle: (0, import_core.withOpacity)(theme.colors.foreground, 0.72),
73
+ subtitle: _core.withOpacity.call(void 0, theme.colors.foreground, 0.72),
142
74
  action: colorScheme.main,
143
- pressed: (0, import_core.withOpacity)(colorScheme.main, 0.16),
144
- shadow: (0, import_core.withOpacity)(theme.colors.foreground, 0.35)
75
+ pressed: _core.withOpacity.call(void 0, colorScheme.main, 0.16),
76
+ shadow: _core.withOpacity.call(void 0, theme.colors.foreground, 0.35)
145
77
  };
146
78
  }, [colorScheme.main, theme.colors, theme.mode]);
147
79
  };
148
80
 
149
81
  // src/components/toolbar/toolbar.style.ts
150
- var import_react_native4 = require("react-native");
151
- var styles = import_react_native4.StyleSheet.create({
82
+
83
+ var styles = _reactnative.StyleSheet.create({
152
84
  container: {
153
85
  position: "absolute",
154
86
  zIndex: 40
@@ -220,10 +152,10 @@ var styles = import_react_native4.StyleSheet.create({
220
152
  });
221
153
 
222
154
  // src/components/toolbar/toolbar-context.ts
223
- var import_react7 = require("react");
224
- var ToolbarContext = (0, import_react7.createContext)(null);
155
+
156
+ var ToolbarContext = _react.createContext.call(void 0, null);
225
157
  var useToolbarContext = () => {
226
- return (0, import_react7.useContext)(ToolbarContext);
158
+ return _react.useContext.call(void 0, ToolbarContext);
227
159
  };
228
160
 
229
161
  // src/components/toolbar/toolbar.tsx
@@ -239,27 +171,27 @@ var Toolbar = ({
239
171
  customAppearance
240
172
  }) => {
241
173
  const variantStyles = useToolbarVariantStyles(variant, position);
242
- const colors2 = useToolbarColors(themeColor);
243
- const translateValue = (0, import_react_native_reanimated.useSharedValue)(
174
+ const colors = useToolbarColors(themeColor);
175
+ const translateValue = _reactnativereanimated.useSharedValue.call(void 0,
244
176
  isVisible ? 0 : getInitialTranslate(position)
245
177
  );
246
- const opacityValue = (0, import_react_native_reanimated.useSharedValue)(isVisible ? 1 : 0);
247
- (0, import_react8.useEffect)(() => {
178
+ const opacityValue = _reactnativereanimated.useSharedValue.call(void 0, isVisible ? 1 : 0);
179
+ _react.useEffect.call(void 0, () => {
248
180
  if (isVisible) {
249
- translateValue.value = (0, import_react_native_reanimated.withSpring)(0, {
181
+ translateValue.value = _reactnativereanimated.withSpring.call(void 0, 0, {
250
182
  damping: 20,
251
183
  stiffness: 300
252
184
  });
253
- opacityValue.value = (0, import_react_native_reanimated.withTiming)(1, { duration: 200 });
185
+ opacityValue.value = _reactnativereanimated.withTiming.call(void 0, 1, { duration: 200 });
254
186
  } else {
255
- translateValue.value = (0, import_react_native_reanimated.withSpring)(getInitialTranslate(position), {
187
+ translateValue.value = _reactnativereanimated.withSpring.call(void 0, getInitialTranslate(position), {
256
188
  damping: 20,
257
189
  stiffness: 300
258
190
  });
259
- opacityValue.value = (0, import_react_native_reanimated.withTiming)(0, { duration: 200 });
191
+ opacityValue.value = _reactnativereanimated.withTiming.call(void 0, 0, { duration: 200 });
260
192
  }
261
193
  }, [isVisible, position, translateValue, opacityValue]);
262
- const animatedStyle = (0, import_react_native_reanimated.useAnimatedStyle)(() => {
194
+ const animatedStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, () => {
263
195
  const transform = position === "left" || position === "right" ? [{ translateX: translateValue.value }] : [{ translateY: translateValue.value }];
264
196
  return {
265
197
  opacity: opacityValue.value,
@@ -267,25 +199,25 @@ var Toolbar = ({
267
199
  };
268
200
  });
269
201
  const isVertical = variantStyles.isVertical;
270
- const shouldElevate = isElevated ?? variantStyles.isElevated;
202
+ const shouldElevate = _nullishCoalesce(isElevated, () => ( variantStyles.isElevated));
271
203
  const positionStyle = position === "top" ? styles.top : position === "bottom" ? styles.bottom : position === "left" ? styles.left : styles.right;
272
204
  const floatingStyle = variant === "floating" ? [
273
205
  styles.floating,
274
206
  position === "bottom" && styles.floatingBottom,
275
207
  position === "top" && styles.floatingTop
276
208
  ] : null;
277
- return /* @__PURE__ */ import_react8.default.createElement(
209
+ return /* @__PURE__ */ _react2.default.createElement(
278
210
  ToolbarContext.Provider,
279
211
  {
280
212
  value: {
281
- actionColor: colors2.action,
282
- actionPressedColor: colors2.pressed,
213
+ actionColor: colors.action,
214
+ actionPressedColor: colors.pressed,
283
215
  iconSize: variantStyles.iconSize,
284
216
  actionButtonSize: variantStyles.actionSize
285
217
  }
286
218
  },
287
- /* @__PURE__ */ import_react8.default.createElement(
288
- import_react_native_reanimated.default.View,
219
+ /* @__PURE__ */ _react2.default.createElement(
220
+ _reactnativereanimated2.default.View,
289
221
  {
290
222
  style: [
291
223
  styles.container,
@@ -297,35 +229,35 @@ var Toolbar = ({
297
229
  width: variantStyles.containerWidth
298
230
  },
299
231
  style,
300
- customAppearance?.container
232
+ _optionalChain([customAppearance, 'optionalAccess', _ => _.container])
301
233
  ]
302
234
  },
303
- /* @__PURE__ */ import_react8.default.createElement(
304
- import_react_native5.View,
235
+ /* @__PURE__ */ _react2.default.createElement(
236
+ _reactnative.View,
305
237
  {
306
238
  style: [
307
239
  isVertical ? styles.contentVertical : styles.content,
308
240
  {
309
- backgroundColor: colors2.background,
241
+ backgroundColor: colors.background,
310
242
  borderRadius: variantStyles.borderRadius,
311
243
  paddingHorizontal: variantStyles.paddingHorizontal,
312
244
  paddingVertical: variantStyles.paddingVertical,
313
245
  borderBottomWidth: showDivider ? 1 : 0,
314
- borderBottomColor: showDivider ? colors2.divider : "transparent",
246
+ borderBottomColor: showDivider ? colors.divider : "transparent",
315
247
  height: "100%",
316
248
  width: "100%"
317
249
  },
318
- shouldElevate && [styles.elevated, { shadowColor: colors2.shadow }],
319
- customAppearance?.topRow
250
+ shouldElevate && [styles.elevated, { shadowColor: colors.shadow }],
251
+ _optionalChain([customAppearance, 'optionalAccess', _2 => _2.topRow])
320
252
  ]
321
253
  },
322
- /* @__PURE__ */ import_react8.default.createElement(
323
- import_react_native5.View,
254
+ /* @__PURE__ */ _react2.default.createElement(
255
+ _reactnative.View,
324
256
  {
325
257
  style: [
326
258
  isVertical ? styles.actionsVertical : styles.actions,
327
259
  { gap: variantStyles.gap },
328
- customAppearance?.actionsContainer
260
+ _optionalChain([customAppearance, 'optionalAccess', _3 => _3.actionsContainer])
329
261
  ]
330
262
  },
331
263
  children
@@ -350,8 +282,8 @@ function getInitialTranslate(position) {
350
282
  }
351
283
 
352
284
  // src/components/toolbar/toolbar-action.tsx
353
- var import_react9 = __toESM(require("react"), 1);
354
- var import_react_native6 = require("react-native");
285
+
286
+
355
287
  var ToolbarAction = ({
356
288
  icon,
357
289
  isDisabled = false,
@@ -363,11 +295,11 @@ var ToolbarAction = ({
363
295
  }) => {
364
296
  const context = useToolbarContext();
365
297
  const iconNode = typeof icon === "function" ? icon({
366
- color: context?.actionColor ?? "#000000",
367
- size: context?.iconSize ?? 26
298
+ color: _nullishCoalesce(_optionalChain([context, 'optionalAccess', _4 => _4.actionColor]), () => ( "#000000")),
299
+ size: _nullishCoalesce(_optionalChain([context, 'optionalAccess', _5 => _5.iconSize]), () => ( 26))
368
300
  }) : icon;
369
- return /* @__PURE__ */ import_react9.default.createElement(
370
- import_react_native6.Pressable,
301
+ return /* @__PURE__ */ _react2.default.createElement(
302
+ _reactnative.Pressable,
371
303
  {
372
304
  onPress: isDisabled ? void 0 : onPress,
373
305
  onLongPress: isDisabled ? void 0 : onLongPress,
@@ -377,9 +309,9 @@ var ToolbarAction = ({
377
309
  style: ({ pressed }) => [
378
310
  styles.actionButton,
379
311
  {
380
- width: context?.actionButtonSize ?? 40,
381
- height: context?.actionButtonSize ?? 40,
382
- backgroundColor: pressed ? context?.actionPressedColor ?? "transparent" : "transparent"
312
+ width: _nullishCoalesce(_optionalChain([context, 'optionalAccess', _6 => _6.actionButtonSize]), () => ( 40)),
313
+ height: _nullishCoalesce(_optionalChain([context, 'optionalAccess', _7 => _7.actionButtonSize]), () => ( 40)),
314
+ backgroundColor: pressed ? _nullishCoalesce(_optionalChain([context, 'optionalAccess', _8 => _8.actionPressedColor]), () => ( "transparent")) : "transparent"
383
315
  },
384
316
  isDisabled && styles.disabledAction,
385
317
  style
@@ -388,8 +320,7 @@ var ToolbarAction = ({
388
320
  iconNode
389
321
  );
390
322
  };
391
- // Annotate the CommonJS export names for ESM import in node:
392
- 0 && (module.exports = {
393
- Toolbar,
394
- ToolbarAction
395
- });
323
+
324
+
325
+
326
+ exports.Toolbar = Toolbar; exports.ToolbarAction = ToolbarAction;
@@ -1,6 +1,7 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useXUITheme
3
- } from "../chunk-4KSZLONZ.js";
4
+ } from "../chunk-LTKYHG5V.js";
4
5
 
5
6
  // src/components/toolbar/toolbar.tsx
6
7
  import React, { useEffect } from "react";
@@ -1,96 +1,27 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-HSPTLUFA.cjs');
29
2
 
30
- // src/components/typography/index.ts
31
- var typography_exports = {};
32
- __export(typography_exports, {
33
- Typography: () => Typography
34
- });
35
- module.exports = __toCommonJS(typography_exports);
3
+
4
+ var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
36
5
 
37
6
  // src/components/typography/typography.tsx
38
- var import_react7 = __toESM(require("react"), 1);
39
- var import_react_native5 = require("react-native");
7
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
8
+ var _reactnative = require('react-native');
40
9
 
41
10
  // src/components/typography/typography.style.ts
42
- var import_react_native = require("react-native");
43
- var styles = import_react_native.StyleSheet.create({
11
+
12
+ var styles = _reactnative.StyleSheet.create({
44
13
  text: {
45
14
  includeFontPadding: false
46
15
  }
47
16
  });
48
17
 
49
18
  // src/components/typography/typography.hook.ts
50
- var import_react6 = require("react");
51
-
52
- // src/core/theme-context.tsx
53
- var import_react4 = __toESM(require("react"), 1);
54
- var import_react_native3 = require("react-native");
55
- var import_theme = require("@xaui/core/theme");
56
- var import_palette = require("@xaui/core/palette");
57
-
58
- // src/core/portal/portal.tsx
59
- var import_react2 = require("react");
60
-
61
- // src/core/portal/portal-context.ts
62
- var import_react = require("react");
63
- var PortalContext = (0, import_react.createContext)(null);
64
-
65
- // src/core/portal/portal-host.tsx
66
- var import_react3 = __toESM(require("react"), 1);
67
- var import_react_native2 = require("react-native");
68
- var hostStyles = import_react_native2.StyleSheet.create({
69
- container: {
70
- flex: 1
71
- }
72
- });
73
-
74
- // src/core/theme-context.tsx
75
- var XUIThemeContext = (0, import_react4.createContext)(null);
76
-
77
- // src/core/theme-hooks.ts
78
- var import_react5 = require("react");
79
- var import_react_native4 = require("react-native");
80
- function useXUITheme() {
81
- const theme = (0, import_react5.useContext)(XUIThemeContext);
82
- if (!theme) {
83
- throw new Error("useXUITheme must be used within XUIProvider");
84
- }
85
- return theme;
86
- }
87
19
 
88
- // src/core/index.ts
89
- var import_theme2 = require("@xaui/core/theme");
90
-
91
- // src/components/typography/typography.hook.ts
92
- var import_core2 = require("@xaui/core");
20
+ var _core = require('@xaui/core');
93
21
  var knownVariants = {
22
+ displayLarge: true,
23
+ displayMedium: true,
24
+ displaySmall: true,
94
25
  caption: true,
95
26
  headlineLarge: true,
96
27
  headlineMedium: true,
@@ -106,19 +37,19 @@ var isKnownVariant = (variant) => {
106
37
  return Boolean(knownVariants[variant]);
107
38
  };
108
39
  var useTypographyColor = (themeColor) => {
109
- const theme = useXUITheme();
110
- const color = (0, import_react6.useMemo)(() => {
40
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
41
+ const color = _react.useMemo.call(void 0, () => {
111
42
  if (themeColor === "default") {
112
43
  return theme.colors.foreground;
113
44
  }
114
- const safeThemeColor = (0, import_core2.getSafeThemeColor)(themeColor);
45
+ const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
115
46
  return theme.colors[safeThemeColor].main;
116
47
  }, [theme, themeColor]);
117
48
  return color;
118
49
  };
119
50
  var useTypographyVariantStyles = (variant) => {
120
- const theme = useXUITheme();
121
- const variantStyles = (0, import_react6.useMemo)(() => {
51
+ const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
52
+ const variantStyles = _react.useMemo.call(void 0, () => {
122
53
  if (!isKnownVariant(variant)) {
123
54
  return {
124
55
  fontFamily: theme.fontFamilies.body,
@@ -127,6 +58,21 @@ var useTypographyVariantStyles = (variant) => {
127
58
  };
128
59
  }
129
60
  const styles2 = {
61
+ displayLarge: {
62
+ fontFamily: theme.fontFamilies.heading,
63
+ fontSize: 72,
64
+ fontWeight: theme.fontWeights.semibold
65
+ },
66
+ displayMedium: {
67
+ fontFamily: theme.fontFamilies.heading,
68
+ fontSize: 57,
69
+ fontWeight: theme.fontWeights.semibold
70
+ },
71
+ displaySmall: {
72
+ fontFamily: theme.fontFamilies.heading,
73
+ fontSize: 45,
74
+ fontWeight: theme.fontWeights.semibold
75
+ },
130
76
  caption: {
131
77
  fontFamily: theme.fontFamilies.body,
132
78
  fontSize: theme.fontSizes.xs,
@@ -196,13 +142,13 @@ var Typography = ({
196
142
  const color = useTypographyColor(themeColor);
197
143
  const variantStyles = useTypographyVariantStyles(variant);
198
144
  const colorStyle = { color };
199
- const ellipsizeMode = (0, import_react7.useMemo)(() => {
145
+ const ellipsizeMode = _react.useMemo.call(void 0, () => {
200
146
  if (!maxLines) return void 0;
201
147
  if (overflow === "clip") return "clip";
202
148
  return "tail";
203
149
  }, [maxLines, overflow]);
204
- return /* @__PURE__ */ import_react7.default.createElement(
205
- import_react_native5.Text,
150
+ return /* @__PURE__ */ _react2.default.createElement(
151
+ _reactnative.Text,
206
152
  {
207
153
  numberOfLines: maxLines,
208
154
  ellipsizeMode,
@@ -217,7 +163,6 @@ var Typography = ({
217
163
  children
218
164
  );
219
165
  };
220
- // Annotate the CommonJS export names for ESM import in node:
221
- 0 && (module.exports = {
222
- Typography
223
- });
166
+
167
+
168
+ exports.Typography = Typography;
@@ -3,7 +3,7 @@ import { StyleProp, TextStyle } from 'react-native';
3
3
  import { T as ThemeColor } from '../index-BOw6tbkc.cjs';
4
4
 
5
5
  type TypographyAlign = 'center' | 'justify' | 'left' | 'right';
6
- type TypographyVariant = 'caption' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'subtitleLarge' | 'subtitleMedium' | 'subtitleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | string;
6
+ type TypographyVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'caption' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'subtitleLarge' | 'subtitleMedium' | 'subtitleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | string;
7
7
  type TypographyProps = {
8
8
  /**
9
9
  * The content to display inside the typography component.
@@ -3,7 +3,7 @@ import { StyleProp, TextStyle } from 'react-native';
3
3
  import { T as ThemeColor } from '../index-BOw6tbkc.js';
4
4
 
5
5
  type TypographyAlign = 'center' | 'justify' | 'left' | 'right';
6
- type TypographyVariant = 'caption' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'subtitleLarge' | 'subtitleMedium' | 'subtitleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | string;
6
+ type TypographyVariant = 'displayLarge' | 'displayMedium' | 'displaySmall' | 'caption' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'subtitleLarge' | 'subtitleMedium' | 'subtitleSmall' | 'bodyLarge' | 'bodyMedium' | 'bodySmall' | string;
7
7
  type TypographyProps = {
8
8
  /**
9
9
  * The content to display inside the typography component.
@@ -1,6 +1,7 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useXUITheme
3
- } from "../chunk-URBEEDFX.js";
4
+ } from "../chunk-LTKYHG5V.js";
4
5
 
5
6
  // src/components/typography/typography.tsx
6
7
  import React, { useMemo as useMemo2 } from "react";
@@ -18,6 +19,9 @@ var styles = StyleSheet.create({
18
19
  import { useMemo } from "react";
19
20
  import { getSafeThemeColor } from "@xaui/core";
20
21
  var knownVariants = {
22
+ displayLarge: true,
23
+ displayMedium: true,
24
+ displaySmall: true,
21
25
  caption: true,
22
26
  headlineLarge: true,
23
27
  headlineMedium: true,
@@ -54,6 +58,21 @@ var useTypographyVariantStyles = (variant) => {
54
58
  };
55
59
  }
56
60
  const styles2 = {
61
+ displayLarge: {
62
+ fontFamily: theme.fontFamilies.heading,
63
+ fontSize: 72,
64
+ fontWeight: theme.fontWeights.semibold
65
+ },
66
+ displayMedium: {
67
+ fontFamily: theme.fontFamilies.heading,
68
+ fontSize: 57,
69
+ fontWeight: theme.fontWeights.semibold
70
+ },
71
+ displaySmall: {
72
+ fontFamily: theme.fontFamilies.heading,
73
+ fontSize: 45,
74
+ fontWeight: theme.fontWeights.semibold
75
+ },
57
76
  caption: {
58
77
  fontFamily: theme.fontFamilies.body,
59
78
  fontSize: theme.fontSizes.xs,