@xaui/native 0.0.32 → 0.0.34
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.
- package/dist/alert/index.cjs +1 -1
- package/dist/alert/index.js +1 -1
- package/dist/app-bar/index.cjs +1 -1
- package/dist/app-bar/index.js +1 -1
- package/dist/autocomplete/index.cjs +1 -1
- package/dist/autocomplete/index.js +1 -1
- package/dist/avatar/index.cjs +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/badge/index.cjs +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/bottom-sheet/index.cjs +5 -4
- package/dist/bottom-sheet/index.js +3 -2
- package/dist/bottom-tab-bar/index.cjs +1 -1
- package/dist/bottom-tab-bar/index.js +1 -1
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.js +1 -1
- package/dist/card/index.cjs +1 -1
- package/dist/card/index.js +1 -1
- package/dist/checkbox/index.cjs +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/chip/index.cjs +1 -1
- package/dist/chip/index.js +1 -1
- package/dist/chunk-2ANGPYCP.cjs +308 -0
- package/dist/{chunk-HSPTLUFA.cjs → chunk-56RPWZD2.cjs} +3 -1
- package/dist/chunk-DECMUMCI.js +0 -0
- package/dist/chunk-E4DOPNVW.js +308 -0
- package/dist/chunk-EUQDGTST.cjs +1 -0
- package/dist/{chunk-DXXNBF5P.js → chunk-SHBDANQN.js} +3 -1
- package/dist/color-picker/index.cjs +460 -0
- package/dist/color-picker/index.d.cts +124 -0
- package/dist/color-picker/index.d.ts +124 -0
- package/dist/color-picker/index.js +460 -0
- package/dist/core/index.cjs +4 -2
- package/dist/core/index.d.cts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +3 -1
- package/dist/datepicker/index.cjs +1 -1
- package/dist/datepicker/index.js +1 -1
- package/dist/divider/index.cjs +1 -1
- package/dist/divider/index.js +1 -1
- package/dist/drawer/index.cjs +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/expansion-panel/index.cjs +1 -1
- package/dist/expansion-panel/index.js +1 -1
- package/dist/fab/index.cjs +1 -1
- package/dist/fab/index.js +1 -1
- package/dist/fab-menu/index.cjs +1 -1
- package/dist/fab-menu/index.js +1 -1
- package/dist/feature-discovery/index.cjs +1 -1
- package/dist/feature-discovery/index.js +1 -1
- package/dist/indicator/index.cjs +1 -1
- package/dist/indicator/index.js +1 -1
- package/dist/input/index.cjs +1 -1
- package/dist/input/index.js +1 -1
- package/dist/input-trigger/index.cjs +8 -0
- package/dist/input-trigger/index.d.cts +9 -0
- package/dist/input-trigger/index.d.ts +9 -0
- package/dist/input-trigger/index.js +8 -0
- package/dist/input-trigger.type-BL70fHE9.d.cts +97 -0
- package/dist/input-trigger.type-BODYStHk.d.ts +97 -0
- package/dist/list/index.cjs +1 -1
- package/dist/list/index.js +1 -1
- package/dist/menu/index.cjs +1 -1
- package/dist/menu/index.js +1 -1
- package/dist/menubox/index.cjs +1 -1
- package/dist/menubox/index.js +1 -1
- package/dist/picker/index.cjs +250 -0
- package/dist/picker/index.d.cts +121 -0
- package/dist/picker/index.d.ts +121 -0
- package/dist/picker/index.js +250 -0
- package/dist/progress/index.cjs +1 -1
- package/dist/progress/index.js +1 -1
- package/dist/radio/index.cjs +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/segment-button/index.cjs +1 -1
- package/dist/segment-button/index.js +1 -1
- package/dist/select/index.cjs +1 -1
- package/dist/select/index.js +1 -1
- package/dist/skeleton/index.cjs +1 -1
- package/dist/skeleton/index.js +1 -1
- package/dist/slider/index.cjs +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/snackbar/index.cjs +1 -1
- package/dist/snackbar/index.js +1 -1
- package/dist/snippet/index.cjs +1 -1
- package/dist/snippet/index.js +1 -1
- package/dist/stepper/index.cjs +1 -1
- package/dist/stepper/index.js +1 -1
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/timepicker/index.cjs +5 -4
- package/dist/timepicker/index.js +3 -2
- package/dist/toolbar/index.cjs +1 -1
- package/dist/toolbar/index.js +1 -1
- package/dist/typography/index.cjs +1 -1
- package/dist/typography/index.js +1 -1
- package/package.json +16 -1
- /package/dist/{chunk-HC2SSHNU.js → chunk-ED22WCCI.js} +0 -0
- /package/dist/{chunk-XFPPR2VB.cjs → chunk-RVR42THG.cjs} +0 -0
package/dist/alert/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
package/dist/alert/index.js
CHANGED
package/dist/app-bar/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/app-bar/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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; }
|
|
2
2
|
|
|
3
3
|
var _chunkDHSTKO3Kcjs = require('../chunk-DHSTKO3K.cjs');
|
|
4
|
-
require('../chunk-
|
|
4
|
+
require('../chunk-56RPWZD2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
package/dist/avatar/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/avatar/index.js
CHANGED
package/dist/badge/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/badge/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-EUQDGTST.cjs');
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require('../chunk-
|
|
3
|
+
|
|
4
|
+
var _chunkRVR42THGcjs = require('../chunk-RVR42THG.cjs');
|
|
5
|
+
require('../chunk-56RPWZD2.cjs');
|
|
5
6
|
require('../chunk-OQ2BLOOG.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
exports.BottomSheet =
|
|
9
|
+
exports.BottomSheet = _chunkRVR42THGcjs.BottomSheet;
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/button/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }
|
|
2
2
|
|
|
3
3
|
var _chunkQMYWIWSXcjs = require('../chunk-QMYWIWSX.cjs');
|
|
4
|
-
require('../chunk-
|
|
4
|
+
require('../chunk-56RPWZD2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
package/dist/button/index.js
CHANGED
package/dist/card/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
package/dist/card/index.js
CHANGED
package/dist/checkbox/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/checkbox/index.js
CHANGED
package/dist/chip/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
package/dist/chip/index.js
CHANGED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }
|
|
2
|
+
|
|
3
|
+
var _chunkOQ2BLOOGcjs = require('./chunk-OQ2BLOOG.cjs');
|
|
4
|
+
|
|
5
|
+
// src/components/input-trigger/input-trigger.tsx
|
|
6
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
7
|
+
var _reactnative = require('react-native');
|
|
8
|
+
|
|
9
|
+
// src/components/input-trigger/input-trigger.hook.ts
|
|
10
|
+
|
|
11
|
+
var _core = require('@xaui/core');
|
|
12
|
+
var sizeMap = {
|
|
13
|
+
sm: {
|
|
14
|
+
minHeight: 40,
|
|
15
|
+
fontSize: 14,
|
|
16
|
+
paddingHorizontal: 12,
|
|
17
|
+
paddingVertical: 8,
|
|
18
|
+
slotGap: 8,
|
|
19
|
+
labelSize: 13,
|
|
20
|
+
helperSize: 12
|
|
21
|
+
},
|
|
22
|
+
md: {
|
|
23
|
+
minHeight: 46,
|
|
24
|
+
fontSize: 16,
|
|
25
|
+
paddingHorizontal: 14,
|
|
26
|
+
paddingVertical: 10,
|
|
27
|
+
slotGap: 10,
|
|
28
|
+
labelSize: 14,
|
|
29
|
+
helperSize: 13
|
|
30
|
+
},
|
|
31
|
+
lg: {
|
|
32
|
+
minHeight: 52,
|
|
33
|
+
fontSize: 17,
|
|
34
|
+
paddingHorizontal: 16,
|
|
35
|
+
paddingVertical: 12,
|
|
36
|
+
slotGap: 12,
|
|
37
|
+
labelSize: 15,
|
|
38
|
+
helperSize: 15
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var useInputTriggerSizeStyles = (size) => _react.useMemo.call(void 0, () => sizeMap[size], [size]);
|
|
42
|
+
var useInputTriggerRadiusStyles = (radius) => {
|
|
43
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
44
|
+
return _react.useMemo.call(void 0, () => {
|
|
45
|
+
if (radius === "full") {
|
|
46
|
+
return { borderRadius: theme.borderRadius.full };
|
|
47
|
+
}
|
|
48
|
+
return { borderRadius: theme.borderRadius[radius] };
|
|
49
|
+
}, [radius, theme.borderRadius]);
|
|
50
|
+
};
|
|
51
|
+
var useInputTriggerVariantStyles = ({
|
|
52
|
+
themeColor,
|
|
53
|
+
variant,
|
|
54
|
+
isInvalid,
|
|
55
|
+
isDisabled
|
|
56
|
+
}) => {
|
|
57
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
58
|
+
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
59
|
+
const colorScheme = theme.colors[safeThemeColor];
|
|
60
|
+
return _react.useMemo.call(void 0, () => {
|
|
61
|
+
const neutralBorder = _core.withOpacity.call(void 0, theme.colors.foreground, 0.1);
|
|
62
|
+
const textColor = isDisabled ? _core.withOpacity.call(void 0, theme.colors.foreground, 0.55) : theme.colors.foreground;
|
|
63
|
+
const placeholderColor = _core.withOpacity.call(void 0, theme.colors.foreground, 0.45);
|
|
64
|
+
const labelColor = isInvalid ? theme.colors.danger.main : _core.withOpacity.call(void 0, theme.colors.foreground, 0.8);
|
|
65
|
+
const helperColor = isInvalid ? theme.colors.danger.main : _core.withOpacity.call(void 0, theme.colors.foreground, 0.72);
|
|
66
|
+
if (variant === "underlined") {
|
|
67
|
+
return {
|
|
68
|
+
container: {
|
|
69
|
+
backgroundColor: "transparent",
|
|
70
|
+
borderBottomWidth: isInvalid ? 2 : 1,
|
|
71
|
+
borderColor: isInvalid ? theme.colors.danger.main : _core.withPaletteNumber.call(void 0, colorScheme.main, 500)
|
|
72
|
+
},
|
|
73
|
+
unfocusedBorderColor: neutralBorder,
|
|
74
|
+
textColor,
|
|
75
|
+
placeholderColor,
|
|
76
|
+
labelColor,
|
|
77
|
+
helperColor
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (variant === "bordered") {
|
|
81
|
+
return {
|
|
82
|
+
container: {
|
|
83
|
+
backgroundColor: theme.colors.background,
|
|
84
|
+
borderColor: isInvalid ? theme.colors.danger.main : neutralBorder,
|
|
85
|
+
borderWidth: theme.borderWidth.md
|
|
86
|
+
},
|
|
87
|
+
unfocusedBorderColor: neutralBorder,
|
|
88
|
+
textColor,
|
|
89
|
+
placeholderColor,
|
|
90
|
+
labelColor,
|
|
91
|
+
helperColor
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (variant === "faded") {
|
|
95
|
+
return {
|
|
96
|
+
container: {
|
|
97
|
+
backgroundColor: _core.withOpacity.call(void 0, colorScheme.background, 0.68),
|
|
98
|
+
borderColor: isInvalid ? theme.colors.danger.main : "transparent",
|
|
99
|
+
borderWidth: isInvalid ? theme.borderWidth.md : 0
|
|
100
|
+
},
|
|
101
|
+
unfocusedBorderColor: "transparent",
|
|
102
|
+
textColor,
|
|
103
|
+
placeholderColor,
|
|
104
|
+
labelColor,
|
|
105
|
+
helperColor
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
container: {
|
|
110
|
+
backgroundColor: colorScheme.background,
|
|
111
|
+
borderColor: isInvalid ? _core.withPaletteNumber.call(void 0, theme.colors.danger.main, 500) : "transparent",
|
|
112
|
+
borderWidth: isInvalid ? theme.borderWidth.md : 0
|
|
113
|
+
},
|
|
114
|
+
unfocusedBorderColor: "transparent",
|
|
115
|
+
textColor,
|
|
116
|
+
placeholderColor,
|
|
117
|
+
labelColor,
|
|
118
|
+
helperColor
|
|
119
|
+
};
|
|
120
|
+
}, [colorScheme, isDisabled, isInvalid, theme, variant]);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
// src/components/input-trigger/input-trigger.style.ts
|
|
124
|
+
|
|
125
|
+
var styles = _reactnative.StyleSheet.create({
|
|
126
|
+
container: {
|
|
127
|
+
width: "100%",
|
|
128
|
+
gap: 6
|
|
129
|
+
},
|
|
130
|
+
noFullWidth: {
|
|
131
|
+
alignSelf: "flex-start"
|
|
132
|
+
},
|
|
133
|
+
inputContainer: {
|
|
134
|
+
gap: 6
|
|
135
|
+
},
|
|
136
|
+
label: {
|
|
137
|
+
fontWeight: "500"
|
|
138
|
+
},
|
|
139
|
+
inputWrapper: {
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
alignItems: "center"
|
|
142
|
+
},
|
|
143
|
+
underlinedWrapper: {
|
|
144
|
+
borderBottomLeftRadius: 0,
|
|
145
|
+
borderBottomRightRadius: 0,
|
|
146
|
+
paddingHorizontal: 0
|
|
147
|
+
},
|
|
148
|
+
slot: {
|
|
149
|
+
justifyContent: "center",
|
|
150
|
+
alignItems: "center"
|
|
151
|
+
},
|
|
152
|
+
content: {
|
|
153
|
+
flex: 1,
|
|
154
|
+
padding: 0
|
|
155
|
+
},
|
|
156
|
+
helperText: {
|
|
157
|
+
fontWeight: "400"
|
|
158
|
+
},
|
|
159
|
+
disabled: {
|
|
160
|
+
opacity: 0.6
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// src/components/input-trigger/input-trigger.tsx
|
|
165
|
+
var InputTrigger = ({
|
|
166
|
+
value,
|
|
167
|
+
placeholder = "Select...",
|
|
168
|
+
label,
|
|
169
|
+
labelPlacement = "outside",
|
|
170
|
+
description,
|
|
171
|
+
errorMessage,
|
|
172
|
+
startContent,
|
|
173
|
+
endContent,
|
|
174
|
+
themeColor = "primary",
|
|
175
|
+
variant = "flat",
|
|
176
|
+
size = "md",
|
|
177
|
+
radius = "md",
|
|
178
|
+
isDisabled = false,
|
|
179
|
+
isInvalid = false,
|
|
180
|
+
fullWidth = true,
|
|
181
|
+
customAppearance,
|
|
182
|
+
onPress
|
|
183
|
+
}) => {
|
|
184
|
+
const sizeStyles = useInputTriggerSizeStyles(size);
|
|
185
|
+
const radiusStyles = useInputTriggerRadiusStyles(radius);
|
|
186
|
+
const variantStyles = useInputTriggerVariantStyles({
|
|
187
|
+
themeColor,
|
|
188
|
+
variant,
|
|
189
|
+
isInvalid,
|
|
190
|
+
isDisabled
|
|
191
|
+
});
|
|
192
|
+
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
193
|
+
const helperText = isInvalid && errorMessage ? errorMessage : description;
|
|
194
|
+
const renderLabel = label ? typeof label === "string" || typeof label === "number" ? /* @__PURE__ */ _react2.default.createElement(
|
|
195
|
+
_reactnative.Text,
|
|
196
|
+
{
|
|
197
|
+
style: [
|
|
198
|
+
styles.label,
|
|
199
|
+
{
|
|
200
|
+
color: variantStyles.labelColor,
|
|
201
|
+
fontSize: sizeStyles.labelSize
|
|
202
|
+
},
|
|
203
|
+
_optionalChain([customAppearance, 'optionalAccess', _ => _.label])
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
label
|
|
207
|
+
) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, null, label) : null;
|
|
208
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
209
|
+
_reactnative.View,
|
|
210
|
+
{
|
|
211
|
+
style: [
|
|
212
|
+
styles.container,
|
|
213
|
+
!fullWidth && styles.noFullWidth,
|
|
214
|
+
isDisabled && styles.disabled,
|
|
215
|
+
_optionalChain([customAppearance, 'optionalAccess', _2 => _2.container])
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.inputContainer, _optionalChain([customAppearance, 'optionalAccess', _3 => _3.inputContainer])] }, label && labelPlacement === "outside" && renderLabel, /* @__PURE__ */ _react2.default.createElement(
|
|
219
|
+
_reactnative.Pressable,
|
|
220
|
+
{
|
|
221
|
+
onPress: isDisabled ? void 0 : onPress,
|
|
222
|
+
disabled: isDisabled,
|
|
223
|
+
accessibilityRole: "button"
|
|
224
|
+
},
|
|
225
|
+
/* @__PURE__ */ _react2.default.createElement(
|
|
226
|
+
_reactnative.View,
|
|
227
|
+
{
|
|
228
|
+
style: [
|
|
229
|
+
styles.inputWrapper,
|
|
230
|
+
{
|
|
231
|
+
minHeight: sizeStyles.minHeight,
|
|
232
|
+
paddingVertical: sizeStyles.paddingVertical,
|
|
233
|
+
paddingHorizontal: variant === "underlined" ? 0 : sizeStyles.paddingHorizontal,
|
|
234
|
+
gap: sizeStyles.slotGap,
|
|
235
|
+
backgroundColor: variantStyles.container.backgroundColor,
|
|
236
|
+
borderWidth: variant === "underlined" ? 0 : variantStyles.container.borderWidth,
|
|
237
|
+
...variant === "underlined" && {
|
|
238
|
+
borderBottomWidth: variantStyles.container.borderBottomWidth
|
|
239
|
+
},
|
|
240
|
+
borderRadius: variant === "underlined" ? 0 : radiusStyles.borderRadius,
|
|
241
|
+
borderColor: variant === "underlined" ? variantStyles.container.borderColor : variantStyles.container.borderColor
|
|
242
|
+
},
|
|
243
|
+
variant === "underlined" && styles.underlinedWrapper,
|
|
244
|
+
_optionalChain([customAppearance, 'optionalAccess', _4 => _4.inputWrapper])
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
startContent && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.slot }, startContent),
|
|
248
|
+
/* @__PURE__ */ _react2.default.createElement(
|
|
249
|
+
_reactnative.View,
|
|
250
|
+
{
|
|
251
|
+
style: {
|
|
252
|
+
flex: 1,
|
|
253
|
+
gap: labelPlacement === "inside" && label ? 2 : 0
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
label && labelPlacement === "inside" && renderLabel,
|
|
257
|
+
typeof value === "string" || typeof value === "number" ? /* @__PURE__ */ _react2.default.createElement(
|
|
258
|
+
_reactnative.Text,
|
|
259
|
+
{
|
|
260
|
+
numberOfLines: 1,
|
|
261
|
+
style: [
|
|
262
|
+
styles.content,
|
|
263
|
+
{
|
|
264
|
+
color: hasValue ? variantStyles.textColor : variantStyles.placeholderColor,
|
|
265
|
+
fontSize: sizeStyles.fontSize
|
|
266
|
+
},
|
|
267
|
+
_optionalChain([customAppearance, 'optionalAccess', _5 => _5.content])
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
hasValue ? value : placeholder
|
|
271
|
+
) : hasValue ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: { flex: 1 } }, value) : /* @__PURE__ */ _react2.default.createElement(
|
|
272
|
+
_reactnative.Text,
|
|
273
|
+
{
|
|
274
|
+
style: [
|
|
275
|
+
styles.content,
|
|
276
|
+
{
|
|
277
|
+
color: variantStyles.placeholderColor,
|
|
278
|
+
fontSize: sizeStyles.fontSize
|
|
279
|
+
},
|
|
280
|
+
_optionalChain([customAppearance, 'optionalAccess', _6 => _6.content])
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
placeholder
|
|
284
|
+
)
|
|
285
|
+
),
|
|
286
|
+
endContent && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.slot }, endContent)
|
|
287
|
+
)
|
|
288
|
+
)),
|
|
289
|
+
helperText ? typeof helperText === "string" || typeof helperText === "number" ? /* @__PURE__ */ _react2.default.createElement(
|
|
290
|
+
_reactnative.Text,
|
|
291
|
+
{
|
|
292
|
+
style: [
|
|
293
|
+
styles.helperText,
|
|
294
|
+
{
|
|
295
|
+
color: variantStyles.helperColor,
|
|
296
|
+
fontSize: sizeStyles.helperSize
|
|
297
|
+
},
|
|
298
|
+
_optionalChain([customAppearance, 'optionalAccess', _7 => _7.helperText])
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
helperText
|
|
302
|
+
) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, null, helperText) : null
|
|
303
|
+
);
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
exports.InputTrigger = InputTrigger;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/core/index.ts
|
|
2
2
|
var _theme = require('@xaui/core/theme');
|
|
3
|
+
var _palette = require('@xaui/core/palette');
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
|
|
9
|
+
exports.defaultDarkTheme = _theme.defaultDarkTheme; exports.defaultTheme = _theme.defaultTheme; exports.colors = _palette.colors;
|
|
File without changes
|