@tcn/ui 0.12.6 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aside.css +1 -0
- package/dist/body.css +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +2 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +28 -26
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/phone_number_input/sip_input.d.ts +2 -1
- package/dist/inputs/phone_number_input/sip_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/sip_input.js +45 -43
- package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
- package/dist/layouts/body/body.d.ts +17 -0
- package/dist/layouts/body/body.d.ts.map +1 -1
- package/dist/layouts/body/body.js +11 -12
- package/dist/layouts/body/body.js.map +1 -1
- package/dist/layouts/index.d.ts +1 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +38 -40
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/scaffold/scaffold.js +1 -1
- package/dist/layouts/scaffold/scaffold.js.map +1 -1
- package/dist/layouts/section/section.d.ts.map +1 -1
- package/dist/layouts/section/section.js +14 -13
- package/dist/layouts/section/section.js.map +1 -1
- package/dist/page.css +1 -1
- package/dist/surfaces/aside/aside.d.ts +5 -0
- package/dist/surfaces/aside/aside.d.ts.map +1 -0
- package/dist/surfaces/aside/aside.js +19 -0
- package/dist/surfaces/aside/aside.js.map +1 -0
- package/dist/surfaces/drawers/drawer.d.ts.map +1 -1
- package/dist/surfaces/drawers/drawer.js +19 -11
- package/dist/surfaces/drawers/drawer.js.map +1 -1
- package/dist/surfaces/index.d.ts +2 -2
- package/dist/surfaces/index.d.ts.map +1 -1
- package/dist/surfaces/index.js +14 -14
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +22 -14
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/page/page.d.ts +5 -0
- package/dist/surfaces/page/page.d.ts.map +1 -0
- package/dist/surfaces/page/page.js +19 -0
- package/dist/surfaces/page/page.js.map +1 -0
- package/dist/surfaces/pop_confirm/pop_confirm.d.ts.map +1 -1
- package/dist/surfaces/pop_confirm/pop_confirm.js +23 -16
- package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +27 -19
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +71 -45
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/package.json +2 -2
- package/src/inputs/phone_number_input/phone_number_input.tsx +3 -0
- package/src/inputs/phone_number_input/sip_input.tsx +3 -0
- package/src/layouts/__stories__/composed_stories.module.css +1 -7
- package/src/layouts/__stories__/rail.stories.tsx +20 -13
- package/src/layouts/__stories__/scaffold.stories.tsx +34 -22
- package/src/layouts/__stories__/utils.tsx +10 -7
- package/src/layouts/body/body.module.css +0 -8
- package/src/layouts/body/body.tsx +19 -3
- package/src/layouts/index.ts +1 -2
- package/src/layouts/scaffold/scaffold.tsx +1 -1
- package/src/layouts/section/section.tsx +2 -1
- package/src/overlay/slide/slide.stories.tsx +9 -6
- package/src/surfaces/aside/aside.module.css +5 -0
- package/src/surfaces/aside/aside.stories.tsx +75 -0
- package/src/surfaces/aside/aside.tsx +22 -0
- package/src/surfaces/card/card.stories.tsx +8 -5
- package/src/surfaces/card/card_stories.module.css +4 -2
- package/src/surfaces/drawers/drawer.stories.tsx +21 -7
- package/src/surfaces/drawers/drawer.tsx +5 -1
- package/src/surfaces/index.ts +2 -2
- package/src/surfaces/modal/__stories__/modal.stories.tsx +21 -4
- package/src/surfaces/modal/modal.tsx +5 -1
- package/src/surfaces/page/page.module.css +0 -6
- package/src/surfaces/page/page.stories.tsx +71 -0
- package/src/surfaces/page/page.tsx +22 -0
- package/src/surfaces/panel/__stories__/panel.stories.tsx +66 -60
- package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +43 -31
- package/src/surfaces/pop_confirm/pop_confirm.tsx +5 -1
- package/src/surfaces/tooltip/__stories__/tooltip.stories.tsx +31 -0
- package/src/surfaces/window/window.stories.tsx +15 -4
- package/src/surfaces/window/window.tsx +5 -1
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +16 -15
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +6 -4
- package/src/themes/themes/ergo/ergo_theme.css +71 -45
- package/dist/body.module-BbFZ7KNP.js +0 -5
- package/dist/body.module-BbFZ7KNP.js.map +0 -1
- package/dist/layouts/body/h_body.d.ts +0 -6
- package/dist/layouts/body/h_body.d.ts.map +0 -1
- package/dist/layouts/body/h_body.js +0 -27
- package/dist/layouts/body/h_body.js.map +0 -1
- package/dist/layouts/body/v_body.d.ts +0 -6
- package/dist/layouts/body/v_body.d.ts.map +0 -1
- package/dist/layouts/body/v_body.js +0 -27
- package/dist/layouts/body/v_body.js.map +0 -1
- package/dist/page.module-DXhph-u6.js +0 -5
- package/dist/page.module-DXhph-u6.js.map +0 -1
- package/dist/surfaces/page/h_page.d.ts +0 -6
- package/dist/surfaces/page/h_page.d.ts.map +0 -1
- package/dist/surfaces/page/h_page.js +0 -22
- package/dist/surfaces/page/h_page.js.map +0 -1
- package/dist/surfaces/page/v_page.d.ts +0 -6
- package/dist/surfaces/page/v_page.d.ts.map +0 -1
- package/dist/surfaces/page/v_page.js +0 -21
- package/dist/surfaces/page/v_page.js.map +0 -1
- package/src/layouts/body/h_body.module.css +0 -7
- package/src/layouts/body/h_body.tsx +0 -28
- package/src/layouts/body/v_body.module.css +0 -7
- package/src/layouts/body/v_body.tsx +0 -28
- package/src/surfaces/page/h_page.tsx +0 -23
- package/src/surfaces/page/v_page.tsx +0 -22
package/dist/aside.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer tcn-system{._aside_e8b6b1e{height:100%}}
|
package/dist/body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer tcn-system{._body_42a1eac{min-height:0;min-width:0;flex-grow:1;flex-shrink:unset}
|
|
1
|
+
@layer tcn-system{._body_42a1eac{min-height:0;min-width:0;flex-grow:1;flex-shrink:unset}}
|
|
@@ -5,6 +5,7 @@ import { OptionProps } from '../options/option.js';
|
|
|
5
5
|
export interface PhoneNumberInputProps extends Omit<HStackProps, 'onChange' | 'children'> {
|
|
6
6
|
value?: string;
|
|
7
7
|
allowSip?: boolean;
|
|
8
|
+
sipAutoComplete?: string;
|
|
8
9
|
onChange: (value?: string) => void;
|
|
9
10
|
defaultCountry?: string;
|
|
10
11
|
allowedCountryCodes?: string[];
|
|
@@ -21,5 +22,5 @@ export interface PhoneNumberInputProps extends Omit<HStackProps, 'onChange' | 'c
|
|
|
21
22
|
ariaPhoneBookButtonLabel?: string;
|
|
22
23
|
children?: React.ReactElement<OptionProps> | React.ReactElement<OptionProps>[];
|
|
23
24
|
}
|
|
24
|
-
export declare function PhoneNumberInput({ value, allowSip, onChange, defaultCountry, allowedCountryCodes: countries, disabled, name, 'aria-label': ariaLabel, autoFocus, placeholder, onCountryChange, limitMaxLength, ariaSelectLabel, ariaPhoneBookButtonLabel, children, ...props }: PhoneNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function PhoneNumberInput({ value, allowSip, onChange, defaultCountry, allowedCountryCodes: countries, disabled, name, 'aria-label': ariaLabel, autoFocus, placeholder, onCountryChange, limitMaxLength, ariaSelectLabel, ariaPhoneBookButtonLabel, sipAutoComplete, children, ...props }: PhoneNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
//# sourceMappingURL=phone_number_input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"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J,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,WAAW,EACX,eAAe,EACf,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAE/C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAInE,OAAO,EAAE,KAAK,WAAW,EAAU,MAAM,sBAAsB,CAAC;AAMhE,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;CAChF;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAU,EACV,QAAe,EACf,QAAQ,EACR,cAAqB,EACrB,mBAAmB,EAAE,SAAS,EAC9B,QAAQ,EACR,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,WAAW,EACX,eAAe,EACf,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA6GvB"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import e, { useLayoutEffect as x } from "react";
|
|
3
|
-
import
|
|
3
|
+
import B from "react-phone-number-input";
|
|
4
4
|
import "react-phone-number-input/style.css";
|
|
5
|
-
import { HStack as
|
|
5
|
+
import { HStack as H } from "../../stacks/h_stack.js";
|
|
6
6
|
import { PhoneBookProvider as _ } from "./phone_number_context.js";
|
|
7
|
-
import { PhoneNumberCountrySelectAdapter as
|
|
8
|
-
import { Option as
|
|
9
|
-
import { PhoneNumberInputAdapter as
|
|
10
|
-
import { clsx as
|
|
11
|
-
import { SipInput as
|
|
12
|
-
import { defaultCountries as
|
|
13
|
-
import '../../phone_number_input.css';const
|
|
14
|
-
function
|
|
7
|
+
import { PhoneNumberCountrySelectAdapter as L } from "./phone_number_country_select_adapter.js";
|
|
8
|
+
import { Option as R } from "../options/option.js";
|
|
9
|
+
import { PhoneNumberInputAdapter as U } from "./phone_number_input_adapter.js";
|
|
10
|
+
import { clsx as W } from "clsx";
|
|
11
|
+
import { SipInput as q } from "./sip_input.js";
|
|
12
|
+
import { defaultCountries as z } from "./countries_phone_information.js";
|
|
13
|
+
import '../../phone_number_input.css';const D = "_phone-number-input_5c4483d", F = { "phone-number-input": D };
|
|
14
|
+
function et({
|
|
15
15
|
value: t = "",
|
|
16
16
|
allowSip: m = !0,
|
|
17
17
|
onChange: n,
|
|
@@ -26,21 +26,22 @@ function tt({
|
|
|
26
26
|
limitMaxLength: V,
|
|
27
27
|
ariaSelectLabel: l,
|
|
28
28
|
ariaPhoneBookButtonLabel: d,
|
|
29
|
+
sipAutoComplete: E,
|
|
29
30
|
children: h,
|
|
30
|
-
...
|
|
31
|
+
...M
|
|
31
32
|
}) {
|
|
32
|
-
const [u, b] = e.useState(!1), o = t?.toLocaleLowerCase().startsWith("sip:") || !1, [y,
|
|
33
|
+
const [u, b] = e.useState(!1), o = t?.toLocaleLowerCase().startsWith("sip:") || !1, [y, j] = e.useState(o ? "" : t), [N, C] = e.useState(
|
|
33
34
|
o ? t?.substring(4).trim() : ""
|
|
34
|
-
), [I,
|
|
35
|
+
), [I, w] = e.useState(
|
|
35
36
|
k
|
|
36
37
|
);
|
|
37
|
-
s = s ||
|
|
38
|
+
s = s || z, x(() => {
|
|
38
39
|
o && C(t?.substring(4).trim() || "");
|
|
39
40
|
}, [o, t]), x(() => {
|
|
40
41
|
u && b(!1);
|
|
41
42
|
}, [u]);
|
|
42
43
|
const S = e.useMemo(() => e.Children.toArray(h).filter(
|
|
43
|
-
(P) => e.isValidElement(P) && P.type ===
|
|
44
|
+
(P) => e.isValidElement(P) && P.type === R
|
|
44
45
|
), [h]), A = e.useMemo(() => ({
|
|
45
46
|
value: t,
|
|
46
47
|
allowSip: m,
|
|
@@ -49,11 +50,11 @@ function tt({
|
|
|
49
50
|
ariaPhoneBookButtonLabel: d,
|
|
50
51
|
ariaSelectLabel: l,
|
|
51
52
|
disabled: p,
|
|
52
|
-
setCountry:
|
|
53
|
+
setCountry: w,
|
|
53
54
|
sipAddress: N,
|
|
54
55
|
setSipAddress: C,
|
|
55
56
|
cachedNumber: y,
|
|
56
|
-
setCachedNumber:
|
|
57
|
+
setCachedNumber: j,
|
|
57
58
|
focusNumberInput: u,
|
|
58
59
|
setFocusNumberInput: b
|
|
59
60
|
}), [
|
|
@@ -69,7 +70,7 @@ function tt({
|
|
|
69
70
|
u
|
|
70
71
|
]);
|
|
71
72
|
return o ? /* @__PURE__ */ r(_, { value: A, children: /* @__PURE__ */ r(
|
|
72
|
-
|
|
73
|
+
q,
|
|
73
74
|
{
|
|
74
75
|
onChange: n,
|
|
75
76
|
disabled: p,
|
|
@@ -77,18 +78,19 @@ function tt({
|
|
|
77
78
|
"aria-label": f,
|
|
78
79
|
autoFocus: c,
|
|
79
80
|
placeholder: a,
|
|
80
|
-
countries: s
|
|
81
|
+
countries: s,
|
|
82
|
+
sipAutoComplete: E
|
|
81
83
|
}
|
|
82
|
-
) }) : /* @__PURE__ */ r(_, { value: A, children: /* @__PURE__ */ r(
|
|
83
|
-
|
|
84
|
+
) }) : /* @__PURE__ */ r(_, { value: A, children: /* @__PURE__ */ r(H, { ...M, children: /* @__PURE__ */ r(
|
|
85
|
+
B,
|
|
84
86
|
{
|
|
85
87
|
value: t,
|
|
86
88
|
onChange: n,
|
|
87
89
|
defaultCountry: I,
|
|
88
90
|
country: I,
|
|
89
91
|
countries: s,
|
|
90
|
-
countrySelectComponent:
|
|
91
|
-
inputComponent:
|
|
92
|
+
countrySelectComponent: L,
|
|
93
|
+
inputComponent: U,
|
|
92
94
|
disabled: p,
|
|
93
95
|
name: i,
|
|
94
96
|
"aria-label": f,
|
|
@@ -96,8 +98,8 @@ function tt({
|
|
|
96
98
|
placeholder: a,
|
|
97
99
|
onCountryChange: O,
|
|
98
100
|
limitMaxLength: V,
|
|
99
|
-
className:
|
|
100
|
-
|
|
101
|
+
className: W(
|
|
102
|
+
F["phone-number-input"],
|
|
101
103
|
"tcn-phone-number-input",
|
|
102
104
|
"tcn-control-set"
|
|
103
105
|
),
|
|
@@ -107,6 +109,6 @@ function tt({
|
|
|
107
109
|
) }) });
|
|
108
110
|
}
|
|
109
111
|
export {
|
|
110
|
-
|
|
112
|
+
et as PhoneNumberInput
|
|
111
113
|
};
|
|
112
114
|
//# sourceMappingURL=phone_number_input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone_number_input.js","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport PhoneInput from 'react-phone-number-input';\nimport 'react-phone-number-input/style.css';\nimport type { CountryCode } from 'libphonenumber-js';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport styles from './phone_number_input.module.css';\nimport { PhoneBookProvider, type PhoneContext } from './phone_number_context.js';\nimport { PhoneNumberCountrySelectAdapter } from './phone_number_country_select_adapter.js';\nimport { type OptionProps, Option } from '../options/option.js';\nimport { PhoneNumberInputAdapter } from './phone_number_input_adapter.js';\nimport { clsx } from 'clsx';\nimport { SipInput } from './sip_input.js';\nimport { defaultCountries } from './countries_phone_information.js';\n\nexport interface PhoneNumberInputProps\n extends Omit<HStackProps, 'onChange' | 'children'> {\n value?: string;\n allowSip?: boolean;\n onChange: (value?: string) => void;\n defaultCountry?: string;\n allowedCountryCodes?: string[];\n disabled?: boolean;\n name?: string;\n 'aria-label'?: string;\n autoFocus?: boolean;\n placeholder?: string;\n className?: string;\n width?: string;\n onCountryChange?: (country: CountryCode) => void;\n limitMaxLength?: boolean;\n ariaSelectLabel?: string;\n ariaPhoneBookButtonLabel?: string;\n children?: React.ReactElement<OptionProps> | React.ReactElement<OptionProps>[];\n}\n\nexport function PhoneNumberInput({\n value = '',\n allowSip = true,\n onChange,\n defaultCountry = 'US',\n allowedCountryCodes: countries,\n disabled,\n name,\n 'aria-label': ariaLabel,\n autoFocus,\n placeholder,\n onCountryChange,\n limitMaxLength,\n ariaSelectLabel,\n ariaPhoneBookButtonLabel,\n children,\n ...props\n}: PhoneNumberInputProps) {\n const [focusNumberInput, setFocusNumberInput] = React.useState<boolean>(false);\n const isSip = value?.toLocaleLowerCase().startsWith('sip:') || false;\n const [cachedNumber, setCachedNumber] = React.useState<string>(isSip ? '' : value);\n const [sipAddress, setSipAddress] = React.useState<string>(\n isSip ? value?.substring(4).trim() : ''\n );\n const [country, setCountry] = React.useState<CountryCode | undefined>(\n defaultCountry as CountryCode\n );\n\n countries = countries || defaultCountries;\n\n useLayoutEffect(() => {\n if (isSip) {\n setSipAddress(value?.substring(4).trim() || '');\n }\n }, [isSip, value]);\n\n useLayoutEffect(() => {\n if (focusNumberInput) {\n setFocusNumberInput(false);\n }\n }, [focusNumberInput]);\n\n // Extract valid Option components from children\n const phoneBookOptions = React.useMemo(() => {\n return React.Children.toArray(children).filter(\n (child): child is React.ReactElement<OptionProps> =>\n React.isValidElement(child) && child.type === Option\n );\n }, [children]);\n\n const phoneContext = React.useMemo<PhoneContext>(() => {\n return {\n value,\n allowSip,\n phoneBook: phoneBookOptions,\n setValue: onChange,\n ariaPhoneBookButtonLabel,\n ariaSelectLabel,\n disabled,\n setCountry,\n sipAddress,\n setSipAddress,\n cachedNumber,\n setCachedNumber,\n focusNumberInput,\n setFocusNumberInput,\n };\n }, [\n value,\n allowSip,\n phoneBookOptions,\n onChange,\n ariaPhoneBookButtonLabel,\n ariaSelectLabel,\n disabled,\n sipAddress,\n cachedNumber,\n focusNumberInput,\n ]);\n\n if (isSip) {\n return (\n <PhoneBookProvider value={phoneContext}>\n <SipInput\n onChange={onChange}\n disabled={disabled}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n countries={countries as CountryCode[]}\n />\n </PhoneBookProvider>\n );\n }\n\n return (\n <PhoneBookProvider value={phoneContext}>\n <HStack {...props}>\n <PhoneInput\n value={value}\n onChange={onChange}\n defaultCountry={country}\n country={country}\n countries={countries as CountryCode[]}\n countrySelectComponent={PhoneNumberCountrySelectAdapter}\n inputComponent={PhoneNumberInputAdapter}\n disabled={disabled}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n onCountryChange={onCountryChange}\n limitMaxLength={limitMaxLength}\n className={clsx(\n styles['phone-number-input'],\n 'tcn-phone-number-input',\n 'tcn-control-set'\n )}\n displayInitialValueAsLocalNumber\n addInternationalOption={false}\n />\n </HStack>\n </PhoneBookProvider>\n );\n}\n"],"names":["PhoneNumberInput","value","allowSip","onChange","defaultCountry","countries","disabled","name","ariaLabel","autoFocus","placeholder","onCountryChange","limitMaxLength","ariaSelectLabel","ariaPhoneBookButtonLabel","children","props","focusNumberInput","setFocusNumberInput","React","isSip","cachedNumber","setCachedNumber","sipAddress","setSipAddress","country","setCountry","defaultCountries","useLayoutEffect","phoneBookOptions","child","Option","phoneContext","jsx","PhoneBookProvider","SipInput","HStack","PhoneInput","PhoneNumberCountrySelectAdapter","PhoneNumberInputAdapter","clsx","styles"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"phone_number_input.js","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport PhoneInput from 'react-phone-number-input';\nimport 'react-phone-number-input/style.css';\nimport type { CountryCode } from 'libphonenumber-js';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport styles from './phone_number_input.module.css';\nimport { PhoneBookProvider, type PhoneContext } from './phone_number_context.js';\nimport { PhoneNumberCountrySelectAdapter } from './phone_number_country_select_adapter.js';\nimport { type OptionProps, Option } from '../options/option.js';\nimport { PhoneNumberInputAdapter } from './phone_number_input_adapter.js';\nimport { clsx } from 'clsx';\nimport { SipInput } from './sip_input.js';\nimport { defaultCountries } from './countries_phone_information.js';\n\nexport interface PhoneNumberInputProps\n extends Omit<HStackProps, 'onChange' | 'children'> {\n value?: string;\n allowSip?: boolean;\n sipAutoComplete?: string;\n onChange: (value?: string) => void;\n defaultCountry?: string;\n allowedCountryCodes?: string[];\n disabled?: boolean;\n name?: string;\n 'aria-label'?: string;\n autoFocus?: boolean;\n placeholder?: string;\n className?: string;\n width?: string;\n onCountryChange?: (country: CountryCode) => void;\n limitMaxLength?: boolean;\n ariaSelectLabel?: string;\n ariaPhoneBookButtonLabel?: string;\n children?: React.ReactElement<OptionProps> | React.ReactElement<OptionProps>[];\n}\n\nexport function PhoneNumberInput({\n value = '',\n allowSip = true,\n onChange,\n defaultCountry = 'US',\n allowedCountryCodes: countries,\n disabled,\n name,\n 'aria-label': ariaLabel,\n autoFocus,\n placeholder,\n onCountryChange,\n limitMaxLength,\n ariaSelectLabel,\n ariaPhoneBookButtonLabel,\n sipAutoComplete,\n children,\n ...props\n}: PhoneNumberInputProps) {\n const [focusNumberInput, setFocusNumberInput] = React.useState<boolean>(false);\n const isSip = value?.toLocaleLowerCase().startsWith('sip:') || false;\n const [cachedNumber, setCachedNumber] = React.useState<string>(isSip ? '' : value);\n const [sipAddress, setSipAddress] = React.useState<string>(\n isSip ? value?.substring(4).trim() : ''\n );\n const [country, setCountry] = React.useState<CountryCode | undefined>(\n defaultCountry as CountryCode\n );\n\n countries = countries || defaultCountries;\n\n useLayoutEffect(() => {\n if (isSip) {\n setSipAddress(value?.substring(4).trim() || '');\n }\n }, [isSip, value]);\n\n useLayoutEffect(() => {\n if (focusNumberInput) {\n setFocusNumberInput(false);\n }\n }, [focusNumberInput]);\n\n // Extract valid Option components from children\n const phoneBookOptions = React.useMemo(() => {\n return React.Children.toArray(children).filter(\n (child): child is React.ReactElement<OptionProps> =>\n React.isValidElement(child) && child.type === Option\n );\n }, [children]);\n\n const phoneContext = React.useMemo<PhoneContext>(() => {\n return {\n value,\n allowSip,\n phoneBook: phoneBookOptions,\n setValue: onChange,\n ariaPhoneBookButtonLabel,\n ariaSelectLabel,\n disabled,\n setCountry,\n sipAddress,\n setSipAddress,\n cachedNumber,\n setCachedNumber,\n focusNumberInput,\n setFocusNumberInput,\n };\n }, [\n value,\n allowSip,\n phoneBookOptions,\n onChange,\n ariaPhoneBookButtonLabel,\n ariaSelectLabel,\n disabled,\n sipAddress,\n cachedNumber,\n focusNumberInput,\n ]);\n\n if (isSip) {\n return (\n <PhoneBookProvider value={phoneContext}>\n <SipInput\n onChange={onChange}\n disabled={disabled}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n countries={countries as CountryCode[]}\n sipAutoComplete={sipAutoComplete}\n />\n </PhoneBookProvider>\n );\n }\n\n return (\n <PhoneBookProvider value={phoneContext}>\n <HStack {...props}>\n <PhoneInput\n value={value}\n onChange={onChange}\n defaultCountry={country}\n country={country}\n countries={countries as CountryCode[]}\n countrySelectComponent={PhoneNumberCountrySelectAdapter}\n inputComponent={PhoneNumberInputAdapter}\n disabled={disabled}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n onCountryChange={onCountryChange}\n limitMaxLength={limitMaxLength}\n className={clsx(\n styles['phone-number-input'],\n 'tcn-phone-number-input',\n 'tcn-control-set'\n )}\n displayInitialValueAsLocalNumber\n addInternationalOption={false}\n />\n </HStack>\n </PhoneBookProvider>\n );\n}\n"],"names":["PhoneNumberInput","value","allowSip","onChange","defaultCountry","countries","disabled","name","ariaLabel","autoFocus","placeholder","onCountryChange","limitMaxLength","ariaSelectLabel","ariaPhoneBookButtonLabel","sipAutoComplete","children","props","focusNumberInput","setFocusNumberInput","React","isSip","cachedNumber","setCachedNumber","sipAddress","setSipAddress","country","setCountry","defaultCountries","useLayoutEffect","phoneBookOptions","child","Option","phoneContext","jsx","PhoneBookProvider","SipInput","HStack","PhoneInput","PhoneNumberCountrySelectAdapter","PhoneNumberInputAdapter","clsx","styles"],"mappings":";;;;;;;;;;;;;AAoCO,SAASA,GAAiB;AAAA,EAC/B,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,qBAAqBC;AAAA,EACrB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,iBAAAC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;AAAA,IACAP;AAAA,IACAkB;AAAA,IACAF;AAAA,IACAJ;AAAA,EAAA,CACD;AAED,SAAIG,IAEA,gBAAAa,EAACC,GAAA,EAAkB,OAAOF,GACxB,UAAA,gBAAAC;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAAjC;AAAA,MACA,UAAAG;AAAA,MACA,MAAAC;AAAA,MACA,cAAYC;AAAA,MACZ,WAAAC;AAAA,MACA,aAAAC;AAAA,MACA,WAAAL;AAAA,MACA,iBAAAU;AAAA,IAAA;AAAA,EAAA,GAEJ,sBAKDoB,GAAA,EAAkB,OAAOF,GACxB,UAAA,gBAAAC,EAACG,GAAA,EAAQ,GAAGpB,GACV,UAAA,gBAAAiB;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,OAAArC;AAAA,MACA,UAAAE;AAAA,MACA,gBAAgBuB;AAAA,MAChB,SAAAA;AAAA,MACA,WAAArB;AAAA,MACA,wBAAwBkC;AAAA,MACxB,gBAAgBC;AAAA,MAChB,UAAAlC;AAAA,MACA,MAAAC;AAAA,MACA,cAAYC;AAAA,MACZ,WAAAC;AAAA,MACA,aAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,WAAW6B;AAAA,QACTC,EAAO,oBAAoB;AAAA,QAC3B;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,kCAAgC;AAAA,MAChC,wBAAwB;AAAA,IAAA;AAAA,EAAA,GAE5B,EAAA,CACF;AAEJ;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CountryCode } from 'libphonenumber-js';
|
|
2
2
|
export interface SipInputProps {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
|
+
sipAutoComplete?: string;
|
|
4
5
|
countries?: CountryCode[];
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
name?: string;
|
|
@@ -8,5 +9,5 @@ export interface SipInputProps {
|
|
|
8
9
|
autoFocus?: boolean;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function SipInput({ disabled, countries, name, 'aria-label': ariaLabel, autoFocus, placeholder, }: SipInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SipInput({ disabled, countries, name, 'aria-label': ariaLabel, autoFocus, placeholder, sipAutoComplete, }: SipInputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=sip_input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sip_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/sip_input.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,WAAW,
|
|
1
|
+
{"version":3,"file":"sip_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/sip_input.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,WAAW,EACX,eAAsB,GACvB,EAAE,aAAa,2CAyHf"}
|
|
@@ -1,101 +1,103 @@
|
|
|
1
|
-
import { jsxs as f, Fragment as
|
|
2
|
-
import g, { useLayoutEffect as
|
|
3
|
-
import { NotebookIcon as
|
|
4
|
-
import { Input as
|
|
1
|
+
import { jsxs as f, Fragment as E, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import g, { useLayoutEffect as F } from "react";
|
|
3
|
+
import { NotebookIcon as L } from "@tcn/icons/notebook_icon.js";
|
|
4
|
+
import { Input as R } from "../input/input.js";
|
|
5
5
|
import "../../actions/button/base_button/base_button.js";
|
|
6
6
|
import "../../actions/button/button_group/button_group.js";
|
|
7
7
|
import "../../actions/button/slim_button/slim_button.js";
|
|
8
|
-
import { Button as
|
|
8
|
+
import { Button as j } from "../../actions/button/button/button.js";
|
|
9
9
|
import "../../actions/toggle/toggle.js";
|
|
10
|
-
import { ControlSet as
|
|
11
|
-
import
|
|
12
|
-
import { usePhoneContext as
|
|
13
|
-
import { PhoneNumberCountrySelectAdapter as
|
|
14
|
-
import { SuggestionList as
|
|
15
|
-
function
|
|
10
|
+
import { ControlSet as w } from "../control_set/control_set.js";
|
|
11
|
+
import y from "clsx";
|
|
12
|
+
import { usePhoneContext as V } from "./phone_number_context.js";
|
|
13
|
+
import { PhoneNumberCountrySelectAdapter as _ } from "./phone_number_country_select_adapter.js";
|
|
14
|
+
import { SuggestionList as q } from "../suggestions/suggestion_list.js";
|
|
15
|
+
function oo({
|
|
16
16
|
disabled: n,
|
|
17
17
|
countries: d,
|
|
18
18
|
name: k,
|
|
19
19
|
"aria-label": S,
|
|
20
20
|
autoFocus: B,
|
|
21
|
-
placeholder: P
|
|
21
|
+
placeholder: P,
|
|
22
|
+
sipAutoComplete: b = "on"
|
|
22
23
|
}) {
|
|
23
24
|
const i = g.useRef(null), [l, t] = g.useState(null), u = l != null, {
|
|
24
25
|
phoneBook: s,
|
|
25
26
|
setValue: r,
|
|
26
|
-
setCountry:
|
|
27
|
-
ariaPhoneBookButtonLabel:
|
|
27
|
+
setCountry: C,
|
|
28
|
+
ariaPhoneBookButtonLabel: I,
|
|
28
29
|
sipAddress: p,
|
|
29
|
-
setSipAddress:
|
|
30
|
-
focusNumberInput:
|
|
30
|
+
setSipAddress: m,
|
|
31
|
+
focusNumberInput: c,
|
|
31
32
|
setFocusNumberInput: a
|
|
32
|
-
} =
|
|
33
|
-
function
|
|
33
|
+
} = V(), x = s.length > 0;
|
|
34
|
+
function A(o) {
|
|
34
35
|
t(u ? null : o.currentTarget);
|
|
35
36
|
}
|
|
36
37
|
function h() {
|
|
37
38
|
t(null);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function N(o) {
|
|
40
41
|
h(), a(!0), r(o);
|
|
41
42
|
}
|
|
42
|
-
const
|
|
43
|
+
const O = d?.map((o) => ({
|
|
43
44
|
value: o,
|
|
44
45
|
label: o
|
|
45
46
|
})) || [];
|
|
46
|
-
function O(o) {
|
|
47
|
-
o !== "SIP" && (c(p), a(!0), r(""), b(o || "US"));
|
|
48
|
-
}
|
|
49
47
|
function v(o) {
|
|
50
|
-
|
|
48
|
+
o !== "SIP" && (m(p), a(!0), r(""), C(o || "US"));
|
|
49
|
+
}
|
|
50
|
+
function z(o) {
|
|
51
|
+
m(o), r(`sip:${o}`);
|
|
51
52
|
}
|
|
52
|
-
return
|
|
53
|
+
return F(() => {
|
|
53
54
|
const o = i.current;
|
|
54
|
-
o == null || !
|
|
55
|
+
o == null || !c || requestAnimationFrame(() => {
|
|
55
56
|
o.value.length > 0 ? o.select() : o.focus();
|
|
56
57
|
});
|
|
57
|
-
}, [
|
|
58
|
-
/* @__PURE__ */ f(
|
|
58
|
+
}, [c]), /* @__PURE__ */ f(E, { children: [
|
|
59
|
+
/* @__PURE__ */ f(w, { children: [
|
|
59
60
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
61
|
+
_,
|
|
61
62
|
{
|
|
62
63
|
value: "SIP",
|
|
63
|
-
onChange:
|
|
64
|
-
options:
|
|
64
|
+
onChange: v,
|
|
65
|
+
options: O,
|
|
65
66
|
disabled: n
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
/* @__PURE__ */ e(
|
|
69
|
-
|
|
70
|
+
R,
|
|
70
71
|
{
|
|
71
72
|
ref: i,
|
|
72
73
|
value: p,
|
|
73
74
|
disabled: n,
|
|
74
|
-
onChange:
|
|
75
|
+
onChange: z,
|
|
75
76
|
name: k,
|
|
76
77
|
"aria-label": S,
|
|
77
78
|
autoFocus: B,
|
|
78
|
-
placeholder: P
|
|
79
|
+
placeholder: P,
|
|
80
|
+
autoComplete: b
|
|
79
81
|
}
|
|
80
82
|
),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
x && /* @__PURE__ */ e(
|
|
84
|
+
j,
|
|
83
85
|
{
|
|
84
86
|
disabled: n,
|
|
85
|
-
className:
|
|
86
|
-
"aria-label":
|
|
87
|
-
onClick:
|
|
87
|
+
className: y("tcn-control-set-item", "tcn-phone-number-phone-book"),
|
|
88
|
+
"aria-label": I,
|
|
89
|
+
onClick: A,
|
|
88
90
|
size: "md",
|
|
89
|
-
children: /* @__PURE__ */ e(
|
|
91
|
+
children: /* @__PURE__ */ e(L, { size: "md" })
|
|
90
92
|
}
|
|
91
93
|
)
|
|
92
94
|
] }),
|
|
93
95
|
/* @__PURE__ */ e(
|
|
94
|
-
|
|
96
|
+
q,
|
|
95
97
|
{
|
|
96
98
|
open: u,
|
|
97
99
|
anchorElement: l,
|
|
98
|
-
onOptionSelect:
|
|
100
|
+
onOptionSelect: N,
|
|
99
101
|
onClose: h,
|
|
100
102
|
width: "300px",
|
|
101
103
|
noSuggestionMessage: "No phone numbers found",
|
|
@@ -109,6 +111,6 @@ function Z({
|
|
|
109
111
|
] });
|
|
110
112
|
}
|
|
111
113
|
export {
|
|
112
|
-
|
|
114
|
+
oo as SipInput
|
|
113
115
|
};
|
|
114
116
|
//# sourceMappingURL=sip_input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sip_input.js","sources":["../../../src/inputs/phone_number_input/sip_input.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport { NotebookIcon } from '@tcn/icons/notebook_icon.js';\nimport { Input } from '../input/input.js';\nimport { Button } from '../../actions/index.js';\nimport { ControlSet } from '../control_set/control_set.js';\nimport clsx from 'clsx';\nimport { usePhoneContext } from './phone_number_context.js';\nimport type { CountryCode } from 'libphonenumber-js';\nimport {\n PhoneNumberCountrySelectAdapter,\n type CountryOption,\n} from './phone_number_country_select_adapter.js';\nimport { SuggestionList } from '../suggestions/suggestion_list.js';\n\nexport interface SipInputProps {\n onChange: (value: string) => void;\n countries?: CountryCode[];\n disabled?: boolean;\n name?: string;\n 'aria-label'?: string;\n autoFocus?: boolean;\n placeholder?: string;\n}\n\nexport function SipInput({\n disabled,\n countries,\n name,\n 'aria-label': ariaLabel,\n autoFocus,\n placeholder,\n}: SipInputProps) {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [phoneBookElement, setPhoneBookElement] =\n React.useState<HTMLButtonElement | null>(null);\n const isPhoneBookOpen = phoneBookElement != null;\n\n const {\n phoneBook: phoneBookOptions,\n setValue,\n setCountry,\n ariaPhoneBookButtonLabel,\n sipAddress,\n setSipAddress,\n focusNumberInput,\n setFocusNumberInput,\n } = usePhoneContext();\n\n const showPhoneBook = phoneBookOptions.length > 0;\n\n function togglePhoneBook(e: React.MouseEvent<HTMLButtonElement>) {\n if (isPhoneBookOpen) {\n setPhoneBookElement(null);\n } else {\n setPhoneBookElement(e.currentTarget);\n }\n }\n\n function closePhoneBook() {\n setPhoneBookElement(null);\n }\n\n function handlePhoneBookOptionSelect(value: string) {\n closePhoneBook();\n setFocusNumberInput(true);\n setValue(value);\n }\n\n const options: CountryOption[] =\n countries?.map(country => ({\n value: country,\n label: country,\n })) || [];\n\n function selectCountry(countryCode?: string) {\n if (countryCode !== 'SIP') {\n setSipAddress(sipAddress);\n setFocusNumberInput(true);\n setValue('');\n setCountry((countryCode as CountryCode) || 'US');\n }\n }\n\n function updateSipValue(value: string) {\n setSipAddress(value);\n setValue(`sip:${value}`);\n }\n\n useLayoutEffect(() => {\n const input = inputRef.current;\n\n if (input == null || !focusNumberInput) {\n return;\n }\n\n requestAnimationFrame(() => {\n if (input.value.length > 0) {\n input.select();\n } else {\n input.focus();\n }\n });\n }, [focusNumberInput]);\n\n return (\n <>\n <ControlSet>\n <PhoneNumberCountrySelectAdapter\n value=\"SIP\"\n onChange={selectCountry}\n options={options}\n disabled={disabled}\n />\n <Input\n ref={inputRef}\n value={sipAddress}\n disabled={disabled}\n onChange={updateSipValue}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n />\n {showPhoneBook && (\n <Button\n disabled={disabled}\n className={clsx('tcn-control-set-item', 'tcn-phone-number-phone-book')}\n aria-label={ariaPhoneBookButtonLabel}\n onClick={togglePhoneBook}\n size=\"md\"\n >\n <NotebookIcon size=\"md\" />\n </Button>\n )}\n </ControlSet>\n <SuggestionList\n open={isPhoneBookOpen}\n anchorElement={phoneBookElement}\n onOptionSelect={handlePhoneBookOptionSelect}\n onClose={closePhoneBook}\n width=\"300px\"\n noSuggestionMessage=\"No phone numbers found\"\n horizontalAnchor=\"end\"\n horizontalOrigin=\"end\"\n verticalAnchor=\"top\"\n verticalOrigin=\"top\"\n >\n {phoneBookOptions}\n </SuggestionList>\n </>\n );\n}\n"],"names":["SipInput","disabled","countries","name","ariaLabel","autoFocus","placeholder","inputRef","React","phoneBookElement","setPhoneBookElement","isPhoneBookOpen","phoneBookOptions","setValue","setCountry","ariaPhoneBookButtonLabel","sipAddress","setSipAddress","focusNumberInput","setFocusNumberInput","usePhoneContext","showPhoneBook","togglePhoneBook","e","closePhoneBook","handlePhoneBookOptionSelect","value","options","country","selectCountry","countryCode","updateSipValue","useLayoutEffect","input","jsxs","Fragment","ControlSet","jsx","PhoneNumberCountrySelectAdapter","Input","Button","clsx","NotebookIcon","SuggestionList"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sip_input.js","sources":["../../../src/inputs/phone_number_input/sip_input.tsx"],"sourcesContent":["import React, { useLayoutEffect } from 'react';\nimport { NotebookIcon } from '@tcn/icons/notebook_icon.js';\nimport { Input } from '../input/input.js';\nimport { Button } from '../../actions/index.js';\nimport { ControlSet } from '../control_set/control_set.js';\nimport clsx from 'clsx';\nimport { usePhoneContext } from './phone_number_context.js';\nimport type { CountryCode } from 'libphonenumber-js';\nimport {\n PhoneNumberCountrySelectAdapter,\n type CountryOption,\n} from './phone_number_country_select_adapter.js';\nimport { SuggestionList } from '../suggestions/suggestion_list.js';\n\nexport interface SipInputProps {\n onChange: (value: string) => void;\n sipAutoComplete?: string;\n countries?: CountryCode[];\n disabled?: boolean;\n name?: string;\n 'aria-label'?: string;\n autoFocus?: boolean;\n placeholder?: string;\n}\n\nexport function SipInput({\n disabled,\n countries,\n name,\n 'aria-label': ariaLabel,\n autoFocus,\n placeholder,\n sipAutoComplete = 'on',\n}: SipInputProps) {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [phoneBookElement, setPhoneBookElement] =\n React.useState<HTMLButtonElement | null>(null);\n const isPhoneBookOpen = phoneBookElement != null;\n\n const {\n phoneBook: phoneBookOptions,\n setValue,\n setCountry,\n ariaPhoneBookButtonLabel,\n sipAddress,\n setSipAddress,\n focusNumberInput,\n setFocusNumberInput,\n } = usePhoneContext();\n\n const showPhoneBook = phoneBookOptions.length > 0;\n\n function togglePhoneBook(e: React.MouseEvent<HTMLButtonElement>) {\n if (isPhoneBookOpen) {\n setPhoneBookElement(null);\n } else {\n setPhoneBookElement(e.currentTarget);\n }\n }\n\n function closePhoneBook() {\n setPhoneBookElement(null);\n }\n\n function handlePhoneBookOptionSelect(value: string) {\n closePhoneBook();\n setFocusNumberInput(true);\n setValue(value);\n }\n\n const options: CountryOption[] =\n countries?.map(country => ({\n value: country,\n label: country,\n })) || [];\n\n function selectCountry(countryCode?: string) {\n if (countryCode !== 'SIP') {\n setSipAddress(sipAddress);\n setFocusNumberInput(true);\n setValue('');\n setCountry((countryCode as CountryCode) || 'US');\n }\n }\n\n function updateSipValue(value: string) {\n setSipAddress(value);\n setValue(`sip:${value}`);\n }\n\n useLayoutEffect(() => {\n const input = inputRef.current;\n\n if (input == null || !focusNumberInput) {\n return;\n }\n\n requestAnimationFrame(() => {\n if (input.value.length > 0) {\n input.select();\n } else {\n input.focus();\n }\n });\n }, [focusNumberInput]);\n\n return (\n <>\n <ControlSet>\n <PhoneNumberCountrySelectAdapter\n value=\"SIP\"\n onChange={selectCountry}\n options={options}\n disabled={disabled}\n />\n <Input\n ref={inputRef}\n value={sipAddress}\n disabled={disabled}\n onChange={updateSipValue}\n name={name}\n aria-label={ariaLabel}\n autoFocus={autoFocus}\n placeholder={placeholder}\n autoComplete={sipAutoComplete}\n />\n {showPhoneBook && (\n <Button\n disabled={disabled}\n className={clsx('tcn-control-set-item', 'tcn-phone-number-phone-book')}\n aria-label={ariaPhoneBookButtonLabel}\n onClick={togglePhoneBook}\n size=\"md\"\n >\n <NotebookIcon size=\"md\" />\n </Button>\n )}\n </ControlSet>\n <SuggestionList\n open={isPhoneBookOpen}\n anchorElement={phoneBookElement}\n onOptionSelect={handlePhoneBookOptionSelect}\n onClose={closePhoneBook}\n width=\"300px\"\n noSuggestionMessage=\"No phone numbers found\"\n horizontalAnchor=\"end\"\n horizontalOrigin=\"end\"\n verticalAnchor=\"top\"\n verticalOrigin=\"top\"\n >\n {phoneBookOptions}\n </SuggestionList>\n </>\n );\n}\n"],"names":["SipInput","disabled","countries","name","ariaLabel","autoFocus","placeholder","sipAutoComplete","inputRef","React","phoneBookElement","setPhoneBookElement","isPhoneBookOpen","phoneBookOptions","setValue","setCountry","ariaPhoneBookButtonLabel","sipAddress","setSipAddress","focusNumberInput","setFocusNumberInput","usePhoneContext","showPhoneBook","togglePhoneBook","e","closePhoneBook","handlePhoneBookOptionSelect","value","options","country","selectCountry","countryCode","updateSipValue","useLayoutEffect","input","jsxs","Fragment","ControlSet","jsx","PhoneNumberCountrySelectAdapter","Input","Button","clsx","NotebookIcon","SuggestionList"],"mappings":";;;;;;;;;;;;;;AAyBO,SAASA,GAAS;AAAA,EACvB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC,IAAkB;AACpB,GAAkB;AAChB,QAAMC,IAAWC,EAAM,OAAyB,IAAI,GAC9C,CAACC,GAAkBC,CAAmB,IAC1CF,EAAM,SAAmC,IAAI,GACzCG,IAAkBF,KAAoB,MAEtC;AAAA,IACJ,WAAWG;AAAA,IACX,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,EAAA,IACEC,EAAA,GAEEC,IAAgBT,EAAiB,SAAS;AAEhD,WAASU,EAAgBC,GAAwC;AAC/D,IACEb,EADEC,IACkB,OAEAY,EAAE,aAFE;AAAA,EAI5B;AAEA,WAASC,IAAiB;AACxB,IAAAd,EAAoB,IAAI;AAAA,EAC1B;AAEA,WAASe,EAA4BC,GAAe;AAClD,IAAAF,EAAA,GACAL,EAAoB,EAAI,GACxBN,EAASa,CAAK;AAAA,EAChB;AAEA,QAAMC,IACJ1B,GAAW,IAAI,CAAA2B,OAAY;AAAA,IACzB,OAAOA;AAAA,IACP,OAAOA;AAAA,EAAA,EACP,KAAK,CAAA;AAET,WAASC,EAAcC,GAAsB;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AA;AAAA,QACC,MAAMhC;AAAA,QACN,eAAeF;AAAA,QACf,gBAAgBgB;AAAA,QAChB,SAASD;AAAA,QACT,OAAM;AAAA,QACN,qBAAoB;AAAA,QACpB,kBAAiB;AAAA,QACjB,kBAAiB;AAAA,QACjB,gBAAe;AAAA,QACf,gBAAe;AAAA,QAEd,UAAAZ;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
|
|
@@ -2,5 +2,22 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { BoxProps } from '../../stacks/box/box.js';
|
|
3
3
|
export interface BodyProps extends Omit<BoxProps, 'as'> {
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* The Body component will fill the available space in in a flex container.
|
|
7
|
+
* It is typically used within a Scaffold or Rail component.
|
|
8
|
+
* And typically will return a Scaffold or Rail component to determine the scroll behavior of the body
|
|
9
|
+
* Example:
|
|
10
|
+
* <Body>
|
|
11
|
+
* <Scaffold>
|
|
12
|
+
* <VerticalContent />
|
|
13
|
+
* </Scaffold>
|
|
14
|
+
* </Body>
|
|
15
|
+
* or
|
|
16
|
+
* <Body>
|
|
17
|
+
* <Rail>
|
|
18
|
+
* <HorizontalContent />
|
|
19
|
+
* </Rail>
|
|
20
|
+
* </Body>
|
|
21
|
+
*/
|
|
5
22
|
export declare const Body: React.ForwardRefExoticComponent<BodyProps & React.RefAttributes<HTMLElement>>;
|
|
6
23
|
//# sourceMappingURL=body.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;CAAG;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,+EAcf,CAAC"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { clsx as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
e,
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { clsx as m } from "clsx";
|
|
4
|
+
import { Box as a } from "../../stacks/box/box.js";
|
|
5
|
+
import '../../body.css';const e = "_body_42a1eac", f = { body: e }, l = d.forwardRef(function({ children: o, className: t, ...r }, s) {
|
|
6
|
+
return /* @__PURE__ */ c(
|
|
7
|
+
a,
|
|
9
8
|
{
|
|
10
|
-
ref:
|
|
9
|
+
ref: s,
|
|
11
10
|
as: "div",
|
|
12
|
-
className:
|
|
13
|
-
...
|
|
11
|
+
className: m(f.body, t, "tcn-body"),
|
|
12
|
+
...r,
|
|
14
13
|
children: o
|
|
15
14
|
}
|
|
16
15
|
);
|
|
17
16
|
});
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
l as Body
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":["../../../src/layouts/body/body.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport
|
|
1
|
+
{"version":3,"file":"body.js","sources":["../../../src/layouts/body/body.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { Box, type BoxProps } from '../../stacks/box/box.js';\n\nimport styles from './body.module.css';\n\nexport interface BodyProps extends Omit<BoxProps, 'as'> {}\n\n/**\n * The Body component will fill the available space in in a flex container.\n * It is typically used within a Scaffold or Rail component.\n * And typically will return a Scaffold or Rail component to determine the scroll behavior of the body\n * Example:\n * <Body>\n * <Scaffold>\n * <VerticalContent />\n * </Scaffold>\n * </Body>\n * or\n * <Body>\n * <Rail>\n * <HorizontalContent />\n * </Rail>\n * </Body>\n */\nexport const Body = React.forwardRef<HTMLElement, BodyProps>(function Body(\n { children, className, ...props }: BodyProps,\n ref\n) {\n return (\n <Box\n ref={ref}\n as=\"div\"\n className={clsx(styles['body'], className, 'tcn-body')}\n {...props}\n >\n {children}\n </Box>\n );\n});\n"],"names":["Body","React","children","className","props","ref","jsx","Box","clsx","styles"],"mappings":";;;;4CAyBaA,IAAOC,EAAM,WAAmC,SAC3D,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAWG,EAAKC,EAAO,MAASN,GAAW,UAAU;AAAA,MACpD,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -6,8 +6,7 @@ export * from './list/list.js';
|
|
|
6
6
|
export * from './sidebar_end/sidebar_end.js';
|
|
7
7
|
export * from './sidebar_start/sidebar_start.js';
|
|
8
8
|
export { Scaffold, type ScaffoldProps } from './scaffold/scaffold.js';
|
|
9
|
-
export {
|
|
10
|
-
export { VBody, type VBodyProps } from './body/v_body.js';
|
|
9
|
+
export { Body, type BodyProps } from './body/body.js';
|
|
11
10
|
export { Footer, type FooterProps } from './footer/footer.js';
|
|
12
11
|
export { Header, type HeaderProps } from './header/header.js';
|
|
13
12
|
export { UtilityBar, type UtilityBarProps } from './utility_bar/utility_bar.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBA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9E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,GACvB,MAAM,uCAAuC,CAAC"}
|
package/dist/layouts/index.js
CHANGED
|
@@ -2,56 +2,54 @@ import { Column as e } from "./column/column.js";
|
|
|
2
2
|
import { Divider as p } from "./divider/divider.js";
|
|
3
3
|
import { Grid as m } from "./grid/grid.js";
|
|
4
4
|
import { Item as i } from "./list/item.js";
|
|
5
|
-
import { List as
|
|
5
|
+
import { List as d } from "./list/list.js";
|
|
6
6
|
import { SidebarEnd as S } from "./sidebar_end/sidebar_end.js";
|
|
7
7
|
import { SidebarStart as n } from "./sidebar_start/sidebar_start.js";
|
|
8
8
|
import { Scaffold as y } from "./scaffold/scaffold.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { UtilityStrip as oo } from "./rail/utility_strip/utility_strip.js";
|
|
9
|
+
import { Body as R } from "./body/body.js";
|
|
10
|
+
import { Footer as s } from "./footer/footer.js";
|
|
11
|
+
import { Header as u } from "./header/header.js";
|
|
12
|
+
import { UtilityBar as D } from "./utility_bar/utility_bar.js";
|
|
13
|
+
import { Group as G } from "./group/group.js";
|
|
14
|
+
import { Bar as g } from "./bar/bar.js";
|
|
15
|
+
import { Row as w } from "./row/row.js";
|
|
16
|
+
import { Section as E } from "./section/section.js";
|
|
17
|
+
import { Heading as L } from "./section/heading.js";
|
|
18
|
+
import { Responsive as j } from "./responsive/responsive.js";
|
|
19
|
+
import { Breakpoint as z } from "./responsive/breakpoint.js";
|
|
20
|
+
import { TBody as J, TD as K, TFoot as M, TH as N, THead as O, TR as P, TTable as Q } from "./table/table.js";
|
|
21
|
+
import { Rail as W } from "./rail/rail.js";
|
|
22
|
+
import { Side as Y } from "./rail/side/side.js";
|
|
23
|
+
import { UtilityStrip as _ } from "./rail/utility_strip/utility_strip.js";
|
|
25
24
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
g as Bar,
|
|
26
|
+
R as Body,
|
|
27
|
+
z as Breakpoint,
|
|
28
28
|
e as Column,
|
|
29
29
|
p as Divider,
|
|
30
|
-
|
|
30
|
+
s as Footer,
|
|
31
31
|
m as Grid,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
h as Heading,
|
|
32
|
+
G as Group,
|
|
33
|
+
u as Header,
|
|
34
|
+
L as Heading,
|
|
36
35
|
i as Item,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
d as List,
|
|
37
|
+
W as Rail,
|
|
38
|
+
j as Responsive,
|
|
39
|
+
w as Row,
|
|
41
40
|
y as Scaffold,
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
E as Section,
|
|
42
|
+
Y as Side,
|
|
44
43
|
S as SidebarEnd,
|
|
45
44
|
n as SidebarStart,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
s as VBody
|
|
45
|
+
J as TBody,
|
|
46
|
+
K as TD,
|
|
47
|
+
M as TFoot,
|
|
48
|
+
N as TH,
|
|
49
|
+
O as THead,
|
|
50
|
+
P as TR,
|
|
51
|
+
Q as TTable,
|
|
52
|
+
D as UtilityBar,
|
|
53
|
+
_ as UtilityStrip
|
|
56
54
|
};
|
|
57
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|