@korsolutions/ui 0.0.52 → 0.0.53
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/AGENTS.md +3 -3
- package/dist/module/components/alert/components/alert-description.js.map +1 -1
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/input/numeric-input.js +1 -1
- package/dist/module/components/input/numeric-input.js.map +1 -1
- package/dist/module/components/input/variants/default.js +9 -2
- package/dist/module/components/input/variants/default.js.map +1 -1
- package/dist/module/components/input/variants/secondary.js +9 -2
- package/dist/module/components/input/variants/secondary.js.map +1 -1
- package/dist/module/components/link/variants/default.js.map +1 -1
- package/dist/module/components/menu/components/menu-trigger.js +1 -1
- package/dist/module/components/menu/components/menu-trigger.js.map +1 -1
- package/dist/module/components/phone-input/index.js +4 -0
- package/dist/module/components/phone-input/index.js.map +1 -0
- package/dist/module/components/phone-input/phone-input.js +165 -0
- package/dist/module/components/phone-input/phone-input.js.map +1 -0
- package/dist/module/components/phone-input/types.js +4 -0
- package/dist/module/components/phone-input/types.js.map +1 -0
- package/dist/module/components/phone-input/variants/default.js +128 -0
- package/dist/module/components/phone-input/variants/default.js.map +1 -0
- package/dist/module/components/phone-input/variants/index.js +7 -0
- package/dist/module/components/phone-input/variants/index.js.map +1 -0
- package/dist/module/components/select/components/select-trigger.js +2 -2
- package/dist/module/components/select/components/select-trigger.js.map +1 -1
- package/dist/module/components/tabs/variants/default.js.map +1 -1
- package/dist/module/components/toast/components/toast-icon.js.map +1 -1
- package/dist/module/components/toast/manager.js +2 -2
- package/dist/module/components/toast/manager.js.map +1 -1
- package/dist/module/components/typography/variants/body-lg.js.map +1 -1
- package/dist/module/components/typography/variants/body-md.js.map +1 -1
- package/dist/module/components/typography/variants/body-sm.js.map +1 -1
- package/dist/module/components/typography/variants/heading-lg.js.map +1 -1
- package/dist/module/components/typography/variants/heading-md.js.map +1 -1
- package/dist/module/components/typography/variants/heading-sm.js.map +1 -1
- package/dist/module/data/countries.js +476 -0
- package/dist/module/data/countries.js.map +1 -0
- package/dist/module/hooks/index.js +1 -0
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/use-phone-mask.js +121 -0
- package/dist/module/hooks/use-phone-mask.js.map +1 -0
- package/dist/module/hooks/use-relative-position.js.map +1 -1
- package/dist/module/index.js +2 -2
- package/dist/module/index.js.map +1 -1
- package/dist/module/themes/provider.js.map +1 -1
- package/dist/module/themes/utils.js.map +1 -1
- package/dist/module/utils/input-utils.js.map +1 -1
- package/dist/module/utils/normalize-layout.js.map +1 -1
- package/dist/module/utils/use-themed-styles.js.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-body.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-description.d.ts +2 -2
- package/dist/typescript/src/components/alert/components/alert-description.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-icon.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-root.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/components/alert-title.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/alert/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/alert/variants/destructive.d.ts +1 -1
- package/dist/typescript/src/components/alert/variants/destructive.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/components/alert-dialog-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/alert-dialog/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/alert-dialog/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/avatar/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/avatar/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/components/badge-root.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/badge/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/badge/variants/secondary.d.ts +1 -1
- package/dist/typescript/src/components/badge/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/button/components/button-label.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/button/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/button/variants/secondary.d.ts +1 -1
- package/dist/typescript/src/components/button/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/calendar/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/calendar/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-body.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-footer.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-header.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-root.d.ts.map +1 -1
- package/dist/typescript/src/components/card/card-title.d.ts.map +1 -1
- package/dist/typescript/src/components/card/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/card/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/checkbox/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/checkbox/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/checkbox/variants/outlined.d.ts +1 -1
- package/dist/typescript/src/components/checkbox/variants/outlined.d.ts.map +1 -1
- package/dist/typescript/src/components/empty/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/empty/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/field/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/field/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/icon/icon.d.ts.map +1 -1
- package/dist/typescript/src/components/index.d.ts +1 -0
- package/dist/typescript/src/components/index.d.ts.map +1 -1
- package/dist/typescript/src/components/input/input.d.ts.map +1 -1
- package/dist/typescript/src/components/input/numeric-input.d.ts +1 -1
- package/dist/typescript/src/components/input/numeric-input.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/secondary.d.ts +1 -1
- package/dist/typescript/src/components/input/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/link/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/components/menu-trigger.d.ts +1 -1
- package/dist/typescript/src/components/menu/components/menu-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/context.d.ts.map +1 -1
- package/dist/typescript/src/components/menu/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/menu/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/index.d.ts +3 -0
- package/dist/typescript/src/components/phone-input/index.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/phone-input.d.ts +16 -0
- package/dist/typescript/src/components/phone-input/phone-input.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/types.d.ts +15 -0
- package/dist/typescript/src/components/phone-input/types.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/phone-input/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/phone-input/variants/index.d.ts +5 -0
- package/dist/typescript/src/components/phone-input/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/components/popover/components/popover-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/context.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/popover/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/popover/variants/unstyled.d.ts +1 -1
- package/dist/typescript/src/components/popover/variants/unstyled.d.ts.map +1 -1
- package/dist/typescript/src/components/progress/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/progress/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/select/components/select-trigger.d.ts.map +1 -1
- package/dist/typescript/src/components/select/context.d.ts.map +1 -1
- package/dist/typescript/src/components/select/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/select/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/tabs/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/tabs/variants/line.d.ts +1 -1
- package/dist/typescript/src/components/tabs/variants/line.d.ts.map +1 -1
- package/dist/typescript/src/components/textarea/variants/default.d.ts +1 -1
- package/dist/typescript/src/components/textarea/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/components/toast-icon.d.ts +1 -1
- package/dist/typescript/src/components/toast/components/toast-icon.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/manager.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/body-lg.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/body-md.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/body-sm.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/heading-lg.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/heading-md.d.ts.map +1 -1
- package/dist/typescript/src/components/typography/variants/heading-sm.d.ts.map +1 -1
- package/dist/typescript/src/data/countries.d.ts +17 -0
- package/dist/typescript/src/data/countries.d.ts.map +1 -0
- package/dist/typescript/src/hooks/index.d.ts +1 -0
- package/dist/typescript/src/hooks/index.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-phone-mask.d.ts +20 -0
- package/dist/typescript/src/hooks/use-phone-mask.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-relative-position.d.ts +1 -1
- package/dist/typescript/src/hooks/use-relative-position.d.ts.map +1 -1
- package/dist/typescript/src/index.d.ts +2 -2
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/themes/provider.d.ts +1 -1
- package/dist/typescript/src/themes/provider.d.ts.map +1 -1
- package/dist/typescript/src/themes/utils.d.ts.map +1 -1
- package/dist/typescript/src/utils/input-utils.d.ts.map +1 -1
- package/dist/typescript/src/utils/normalize-layout.d.ts +1 -1
- package/dist/typescript/src/utils/normalize-layout.d.ts.map +1 -1
- package/dist/typescript/src/utils/use-themed-styles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/components/alert-body.tsx +1 -1
- package/src/components/alert/components/alert-description.tsx +5 -3
- package/src/components/alert/components/alert-icon.tsx +1 -1
- package/src/components/alert/components/alert-root.tsx +1 -1
- package/src/components/alert/components/alert-title.tsx +2 -2
- package/src/components/alert/variants/default.tsx +2 -2
- package/src/components/alert/variants/destructive.tsx +2 -2
- package/src/components/alert-dialog/components/alert-dialog-trigger.tsx +1 -1
- package/src/components/alert-dialog/variants/default.tsx +2 -2
- package/src/components/avatar/variants/default.tsx +2 -2
- package/src/components/badge/components/badge-label.tsx +1 -1
- package/src/components/badge/components/badge-root.tsx +2 -2
- package/src/components/badge/variants/default.tsx +2 -2
- package/src/components/badge/variants/secondary.tsx +2 -2
- package/src/components/button/components/button-label.tsx +2 -2
- package/src/components/button/variants/default.tsx +3 -3
- package/src/components/button/variants/secondary.tsx +3 -3
- package/src/components/calendar/components/calendar-day.tsx +1 -1
- package/src/components/calendar/components/calendar-nav-button.tsx +1 -1
- package/src/components/calendar/components/calendar-title.tsx +1 -1
- package/src/components/calendar/components/calendar-weeks.tsx +1 -1
- package/src/components/calendar/variants/default.tsx +2 -2
- package/src/components/card/card-body.tsx +2 -2
- package/src/components/card/card-footer.tsx +2 -2
- package/src/components/card/card-header.tsx +2 -2
- package/src/components/card/card-root.tsx +2 -2
- package/src/components/card/card-title.tsx +3 -3
- package/src/components/card/variants/default.tsx +2 -2
- package/src/components/checkbox/variants/default.tsx +2 -2
- package/src/components/checkbox/variants/outlined.tsx +2 -2
- package/src/components/empty/variants/default.tsx +2 -2
- package/src/components/field/variants/default.tsx +2 -2
- package/src/components/icon/icon.tsx +1 -1
- package/src/components/icon/variants/default.tsx +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/input/input.tsx +1 -1
- package/src/components/input/numeric-input.tsx +8 -2
- package/src/components/input/variants/default.tsx +10 -3
- package/src/components/input/variants/secondary.tsx +10 -3
- package/src/components/link/variants/default.tsx +2 -2
- package/src/components/menu/components/menu-content.tsx +1 -1
- package/src/components/menu/components/menu-root.tsx +1 -1
- package/src/components/menu/components/menu-trigger.tsx +40 -38
- package/src/components/menu/context.ts +1 -1
- package/src/components/menu/variants/default.tsx +2 -2
- package/src/components/phone-input/index.ts +2 -0
- package/src/components/phone-input/phone-input.tsx +220 -0
- package/src/components/phone-input/types.ts +20 -0
- package/src/components/phone-input/variants/default.tsx +124 -0
- package/src/components/phone-input/variants/index.ts +5 -0
- package/src/components/popover/components/popover-content.tsx +2 -2
- package/src/components/popover/components/popover-root.tsx +1 -1
- package/src/components/popover/components/popover-trigger.tsx +2 -2
- package/src/components/popover/context.ts +1 -1
- package/src/components/popover/variants/default.tsx +2 -2
- package/src/components/popover/variants/unstyled.tsx +2 -2
- package/src/components/progress/components/progress-indicator.tsx +1 -1
- package/src/components/progress/components/progress-root.tsx +1 -1
- package/src/components/progress/variants/default.tsx +2 -2
- package/src/components/scroll-bar/scroll-bar.tsx +1 -1
- package/src/components/select/components/select-content.tsx +2 -2
- package/src/components/select/components/select-option.tsx +1 -1
- package/src/components/select/components/select-overlay.tsx +1 -1
- package/src/components/select/components/select-root.tsx +2 -2
- package/src/components/select/components/select-trigger.tsx +35 -9
- package/src/components/select/context.ts +1 -1
- package/src/components/select/variants/default.tsx +2 -2
- package/src/components/tabs/variants/default.tsx +2 -2
- package/src/components/tabs/variants/line.tsx +2 -2
- package/src/components/textarea/variants/default.tsx +2 -2
- package/src/components/toast/components/toast-icon.tsx +8 -2
- package/src/components/toast/manager.tsx +11 -4
- package/src/components/toast/variants/danger.tsx +1 -1
- package/src/components/toast/variants/default.tsx +1 -1
- package/src/components/toast/variants/success.tsx +1 -1
- package/src/components/typography/variants/body-lg.tsx +1 -1
- package/src/components/typography/variants/body-md.tsx +1 -1
- package/src/components/typography/variants/body-sm.tsx +1 -1
- package/src/components/typography/variants/heading-lg.tsx +1 -1
- package/src/components/typography/variants/heading-md.tsx +1 -1
- package/src/components/typography/variants/heading-sm.tsx +1 -1
- package/src/data/countries.ts +88 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-phone-mask.ts +183 -0
- package/src/hooks/use-relative-position.ts +94 -18
- package/src/index.tsx +8 -3
- package/src/themes/provider.tsx +23 -5
- package/src/themes/utils.ts +5 -2
- package/src/utils/input-utils.ts +5 -2
- package/src/utils/normalize-layout.ts +5 -2
- package/src/utils/use-themed-styles.ts +11 -3
- package/tsconfig.json +14 -7
package/AGENTS.md
CHANGED
|
@@ -116,7 +116,7 @@ Theme-aware style hooks providing reactive styles.
|
|
|
116
116
|
|
|
117
117
|
```typescript
|
|
118
118
|
// components/button/variants/default.tsx
|
|
119
|
-
import { useThemedStyles } from "
|
|
119
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
120
120
|
import { type ButtonStyles } from "../types";
|
|
121
121
|
|
|
122
122
|
export const useButtonVariantDefault = (): ButtonStyles => {
|
|
@@ -301,7 +301,7 @@ touch src/components/alert/index.ts
|
|
|
301
301
|
|
|
302
302
|
```typescript
|
|
303
303
|
// src/components/alert/variants/default.tsx
|
|
304
|
-
import { useThemedStyles } from "
|
|
304
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
305
305
|
import type { AlertStyles } from "../types";
|
|
306
306
|
|
|
307
307
|
export const useAlertVariantDefault = (): AlertStyles => {
|
|
@@ -449,7 +449,7 @@ export function Icon({
|
|
|
449
449
|
|
|
450
450
|
```typescript
|
|
451
451
|
// In component code (variants only)
|
|
452
|
-
import { useThemedStyles } from "
|
|
452
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles";
|
|
453
453
|
|
|
454
454
|
const styles = useThemedStyles((theme) => ({
|
|
455
455
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","useAlert","jsx","_jsx","AlertDescription","props","alert","composedStyle","styles","description","style","Component","render"],"sourceRoot":"../../../../../src","sources":["components/alert/components/alert-description.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["React","Text","useAlert","jsx","_jsx","AlertDescription","props","alert","composedStyle","styles","description","style","Component","render"],"sourceRoot":"../../../../../src","sources":["components/alert/components/alert-description.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAyBC,IAAI,QAAwB,cAAc;AAGnE,SAASC,QAAQ;AAAqB,SAAAC,GAAA,IAAAC,IAAA;AAQtC,OAAO,SAASC,gBAAgBA,CAC9BC,KAA6C,EAC7C;EACA,MAAMC,KAAK,GAAGL,QAAQ,CAAC,CAAC;EAExB,MAAMM,aAAa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAEC,WAAW,EAAEJ,KAAK,CAACK,KAAK,CAAC;EAE9D,MAAMC,SAAS,GAAGN,KAAK,CAACO,MAAM,IAAIZ,IAAI;EACtC,oBAAOG,IAAA,CAACQ,SAAS;IAAA,GAAKN,KAAK;IAAEK,KAAK,EAAEH;EAAc,CAAE,CAAC;AACvD","ignoreList":[]}
|
|
@@ -15,6 +15,7 @@ export * from "./input/index.js";
|
|
|
15
15
|
export * from "./link/index.js";
|
|
16
16
|
export * from "./list/index.js";
|
|
17
17
|
export * from "./menu/index.js";
|
|
18
|
+
export * from "./phone-input/index.js";
|
|
18
19
|
export * from "./popover/index.js";
|
|
19
20
|
export * from "./portal/index.js";
|
|
20
21
|
export * from "./progress/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useNumericMask } from "../../hooks/use-numeric-mask.js";
|
|
4
3
|
import React, { useEffect } from "react";
|
|
4
|
+
import { useNumericMask } from "../../hooks/use-numeric-mask.js";
|
|
5
5
|
import { Input } from "./input.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export function NumericInput({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useEffect","useNumericMask","Input","jsx","_jsx","NumericInput","value","onChange","format","locale","currency","precision","min","max","allowNegative","variant","onBlur","onFocus","props","numericMask","numericValue","setValue","handleBlur","e","handleFocus","onChangeText","keyboardType"],"sourceRoot":"../../../../src","sources":["components/input/numeric-input.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,cAAc;AAGhB,SAASC,KAAK;AAAmC,SAAAC,GAAA,IAAAC,IAAA;AAmBjD,OAAO,SAASC,YAAYA,CAAC;EAC3BC,KAAK;EACLC,QAAQ;EACRC,MAAM,GAAG,SAAS;EAClBC,MAAM,GAAG,OAAO;EAChBC,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAG,CAAC;EACbC,GAAG;EACHC,GAAG;EACHC,aAAa,GAAG,IAAI;EACpBC,OAAO,GAAG,SAAS;EACnBC,MAAM;EACNC,OAAO;EACP,GAAGC;AACc,CAAC,EAAE;EACpB,MAAMC,WAAW,GAAGlB,cAAc,CAAC;IACjCO,MAAM;IACNC,MAAM;IACNC,QAAQ;IACRC,SAAS;IACTC,GAAG;IACHC,GAAG;IACHC,aAAa;IACbP;EACF,CAAC,CAAC;EAEFP,SAAS,CAAC,MAAM;IACd,IAAIM,KAAK,KAAKa,WAAW,CAACC,YAAY,EAAE;MACtCD,WAAW,CAACE,QAAQ,CAACf,KAAK,IAAI,IAAI,CAAC;IACrC;EACF,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,MAAMgB,UAAU,GAAIC,CAAM,IAAK;IAC7BJ,WAAW,CAACH,MAAM,CAAC,CAAC;IACpBA,MAAM,GAAGO,CAAC,CAAC;EACb,CAAC;EAED,MAAMC,WAAW,GAAID,CAAM,IAAK;IAC9BJ,WAAW,CAACF,OAAO,CAAC,CAAC;IACrBA,OAAO,GAAGM,CAAC,CAAC;EACd,CAAC;EAED,oBACEnB,IAAA,CAACF,KAAK;IAAA,GACAgB,KAAK;IACTZ,KAAK,EAAEa,WAAW,CAACb,KAAM;IACzBC,QAAQ,EAAEY,WAAW,CAACM,YAAa;IACnCT,MAAM,EAAEM,UAAW;IACnBL,OAAO,EAAEO,WAAY;IACrBE,YAAY,EAAEP,WAAW,CAACO;EAAa,CACxC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { Platform } from "react-native";
|
|
3
4
|
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
5
|
export function useInputVariantDefault() {
|
|
5
6
|
return useThemedStyles(({
|
|
@@ -18,11 +19,17 @@ export function useInputVariantDefault() {
|
|
|
18
19
|
backgroundColor: colors.surface,
|
|
19
20
|
paddingVertical: 12,
|
|
20
21
|
paddingHorizontal: 16,
|
|
21
|
-
outlineWidth: 0,
|
|
22
22
|
fontFamily,
|
|
23
23
|
fontSize,
|
|
24
24
|
height: 48,
|
|
25
|
-
color: colors.foreground
|
|
25
|
+
color: colors.foreground,
|
|
26
|
+
outlineWidth: 0,
|
|
27
|
+
...Platform.select({
|
|
28
|
+
default: {},
|
|
29
|
+
web: {
|
|
30
|
+
outline: "none"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
26
33
|
}
|
|
27
34
|
},
|
|
28
35
|
focused: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useInputVariantDefault","colors","radius","fontFamily","fontSize","default","placeholderTextColor","mutedForeground","selectionColor","primary","style","borderWidth","borderColor","border","borderRadius","backgroundColor","surface","paddingVertical","paddingHorizontal","outlineWidth","
|
|
1
|
+
{"version":3,"names":["Platform","useThemedStyles","useInputVariantDefault","colors","radius","fontFamily","fontSize","default","placeholderTextColor","mutedForeground","selectionColor","primary","style","borderWidth","borderColor","border","borderRadius","backgroundColor","surface","paddingVertical","paddingHorizontal","height","color","foreground","outlineWidth","select","web","outline","focused","disabled","muted"],"sourceRoot":"../../../../../src","sources":["components/input/variants/default.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,eAAe;AAGxB,OAAO,SAASC,sBAAsBA,CAAA,EAAgB;EACpD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,MAAmB;IAC1DC,OAAO,EAAE;MACPC,oBAAoB,EAAEL,MAAM,CAACM,eAAe;MAC5CC,cAAc,EAAEP,MAAM,CAACQ,OAAO;MAC9BC,KAAK,EAAE;QACLC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEX,MAAM,CAACY,MAAM;QAC1BC,YAAY,EAAEZ,MAAM;QACpBa,eAAe,EAAEd,MAAM,CAACe,OAAO;QAC/BC,eAAe,EAAE,EAAE;QACnBC,iBAAiB,EAAE,EAAE;QACrBf,UAAU;QACVC,QAAQ;QACRe,MAAM,EAAE,EAAE;QACVC,KAAK,EAAEnB,MAAM,CAACoB,UAAU;QACxBC,YAAY,EAAE,CAAC;QACf,GAAGxB,QAAQ,CAACyB,MAAM,CAAC;UACjBlB,OAAO,EAAE,CAAC,CAAC;UACXmB,GAAG,EAAE;YACHC,OAAO,EAAE;UACX;QACF,CAAC;MACH;IACF,CAAC;IACDC,OAAO,EAAE;MACPhB,KAAK,EAAE;QACLE,WAAW,EAAEX,MAAM,CAACQ;MACtB;IACF,CAAC;IACDkB,QAAQ,EAAE;MACRjB,KAAK,EAAE;QACLU,KAAK,EAAEnB,MAAM,CAACM,eAAe;QAC7BQ,eAAe,EAAEd,MAAM,CAAC2B;MAC1B;IACF;EACF,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { Platform } from "react-native";
|
|
3
4
|
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
4
5
|
export function useInputVariantSecondary() {
|
|
5
6
|
return useThemedStyles(({
|
|
@@ -18,11 +19,17 @@ export function useInputVariantSecondary() {
|
|
|
18
19
|
backgroundColor: colors.background,
|
|
19
20
|
paddingVertical: 12,
|
|
20
21
|
paddingHorizontal: 16,
|
|
21
|
-
outlineWidth: 0,
|
|
22
22
|
fontFamily,
|
|
23
23
|
fontSize,
|
|
24
24
|
height: 48,
|
|
25
|
-
color: colors.foreground
|
|
25
|
+
color: colors.foreground,
|
|
26
|
+
outlineWidth: 0,
|
|
27
|
+
...Platform.select({
|
|
28
|
+
default: {},
|
|
29
|
+
web: {
|
|
30
|
+
outline: "none"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
26
33
|
}
|
|
27
34
|
},
|
|
28
35
|
focused: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useInputVariantSecondary","colors","radius","fontFamily","fontSize","default","placeholderTextColor","mutedForeground","selectionColor","primary","style","borderWidth","borderColor","border","borderRadius","backgroundColor","background","paddingVertical","paddingHorizontal","outlineWidth","
|
|
1
|
+
{"version":3,"names":["Platform","useThemedStyles","useInputVariantSecondary","colors","radius","fontFamily","fontSize","default","placeholderTextColor","mutedForeground","selectionColor","primary","style","borderWidth","borderColor","border","borderRadius","backgroundColor","background","paddingVertical","paddingHorizontal","height","color","foreground","outlineWidth","select","web","outline","focused","disabled","muted"],"sourceRoot":"../../../../../src","sources":["components/input/variants/secondary.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,eAAe;AAExB,OAAO,SAASC,wBAAwBA,CAAA,EAAgB;EACtD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,MAAmB;IAC1DC,OAAO,EAAE;MACPC,oBAAoB,EAAEL,MAAM,CAACM,eAAe;MAC5CC,cAAc,EAAEP,MAAM,CAACQ,OAAO;MAC9BC,KAAK,EAAE;QACLC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAEX,MAAM,CAACY,MAAM;QAC1BC,YAAY,EAAEZ,MAAM;QACpBa,eAAe,EAAEd,MAAM,CAACe,UAAU;QAClCC,eAAe,EAAE,EAAE;QACnBC,iBAAiB,EAAE,EAAE;QACrBf,UAAU;QACVC,QAAQ;QACRe,MAAM,EAAE,EAAE;QACVC,KAAK,EAAEnB,MAAM,CAACoB,UAAU;QACxBC,YAAY,EAAE,CAAC;QACf,GAAGxB,QAAQ,CAACyB,MAAM,CAAC;UACjBlB,OAAO,EAAE,CAAC,CAAC;UACXmB,GAAG,EAAE;YACHC,OAAO,EAAE;UACX;QACF,CAAC;MACH;IACF,CAAC;IACDC,OAAO,EAAE;MACPhB,KAAK,EAAE;QACLE,WAAW,EAAEX,MAAM,CAACQ;MACtB;IACF,CAAC;IACDkB,QAAQ,EAAE;MACRjB,KAAK,EAAE;QACLU,KAAK,EAAEnB,MAAM,CAACM,eAAe;QAC7BQ,eAAe,EAAEd,MAAM,CAAC2B;MAC1B;IACF;EACF,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useLinkVariantDefault","colors","fontFamily","letterSpacing","fontSize","color","primary","textDecorationLine"],"sourceRoot":"../../../../../src","sources":["components/link/variants/default.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useLinkVariantDefault","colors","fontFamily","letterSpacing","fontSize","color","primary","textDecorationLine"],"sourceRoot":"../../../../../src","sources":["components/link/variants/default.tsx"],"mappings":";;AACA,SAASA,eAAe;AAExB,OAAO,SAASC,qBAAqBA,CAAA,EAAc;EACjD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,OAAO;IACrBF,QAAQ;IACRF,UAAU;IACVK,kBAAkB,EAAE,WAAW;IAC/BJ;EACF,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { measureLayoutPosition } from "../../../utils/normalize-layout.js";
|
|
4
3
|
import React, { forwardRef, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import { measureLayoutPosition } from "../../../utils/normalize-layout.js";
|
|
5
5
|
import { useMenu } from "../context.js";
|
|
6
6
|
export const MenuTrigger = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7
7
|
const menu = useMenu();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useImperativeHandle","useRef","measureLayoutPosition","useMenu","MenuTrigger","props","ref","menu","triggerRef","onTriggerPress","isOpen","current","layout","setTriggerPosition","setIsOpen","open","measureInWindow","pageX","pageY","width","height","close","cloneElement","children","onPress","role","accessible","accessibilityRole","accessibilityState","expanded","displayName"],"sourceRoot":"../../../../../src","sources":["components/menu/components/menu-trigger.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,mBAAmB,EAAEC,MAAM,QAAQ,OAAO;AAGtE,SAASC,qBAAqB;AAC9B,SAASC,OAAO;AAWhB,OAAO,MAAMC,WAAW,gBAAGL,UAAU,CACnC,CAACM,KAAK,EAAEC,GAAG,KAAK;EACd,MAAMC,IAAI,GAAGJ,OAAO,CAAC,CAAC;EACtB,MAAMK,UAAU,GAAGP,MAAM,CAAU,IAAI,CAAC;EAExC,MAAMQ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one-input/index.ts"],"mappings":";;AAAA,SAASA,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { usePhoneMask } from "../../hooks/use-phone-mask.js";
|
|
4
|
+
import { DEFAULT_LAYOUT, DEFAULT_POSITION, useRelativePosition } from "../../hooks/use-relative-position.js";
|
|
5
|
+
import { measureLayoutPosition } from "../../utils/normalize-layout.js";
|
|
6
|
+
import React, { useRef, useState } from "react";
|
|
7
|
+
import { Keyboard, Platform, Pressable, ScrollView, StyleSheet, Text, TextInput, View } from "react-native";
|
|
8
|
+
import { Portal } from "../portal/index.js";
|
|
9
|
+
import { PhoneInputVariants } from "./variants/index.js";
|
|
10
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
const calculateState = (isDisabled, isFocused) => {
|
|
12
|
+
if (isDisabled) return "disabled";
|
|
13
|
+
if (isFocused) return "focused";
|
|
14
|
+
return "default";
|
|
15
|
+
};
|
|
16
|
+
export function PhoneInput({
|
|
17
|
+
value,
|
|
18
|
+
onChange,
|
|
19
|
+
defaultCountry = "US",
|
|
20
|
+
countries,
|
|
21
|
+
placeholder,
|
|
22
|
+
isDisabled = false,
|
|
23
|
+
variant = "default",
|
|
24
|
+
style
|
|
25
|
+
}) {
|
|
26
|
+
const variantStyles = PhoneInputVariants[variant]();
|
|
27
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
28
|
+
const [isPickerOpen, setIsPickerOpen] = useState(false);
|
|
29
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
30
|
+
const [triggerPosition, setTriggerPosition] = useState(DEFAULT_POSITION);
|
|
31
|
+
const [contentLayout, setContentLayout] = useState(DEFAULT_LAYOUT);
|
|
32
|
+
const triggerRef = useRef(null);
|
|
33
|
+
const state = calculateState(isDisabled, isFocused);
|
|
34
|
+
const phoneMask = usePhoneMask({
|
|
35
|
+
value,
|
|
36
|
+
defaultCountry,
|
|
37
|
+
onChange,
|
|
38
|
+
countries
|
|
39
|
+
});
|
|
40
|
+
const rootStyles = StyleSheet.flatten([variantStyles.root?.default, variantStyles.root?.[state], style]);
|
|
41
|
+
const countryButtonStyles = StyleSheet.flatten([variantStyles.countryButton?.default, variantStyles.countryButton?.[state]]);
|
|
42
|
+
const countryButtonTextStyles = StyleSheet.flatten([variantStyles.countryButtonText?.default, variantStyles.countryButtonText?.[state]]);
|
|
43
|
+
const separatorStyles = StyleSheet.flatten([variantStyles.separator?.default, variantStyles.separator?.[state]]);
|
|
44
|
+
const inputStyles = StyleSheet.flatten([variantStyles.input?.default, variantStyles.input?.[state]]);
|
|
45
|
+
const openPicker = () => {
|
|
46
|
+
if (isDisabled) return;
|
|
47
|
+
if (Platform.OS !== "web") {
|
|
48
|
+
Keyboard.dismiss();
|
|
49
|
+
}
|
|
50
|
+
measureLayoutPosition(triggerRef.current, layout => {
|
|
51
|
+
setTriggerPosition(layout);
|
|
52
|
+
setSearchQuery("");
|
|
53
|
+
setIsPickerOpen(true);
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const closePicker = () => {
|
|
57
|
+
setIsPickerOpen(false);
|
|
58
|
+
setSearchQuery("");
|
|
59
|
+
};
|
|
60
|
+
const selectCountry = country => {
|
|
61
|
+
phoneMask.setCountry(country.code);
|
|
62
|
+
closePicker();
|
|
63
|
+
};
|
|
64
|
+
const filteredCountries = searchQuery ? phoneMask.countries.filter(c => c.name.toLowerCase().includes(searchQuery.toLowerCase())) : phoneMask.countries;
|
|
65
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
66
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
67
|
+
ref: triggerRef,
|
|
68
|
+
style: rootStyles,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
70
|
+
onPress: openPicker,
|
|
71
|
+
disabled: isDisabled,
|
|
72
|
+
style: countryButtonStyles,
|
|
73
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
74
|
+
style: countryButtonTextStyles,
|
|
75
|
+
children: [phoneMask.country.flag, " +", phoneMask.country.dialCode]
|
|
76
|
+
})
|
|
77
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
78
|
+
style: separatorStyles
|
|
79
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
80
|
+
value: phoneMask.displayValue,
|
|
81
|
+
onChangeText: phoneMask.onChangeText,
|
|
82
|
+
keyboardType: phoneMask.keyboardType,
|
|
83
|
+
placeholder: placeholder,
|
|
84
|
+
placeholderTextColor: StyleSheet.flatten(variantStyles.countryButtonText?.disabled)?.color,
|
|
85
|
+
readOnly: isDisabled,
|
|
86
|
+
onFocus: () => setIsFocused(true),
|
|
87
|
+
onBlur: () => setIsFocused(false),
|
|
88
|
+
style: inputStyles
|
|
89
|
+
})]
|
|
90
|
+
}), isPickerOpen && /*#__PURE__*/_jsx(CountryPicker, {
|
|
91
|
+
countries: filteredCountries,
|
|
92
|
+
selectedCode: phoneMask.country.code,
|
|
93
|
+
searchQuery: searchQuery,
|
|
94
|
+
onSearchChange: setSearchQuery,
|
|
95
|
+
onSelect: selectCountry,
|
|
96
|
+
onClose: closePicker,
|
|
97
|
+
triggerPosition: triggerPosition,
|
|
98
|
+
contentLayout: contentLayout,
|
|
99
|
+
onContentLayout: setContentLayout,
|
|
100
|
+
variantStyles: variantStyles,
|
|
101
|
+
state: state
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function CountryPicker({
|
|
106
|
+
countries,
|
|
107
|
+
selectedCode,
|
|
108
|
+
searchQuery,
|
|
109
|
+
onSearchChange,
|
|
110
|
+
onSelect,
|
|
111
|
+
onClose,
|
|
112
|
+
triggerPosition,
|
|
113
|
+
contentLayout,
|
|
114
|
+
onContentLayout,
|
|
115
|
+
variantStyles,
|
|
116
|
+
state
|
|
117
|
+
}) {
|
|
118
|
+
const positionStyle = useRelativePosition({
|
|
119
|
+
align: "start",
|
|
120
|
+
triggerPosition,
|
|
121
|
+
contentLayout,
|
|
122
|
+
alignOffset: 0,
|
|
123
|
+
preferredSide: "bottom",
|
|
124
|
+
sideOffset: 4
|
|
125
|
+
});
|
|
126
|
+
const overlayStyles = StyleSheet.flatten([variantStyles.pickerOverlay?.default, variantStyles.pickerOverlay?.[state]]);
|
|
127
|
+
const contentStyles = StyleSheet.flatten([variantStyles.pickerContent?.default, variantStyles.pickerContent?.[state]]);
|
|
128
|
+
const searchStyles = StyleSheet.flatten([variantStyles.pickerSearch?.default, variantStyles.pickerSearch?.[state]]);
|
|
129
|
+
return /*#__PURE__*/_jsxs(Portal, {
|
|
130
|
+
name: "phone-input-country-picker",
|
|
131
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
132
|
+
onPress: onClose,
|
|
133
|
+
style: [StyleSheet.absoluteFill, overlayStyles]
|
|
134
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
135
|
+
style: [positionStyle, contentStyles, {
|
|
136
|
+
width: triggerPosition.width
|
|
137
|
+
}],
|
|
138
|
+
onLayout: e => onContentLayout(e.nativeEvent.layout),
|
|
139
|
+
pointerEvents: "box-none",
|
|
140
|
+
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
141
|
+
value: searchQuery,
|
|
142
|
+
onChangeText: onSearchChange,
|
|
143
|
+
placeholder: "Search countries...",
|
|
144
|
+
autoFocus: true,
|
|
145
|
+
style: searchStyles
|
|
146
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
147
|
+
keyboardShouldPersistTaps: "handled",
|
|
148
|
+
children: countries.map(country => {
|
|
149
|
+
const isSelected = country.code === selectedCode;
|
|
150
|
+
const optionStyles = StyleSheet.flatten([variantStyles.pickerOption?.default, isSelected && variantStyles.pickerOption?.selected]);
|
|
151
|
+
const optionTextStyles = StyleSheet.flatten([variantStyles.pickerOptionText?.default, isSelected && variantStyles.pickerOptionText?.selected]);
|
|
152
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
153
|
+
onPress: () => onSelect(country),
|
|
154
|
+
style: optionStyles,
|
|
155
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
156
|
+
style: optionTextStyles,
|
|
157
|
+
children: [country.flag, " ", country.name, " +", country.dialCode]
|
|
158
|
+
})
|
|
159
|
+
}, country.code);
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=phone-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["usePhoneMask","DEFAULT_LAYOUT","DEFAULT_POSITION","useRelativePosition","measureLayoutPosition","React","useRef","useState","Keyboard","Platform","Pressable","ScrollView","StyleSheet","Text","TextInput","View","Portal","PhoneInputVariants","jsxs","_jsxs","jsx","_jsx","Fragment","_Fragment","calculateState","isDisabled","isFocused","PhoneInput","value","onChange","defaultCountry","countries","placeholder","variant","style","variantStyles","setIsFocused","isPickerOpen","setIsPickerOpen","searchQuery","setSearchQuery","triggerPosition","setTriggerPosition","contentLayout","setContentLayout","triggerRef","state","phoneMask","rootStyles","flatten","root","default","countryButtonStyles","countryButton","countryButtonTextStyles","countryButtonText","separatorStyles","separator","inputStyles","input","openPicker","OS","dismiss","current","layout","closePicker","selectCountry","country","setCountry","code","filteredCountries","filter","c","name","toLowerCase","includes","children","ref","onPress","disabled","flag","dialCode","displayValue","onChangeText","keyboardType","placeholderTextColor","color","readOnly","onFocus","onBlur","CountryPicker","selectedCode","onSearchChange","onSelect","onClose","onContentLayout","positionStyle","align","alignOffset","preferredSide","sideOffset","overlayStyles","pickerOverlay","contentStyles","pickerContent","searchStyles","pickerSearch","absoluteFill","width","onLayout","e","nativeEvent","pointerEvents","autoFocus","keyboardShouldPersistTaps","map","isSelected","optionStyles","pickerOption","selected","optionTextStyles","pickerOptionText"],"sourceRoot":"../../../../src","sources":["components/phone-input/phone-input.tsx"],"mappings":";;AACA,SAASA,YAAY;AACrB,SAASC,cAAc,EAAEC,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mF,YAAY,EAAEnE,OAAO,EACnCiE,UAAU,IAAIjF,aAAa,CAACmF,YAAY,EAAEC,QAAQ,CACnD,CAAC;UACF,MAAMC,gBAAgB,GAAG5G,UAAU,CAACqC,OAAO,CAAC,CAC1Cd,aAAa,CAACsF,gBAAgB,EAAEtE,OAAO,EACvCiE,UAAU,IAAIjF,aAAa,CAACsF,gBAAgB,EAAEF,QAAQ,CACvD,CAAC;UAEF,oBACElG,IAAA,CAACX,SAAS;YAAoBoE,OAAO,EAAEA,CAAA,KAAMe,QAAQ,CAAC1B,OAAO,CAAE;YAACjC,KAAK,EAAEmF,YAAa;YAAAzC,QAAA,eAClFzD,KAAA,CAACN,IAAI;cAACqB,KAAK,EAAEsF,gBAAiB;cAAA5C,QAAA,GAC3BT,OAAO,CAACa,IAAI,EAAC,GAAC,EAACb,OAAO,CAACM,IAAI,EAAC,IAAE,EAACN,OAAO,CAACc,QAAQ;YAAA,CAC5C;UAAC,GAHOd,OAAO,CAACE,IAIb,CAAC;QAEhB,CAAC;MAAC,CACQ,CAAC;IAAA,CACT,CAAC;EAAA,CACD,CAAC;AAEb","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/phone-input/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
|
+
import { useThemedStyles } from "../../../utils/use-themed-styles.js";
|
|
5
|
+
export function usePhoneInputVariantDefault() {
|
|
6
|
+
return useThemedStyles(({
|
|
7
|
+
colors,
|
|
8
|
+
radius,
|
|
9
|
+
fontFamily,
|
|
10
|
+
fontSize
|
|
11
|
+
}) => ({
|
|
12
|
+
root: {
|
|
13
|
+
default: {
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
borderWidth: 1,
|
|
17
|
+
borderColor: colors.border,
|
|
18
|
+
borderRadius: radius,
|
|
19
|
+
backgroundColor: colors.surface,
|
|
20
|
+
height: 48,
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
outlineWidth: 0
|
|
23
|
+
},
|
|
24
|
+
focused: {
|
|
25
|
+
borderColor: colors.primary
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
backgroundColor: colors.muted
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
countryButton: {
|
|
32
|
+
default: {
|
|
33
|
+
paddingHorizontal: 12,
|
|
34
|
+
height: "100%",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
flexDirection: "row",
|
|
38
|
+
gap: 4
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
countryButtonText: {
|
|
42
|
+
default: {
|
|
43
|
+
fontFamily,
|
|
44
|
+
fontSize,
|
|
45
|
+
color: colors.foreground
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
color: colors.mutedForeground
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
separator: {
|
|
52
|
+
default: {
|
|
53
|
+
width: 1,
|
|
54
|
+
alignSelf: "center",
|
|
55
|
+
height: "60%",
|
|
56
|
+
backgroundColor: colors.border
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
input: {
|
|
60
|
+
default: {
|
|
61
|
+
flex: 1,
|
|
62
|
+
paddingHorizontal: 12,
|
|
63
|
+
fontFamily,
|
|
64
|
+
fontSize,
|
|
65
|
+
color: colors.foreground,
|
|
66
|
+
height: "100%",
|
|
67
|
+
outlineWidth: 0,
|
|
68
|
+
...Platform.select({
|
|
69
|
+
default: {},
|
|
70
|
+
web: {
|
|
71
|
+
outline: "none"
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
disabled: {
|
|
76
|
+
color: colors.mutedForeground
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
pickerOverlay: {
|
|
80
|
+
default: {}
|
|
81
|
+
},
|
|
82
|
+
pickerContent: {
|
|
83
|
+
default: {
|
|
84
|
+
backgroundColor: colors.surface,
|
|
85
|
+
borderRadius: radius,
|
|
86
|
+
borderWidth: 1,
|
|
87
|
+
borderColor: colors.border,
|
|
88
|
+
padding: 4,
|
|
89
|
+
maxHeight: 300
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
pickerOption: {
|
|
93
|
+
default: {
|
|
94
|
+
paddingVertical: 10,
|
|
95
|
+
paddingHorizontal: 12,
|
|
96
|
+
borderRadius: radius / 2,
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
gap: 8
|
|
100
|
+
},
|
|
101
|
+
selected: {
|
|
102
|
+
backgroundColor: colors.muted
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
pickerOptionText: {
|
|
106
|
+
default: {
|
|
107
|
+
fontFamily,
|
|
108
|
+
fontSize,
|
|
109
|
+
color: colors.foreground
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
pickerSearch: {
|
|
113
|
+
default: {
|
|
114
|
+
borderWidth: 1,
|
|
115
|
+
borderColor: colors.border,
|
|
116
|
+
borderRadius: radius,
|
|
117
|
+
paddingVertical: 8,
|
|
118
|
+
paddingHorizontal: 12,
|
|
119
|
+
fontFamily,
|
|
120
|
+
fontSize: fontSize * 0.875,
|
|
121
|
+
color: colors.foreground,
|
|
122
|
+
marginBottom: 4,
|
|
123
|
+
outlineWidth: 0
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","useThemedStyles","usePhoneInputVariantDefault","colors","radius","fontFamily","fontSize","root","default","flexDirection","alignItems","borderWidth","borderColor","border","borderRadius","backgroundColor","surface","height","overflow","outlineWidth","focused","primary","disabled","muted","countryButton","paddingHorizontal","justifyContent","gap","countryButtonText","color","foreground","mutedForeground","separator","width","alignSelf","input","flex","select","web","outline","pickerOverlay","pickerContent","padding","maxHeight","pickerOption","paddingVertical","selected","pickerOptionText","pickerSearch","marginBottom"],"sourceRoot":"../../../../../src","sources":["components/phone-input/variants/default.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,eAAe;AAGxB,OAAO,SAASC,2BAA2BA,CAAA,EAAqB;EAC9D,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,MAAwB;IAC/DC,IAAI,EAAE;MACJC,OAAO,EAAE;QACPC,aAAa,EAAE,KAAK;QACpBC,UAAU,EAAE,QAAQ;QACpBC,WAAW,EAAE,CAAC;QACdC,WAAW,EAAET,MAAM,CAACU,MAAM;QAC1BC,YAAY,EAAEV,MAAM;QACpBW,eAAe,EAAEZ,MAAM,CAACa,OAAO;QAC/BC,MAAM,EAAE,EAAE;QACVC,QAAQ,EAAE,QAAQ;QAClBC,YAAY,EAAE;MAChB,CAAC;MACDC,OAAO,EAAE;QACPR,WAAW,EAAET,MAAM,CAACkB;MACtB,CAAC;MACDC,QAAQ,EAAE;QACRP,eAAe,EAAEZ,MAAM,CAACoB;MAC1B;IACF,CAAC;IACDC,aAAa,EAAE;MACbhB,OAAO,EAAE;QACPiB,iBAAiB,EAAE,EAAE;QACrBR,MAAM,EAAE,MAAM;QACdS,cAAc,EAAE,QAAQ;QACxBhB,UAAU,EAAE,QAAQ;QACpBD,aAAa,EAAE,KAAK;QACpBkB,GAAG,EAAE;MACP;IACF,CAAC;IACDC,iBAAiB,EAAE;MACjBpB,OAAO,EAAE;QACPH,UAAU;QACVC,QAAQ;QACRuB,KAAK,EAAE1B,MAAM,CAAC2B;MAChB,CAAC;MACDR,QAAQ,EAAE;QACRO,KAAK,EAAE1B,MAAM,CAAC4B;MAChB;IACF,CAAC;IACDC,SAAS,EAAE;MACTxB,OAAO,EAA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AAC;IACDkB,YAAY,EAAE;MACZxC,OAAO,EAAE;QACPG,WAAW,EAAE,CAAC;QACdC,WAAW,EAAET,MAAM,CAACU,MAAM;QAC1BC,YAAY,EAAEV,MAAM;QACpByC,eAAe,EAAE,CAAC;QAClBpB,iBAAiB,EAAE,EAAE;QACrBpB,UAAU;QACVC,QAAQ,EAAEA,QAAQ,GAAG,KAAK;QAC1BuB,KAAK,EAAE1B,MAAM,CAAC2B,UAAU;QACxBmB,YAAY,EAAE,CAAC;QACf9B,YAAY,EAAE;MAChB;IACF;EACF,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["usePhoneInputVariantDefault","PhoneInputVariants","default"],"sourceRoot":"../../../../../src","sources":["components/phone-input/variants/index.ts"],"mappings":";;AAAA,SAASA,2BAA2B;AAEpC,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,OAAO,EAAEF;AACX,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { calculateComposedStyles } from "../../../utils/calculate-styles.js";
|
|
4
|
-
import { measureLayoutPosition } from "../../../utils/normalize-layout.js";
|
|
5
3
|
import React, { useRef } from "react";
|
|
6
4
|
import { Pressable, Text } from "react-native";
|
|
5
|
+
import { calculateComposedStyles } from "../../../utils/calculate-styles.js";
|
|
6
|
+
import { measureLayoutPosition } from "../../../utils/normalize-layout.js";
|
|
7
7
|
import { useSelect } from "../context.js";
|
|
8
8
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
9
|
export function SelectTrigger(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useRef","Pressable","Text","calculateComposedStyles","measureLayoutPosition","useSelect","jsx","_jsx","Fragment","_Fragment","SelectTrigger","props","select","triggerRef","composedStyles","styles","state","style","onTriggerPress","isOpen","current","layout","setTriggerPosition","setIsOpen","ref","onPress","disabled","isDisabled","children","SelectValue","placeholder","selectedOption","options","find","option","value","selectedOptionLabel","label"],"sourceRoot":"../../../../../src","sources":["components/select/components/select-trigger.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SACEC,SAAS,EACTC,IAAI,QAIC,cAAc;AAErB,SAASC,uBAAuB;AAChC,SAASC,qBAAqB;AAC9B,SAASC,SAAS;AAAqB,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAOvC,OAAO,SAASC,aAAaA,CAACC,KAAyB,EAAE;EACvD,MAAMC,MAAM,GAAGP,SAAS,CAAC,CAAC;EAC1B,MAAMQ,UAAU,GAAGb,MAAM,CAAU,IAAI,CAAC;EAExC,MAAMc,cAAc,GAAGX,uBAAuB,CAC5CS,MAAM,CAACG,MAAM,EACbH,MAAM,CAACI,KAAK,EACZ,SAAS,EACTL,KAAK,CAACM,KACR,CAAC;EAED,MAAMC,cAAc,GAAGA,CAAA,KAAM;IAC3B,IAAI,CAACN,MAAM,CAACO,MAAM,EAAE;MAClBf,qBAAqB,CAACS,UAAU,CAACO,OAAO,EAAGC,MAAM,IAAK;QACpDT,MAAM,CAACU,kBAAkB,CAACD,MAAM,CAAC;QACjCT,MAAM,CAACW,SAAS,CAAC,IAAI,CAAC;MACxB,CAAC,CAAC;IACJ,CAAC,MAAM;MACLX,MAAM,CAACW,SAAS,CAAC,KAAK,CAAC;IACzB;EACF,CAAC;EAED,oBACEhB,IAAA,CAACN,SAAS;IACRuB,GAAG,EAAEX,UAAW;IAChBY,OAAO,EAAEP,cAAe;IACxBQ,QAAQ,EAAEd,MAAM,CAACe,UAAW;IAC5BV,KAAK,EAAEH,cAAe;IAAAc,QAAA,eAEtBrB,IAAA,CAACsB,WAAW;MAACC,WAAW,EAAEnB,KAAK,CAACmB;IAAY,CAAE;EAAC,CACtC,CAAC;AAEhB;AAOA,OAAO,SAASD,WAAWA,CAAClB,KAAuB,EAAE;EACnD,MAAMC,MAAM,GAAGP,SAAS,CAAC,CAAC;EAE1B,MAAM0B,cAAc,GAAGnB,MAAM,CAACoB,OAAO,CAACC,IAAI,CACvCC,MAAM,IAAKA,MAAM,CAACC,KAAK,KAAKvB,MAAM,CAACuB,KACtC,CAAC;EACD,MAAMC,mBAAmB,GAAGL,cAAc,EAAEM,KAAK;EAEjD,MAAMvB,cAAc,GAAGX,uBAAuB,CAC5CS,MAAM,CAACG,MAAM,EACbH,MAAM,CAACI,KAAK,EACZoB,mBAAmB,GAAG,OAAO,GAAG,aAClC,CAAC;EACD,IAAI,OAAOA,mBAAmB,KAAK,QAAQ,EAAE;IAC3C,oBAAO7B,IAAA,CAAAE,SAAA;MAAAmB,QAAA,EAAGQ;IAAmB,CAAG,CAAC;EACnC;EACA,oBACE7B,IAAA,CAACL,IAAI;IAACe,KAAK,EAAEH,cAAe;IAAAc,QAAA,EACzBQ,mBAAmB,IAAIzB,KAAK,CAACmB;EAAW,CACrC,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTabsVariantDefault","colors","radius","fontFamily","fontSize","list","flexDirection","backgroundColor","muted","padding","borderRadius","gap","trigger","default","paddingVertical","paddingHorizontal","active","background","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","disabled","opacity","triggerText","color","mutedForeground","foreground"],"sourceRoot":"../../../../../src","sources":["components/tabs/variants/default.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useTabsVariantDefault","colors","radius","fontFamily","fontSize","list","flexDirection","backgroundColor","muted","padding","borderRadius","gap","trigger","default","paddingVertical","paddingHorizontal","active","background","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","disabled","opacity","triggerText","color","mutedForeground","foreground"],"sourceRoot":"../../../../../src","sources":["components/tabs/variants/default.tsx"],"mappings":";;AAAA,SAASA,eAAe;AAGxB,OAAO,MAAMC,qBAAqB,GAAGA,CAAA,KAAkB;EACrD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAS,CAAC,MAAkB;IACzDC,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,eAAe,EAAEN,MAAM,CAACO,KAAK;MAC7BC,OAAO,EAAE,CAAC;MACVC,YAAY,EAAER,MAAM;MACpBS,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE;MACPC,OAAO,EAAE;QACPC,eAAe,EAAE,CAAC;QAClBC,iBAAiB,EAAE,EAAE;QACrBL,YAAY,EAAER,MAAM;QACpBK,eAAe,EAAE;MACnB,CAAC;MACDS,MAAM,EAAE;QACNT,eAAe,EAAEN,MAAM,CAACgB,UAAU;QAClCC,WAAW,EAAE,MAAM;QACnBC,YAAY,EAAE;UAAEC,KAAK,EAAE,CAAC;UAAEC,MAAM,EAAE;QAAE,CAAC;QACrCC,aAAa,EAAE,GAAG;QAClBC,YAAY,EAAE,CAAC;QACfC,SAAS,EAAE;MACb,CAAC;MACDC,QAAQ,EAAE;QACRC,OAAO,EAAE;MACX;IACF,CAAC;IACDC,WAAW,EAAE;MACXd,OAAO,EAAE;QACPe,KAAK,EAAE3B,MAAM,CAAC4B,eAAe;QAC7BzB,QAAQ;QACRD;MACF,CAAC;MACDa,MAAM,EAAE;QACNY,KAAK,EAAE3B,MAAM,CAAC6B;MAChB,CAAC;MACDL,QAAQ,EAAE;QACRG,KAAK,EAAE3B,MAAM,CAAC4B;MAChB;IACF;EACF,CAAC,CACH,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useToast","jsx","_jsx","ToastIcon","render","Component","props","toast","composedProps","styles","icon","style","absoluteStrokeWidth"],"sourceRoot":"../../../../../src","sources":["components/toast/components/toast-icon.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["React","useToast","jsx","_jsx","ToastIcon","render","Component","props","toast","composedProps","styles","icon","style","absoluteStrokeWidth"],"sourceRoot":"../../../../../src","sources":["components/toast/components/toast-icon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAKzB,SAASC,QAAQ;AAAqB,SAAAC,GAAA,IAAAC,IAAA;AAItC,OAAO,SAASC,SAASA,CAAC;EACxBC,MAAM,EAAEC,SAAS;EACjB,GAAGC;AACoC,CAAC,EAAE;EAC1C,MAAMC,KAAK,GAAGP,QAAQ,CAAC,CAAC;EAExB,MAAMQ,aAAa,GAAG;IACpB,GAAGD,KAAK,CAACE,MAAM,EAAEC,IAAI;IACrB,GAAGJ,KAAK;IACRK,KAAK,EAAE,CAACJ,KAAK,CAACE,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEL,KAAK,CAACK,KAAK;EAChD,CAAC;EAED,oBAAOT,IAAA,CAACG,SAAS;IAACO,mBAAmB;IAAA,GAAKJ;EAAa,CAAG,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Portal } from "../portal/index.js";
|
|
4
|
-
import { useSafeAreaInsets } from "../../safe-area/index.js";
|
|
5
3
|
import React, { useSyncExternalStore } from "react";
|
|
6
4
|
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import { useSafeAreaInsets } from "../../safe-area/index.js";
|
|
6
|
+
import { Portal } from "../portal/index.js";
|
|
7
7
|
import { ToastDescription } from "./components/toast-description.js";
|
|
8
8
|
import { ToastRoot } from "./components/toast-root.js";
|
|
9
9
|
import { ToastTitle } from "./components/toast-title.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["React","useSyncExternalStore","StyleSheet","View","useSafeAreaInsets","Portal","ToastDescription","ToastRoot","ToastTitle","jsx","_jsx","jsxs","_jsxs","TOAST_PORTAL_NAME","store","toasts","listeners","Set","emit","cb","getSnapshot","subscribe","add","delete","addToast","config","existingToast","find","t","id","toast","duration","setTimeout","removeToast","filter","ToastAPI","show","dismiss","ToastContainer","insets","length","name","children","style","s","wrapper","top","map","ToastComponent","title","description","variant","props","create","width","alignItems","position","gap"],"sourceRoot":"../../../../src","sources":["components/toast/manager.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,oBAAoB,QAAQ,OAAO;AACnD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,iBAAiB;AAC1B,SAASC,MAAM;AACf,SAASC,gBAAgB;AACzB,SAASC,SAAS;AAClB,SAASC,UAAU;AAAmC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGtD,OAAO,MAAMC,iBAAiB,GAAG,cAAc;AAe/C,MAAMC,KAAiB,GAAG;EACxBC,MAAM,EAAE,EAAE;EACVC,SAAS,EAAE,IAAIC,GAAG,CAAC;AACrB,CAAC;AAED,SAASC,IAAIA,CAAA,EAAG;EACd,KAAK,MAAMC,EAAE,IAAIL,KAAK,CAACE,SAAS,EAAEG,EAAE,CAAC,CAAC;AACxC;AAEA,SAASC,WAAWA,CAAA,EAAG;EACrB,OAAON,KAAK,CAACC,MAAM;AACrB;AAEA,SAASM,SAASA,CAACF,EAAc,EAAE;EACjCL,KAAK,CAACE,SAAS,CAACM,GAAG,CAACH,EAAE,CAAC;EACvB,OAAO,MAAM;IACXL,KAAK,CAACE,SAAS,CAACO,MAAM,CAACJ,EAAE,CAAC;EAC5B,CAAC;AACH;AAEA,SAASK,QAAQA,CAACC,MAAmB,EAAU;EAC7C;EACA,MAAMC,aAAa,GAAGZ,KAAK,CAACC,MAAM,CAACY,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,EAAE,KAAKJ,MAAM,CAACI,EAAE,CAAC;EAClE,IAAIH,aAAa,EAAE;IACjB,OAAOA,aAAa,CAACG,EAAE;EACzB;EAEA,MAAMC,KAAkB,GAAG;IACzBC,QAAQ,EAAE,IAAI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,KAAK,CAACqB;MAAQ,GAHlBrB,KAAK,CAACD,EAIZ,CACF;IAAC,CACE;EAAC,CACD,CAAC;AAEb;AASA,OAAO,SAASmB,cAAcA,CAACI,KAAiB,EAAE;EAChD,oBACExC,KAAA,CAACL,SAAS;IAAC4C,OAAO,EAAEC,KAAK,CAACD,OAAQ;IAAAT,QAAA,gBAChChC,IAAA,CAACF,UAAU;MAAAkC,QAAA,EAAEU,KAAK,CAACH;IAAK,CAAa,CAAC,EACrC,CAAC,CAACG,KAAK,CAACF,WAAW,iBAClBxC,IAAA,CAACJ,gBAAgB;MAAAoC,QAAA,EAAEU,KAAK,CAACF;IAAW,CAAmB,CACxD;EAAA,CACQ,CAAC;AAEhB;AAEA,MAAMN,CAAC,GAAG1C,UAAU,CAACmD,MAAM,CAAC;EAC1BR,OAAO,EAAE;IACPS,KAAK,EAAE,MAAM;IACbC,UAAU,EAAE,QAAQ;IACpBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useThemedStyles","useTextVariantBodyLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-lg.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["useThemedStyles","useTextVariantBodyLg","colors","fontFamily","letterSpacing","fontSize","color","foreground","lineHeight"],"sourceRoot":"../../../../../src","sources":["components/typography/variants/body-lg.tsx"],"mappings":";;AACA,SAASA,eAAe;AAExB,OAAO,SAASC,oBAAoBA,CAAA,EAAc;EAChD,OAAOD,eAAe,CACpB,CAAC;IAAEE,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAS,CAAC,MAAiB;IAC/DC,KAAK,EAAEJ,MAAM,CAACK,UAAU;IACxBF,QAAQ,EAAEA,QAAQ,GAAG,IAAI;IACzBF,UAAU;IACVC,aAAa;IACbI,UAAU,EAAEH,QAAQ,GAAG;EACzB,CAAC,CACH,CAAC;AACH","ignoreList":[]}
|