import { a as e, n as t } from './chunk-BneVvdWh.js';
import { S as n } from './iframe-B-AKBcwT.js';
import { t as r } from './jsx-runtime-Bn1Ys6_W.js';
import { t as i } from './compiler-runtime-C9X80vSn.js';
import { t as a } from './InputText-CxTji68U.js';
function o(e) {
    let t = (0, l.c)(81),
        {
            autoCapitalize: n,
            autoComplete: r,
            autoFocus: i,
            className: a,
            disabled: o,
            discardOnEscape: p,
            doubleClickToEdit: m,
            enterKeyHint: ee,
            form: h,
            id: g,
            initialValue: _,
            keepFocusOnSubmit: v,
            list: y,
            max: b,
            maxHeight: x,
            maxLength: S,
            min: C,
            minHeight: w,
            minLength: T,
            multiLine: E,
            multiple: D,
            name: O,
            onBlur: k,
            onChange: A,
            onChangeValue: j,
            onFocus: M,
            onKeyDown: N,
            onKeyUp: P,
            pattern: F,
            placeholder: I,
            readOnly: L,
            ref: R,
            required: z,
            rows: B,
            selectTextOnFocus: V,
            size: H,
            step: U,
            style: W,
            submitOnEnter: te,
            tabIndex: ne,
            title: re,
            type: ie,
        } = e,
        ae = B === void 0 ? 1 : B,
        oe = ie === void 0 ? `text` : ie,
        G = (0, u.useRef)(null),
        K = _ ?? ``,
        q = (0, u.useRef)(K),
        J;
    t[0] !== x || t[1] !== w || t[2] !== E
        ? ((J = () => {
              if (!G.current || f) return;
              if (!E) {
                  G.current.style.height = ``;
                  return;
              }
              let { transitionDelay: e, transitionDuration: t } = G.current.style;
              ((G.current.style.transitionDelay = `0s`),
                  (G.current.style.transitionDuration = `0s`),
                  (G.current.style.height = ``));
              let n = typeof w == `string` ? parseFloat(w) : w,
                  r = typeof x == `string` ? parseFloat(x) : x,
                  i = Math.max(n ?? 0, Math.min(G.current.scrollHeight, r ?? 1 / 0));
              (i && (G.current.style.height = `${i}px`),
                  setTimeout(() => {
                      G.current &&
                          ((G.current.style.transitionDelay = e === `0s` ? `` : e),
                          (G.current.style.transitionDuration = t === `0s` ? `` : t));
                  }, 0));
          }),
          (t[0] = x),
          (t[1] = w),
          (t[2] = E),
          (t[3] = J))
        : (J = t[3]);
    let Y = J,
        X;
    t[4] !== E || t[5] !== R || t[6] !== Y
        ? ((X = (e) => {
              G.current = e;
              let t;
              if (
                  (typeof R == `function` ? (t = R(e)) : R && (R.current = e),
                  !e || !E || f)
              )
                  return t;
              Y();
              let n = new ResizeObserver(Y);
              return (
                  n.observe(e),
                  () => {
                      (n.disconnect(), typeof t == `function` && t());
                  }
              );
          }),
          (t[4] = E),
          (t[5] = R),
          (t[6] = Y),
          (t[7] = X))
        : (X = t[7]);
    let se = X,
        ce,
        le;
    (t[8] === K
        ? ((ce = t[9]), (le = t[10]))
        : ((ce = () => {
              ((q.current = K), G.current && (G.current.value = K));
          }),
          (le = [K]),
          (t[8] = K),
          (t[9] = ce),
          (t[10] = le)),
        (0, u.useEffect)(ce, le));
    let [Z, ue] = (0, u.useState)(L ?? m),
        de = (0, u.useRef)(!0),
        fe;
    t[11] === m
        ? (fe = t[12])
        : ((fe = () => {
              m && ue(!1);
          }),
          (t[11] = m),
          (t[12] = fe));
    let pe = fe,
        me;
    t[13] !== A || t[14] !== j
        ? ((me = (e) => {
              (A && A(e), j && j(e.target.value));
          }),
          (t[13] = A),
          (t[14] = j),
          (t[15] = me))
        : (me = t[15]);
    let Q = me,
        he;
    t[16] !== E || t[17] !== M || t[18] !== Y
        ? ((he = (e) => {
              (M && M(e), E && Y());
          }),
          (t[16] = E),
          (t[17] = M),
          (t[18] = Y),
          (t[19] = he))
        : (he = t[19]);
    let ge = he,
        _e;
    t[20] !== m || t[21] !== k || t[22] !== V
        ? ((_e = (e) => {
              (k && k(e),
                  (q.current = e.currentTarget.value),
                  m && ue(!0),
                  V && (de.current = !0));
          }),
          (t[20] = m),
          (t[21] = k),
          (t[22] = V),
          (t[23] = _e))
        : (_e = t[23]);
    let ve = _e,
        ye;
    t[24] === V
        ? (ye = t[25])
        : ((ye = (e) => {
              if (!V) return;
              let t = e.currentTarget;
              if (
                  !de.current ||
                  ((de.current = !1), !t.value) ||
                  t.ownerDocument.activeElement !== t
              )
                  return;
              let n = t.value.length;
              (t.selectionStart === 0 && t.selectionEnd === n) ||
                  ((t.selectionStart = 0), (t.selectionEnd = n));
          }),
          (t[24] = V),
          (t[25] = ye));
    let be = ye,
        xe;
    t[26] !== p ||
    t[27] !== m ||
    t[28] !== Q ||
    t[29] !== v ||
    t[30] !== E ||
    t[31] !== N ||
    t[32] !== Z ||
    t[33] !== te
        ? ((xe = (e) => {
              if ((N && N(e), !(e.key !== `Enter` && e.key !== `Escape`))) {
                  if (
                      e.key === `Enter` &&
                      (te || (E && c(e))) &&
                      (!E || (!e.shiftKey && !e.altKey && !e.ctrlKey))
                  ) {
                      (e.preventDefault(),
                          e.currentTarget.closest(`form`)?.requestSubmit(),
                          v || e.currentTarget.blur());
                      return;
                  }
                  (!p && !m) ||
                      (e.key === `Escape` && p
                          ? e.currentTarget.value !== q.current &&
                            ((e.currentTarget.value = q.current), Q(e))
                          : e.key === `Enter` && m && Z && ue(!1),
                      e.currentTarget.blur());
              }
          }),
          (t[26] = p),
          (t[27] = m),
          (t[28] = Q),
          (t[29] = v),
          (t[30] = E),
          (t[31] = N),
          (t[32] = Z),
          (t[33] = te),
          (t[34] = xe))
        : (xe = t[34]);
    let Se = xe,
        Ce;
    t[35] !== x || t[36] !== w || t[37] !== E || t[38] !== W
        ? ((Ce =
              E && f
                  ? {
                        ...W,
                        fieldSizing: `content`,
                        maxHeight: s(x) ? void 0 : x,
                        minHeight: s(w) ? void 0 : w,
                    }
                  : W),
          (t[35] = x),
          (t[36] = w),
          (t[37] = E),
          (t[38] = W),
          (t[39] = Ce))
        : (Ce = t[39]);
    let we = Ce,
        Te = E ? `textarea` : `input`,
        $;
    t[40] !== b ||
    t[41] !== C ||
    t[42] !== E ||
    t[43] !== ae ||
    t[44] !== Y ||
    t[45] !== U
        ? (($ = E ? { onInput: Y, rows: ae } : { max: b, min: C, step: U }),
          (t[40] = b),
          (t[41] = C),
          (t[42] = E),
          (t[43] = ae),
          (t[44] = Y),
          (t[45] = U),
          (t[46] = $))
        : ($ = t[46]);
    let Ee;
    return (
        t[47] !== Te ||
        t[48] !== n ||
        t[49] !== r ||
        t[50] !== i ||
        t[51] !== a ||
        t[52] !== o ||
        t[53] !== ee ||
        t[54] !== h ||
        t[55] !== ve ||
        t[56] !== Q ||
        t[57] !== ge ||
        t[58] !== Se ||
        t[59] !== se ||
        t[60] !== be ||
        t[61] !== g ||
        t[62] !== we ||
        t[63] !== y ||
        t[64] !== S ||
        t[65] !== T ||
        t[66] !== D ||
        t[67] !== O ||
        t[68] !== P ||
        t[69] !== F ||
        t[70] !== I ||
        t[71] !== Z ||
        t[72] !== z ||
        t[73] !== H ||
        t[74] !== pe ||
        t[75] !== $ ||
        t[76] !== ne ||
        t[77] !== re ||
        t[78] !== oe ||
        t[79] !== K
            ? ((Ee = (0, d.jsx)(Te, {
                  autoCapitalize: n,
                  autoComplete: r,
                  autoFocus: i,
                  className: a,
                  defaultValue: K,
                  disabled: o,
                  enterKeyHint: ee,
                  form: h,
                  id: g,
                  list: y,
                  maxLength: S,
                  minLength: T,
                  multiple: D,
                  name: O,
                  onBlur: ve,
                  onChange: Q,
                  onDoubleClick: pe,
                  onFocus: ge,
                  onKeyDown: Se,
                  onKeyUp: P,
                  onSelect: be,
                  pattern: F,
                  placeholder: I,
                  readOnly: Z,
                  ref: se,
                  required: z,
                  size: H,
                  style: we,
                  tabIndex: ne,
                  title: re,
                  type: oe,
                  ...$,
              })),
              (t[47] = Te),
              (t[48] = n),
              (t[49] = r),
              (t[50] = i),
              (t[51] = a),
              (t[52] = o),
              (t[53] = ee),
              (t[54] = h),
              (t[55] = ve),
              (t[56] = Q),
              (t[57] = ge),
              (t[58] = Se),
              (t[59] = se),
              (t[60] = be),
              (t[61] = g),
              (t[62] = we),
              (t[63] = y),
              (t[64] = S),
              (t[65] = T),
              (t[66] = D),
              (t[67] = O),
              (t[68] = P),
              (t[69] = F),
              (t[70] = I),
              (t[71] = Z),
              (t[72] = z),
              (t[73] = H),
              (t[74] = pe),
              (t[75] = $),
              (t[76] = ne),
              (t[77] = re),
              (t[78] = oe),
              (t[79] = K),
              (t[80] = Ee))
            : (Ee = t[80]),
        Ee
    );
}
function s(e) {
    return e == null || e === `` || e === 0 || e === 1 / 0;
}
function c(e) {
    let t = globalThis.navigator?.platform ?? ``;
    return p.test(t) ? e.metaKey : e.ctrlKey;
}
var l,
    u,
    d,
    f,
    p,
    m = t(() => {
        ((l = i()),
            (u = e(n(), 1)),
            (d = r()),
            (f = typeof CSS > `u` ? !0 : CSS.supports(`field-sizing`, `content`)),
            (p = /mac|iphone|ipad|ipod/i),
            (o.__docgenInfo = {
                description: ``,
                methods: [],
                displayName: `InputText`,
                props: {
                    autoCapitalize: {
                        required: !1,
                        tsType: {
                            name: `union`,
                            raw: `'characters' | 'none' | 'off' | 'sentences' | 'words'`,
                            elements: [
                                { name: `literal`, value: `'characters'` },
                                { name: `literal`, value: `'none'` },
                                { name: `literal`, value: `'off'` },
                                { name: `literal`, value: `'sentences'` },
                                { name: `literal`, value: `'words'` },
                            ],
                        },
                        description: ``,
                    },
                    autoComplete: {
                        required: !1,
                        tsType: {
                            name: `HTMLInputElement['autocomplete']`,
                            raw: `HTMLInputElement['autocomplete']`,
                        },
                        description: ``,
                    },
                    autoFocus: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: ``,
                    },
                    className: {
                        required: !1,
                        tsType: { name: `string` },
                        description: ``,
                    },
                    disabled: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: ``,
                    },
                    discardOnEscape: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, resets input’s value to initialValue and blurs when user presses
the escape key.`,
                    },
                    doubleClickToEdit: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, input renders as readonly initially and only becomes interactive
when double-clicked or when user focuses the readonly input and then
presses the enter key. Likewise, the input becomes readonly again when
it is blurred or when the user presses enter or escape.`,
                    },
                    enterKeyHint: {
                        required: !1,
                        tsType: {
                            name: `InputHTMLAttributes['enterKeyHint']`,
                            raw: `InputHTMLAttributes<HTMLInputElement>['enterKeyHint']`,
                        },
                        description: ``,
                    },
                    form: { required: !1, tsType: { name: `string` }, description: `` },
                    id: { required: !1, tsType: { name: `string` }, description: `` },
                    initialValue: {
                        required: !1,
                        tsType: { name: `string` },
                        description: `The initial value of the text input. If props.initialValue changes at
any point, the new value will override the local state of the input.`,
                    },
                    keepFocusOnSubmit: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, pressing enter/return while submitOnEnter is enabled keeps
focus on the input instead of blurring.`,
                    },
                    list: { required: !1, tsType: { name: `string` }, description: `` },
                    max: { required: !1, tsType: { name: `number` }, description: `` },
                    maxHeight: {
                        required: !1,
                        tsType: {
                            name: `union`,
                            raw: `null | number | string`,
                            elements: [
                                { name: `null` },
                                { name: `number` },
                                { name: `string` },
                            ],
                        },
                        description: ``,
                    },
                    maxLength: {
                        required: !1,
                        tsType: { name: `number` },
                        description: ``,
                    },
                    min: { required: !1, tsType: { name: `number` }, description: `` },
                    minHeight: {
                        required: !1,
                        tsType: {
                            name: `union`,
                            raw: `null | number | string`,
                            elements: [
                                { name: `null` },
                                { name: `number` },
                                { name: `string` },
                            ],
                        },
                        description: ``,
                    },
                    minLength: {
                        required: !1,
                        tsType: { name: `number` },
                        description: ``,
                    },
                    multiLine: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, input renders as a <textarea> that automatically grows and
shrinks vertically to adjust to the length of its contents.`,
                    },
                    multiple: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: ``,
                    },
                    name: { required: !1, tsType: { name: `string` }, description: `` },
                    onBlur: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(event: FocusEvent<InputElement>) => unknown`,
                            signature: {
                                arguments: [
                                    {
                                        type: {
                                            name: `FocusEvent`,
                                            elements: [
                                                {
                                                    name: `union`,
                                                    raw: `HTMLInputElement | HTMLTextAreaElement`,
                                                    elements: [
                                                        { name: `HTMLInputElement` },
                                                        { name: `HTMLTextAreaElement` },
                                                    ],
                                                },
                                            ],
                                            raw: `FocusEvent<InputElement>`,
                                        },
                                        name: `event`,
                                    },
                                ],
                                return: { name: `unknown` },
                            },
                        },
                        description: ``,
                    },
                    onChange: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(event: ChangeEvent<InputElement>) => unknown`,
                            signature: {
                                arguments: [
                                    {
                                        type: {
                                            name: `ChangeEvent`,
                                            elements: [
                                                {
                                                    name: `union`,
                                                    raw: `HTMLInputElement | HTMLTextAreaElement`,
                                                    elements: [
                                                        { name: `HTMLInputElement` },
                                                        { name: `HTMLTextAreaElement` },
                                                    ],
                                                },
                                            ],
                                            raw: `ChangeEvent<InputElement>`,
                                        },
                                        name: `event`,
                                    },
                                ],
                                return: { name: `unknown` },
                            },
                        },
                        description: ``,
                    },
                    onChangeValue: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(value: string) => unknown`,
                            signature: {
                                arguments: [{ type: { name: `string` }, name: `value` }],
                                return: { name: `unknown` },
                            },
                        },
                        description: `Custom change handler that only receives the changed value as an argument.
Enables passing a state setter function directly, e.g. onChangeValue={setValue}.`,
                    },
                    onFocus: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(event: FocusEvent<InputElement>) => unknown`,
                            signature: {
                                arguments: [
                                    {
                                        type: {
                                            name: `FocusEvent`,
                                            elements: [
                                                {
                                                    name: `union`,
                                                    raw: `HTMLInputElement | HTMLTextAreaElement`,
                                                    elements: [
                                                        { name: `HTMLInputElement` },
                                                        { name: `HTMLTextAreaElement` },
                                                    ],
                                                },
                                            ],
                                            raw: `FocusEvent<InputElement>`,
                                        },
                                        name: `event`,
                                    },
                                ],
                                return: { name: `unknown` },
                            },
                        },
                        description: ``,
                    },
                    onKeyDown: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(event: KeyboardEvent<InputElement>) => unknown`,
                            signature: {
                                arguments: [
                                    {
                                        type: {
                                            name: `KeyboardEvent`,
                                            elements: [
                                                {
                                                    name: `union`,
                                                    raw: `HTMLInputElement | HTMLTextAreaElement`,
                                                    elements: [
                                                        { name: `HTMLInputElement` },
                                                        { name: `HTMLTextAreaElement` },
                                                    ],
                                                },
                                            ],
                                            raw: `KeyboardEvent<InputElement>`,
                                        },
                                        name: `event`,
                                    },
                                ],
                                return: { name: `unknown` },
                            },
                        },
                        description: ``,
                    },
                    onKeyUp: {
                        required: !1,
                        tsType: {
                            name: `signature`,
                            type: `function`,
                            raw: `(event: KeyboardEvent<InputElement>) => unknown`,
                            signature: {
                                arguments: [
                                    {
                                        type: {
                                            name: `KeyboardEvent`,
                                            elements: [
                                                {
                                                    name: `union`,
                                                    raw: `HTMLInputElement | HTMLTextAreaElement`,
                                                    elements: [
                                                        { name: `HTMLInputElement` },
                                                        { name: `HTMLTextAreaElement` },
                                                    ],
                                                },
                                            ],
                                            raw: `KeyboardEvent<InputElement>`,
                                        },
                                        name: `event`,
                                    },
                                ],
                                return: { name: `unknown` },
                            },
                        },
                        description: ``,
                    },
                    pattern: {
                        required: !1,
                        tsType: { name: `string` },
                        description: ``,
                    },
                    placeholder: {
                        required: !1,
                        tsType: { name: `string` },
                        description: ``,
                    },
                    readOnly: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: ``,
                    },
                    ref: {
                        required: !1,
                        tsType: {
                            name: `Ref`,
                            elements: [{ name: `HTMLInputElement` }],
                            raw: `Ref<HTMLInputElement>`,
                        },
                        description: ``,
                    },
                    required: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: ``,
                    },
                    rows: {
                        required: !1,
                        tsType: { name: `number` },
                        description: ``,
                        defaultValue: { value: `1`, computed: !1 },
                    },
                    selectTextOnFocus: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, the contents of the input are selected when it’s focused.`,
                    },
                    size: { required: !1, tsType: { name: `number` }, description: `` },
                    step: { required: !1, tsType: { name: `number` }, description: `` },
                    style: {
                        required: !1,
                        tsType: { name: `CSSProperties` },
                        description: ``,
                    },
                    submitOnEnter: {
                        required: !1,
                        tsType: { name: `boolean` },
                        description: `If true, pressing enter/return submits the <form> that the input is a
part of. By default, this also blurs the input unless
keepFocusOnSubmit is true.`,
                    },
                    tabIndex: {
                        required: !1,
                        tsType: { name: `number` },
                        description: ``,
                    },
                    title: { required: !1, tsType: { name: `string` }, description: `` },
                    type: {
                        required: !1,
                        tsType: {
                            name: `union`,
                            raw: `'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url'`,
                            elements: [
                                { name: `literal`, value: `'email'` },
                                { name: `literal`, value: `'number'` },
                                { name: `literal`, value: `'password'` },
                                { name: `literal`, value: `'search'` },
                                { name: `literal`, value: `'tel'` },
                                { name: `literal`, value: `'text'` },
                                { name: `literal`, value: `'url'` },
                            ],
                        },
                        description: ``,
                        defaultValue: { value: `'text'`, computed: !1 },
                    },
                },
            }));
    });
function ee() {
    let e = (0, h.c)(13),
        [t, n] = (0, g.useState)(``),
        r;
    e[0] === Symbol.for(`react.memo_cache_sentinel`)
        ? ((r = []), (e[0] = r))
        : (r = e[0]);
    let [i, a] = (0, g.useState)(r),
        s;
    e[1] === t
        ? (s = e[2])
        : ((s = (e) => {
              (e.preventDefault(), t.trim() && (a((e) => [...e, t.trim()]), n(``)));
          }),
          (e[1] = t),
          (e[2] = s));
    let c;
    e[3] === i
        ? (c = e[4])
        : ((c =
              i.join(`
`) || `No messages yet`),
          (e[3] = i),
          (e[4] = c));
    let l;
    e[5] === c
        ? (l = e[6])
        : ((l = (0, _.jsx)(`pre`, { children: c })), (e[5] = c), (e[6] = l));
    let u;
    e[7] === t
        ? (u = e[8])
        : ((u = (0, _.jsx)(o, {
              className: `input-text`,
              initialValue: t,
              keepFocusOnSubmit: !0,
              onChangeValue: n,
              placeholder: `Type then press Enter`,
              submitOnEnter: !0,
          })),
          (e[7] = t),
          (e[8] = u));
    let d;
    return (
        e[9] !== s || e[10] !== l || e[11] !== u
            ? ((d = (0, _.jsxs)(`form`, { onSubmit: s, children: [l, u] })),
              (e[9] = s),
              (e[10] = l),
              (e[11] = u),
              (e[12] = d))
            : (d = e[12]),
        d
    );
}
var h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, L, R, z, B, V, H, U;
t(() => {
    ((h = i()),
        (g = e(n())),
        m(),
        a(),
        (_ = r()),
        ({ fn: v } = __STORYBOOK_MODULE_TEST__),
        (y = {
            component: o,
            parameters: {
                docs: {
                    description: {
                        component:
                            '`InputText` is a React component that renders a textual input (`type: "text"|"email"|"number"|"password"|"search"|"tel"|"url"`) that is uncontrolled, but whose value is overwritten whenever `props.initialValue` changes. Also, if `props.selectTextOnFocus` is true, it selects the entire contents of the input whenever the input is focused. And it supports multiline inputs (rendered as a `<textarea>`) that automatically resize vertically to fit their content.',
                    },
                },
            },
            tags: [`autodocs`],
            title: `UIKit/Controls/InputText`,
        }),
        (b = {
            args: {
                className: `input-text`,
                name: `empty`,
                onBlur: v(),
                onChange: v(),
                onChangeValue: v(),
                onFocus: v(),
                onKeyDown: v(),
                onKeyUp: v(),
                placeholder: `enter text here…`,
            },
        }),
        (x = {
            args: {
                className: `input-text`,
                initialValue: `Bolivia`,
                placeholder: `enter country name`,
            },
        }),
        (S = {
            args: {
                className: `input-text`,
                initialValue: `Bolivia`,
                name: `country`,
                placeholder: `enter country name (selectTextOnFocus)`,
                selectTextOnFocus: !0,
            },
        }),
        (C = {
            args: {
                className: `multi-line-input-text`,
                initialValue: `The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You’re Going to Have to Leave Now, or, “I have fought the Big Knives and will continue to fight them until they are off our lands!”`,
                maxHeight: 600,
                multiLine: !0,
                name: `multi-line-input`,
                placeholder: `enter text of any length`,
                selectTextOnFocus: !0,
            },
        }),
        (w = {
            className: `multi-line-input-text`,
            maxHeight: 600,
            multiLine: !0,
            name: `multi-line-submit-on-enter-input`,
            placeholder: `enter text of any length`,
            submitOnEnter: !0,
        }),
        (T = new Intl.DateTimeFormat(void 0, { timeStyle: `medium` }).format),
        (E = {
            args: w,
            render() {
                let [e, t] = (0, g.useState)(null),
                    n = e ? T(e) : `never`;
                return (0, _.jsxs)(`form`, {
                    onSubmit: (e) => {
                        (e.preventDefault(), t(new Date()));
                    },
                    children: [
                        (0, _.jsx)(o, { ...w }),
                        (0, _.jsxs)(`pre`, { children: [`Last submitted: `, n] }),
                    ],
                });
            },
        }),
        (D = { args: { ...w, name: `${w.name}-no-form` } }),
        (O = {
            args: {
                className: `input-text`,
                keepFocusOnSubmit: !0,
                placeholder: `Type then press Enter`,
                submitOnEnter: !0,
            },
            render() {
                return (0, _.jsx)(ee, {});
            },
        }),
        (k = {
            className: `input-text-double-click-to-edit`,
            doubleClickToEdit: !0,
            initialValue: `Lorem ipsum dolor sit amet`,
            name: `double-click-to-edit-input`,
        }),
        (A = { args: k }),
        (j = {
            className: `input-text`,
            discardOnEscape: !0,
            initialValue: `Lorem ipsum`,
            name: `discard-on-escape-input`,
        }),
        (M = { args: j }),
        (N = {
            args: {
                ...j,
                ...k,
                name: `double-click-to-edit-and-discard-on-escape-input`,
            },
        }),
        (P = { args: { autoFocus: !0, name: `autofocus-input` } }),
        (F = {
            args: {
                className: `multi-line-input-text`,
                initialValue: `This textarea has a minHeight of 50px.

Try deleting this text to see that the textarea does not shrink below the minimum height.`,
                minHeight: 50,
                multiLine: !0,
                name: `multi-line-min-height-input`,
                placeholder: `enter text of any length`,
            },
        }),
        (I = {
            args: {
                className: `multi-line-input-text`,
                initialValue: `This textarea has a maxHeight of 150px.

Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10`,
                maxHeight: 150,
                multiLine: !0,
                name: `multi-line-max-height-input`,
                placeholder: `enter text of any length`,
            },
        }),
        (L = {
            args: {
                className: `multi-line-input-text`,
                initialValue: `This textarea has minHeight of 100px and maxHeight of 200px.`,
                maxHeight: 200,
                minHeight: 100,
                multiLine: !0,
                name: `multi-line-min-max-height-input`,
                placeholder: `enter text of any length`,
            },
        }),
        (R = {
            args: {
                className: `multi-line-input-css-transition`,
                multiLine: !0,
                name: `multi-line-input-css-transition`,
                placeholder: `Write a quick note here`,
                rows: 4,
            },
        }),
        (z = {
            className: `multi-line-input-text`,
            initialValue: `This multi-line input should resize to fit its contents when the popover opens even though it initializes with display: none as a result of being inside a hidden popover element so it doesn’t have any dimensions when the component initially renders.`,
            multiLine: !0,
            name: `multi-line-input-in-popover`,
            selectTextOnFocus: !0,
        }),
        (B = {
            args: z,
            render() {
                return (0, _.jsxs)(_.Fragment, {
                    children: [
                        (0, _.jsx)(`button`, {
                            popoverTarget: `multi-line-input-popover`,
                            children: `Open Popover`,
                        }),
                        (0, _.jsx)(`div`, {
                            id: `multi-line-input-popover`,
                            popover: `auto`,
                            children: (0, _.jsx)(o, { ...z }),
                        }),
                    ],
                });
            },
        }),
        (V = {
            autoFocus: !0,
            initialValue: `This multi-line input should be focused when the popover opens`,
            multiLine: !0,
            name: `multi-line-input-with-autofocus-in-popover`,
            selectTextOnFocus: !0,
        }),
        (H = {
            args: V,
            render() {
                return (0, _.jsxs)(_.Fragment, {
                    children: [
                        (0, _.jsx)(`button`, {
                            popoverTarget: `multi-line-input-with-autofocus-popover`,
                            children: `Open Popover`,
                        }),
                        (0, _.jsx)(`div`, {
                            id: `multi-line-input-with-autofocus-popover`,
                            popover: `auto`,
                            children: (0, _.jsx)(o, { ...V }),
                        }),
                    ],
                });
            },
        }),
        (b.parameters = {
            ...b.parameters,
            docs: {
                ...b.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'input-text',
    name: 'empty',
    // NOTE spies are a workaround for a bug related to implicit arg detection
    onBlur: fn(),
    onChange: fn(),
    onChangeValue: fn(),
    onFocus: fn(),
    onKeyDown: fn(),
    onKeyUp: fn(),
    placeholder: 'enter text here…'
  }
}`,
                    ...b.parameters?.docs?.source,
                },
            },
        }),
        (x.parameters = {
            ...x.parameters,
            docs: {
                ...x.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'input-text',
    initialValue: 'Bolivia',
    placeholder: 'enter country name'
  }
}`,
                    ...x.parameters?.docs?.source,
                },
            },
        }),
        (S.parameters = {
            ...S.parameters,
            docs: {
                ...S.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'input-text',
    initialValue: 'Bolivia',
    name: 'country',
    placeholder: 'enter country name (selectTextOnFocus)',
    selectTextOnFocus: true
  }
}`,
                    ...S.parameters?.docs?.source,
                },
            },
        }),
        (C.parameters = {
            ...C.parameters,
            docs: {
                ...C.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'multi-line-input-text',
    initialValue: 'The Black Hawk War, or, How to Demolish an Entire Civilization and Still Feel Good About Yourself in the Morning, or, We Apologize for the Inconvenience but You’re Going to Have to Leave Now, or, “I have fought the Big Knives and will continue to fight them until they are off our lands!”',
    maxHeight: 600,
    multiLine: true,
    name: 'multi-line-input',
    placeholder: 'enter text of any length',
    selectTextOnFocus: true
  }
}`,
                    ...C.parameters?.docs?.source,
                },
            },
        }),
        (E.parameters = {
            ...E.parameters,
            docs: {
                ...E.parameters?.docs,
                source: {
                    originalSource: `{
  args: SUBMIT_ON_ENTER_PROPS,
  render() {
    const [lastSubmitDate, setLastSubmitDate] = useState<Date | null>(null);
    const lastSubmit = lastSubmitDate ? formatDate(lastSubmitDate) : 'never';
    return <form onSubmit={(event: FormEvent<HTMLFormElement>) => {
      event.preventDefault();
      setLastSubmitDate(new Date());
    }}>
                <InputText {...SUBMIT_ON_ENTER_PROPS} />
                <pre>Last submitted: {lastSubmit}</pre>
            </form>;
  }
}`,
                    ...E.parameters?.docs?.source,
                },
            },
        }),
        (D.parameters = {
            ...D.parameters,
            docs: {
                ...D.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    ...SUBMIT_ON_ENTER_PROPS,
    name: \`\${SUBMIT_ON_ENTER_PROPS.name}-no-form\`
  }
}`,
                    ...D.parameters?.docs?.source,
                },
            },
        }),
        (O.parameters = {
            ...O.parameters,
            docs: {
                ...O.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'input-text',
    keepFocusOnSubmit: true,
    placeholder: 'Type then press Enter',
    submitOnEnter: true
  },
  render() {
    return <ChatLikeInputDemo />;
  }
}`,
                    ...O.parameters?.docs?.source,
                },
            },
        }),
        (A.parameters = {
            ...A.parameters,
            docs: {
                ...A.parameters?.docs,
                source: {
                    originalSource: `{
  args: DOUBLE_CLICK_TO_EDIT_PROPS
}`,
                    ...A.parameters?.docs?.source,
                },
            },
        }),
        (M.parameters = {
            ...M.parameters,
            docs: {
                ...M.parameters?.docs,
                source: {
                    originalSource: `{
  args: DISCARD_ON_ESCAPE_PROPS
}`,
                    ...M.parameters?.docs?.source,
                },
            },
        }),
        (N.parameters = {
            ...N.parameters,
            docs: {
                ...N.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    ...DISCARD_ON_ESCAPE_PROPS,
    ...DOUBLE_CLICK_TO_EDIT_PROPS,
    name: 'double-click-to-edit-and-discard-on-escape-input'
  }
}`,
                    ...N.parameters?.docs?.source,
                },
            },
        }),
        (P.parameters = {
            ...P.parameters,
            docs: {
                ...P.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    autoFocus: true,
    name: 'autofocus-input'
  }
}`,
                    ...P.parameters?.docs?.source,
                },
            },
        }),
        (F.parameters = {
            ...F.parameters,
            docs: {
                ...F.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'multi-line-input-text',
    initialValue: 'This textarea has a minHeight of 50px.\\n\\nTry deleting this text to see that the textarea does not shrink below the minimum height.',
    minHeight: 50,
    multiLine: true,
    name: 'multi-line-min-height-input',
    placeholder: 'enter text of any length'
  }
}`,
                    ...F.parameters?.docs?.source,
                },
            },
        }),
        (I.parameters = {
            ...I.parameters,
            docs: {
                ...I.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'multi-line-input-text',
    initialValue: 'This textarea has a maxHeight of 150px.\\n\\nLine 3\\nLine 4\\nLine 5\\nLine 6\\nLine 7\\nLine 8\\nLine 9\\nLine 10',
    maxHeight: 150,
    multiLine: true,
    name: 'multi-line-max-height-input',
    placeholder: 'enter text of any length'
  }
}`,
                    ...I.parameters?.docs?.source,
                },
            },
        }),
        (L.parameters = {
            ...L.parameters,
            docs: {
                ...L.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'multi-line-input-text',
    initialValue: 'This textarea has minHeight of 100px and maxHeight of 200px.',
    maxHeight: 200,
    minHeight: 100,
    multiLine: true,
    name: 'multi-line-min-max-height-input',
    placeholder: 'enter text of any length'
  }
}`,
                    ...L.parameters?.docs?.source,
                },
            },
        }),
        (R.parameters = {
            ...R.parameters,
            docs: {
                ...R.parameters?.docs,
                source: {
                    originalSource: `{
  args: {
    className: 'multi-line-input-css-transition',
    multiLine: true,
    name: 'multi-line-input-css-transition',
    placeholder: 'Write a quick note here',
    rows: 4
  }
}`,
                    ...R.parameters?.docs?.source,
                },
            },
        }),
        (B.parameters = {
            ...B.parameters,
            docs: {
                ...B.parameters?.docs,
                source: {
                    originalSource: `{
  args: MULTI_LINE_INPUT_IN_POPOVER_PROPS,
  render() {
    return <>
                <button popoverTarget="multi-line-input-popover">Open Popover</button>
                <div id="multi-line-input-popover" popover="auto">
                    <InputText {...MULTI_LINE_INPUT_IN_POPOVER_PROPS} />
                </div>
            </>;
  }
}`,
                    ...B.parameters?.docs?.source,
                },
            },
        }),
        (H.parameters = {
            ...H.parameters,
            docs: {
                ...H.parameters?.docs,
                source: {
                    originalSource: `{
  args: MULTI_LINE_INPUT_WITH_AUTO_FOCUS_PROPS,
  render() {
    return <>
                <button popoverTarget="multi-line-input-with-autofocus-popover">
                    Open Popover
                </button>
                <div id="multi-line-input-with-autofocus-popover" popover="auto">
                    <InputText {...MULTI_LINE_INPUT_WITH_AUTO_FOCUS_PROPS} />
                </div>
            </>;
  }
}`,
                    ...H.parameters?.docs?.source,
                },
            },
        }),
        (U = [
            `EmptyInput`,
            `InputWithInitialValue`,
            `InputWithInitialValueAndSelectTextOnFocus`,
            `MultiLineInputWithInitialValueAndSelectTextOnFocus`,
            `MultiLineInputWithSubmitOnEnter`,
            `MultiLineInputWithSubmitOnEnterNoForm`,
            `ChatLikeInputWithSubmitOnEnter`,
            `InputWithDoubleClickToEdit`,
            `InputWithDiscardOnEscape`,
            `InputWithDoubleClickToEditAndDiscardOnEscape`,
            `InputWithAutoFocus`,
            `MultiLineInputWithMinHeight`,
            `MultiLineInputWithMaxHeight`,
            `MultiLineInputWithMinHeightAndMaxHeight`,
            `MultiLineInputWithCSSTransition`,
            `MultiLineInputInPopover`,
            `MultiLineInputWithAutoFocusInPopover`,
        ]));
})();
export {
    O as ChatLikeInputWithSubmitOnEnter,
    b as EmptyInput,
    P as InputWithAutoFocus,
    M as InputWithDiscardOnEscape,
    A as InputWithDoubleClickToEdit,
    N as InputWithDoubleClickToEditAndDiscardOnEscape,
    x as InputWithInitialValue,
    S as InputWithInitialValueAndSelectTextOnFocus,
    B as MultiLineInputInPopover,
    H as MultiLineInputWithAutoFocusInPopover,
    R as MultiLineInputWithCSSTransition,
    C as MultiLineInputWithInitialValueAndSelectTextOnFocus,
    I as MultiLineInputWithMaxHeight,
    F as MultiLineInputWithMinHeight,
    L as MultiLineInputWithMinHeightAndMaxHeight,
    E as MultiLineInputWithSubmitOnEnter,
    D as MultiLineInputWithSubmitOnEnterNoForm,
    U as __namedExportsOrder,
    y as default,
};
