@tcn/ui 0.0.2 → 0.0.3
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/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +12 -4
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.d.ts.map +1 -1
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.d.ts.map +1 -1
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.js.map +1 -1
- package/dist/form/form_field.d.ts.map +1 -1
- package/dist/form/form_field.js.map +1 -1
- package/dist/form/index.d.ts +14 -11
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +27 -20
- package/dist/form/index.js.map +1 -1
- package/dist/h_body.css +1 -1
- package/dist/layouts/body/h_body.d.ts.map +1 -1
- package/dist/layouts/body/h_body.js +11 -10
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.d.ts.map +1 -1
- package/dist/layouts/body/v_body.js +10 -9
- package/dist/layouts/body/v_body.js.map +1 -1
- package/dist/layouts/divider/divider.d.ts +2 -2
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +17 -16
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.d.ts +1 -1
- package/dist/layouts/footer/footer.d.ts.map +1 -1
- package/dist/layouts/footer/footer.js +5 -5
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/header/header.d.ts +1 -1
- package/dist/layouts/header/header.d.ts.map +1 -1
- package/dist/layouts/header/header.js +10 -10
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +13 -8
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/panel.css +1 -1
- package/dist/panel.module-DwGKncon.js +5 -0
- package/dist/panel.module-DwGKncon.js.map +1 -0
- package/dist/stack.css +1 -1
- package/dist/stacks/types/styles.d.ts +2 -2
- package/dist/stacks/types/styles.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.d.ts +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +44 -33
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.d.ts +1 -1
- package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/v_panel.js +36 -31
- package/dist/surfaces/panel/v_panel.js.map +1 -1
- package/dist/themes/index.js +82 -20
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/typography/title/title.d.ts +1 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +16 -16
- package/dist/typography/title/title.js.map +1 -1
- package/dist/v_body.css +1 -1
- package/package.json +3 -3
- package/src/actions/button/button/button.tsx +10 -4
- package/src/form/field/common/status_input/status_input.tsx +1 -1
- package/src/form/field/h_field/h_field.tsx +1 -1
- package/src/form/field/v_field/v_field.tsx +1 -1
- package/src/form/field_presenters/options_field_presenter.ts +1 -1
- package/src/form/form_field.tsx +1 -1
- package/src/form/index.ts +50 -11
- package/src/layouts/body/h_body.module.css +3 -2
- package/src/layouts/body/h_body.tsx +4 -3
- package/src/layouts/body/v_body.module.css +3 -2
- package/src/layouts/body/v_body.tsx +4 -3
- package/src/layouts/divider/divider.tsx +5 -4
- package/src/layouts/footer/footer.tsx +4 -4
- package/src/layouts/header/header.tsx +4 -4
- package/src/layouts/utility_bar/utility_bar.tsx +9 -4
- package/src/stacks/stack.module.css +54 -5
- package/src/stacks/stacks.mdx +28 -28
- package/src/stacks/types/styles.ts +2 -2
- package/src/surfaces/panel/__stories__/panel.stories.tsx +68 -0
- package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
- package/src/surfaces/panel/h_panel.tsx +18 -6
- package/src/surfaces/panel/panel.module.css +2 -7
- package/src/surfaces/panel/v_panel.tsx +11 -5
- package/src/themes/themes/ergo/ergo_theme.css +72 -10
- package/src/typography/title/title.tsx +2 -2
- package/dist/form/field/form_field.d.ts +0 -6
- package/dist/form/field/form_field.d.ts.map +0 -1
- package/dist/form/field/form_field.js +0 -18
- package/dist/form/field/form_field.js.map +0 -1
- package/dist/panel.module-CtikcmYB.js +0 -5
- package/dist/panel.module-CtikcmYB.js.map +0 -1
- package/src/form/field/form_field.tsx +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/actions/button/button/button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/actions/button/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGjF,MAAM,WAAW,WAAY,SAAQ,eAAe;CAAG;AAEvD,eAAO,MAAM,MAAM,oGAmBjB,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import b from "react";
|
|
2
3
|
import n from "classnames";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { BaseButton as c } from "../base_button/base_button.js";
|
|
5
|
+
import '../../../button.css';const m = "_button_fd354ec", a = "_button-text_5989b5f", s = { button: m, "button-text": a }, _ = b.forwardRef(function({ children: t, className: e, ...u }, r) {
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
c,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: n(s.button, "button", "tcn-button", e),
|
|
11
|
+
...u,
|
|
12
|
+
children: typeof t == "string" ? /* @__PURE__ */ o("span", { className: n(s["button-text"], "button-text", "tcn-button-text"), children: t }) : t
|
|
13
|
+
}
|
|
14
|
+
);
|
|
7
15
|
});
|
|
8
16
|
export {
|
|
9
17
|
_ as Button
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../src/actions/button/button/button.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../src/actions/button/button/button.tsx"],"sourcesContent":["import React from 'react';\nimport cln from 'classnames';\nimport { BaseButton, type BaseButtonProps } from '../base_button/base_button.js';\nimport styles from './button.module.css';\n\nexport interface ButtonProps extends BaseButtonProps {}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { children, className, ...props },\n ref\n) {\n return (\n <BaseButton\n ref={ref}\n className={cln(styles.button, 'button', 'tcn-button', className)}\n {...props}\n >\n {typeof children === 'string' ? (\n <span className={cln(styles['button-text'], 'button-text', 'tcn-button-text')}>\n {children}\n </span>\n ) : (\n children\n )}\n </BaseButton>\n );\n});\n"],"names":["Button","React","children","className","props","ref","jsx","BaseButton","cln","styles"],"mappings":";;;;8FAOaA,IAASC,EAAM,WAA2C,SACrE,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG,EAAIC,EAAO,QAAQ,UAAU,cAAcN,CAAS;AAAA,MAC9D,GAAGC;AAAA,MAEH,UAAA,OAAOF,KAAa,WACnB,gBAAAI,EAAC,UAAK,WAAWE,EAAIC,EAAO,aAAa,GAAG,eAAe,iBAAiB,GACzE,UAAAP,GACH,IAEAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status_input.js","sources":["../../../../../src/form/field/common/status_input/status_input.tsx"],"sourcesContent":["import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';\nimport { LockTwoIcon } from '@tcn/icons/lock_two_icon.js';\nimport { HStack } from '../../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';\nimport React from 'react';\nimport { Loading } from '../../../../feedback/index.js';\nimport classNames from 'classnames';\nimport styles from './status_input.module.css';\n\n/*\n TODO: I really want to make these
|
|
1
|
+
{"version":3,"file":"status_input.js","sources":["../../../../../src/form/field/common/status_input/status_input.tsx"],"sourcesContent":["import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';\nimport { LockTwoIcon } from '@tcn/icons/lock_two_icon.js';\nimport { HStack } from '../../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';\nimport React from 'react';\nimport { Loading } from '../../../../feedback/index.js';\nimport classNames from 'classnames';\nimport styles from './status_input.module.css';\n\n/*\n TODO: I really want to make these themeable.\n The way we do that is simply put a div placeholder with\n a class that the theme can override. They can use svgs as \n backgrounds for icons. This would make it so the component\n library doesn't dictate the icon set used. \n*/\nconst LockedAdornment: React.FC = () => {\n return <LockTwoIcon className=\"field-lock\" size=\"lg\" />;\n};\n\nconst LoadingAdornment: React.FC = () => {\n return <Loading size=\"20px\" className=\"field-loader\" />;\n};\n\nconst ErroredAdornment: React.FC = () => {\n return (\n <AlertTriangleIcon\n className={classNames(styles['field-error'], 'field-error')}\n size=\"lg\"\n />\n );\n};\n\nexport const AdornmentMap: React.FC<{ state: StatusInputState }> = ({ state }) => {\n switch (state) {\n case 'locked':\n return <LockedAdornment />;\n case 'loading':\n return <LoadingAdornment />;\n case 'error':\n return <ErroredAdornment />;\n default:\n return null;\n }\n};\n\nexport type StatusInputState = 'locked' | 'loading' | 'error' | 'default';\nexport interface StatusInputOwnProps {\n children: React.ReactNode;\n state?: StatusInputState;\n}\n\nexport type StatusInputProps = WithDetailedHTMLProps<\n StatusInputOwnProps & HStackOwnProps,\n 'div'\n>;\n\nexport const FieldStatusInput = React.forwardRef(function StatusInput(\n { children: Control, state = 'default', className, ...props }: StatusInputProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const showControl = state === 'default' || state === 'error';\n\n return (\n <HStack\n ref={ref}\n data-state={state}\n className={classNames(\n 'field-status-input',\n styles['field-status-input'],\n className,\n 'field-status-input'\n )}\n vAlign=\"center\"\n hAlign=\"end\"\n gap=\"4px\"\n {...props}\n >\n {showControl && Control}\n <AdornmentMap state={state} />\n </HStack>\n );\n});\n"],"names":["LockedAdornment","jsx","LockTwoIcon","LoadingAdornment","Loading","ErroredAdornment","AlertTriangleIcon","classNames","styles","AdornmentMap","state","FieldStatusInput","React","Control","className","props","ref","showControl","jsxs","HStack"],"mappings":";;;;;;;;;;wHAiBMA,IAA4B,MACzB,gBAAAC,EAACC,GAAA,EAAY,WAAU,cAAa,MAAK,MAAK,GAGjDC,IAA6B,MAC1B,gBAAAF,EAACG,GAAA,EAAQ,MAAK,QAAO,WAAU,gBAAe,GAGjDC,IAA6B,MAE/B,gBAAAJ;AAAA,EAACK;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,aAAa,GAAG,aAAa;AAAA,IAC1D,MAAK;AAAA,EAAA;AAAA,GAKEC,IAAsD,CAAC,EAAE,OAAAC,QAAY;AAChF,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,+BAAQV,GAAA,EAAgB;AAAA,IAC1B,KAAK;AACH,+BAAQG,GAAA,EAAiB;AAAA,IAC3B,KAAK;AACH,+BAAQE,GAAA,EAAiB;AAAA,IAC3B;AACE,aAAO;AAAA,EAAA;AAEb,GAaaM,IAAmBC,EAAM,WAAW,SAC/C,EAAE,UAAUC,GAAS,OAAAH,IAAQ,WAAW,WAAAI,GAAW,GAAGC,EAAA,GACtDC,GACA;AACA,QAAMC,IAAcP,MAAU,aAAaA,MAAU;AAErD,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,cAAYN;AAAA,MACZ,WAAWH;AAAA,QACT;AAAA,QACAC,EAAO,oBAAoB;AAAA,QAC3BM;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAE,KAAeJ;AAAA,QAChB,gBAAAZ,EAACQ,KAAa,OAAAC,EAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlC,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/h_field/h_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"h_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/h_field/h_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAGxF,eAAO,MAAM,MAAM,iGAmDjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_field.js","sources":["../../../../src/form/field/h_field/h_field.tsx"],"sourcesContent":["import { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './h_field.module.css';\nimport { FieldInput } from '../common/types.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\n\nexport interface HFieldOwnProps extends FieldInput {\n labelWidth?: string;\n children: React.ReactNode;\n}\nexport type HFieldProps = WithDetailedHTMLProps<HFieldOwnProps, 'div'> & HStackOwnProps;\n\nlet idIndex = 0;\nexport const HField = React.forwardRef(function HField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n labelWidth = '40%',\n locked = false,\n loading = false,\n className,\n id,\n required,\n ...props\n }: HFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `h-field-${idIndex++}`);\n const labelId = `${finalId}-label`;\n const descriptionId = `${finalId}-description`;\n const hasError = errorMessage ? true : false;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n\n return (\n <HStack\n ref={ref}\n as=\"div\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={classNames('base-field', styles['h-field'], 'h-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n minWidth={labelWidth}\n width={labelWidth}\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl errorMessage={errorMessage} loading={loading} locked={locked}>\n <FieldStatusInput state={state}>{Control}</FieldStatusInput>\n </FieldControl>\n </HStack>\n );\n});\n"],"names":["idIndex","HField","React","label","description","errorMessage","Control","labelWidth","locked","loading","className","id","required","props","ref","finalId","useState","labelId","descriptionId","hasError","state","jsxs","HStack","classNames","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAiBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC,IAAa;AAAA,EACb,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWX,GAAS,EAAE,GACvDiB,IAAU,GAAGF,CAAO,UACpBG,IAAgB,GAAGH,CAAO,gBAC1BI,IAAW,EAAAd,GACXe,IAAQZ,IAAS,WAAWC,IAAU,YAAYU,IAAW,UAAU;AAE7E,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,IAAG;AAAA,MACH,mBAAiBG;AAAA,MACjB,oBAAkBC;AAAA,MAClB,eAAaV;AAAA,MACb,cAAYW;AAAA,MACZ,gBAAcV;AAAA,MACd,WAAWc,EAAW,cAAcC,EAAO,SAAS,GAAG,WAAWd,CAAS;AAAA,MAC3E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAY;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAUnB;AAAA,YACV,OAAOA;AAAA,YACP,IAAIQ;AAAA,YACJ,OAAAZ;AAAA,YACA,aAAAC;AAAA,YACA,UAAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAa,EAACE,KAAa,cAAAtB,GAA4B,SAAAI,GAAkB,QAAAD,GAC1D,UAAA,gBAAAiB,EAACG,GAAA,EAAiB,OAAAR,GAAe,UAAAd,EAAA,CAAQ,EAAA,CAC3C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
1
|
+
{"version":3,"file":"h_field.js","sources":["../../../../src/form/field/h_field/h_field.tsx"],"sourcesContent":["import { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './h_field.module.css';\nimport type { FieldInput } from '../common/types.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\n\nexport interface HFieldOwnProps extends FieldInput {\n labelWidth?: string;\n children: React.ReactNode;\n}\nexport type HFieldProps = WithDetailedHTMLProps<HFieldOwnProps, 'div'> & HStackOwnProps;\n\nlet idIndex = 0;\nexport const HField = React.forwardRef(function HField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n labelWidth = '40%',\n locked = false,\n loading = false,\n className,\n id,\n required,\n ...props\n }: HFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `h-field-${idIndex++}`);\n const labelId = `${finalId}-label`;\n const descriptionId = `${finalId}-description`;\n const hasError = errorMessage ? true : false;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n\n return (\n <HStack\n ref={ref}\n as=\"div\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={classNames('base-field', styles['h-field'], 'h-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n minWidth={labelWidth}\n width={labelWidth}\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl errorMessage={errorMessage} loading={loading} locked={locked}>\n <FieldStatusInput state={state}>{Control}</FieldStatusInput>\n </FieldControl>\n </HStack>\n );\n});\n"],"names":["idIndex","HField","React","label","description","errorMessage","Control","labelWidth","locked","loading","className","id","required","props","ref","finalId","useState","labelId","descriptionId","hasError","state","jsxs","HStack","classNames","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAiBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC,IAAa;AAAA,EACb,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWX,GAAS,EAAE,GACvDiB,IAAU,GAAGF,CAAO,UACpBG,IAAgB,GAAGH,CAAO,gBAC1BI,IAAW,EAAAd,GACXe,IAAQZ,IAAS,WAAWC,IAAU,YAAYU,IAAW,UAAU;AAE7E,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,IAAG;AAAA,MACH,mBAAiBG;AAAA,MACjB,oBAAkBC;AAAA,MAClB,eAAaV;AAAA,MACb,cAAYW;AAAA,MACZ,gBAAcV;AAAA,MACd,WAAWc,EAAW,cAAcC,EAAO,SAAS,GAAG,WAAWd,CAAS;AAAA,MAC3E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAY;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAUnB;AAAA,YACV,OAAOA;AAAA,YACP,IAAIQ;AAAA,YACJ,OAAAZ;AAAA,YACA,aAAAC;AAAA,YACA,UAAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAa,EAACE,KAAa,cAAAtB,GAA4B,SAAAI,GAAkB,QAAAD,GAC1D,UAAA,gBAAAiB,EAACG,GAAA,EAAiB,OAAAR,GAAe,UAAAd,EAAA,CAAQ,EAAA,CAC3C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/v_field/v_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"v_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/v_field/v_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAExF,eAAO,MAAM,MAAM,iGAwDjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_field.js","sources":["../../../../src/form/field/v_field/v_field.tsx"],"sourcesContent":["import { VStack } from '../../../stacks/v_stack.js';\nimport type { VStackOwnProps } from '../../../stacks/v_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './v_field.module.css';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\nimport { FieldInput } from '../common/types.js';\n\nexport interface VFieldOwnProps extends FieldInput {\n children: React.ReactNode;\n}\n\nexport type VFieldProps = WithDetailedHTMLProps<VFieldOwnProps, 'div'> & VStackOwnProps;\nlet idIndex = 0;\nexport const VField = React.forwardRef(function VField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n locked = false,\n loading = false,\n maxWidth,\n minWidth,\n className,\n id,\n required,\n ...props\n }: VFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `v-field-${idIndex++}`);\n const hasError = errorMessage ? true : false;\n const labelId = `${finalId}-label`;\n const descriptionId = `${finalId}-description`;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n return (\n <VStack\n ref={ref}\n as=\"div\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={classNames('base-field', styles['v-field'], 'v-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl\n errorMessage={errorMessage}\n loading={loading}\n locked={locked}\n hAlign=\"start\"\n >\n <FieldStatusInput state={state} hAlign=\"start\">\n {Control}\n </FieldStatusInput>\n </FieldControl>\n </VStack>\n );\n});\n"],"names":["idIndex","VField","React","label","description","errorMessage","Control","locked","loading","maxWidth","minWidth","className","id","required","props","ref","finalId","useState","hasError","labelId","descriptionId","state","jsxs","VStack","classNames","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAgBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWZ,GAAS,EAAE,GACvDkB,IAAW,EAAAb,GACXc,IAAU,GAAGH,CAAO,UACpBI,IAAgB,GAAGJ,CAAO,gBAC1BK,IAAQd,IAAS,WAAWC,IAAU,YAAYU,IAAW,UAAU;AAC7E,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,IAAG;AAAA,MACH,mBAAiBI;AAAA,MACjB,oBAAkBC;AAAA,MAClB,eAAab;AAAA,MACb,cAAYW;AAAA,MACZ,gBAAcV;AAAA,MACd,WAAWgB,EAAW,cAAcC,EAAO,SAAS,GAAG,WAAWd,CAAS;AAAA,MAC3E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAY;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAIX;AAAA,YACJ,OAAAb;AAAA,YACA,aAAAC;AAAA,YACA,UAAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAa;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAAvB;AAAA,YACA,SAAAG;AAAA,YACA,QAAAD;AAAA,YACA,QAAO;AAAA,YAEP,UAAA,gBAAAmB,EAACG,GAAA,EAAiB,OAAAR,GAAc,QAAO,SACpC,UAAAf,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
1
|
+
{"version":3,"file":"v_field.js","sources":["../../../../src/form/field/v_field/v_field.tsx"],"sourcesContent":["import { VStack } from '../../../stacks/v_stack.js';\nimport type { VStackOwnProps } from '../../../stacks/v_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport classNames from 'classnames';\nimport React, { useState } from 'react';\nimport styles from './v_field.module.css';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\nimport type { FieldInput } from '../common/types.js';\n\nexport interface VFieldOwnProps extends FieldInput {\n children: React.ReactNode;\n}\n\nexport type VFieldProps = WithDetailedHTMLProps<VFieldOwnProps, 'div'> & VStackOwnProps;\nlet idIndex = 0;\nexport const VField = React.forwardRef(function VField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n locked = false,\n loading = false,\n maxWidth,\n minWidth,\n className,\n id,\n required,\n ...props\n }: VFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `v-field-${idIndex++}`);\n const hasError = errorMessage ? true : false;\n const labelId = `${finalId}-label`;\n const descriptionId = `${finalId}-description`;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n return (\n <VStack\n ref={ref}\n as=\"div\"\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={classNames('base-field', styles['v-field'], 'v-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl\n errorMessage={errorMessage}\n loading={loading}\n locked={locked}\n hAlign=\"start\"\n >\n <FieldStatusInput state={state} hAlign=\"start\">\n {Control}\n </FieldStatusInput>\n </FieldControl>\n </VStack>\n );\n});\n"],"names":["idIndex","VField","React","label","description","errorMessage","Control","locked","loading","maxWidth","minWidth","className","id","required","props","ref","finalId","useState","hasError","labelId","descriptionId","state","jsxs","VStack","classNames","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAgBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWZ,GAAS,EAAE,GACvDkB,IAAW,EAAAb,GACXc,IAAU,GAAGH,CAAO,UACpBI,IAAgB,GAAGJ,CAAO,gBAC1BK,IAAQd,IAAS,WAAWC,IAAU,YAAYU,IAAW,UAAU;AAC7E,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,IAAG;AAAA,MACH,mBAAiBI;AAAA,MACjB,oBAAkBC;AAAA,MAClB,eAAab;AAAA,MACb,cAAYW;AAAA,MACZ,gBAAcV;AAAA,MACd,WAAWgB,EAAW,cAAcC,EAAO,SAAS,GAAG,WAAWd,CAAS;AAAA,MAC3E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAY;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAIX;AAAA,YACJ,OAAAb;AAAA,YACA,aAAAC;AAAA,YACA,UAAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAa;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAAvB;AAAA,YACA,SAAAG;AAAA,YACA,QAAAD;AAAA,YACA,QAAO;AAAA,YAEP,UAAA,gBAAAmB,EAACG,GAAA,EAAiB,OAAAR,GAAc,QAAO,SACpC,UAAAf,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options_field_presenter.d.ts","sourceRoot":"","sources":["../../../src/form/field_presenters/options_field_presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"options_field_presenter.d.ts","sourceRoot":"","sources":["../../../src/form/field_presenters/options_field_presenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,YAAY,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE1F,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,GAAG,MAAM,CAClE,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC1B,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,GAAG,MAAM,CACpE,SAAQ,YAAY,CAAC,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,qBAAa,qBAAqB,CAChC,MAAM,GAAG,MAAM,EACf,OAAO,GAAG,MAAM,CAChB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC9B,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAEtC,IAAI,gBAAgB,+CAEnB;gBAGC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE;CAG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options_field_presenter.js","sources":["../../../src/form/field_presenters/options_field_presenter.ts"],"sourcesContent":["import { Signal } from '@tcn/state';\nimport { FieldOptions, FieldPresenter, FieldState } from './field_presenter.js';\n\nexport interface OptionsFieldState<TValue = string, TOption = string>\n extends FieldState<TValue> {\n options: TOption[];\n}\n\nexport interface OptionsFieldOptions<TValue = string, TOption = string>\n extends FieldOptions<TValue> {\n options?: TOption[];\n}\n\nexport class OptionsFieldPresenter<\n TValue = string,\n TOption = TValue,\n> extends FieldPresenter<TValue> {\n protected _options: Signal<TOption[]>;\n\n get optionsBroadcast() {\n return this._options.broadcast;\n }\n\n constructor(\n label: string,\n value: TValue,\n options: OptionsFieldOptions<TValue, TOption>\n ) {\n super(label, value, options);\n this._options = new Signal(options.options || []);\n }\n\n setOptions(options: TOption[]) {\n this._options.set(options);\n }\n}\n"],"names":["OptionsFieldPresenter","FieldPresenter","label","value","options","Signal"],"mappings":";;AAaO,MAAMA,UAGHC,EAAuB;AAAA,EACrB;AAAA,EAEV,IAAI,mBAAmB;AACrB,WAAO,KAAK,SAAS;AAAA,EACvB;AAAA,EAEA,YACEC,GACAC,GACAC,GACA;AACA,UAAMF,GAAOC,GAAOC,CAAO,GAC3B,KAAK,WAAW,IAAIC,EAAOD,EAAQ,WAAW,CAAA,CAAE;AAAA,EAClD;AAAA,EAEA,WAAWA,GAAoB;AAC7B,SAAK,SAAS,IAAIA,CAAO;AAAA,EAC3B;AACF;"}
|
|
1
|
+
{"version":3,"file":"options_field_presenter.js","sources":["../../../src/form/field_presenters/options_field_presenter.ts"],"sourcesContent":["import { Signal } from '@tcn/state';\nimport { type FieldOptions, FieldPresenter, type FieldState } from './field_presenter.js';\n\nexport interface OptionsFieldState<TValue = string, TOption = string>\n extends FieldState<TValue> {\n options: TOption[];\n}\n\nexport interface OptionsFieldOptions<TValue = string, TOption = string>\n extends FieldOptions<TValue> {\n options?: TOption[];\n}\n\nexport class OptionsFieldPresenter<\n TValue = string,\n TOption = TValue,\n> extends FieldPresenter<TValue> {\n protected _options: Signal<TOption[]>;\n\n get optionsBroadcast() {\n return this._options.broadcast;\n }\n\n constructor(\n label: string,\n value: TValue,\n options: OptionsFieldOptions<TValue, TOption>\n ) {\n super(label, value, options);\n this._options = new Signal(options.options || []);\n }\n\n setOptions(options: TOption[]) {\n this._options.set(options);\n }\n}\n"],"names":["OptionsFieldPresenter","FieldPresenter","label","value","options","Signal"],"mappings":";;AAaO,MAAMA,UAGHC,EAAuB;AAAA,EACrB;AAAA,EAEV,IAAI,mBAAmB;AACrB,WAAO,KAAK,SAAS;AAAA,EACvB;AAAA,EAEA,YACEC,GACAC,GACAC,GACA;AACA,UAAMF,GAAOC,GAAOC,CAAO,GAC3B,KAAK,WAAW,IAAIC,EAAOD,EAAQ,WAAW,CAAA,CAAE;AAAA,EAClD;AAAA,EAEA,WAAWA,GAAoB;AAC7B,SAAK,SAAS,IAAIA,CAAO;AAAA,EAC3B;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form_field.d.ts","sourceRoot":"","sources":["../../src/form/form_field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"form_field.d.ts","sourceRoot":"","sources":["../../src/form/form_field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAExF,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,EAAE,CACR,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC5B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1B,KAAK,CAAC,YAAY,CAAC;CACzB,0FAcA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form_field.js","sources":["../../src/form/form_field.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSignalValue } from '@tcn/state';\nimport { FieldPresenter, FieldState } from './field_presenters/field_presenter.js';\n\nexport function FormField<T>({\n field,\n children,\n}: {\n field: FieldPresenter<T>;\n children: (\n state: FieldState<T>,\n setValue: (value: T) => void,\n validate: () => Promise<void>\n ) => React.ReactElement;\n}) {\n const state = useSignalValue(field.stateBroadcast);\n const setValue = useCallback(\n (value: T) => {\n field.setValue(value);\n },\n [field]\n );\n\n const validate = useCallback(() => {\n return field.validate();\n }, [field]);\n\n return children(state, setValue, validate);\n}\n"],"names":["FormField","field","children","state","useSignalValue","setValue","useCallback","value","validate"],"mappings":";;AAIO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,UAAAC;AACF,GAOG;AACD,QAAMC,IAAQC,EAAeH,EAAM,cAAc,GAC3CI,IAAWC;AAAA,IACf,CAACC,MAAa;AACZ,MAAAN,EAAM,SAASM,CAAK;AAAA,IACtB;AAAA,IACA,CAACN,CAAK;AAAA,EAAA,GAGFO,IAAWF,EAAY,MACpBL,EAAM,SAAA,GACZ,CAACA,CAAK,CAAC;AAEV,SAAOC,EAASC,GAAOE,GAAUG,CAAQ;AAC3C;"}
|
|
1
|
+
{"version":3,"file":"form_field.js","sources":["../../src/form/form_field.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSignalValue } from '@tcn/state';\nimport { FieldPresenter, type FieldState } from './field_presenters/field_presenter.js';\n\nexport function FormField<T>({\n field,\n children,\n}: {\n field: FieldPresenter<T>;\n children: (\n state: FieldState<T>,\n setValue: (value: T) => void,\n validate: () => Promise<void>\n ) => React.ReactElement;\n}) {\n const state = useSignalValue(field.stateBroadcast);\n const setValue = useCallback(\n (value: T) => {\n field.setValue(value);\n },\n [field]\n );\n\n const validate = useCallback(() => {\n return field.validate();\n }, [field]);\n\n return children(state, setValue, validate);\n}\n"],"names":["FormField","field","children","state","useSignalValue","setValue","useCallback","value","validate"],"mappings":";;AAIO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,UAAAC;AACF,GAOG;AACD,QAAMC,IAAQC,EAAeH,EAAM,cAAc,GAC3CI,IAAWC;AAAA,IACf,CAACC,MAAa;AACZ,MAAAN,EAAM,SAASM,CAAK;AAAA,IACtB;AAAA,IACA,CAACN,CAAK;AAAA,EAAA,GAGFO,IAAWF,EAAY,MACpBL,EAAM,SAAA,GACZ,CAACA,CAAK,CAAC;AAEV,SAAOC,EAASC,GAAOE,GAAUG,CAAQ;AAC3C;"}
|
package/dist/form/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
1
|
+
export { type FieldControlOwnProps, type FieldControlProps, FieldControl, } from './field/common/field_control/field_control.js';
|
|
2
|
+
export { AdornmentMap, type StatusInputState, type StatusInputOwnProps, type StatusInputProps, FieldStatusInput, } from './field/common/status_input/status_input.js';
|
|
3
|
+
export { FieldDescription, type FieldDescriptionOwnProps, } from './field/common/field_description.js';
|
|
4
|
+
export { type FieldErrorMessageOwnProps, FieldErrorMessage, } from './field/common/field_error.js';
|
|
5
|
+
export { FieldHeader, type FieldHeaderProps, type FieldHeaderOwnProps, } from './field/common/field_header.js';
|
|
6
|
+
export { FieldLabel, type FieldLabelOwnProps } from './field/common/field_label.js';
|
|
7
|
+
export type { FieldInput } from './field/common/types.js';
|
|
8
|
+
export { HField, type HFieldProps, type HFieldOwnProps, } from './field/h_field/h_field.js';
|
|
9
|
+
export { VField, type VFieldProps, type VFieldOwnProps, } from './field/v_field/v_field.js';
|
|
10
|
+
export { Field, type FieldProps } from './field/field.js';
|
|
11
|
+
export { FieldPresenter, type FieldState, type FieldOptions, } from './field_presenters/field_presenter.js';
|
|
12
|
+
export { OptionsFieldPresenter, type OptionsFieldState, type OptionsFieldOptions, } from './field_presenters/options_field_presenter.js';
|
|
13
|
+
export { FieldSet, type FieldSetProps } from './field_set/field_set.js';
|
|
14
|
+
export { FormField } from './form_field.js';
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,YAAY,GACb,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,gBAAgB,GACjB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,KAAK,wBAAwB,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,KAAK,yBAAyB,EAC9B,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACpF,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/form/index.js
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { FieldControl as o } from "./field/common/field_control/field_control.js";
|
|
2
|
+
import { AdornmentMap as p, FieldStatusInput as i } from "./field/common/status_input/status_input.js";
|
|
3
|
+
import { FieldDescription as l } from "./field/common/field_description.js";
|
|
4
|
+
import { FieldErrorMessage as F } from "./field/common/field_error.js";
|
|
5
|
+
import { FieldHeader as x } from "./field/common/field_header.js";
|
|
6
|
+
import { FieldLabel as s } from "./field/common/field_label.js";
|
|
7
|
+
import { HField as u } from "./field/h_field/h_field.js";
|
|
8
|
+
import { VField as M } from "./field/v_field/v_field.js";
|
|
9
|
+
import { Field as S } from "./field/field.js";
|
|
10
|
+
import { FieldPresenter as c } from "./field_presenters/field_presenter.js";
|
|
11
|
+
import { OptionsFieldPresenter as A } from "./field_presenters/options_field_presenter.js";
|
|
12
|
+
import { FieldSet as D } from "./field_set/field_set.js";
|
|
13
|
+
import { FormField as I } from "./form_field.js";
|
|
11
14
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
p as AdornmentMap,
|
|
16
|
+
S as Field,
|
|
17
|
+
o as FieldControl,
|
|
18
|
+
l as FieldDescription,
|
|
19
|
+
F as FieldErrorMessage,
|
|
20
|
+
x as FieldHeader,
|
|
21
|
+
s as FieldLabel,
|
|
22
|
+
c as FieldPresenter,
|
|
23
|
+
D as FieldSet,
|
|
24
|
+
i as FieldStatusInput,
|
|
25
|
+
I as FormField,
|
|
26
|
+
u as HField,
|
|
27
|
+
A as OptionsFieldPresenter,
|
|
28
|
+
M as VField
|
|
22
29
|
};
|
|
23
30
|
//# sourceMappingURL=index.js.map
|
package/dist/form/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
package/dist/h_body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._h-body_d56f4f1{
|
|
1
|
+
._h-body_d56f4f1{min-width:0;flex-grow:1;height:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/h_body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"h_body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/h_body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,gFAehB,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { HStack as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { HStack as a } from "../../stacks/h_stack.js";
|
|
3
3
|
import c from "react";
|
|
4
4
|
import f from "classnames";
|
|
5
|
-
import '../../h_body.css';const y = "_h-body_d56f4f1",
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
|
|
5
|
+
import '../../h_body.css';const y = "_h-body_d56f4f1", e = { "h-body": y }, l = c.forwardRef(function({ children: o, className: t, overflowX: r = "auto", ...s }, d) {
|
|
6
|
+
return /* @__PURE__ */ m(
|
|
7
|
+
a,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
as: "
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
ref: d,
|
|
10
|
+
as: "div",
|
|
11
|
+
overflowX: r,
|
|
12
|
+
className: f(e["h-body"], t, "tcn-h-body", "body"),
|
|
13
|
+
...s,
|
|
13
14
|
children: o
|
|
14
15
|
}
|
|
15
16
|
);
|
|
16
17
|
});
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
l as HBody
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=h_body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_body.js","sources":["../../../src/layouts/body/h_body.tsx"],"sourcesContent":["import { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport React from 'react';\nimport classNames from 'classnames';\nimport styles from './h_body.module.css';\n\nexport interface HBodyProps extends Omit<HStackProps, 'as'> {}\n\nexport const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(\n { children, className, ...props }: HBodyProps,\n ref\n) {\n return (\n <HStack\n ref={ref}\n as=\"
|
|
1
|
+
{"version":3,"file":"h_body.js","sources":["../../../src/layouts/body/h_body.tsx"],"sourcesContent":["import { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport React from 'react';\nimport classNames from 'classnames';\nimport styles from './h_body.module.css';\n\nexport interface HBodyProps extends Omit<HStackProps, 'as'> {}\n\nexport const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(\n { children, className, overflowX = 'auto', ...props }: HBodyProps,\n ref\n) {\n return (\n <HStack\n ref={ref}\n as=\"div\"\n overflowX={overflowX}\n className={classNames(styles['h-body'], className, 'tcn-h-body', 'body')}\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["HBody","React","children","className","overflowX","props","ref","jsx","HStack","classNames","styles"],"mappings":";;;;kDAOaA,IAAQC,EAAM,WAAoC,SAC7D,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,IAAY,QAAQ,GAAGC,EAAA,GAC9CC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAAF;AAAA,MACA,WAAWK,EAAWC,EAAO,QAAQ,GAAGP,GAAW,cAAc,MAAM;AAAA,MACtE,GAAGE;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/v_body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"v_body.d.ts","sourceRoot":"","sources":["../../../src/layouts/body/v_body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,gFAehB,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { VStack as m } from "../../stacks/v_stack.js";
|
|
3
|
-
import
|
|
3
|
+
import a from "react";
|
|
4
4
|
import y from "classnames";
|
|
5
|
-
import '../../v_body.css';const
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
import '../../v_body.css';const f = "_v-body_d8f1917", n = { "v-body": f }, l = a.forwardRef(function({ children: o, className: t, overflowY: r = "auto", ...s }, d) {
|
|
6
|
+
return /* @__PURE__ */ c(
|
|
7
7
|
m,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
as: "
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
ref: d,
|
|
10
|
+
as: "div",
|
|
11
|
+
overflowY: r,
|
|
12
|
+
className: y(n["v-body"], t, "tcn-body", "tcn-v-body"),
|
|
13
|
+
...s,
|
|
13
14
|
children: o
|
|
14
15
|
}
|
|
15
16
|
);
|
|
16
17
|
});
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
l as VBody
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=v_body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_body.js","sources":["../../../src/layouts/body/v_body.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../stacks/v_stack.js';\nimport React from 'react';\nimport classNames from 'classnames';\nimport styles from './v_body.module.css';\n\nexport interface VBodyProps extends Omit<VStackProps, 'as'> {}\n\nexport const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(\n { children, className, ...props }: VBodyProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n as=\"
|
|
1
|
+
{"version":3,"file":"v_body.js","sources":["../../../src/layouts/body/v_body.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../stacks/v_stack.js';\nimport React from 'react';\nimport classNames from 'classnames';\nimport styles from './v_body.module.css';\n\nexport interface VBodyProps extends Omit<VStackProps, 'as'> {}\n\nexport const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(\n { children, className, overflowY = 'auto', ...props }: VBodyProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n as=\"div\"\n overflowY={overflowY}\n className={classNames(styles['v-body'], className, 'tcn-body', 'tcn-v-body')}\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["VBody","React","children","className","overflowY","props","ref","jsx","VStack","classNames","styles"],"mappings":";;;;kDAOaA,IAAQC,EAAM,WAAoC,SAC7D,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,IAAY,QAAQ,GAAGC,EAAA,GAC9CC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAAF;AAAA,MACA,WAAWK,EAAWC,EAAO,QAAQ,GAAGP,GAAW,YAAY,YAAY;AAAA,MAC1E,GAAGE;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Emphasis, Size } from '../../utils/index.js';
|
|
2
|
-
import { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
3
1
|
import { default as React, CSSProperties } from 'react';
|
|
2
|
+
import { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
3
|
+
import { Emphasis, Size } from '../../utils/index.js';
|
|
4
4
|
export type DividerOrientation = {
|
|
5
5
|
horizontal?: boolean;
|
|
6
6
|
vertical?: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/layouts/divider/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/layouts/divider/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,MAAM,kBAAkB,GAC1B;IACE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEN,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAC9C,iBAAiB,GAAG;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACnC,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AAEzE,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8C1C,CAAC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsxs as h, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import r from "classnames";
|
|
3
|
-
import '../../divider.css';const p = "_divider_af0a0c6", _ = "_divider-line_cae0189",
|
|
3
|
+
import '../../divider.css';const p = "_divider_af0a0c6", _ = "_divider-line_cae0189", n = { divider: p, "divider-line": _ }, u = ({
|
|
4
4
|
emphasis: i = "normal",
|
|
5
5
|
thickness: e = "sm",
|
|
6
|
-
length:
|
|
6
|
+
length: d = "full",
|
|
7
7
|
style: x,
|
|
8
|
-
horizontal:
|
|
8
|
+
horizontal: s,
|
|
9
9
|
vertical: y,
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
12
|
-
className:
|
|
10
|
+
width: l,
|
|
11
|
+
height: o,
|
|
12
|
+
className: t,
|
|
13
13
|
children: v,
|
|
14
14
|
...c
|
|
15
15
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
"--divider-width":
|
|
18
|
-
"--divider-height":
|
|
16
|
+
const a = s ? "horizontal" : "vertical", m = {
|
|
17
|
+
"--divider-width": l,
|
|
18
|
+
"--divider-height": o
|
|
19
19
|
};
|
|
20
20
|
return /* @__PURE__ */ h(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-emphasis": i,
|
|
24
24
|
"data-thickness": e,
|
|
25
|
-
"data-length":
|
|
26
|
-
"data-orientation":
|
|
27
|
-
className: r(
|
|
25
|
+
"data-length": d,
|
|
26
|
+
"data-orientation": a,
|
|
27
|
+
className: r(n.divider, "divider", "tcn-divider", t),
|
|
28
28
|
...c,
|
|
29
29
|
children: [
|
|
30
30
|
/* @__PURE__ */ f(
|
|
@@ -32,14 +32,15 @@ import '../../divider.css';const p = "_divider_af0a0c6", _ = "_divider-line_cae0
|
|
|
32
32
|
{
|
|
33
33
|
"data-emphasis": i,
|
|
34
34
|
"data-thickness": e,
|
|
35
|
-
"data-length":
|
|
36
|
-
"data-orientation":
|
|
35
|
+
"data-length": d,
|
|
36
|
+
"data-orientation": a,
|
|
37
37
|
style: m,
|
|
38
38
|
className: r(
|
|
39
|
-
|
|
39
|
+
n["divider-line"],
|
|
40
40
|
"divider-line",
|
|
41
|
+
"tcn-divider-line",
|
|
41
42
|
"material",
|
|
42
|
-
|
|
43
|
+
t
|
|
43
44
|
)
|
|
44
45
|
}
|
|
45
46
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../../src/layouts/divider/divider.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"divider.js","sources":["../../../src/layouts/divider/divider.tsx"],"sourcesContent":["import React, { type CSSProperties } from 'react';\nimport classnames from 'classnames';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Size } from '../../utils/index.js';\nimport styles from './divider.module.css';\n\nexport type DividerOrientation =\n | {\n horizontal?: boolean;\n vertical?: never;\n }\n | {\n horizontal?: never;\n vertical?: boolean;\n };\n\nexport interface DividerClasses {\n line?: string;\n}\n\nexport interface DividerProperties {\n width?: CSSProperties['width'];\n height?: CSSProperties['height'];\n}\n\nexport type DividerOwnProps = DividerOrientation &\n DividerProperties & {\n emphasis?: Emphasis;\n thickness?: Size;\n length?: Size | 'full';\n classes?: Partial<DividerClasses>;\n };\n\nexport type DividerProps = WithDetailedHTMLProps<DividerOwnProps, 'div'>;\n\nexport const Divider: React.FC<DividerProps> = ({\n emphasis = 'normal',\n thickness = 'sm',\n length = 'full',\n style,\n horizontal,\n vertical,\n width,\n height,\n className,\n children,\n ...props\n}) => {\n const orientation = horizontal ? 'horizontal' : 'vertical';\n\n const cssVariables = {\n '--divider-width': width,\n '--divider-height': height,\n } as CSSProperties;\n\n return (\n <div\n data-emphasis={emphasis}\n data-thickness={thickness}\n data-length={length}\n data-orientation={orientation}\n className={classnames(styles[`divider`], 'divider', 'tcn-divider', className)}\n {...props}\n >\n <div\n data-emphasis={emphasis}\n data-thickness={thickness}\n data-length={length}\n data-orientation={orientation}\n style={cssVariables}\n className={classnames(\n styles[`divider-line`],\n 'divider-line',\n 'tcn-divider-line',\n 'material',\n className\n )}\n />\n {children}\n </div>\n );\n};\n"],"names":["Divider","emphasis","thickness","length","style","horizontal","vertical","width","height","className","children","props","orientation","cssVariables","jsxs","classnames","styles","jsx"],"mappings":";;kGAmCaA,IAAkC,CAAC;AAAA,EAC9C,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,QAAAC,IAAS;AAAA,EACT,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAcP,IAAa,eAAe,YAE1CQ,IAAe;AAAA,IACnB,mBAAmBN;AAAA,IACnB,oBAAoBC;AAAA,EAAA;AAGtB,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,iBAAeb;AAAA,MACf,kBAAgBC;AAAA,MAChB,eAAaC;AAAA,MACb,oBAAkBS;AAAA,MAClB,WAAWG,EAAWC,EAAO,SAAY,WAAW,eAAeP,CAAS;AAAA,MAC3E,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,iBAAehB;AAAA,YACf,kBAAgBC;AAAA,YAChB,eAAaC;AAAA,YACb,oBAAkBS;AAAA,YAClB,OAAOC;AAAA,YACP,WAAWE;AAAAA,cACTC,EAAO,cAAc;AAAA,cACrB;AAAA,cACA;AAAA,cACA;AAAA,cACAP;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,QAEDC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HStackProps } from '../../stacks/h_stack.js';
|
|
2
1
|
import { default as React } from 'react';
|
|
2
|
+
import { HStackProps } from '../../stacks/h_stack.js';
|
|
3
3
|
import { Hierarchy, Size } from '../../utils/index.js';
|
|
4
4
|
export interface FooterProps extends Omit<HStackProps, 'as' | 'children'> {
|
|
5
5
|
hierarchy?: Hierarchy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/layouts/footer/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/layouts/footer/footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,MAAM,iFAgBjB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import c from "react";
|
|
3
3
|
import m from "classnames";
|
|
4
|
-
import
|
|
5
|
-
import '../../footer.css';const
|
|
4
|
+
import { HStack as n } from "../../stacks/h_stack.js";
|
|
5
|
+
import '../../footer.css';const i = "_footer_4a43c3e", d = { footer: i }, x = c.forwardRef(function({ hierarchy: o = "secondary", size: r = "md", children: t, className: e, ...a }, s) {
|
|
6
6
|
return /* @__PURE__ */ f(
|
|
7
|
-
|
|
7
|
+
n,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
10
|
as: "footer",
|
|
11
|
-
className: m(d.footer, e, "footer"),
|
|
11
|
+
className: m(d.footer, e, "footer", "tcn-footer"),
|
|
12
12
|
"data-hierarchy": o,
|
|
13
13
|
"data-size": r,
|
|
14
14
|
...a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":["../../../src/layouts/footer/footer.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"footer.js","sources":["../../../src/layouts/footer/footer.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport type { Hierarchy, Size } from '../../utils/index.js';\nimport styles from './footer.module.css';\n\nexport interface FooterProps extends Omit<HStackProps, 'as' | 'children'> {\n hierarchy?: Hierarchy;\n size?: Size;\n children?: React.ReactNode;\n}\n\nexport const Footer = React.forwardRef<HTMLElement, FooterProps>(function Footer(\n { hierarchy = 'secondary', size = 'md', children, className, ...props }: FooterProps,\n ref\n) {\n return (\n <HStack\n ref={ref}\n as=\"footer\"\n className={classNames(styles.footer, className, 'footer', 'tcn-footer')}\n data-hierarchy={hierarchy}\n data-size={size}\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Footer","React","hierarchy","size","children","className","props","ref","jsx","HStack","classNames","styles"],"mappings":";;;;gDAYaA,IAASC,EAAM,WAAqC,SAC/D,EAAE,WAAAC,IAAY,aAAa,MAAAC,IAAO,MAAM,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAChEC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAWG,EAAWC,EAAO,QAAQN,GAAW,UAAU,YAAY;AAAA,MACtE,kBAAgBH;AAAA,MAChB,aAAWC;AAAA,MACV,GAAGG;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HStackProps } from '../../stacks/h_stack.js';
|
|
2
1
|
import { default as React } from 'react';
|
|
2
|
+
import { HStackProps } from '../../stacks/h_stack.js';
|
|
3
3
|
import { Hierarchy, Size } from '../../utils/index.js';
|
|
4
4
|
export interface HeaderProps extends Omit<HStackProps, 'as'> {
|
|
5
5
|
hierarchy?: Hierarchy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/layouts/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/layouts/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAI5D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;IAC1D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,eAAO,MAAM,MAAM,iFAwBjB,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
3
|
import f from "classnames";
|
|
4
|
-
import h from "
|
|
5
|
-
import '../../header.css';const
|
|
4
|
+
import { HStack as h } from "../../stacks/h_stack.js";
|
|
5
|
+
import '../../header.css';const n = "_header_3155fa4", i = { header: n }, x = m.forwardRef(function({
|
|
6
6
|
hierarchy: e = "secondary",
|
|
7
7
|
height: a = "auto",
|
|
8
8
|
children: r,
|
|
9
|
-
className:
|
|
10
|
-
size:
|
|
9
|
+
className: t,
|
|
10
|
+
size: o = "md",
|
|
11
11
|
...s
|
|
12
12
|
}, d) {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
13
|
+
return /* @__PURE__ */ c(
|
|
14
|
+
h,
|
|
15
15
|
{
|
|
16
16
|
ref: d,
|
|
17
17
|
as: "header",
|
|
18
|
-
className: f(
|
|
18
|
+
className: f(i.header, t, "tcn-header", "header"),
|
|
19
19
|
"data-hierarchy": e,
|
|
20
|
-
"data-size":
|
|
20
|
+
"data-size": o,
|
|
21
21
|
height: a,
|
|
22
22
|
...s,
|
|
23
23
|
children: r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../src/layouts/header/header.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../src/layouts/header/header.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\nimport type { Hierarchy, Size } from '../../utils/index.js';\nimport styles from './header.module.css';\n\n// UtilityBar\nexport interface HeaderProps extends Omit<HStackProps, 'as'> {\n hierarchy?: Hierarchy;\n size?: Size;\n}\n\nexport const Header = React.forwardRef<HTMLElement, HeaderProps>(function Header(\n {\n hierarchy = 'secondary',\n height = 'auto',\n children,\n className,\n size = 'md',\n ...props\n }: HeaderProps,\n ref\n) {\n return (\n <HStack\n ref={ref}\n as=\"header\"\n className={classNames(styles.header, className, 'tcn-header', 'header')}\n data-hierarchy={hierarchy}\n data-size={size}\n height={height}\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Header","React","hierarchy","height","children","className","size","props","ref","jsx","HStack","classNames","styles"],"mappings":";;;;gDAYaA,IAASC,EAAM,WAAqC,SAC/D;AAAA,EACE,WAAAC,IAAY;AAAA,EACZ,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAWG,EAAWC,EAAO,QAAQP,GAAW,cAAc,QAAQ;AAAA,MACtE,kBAAgBH;AAAA,MAChB,aAAWI;AAAA,MACX,QAAAH;AAAA,MACC,GAAGI;AAAA,MAEH,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HStackProps } from '../../stacks/h_stack.js';
|
|
2
1
|
import { default as React } from 'react';
|
|
2
|
+
import { HStackProps } from '../../stacks/h_stack.js';
|
|
3
3
|
import { Hierarchy, Size } from '../../utils/index.js';
|
|
4
4
|
export interface UtilityBarProps extends Omit<HStackProps, 'as'> {
|
|
5
5
|
hierarchy?: Hierarchy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility_bar.d.ts","sourceRoot":"","sources":["../../../src/layouts/utility_bar/utility_bar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utility_bar.d.ts","sourceRoot":"","sources":["../../../src/layouts/utility_bar/utility_bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAI5D,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,eAAO,MAAM,UAAU,qFA+BtB,CAAC"}
|