@tcn/ui 0.0.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -3
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +17 -12
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +7 -7
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/actions/button/slim_button/slim_button.js +2 -2
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/button.css +1 -1
- package/dist/draggable.css +1 -0
- package/dist/feedback/progress/progress_bar.js +1 -1
- package/dist/footer.css +1 -1
- package/dist/form/field/common/field_description.js +1 -1
- package/dist/form/field/common/field_error.js +4 -3
- package/dist/form/field/common/field_error.js.map +1 -1
- package/dist/form/field/common/field_label.js +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.js +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +1 -1
- package/dist/inputs/input/input.d.ts +2 -2
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/options/option.d.ts +1 -0
- package/dist/inputs/options/option.d.ts.map +1 -1
- package/dist/inputs/options/option.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +8 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +187 -137
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +23 -18
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +106 -96
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/textarea/textarea.d.ts +2 -2
- package/dist/inputs/textarea/textarea.d.ts.map +1 -1
- package/dist/inputs/textarea/textarea.js.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.map +1 -1
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/index.d.ts +3 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +26 -24
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/list/item.d.ts +1 -0
- package/dist/layouts/list/item.d.ts.map +1 -1
- package/dist/layouts/list/item.js +17 -6
- package/dist/layouts/list/item.js.map +1 -1
- package/dist/layouts/list/list.js +10 -10
- package/dist/layouts/list/list.js.map +1 -1
- package/dist/overlay/context_menu/context_menu.js +4 -4
- package/dist/overlay/frame/frame.d.ts +11 -0
- package/dist/overlay/frame/frame.d.ts.map +1 -0
- package/dist/overlay/frame/frame.js +18 -0
- package/dist/overlay/frame/frame.js.map +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.d.ts.map +1 -1
- package/dist/overlay/index.js +5 -3
- package/dist/overlay/index.js.map +1 -1
- package/dist/overlay/popper/popper.js +12 -12
- package/dist/{portal-qqIp4SIl.js → overlay/portal/portal.js} +3 -3
- package/dist/overlay/portal/portal.js.map +1 -0
- package/dist/overlay/portal/portal_platform.js +3 -4
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stacks/box/box.d.ts +1 -1
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/surfaces/card/card.d.ts.map +1 -1
- package/dist/surfaces/card/card.js +7 -16
- package/dist/surfaces/card/card.js.map +1 -1
- package/dist/surfaces/confirm/confirm.js +4 -4
- package/dist/surfaces/index.d.ts +2 -2
- package/dist/surfaces/index.d.ts.map +1 -1
- package/dist/surfaces/index.js +22 -22
- package/dist/surfaces/modal/modal.d.ts +3 -2
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +14 -13
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/window/window.d.ts +3 -2
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +17 -7
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/index.js +6 -141
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/stylesheets/reset.js +140 -0
- package/dist/themes/stylesheets/reset.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +664 -0
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -0
- package/dist/tokens/bubble/bubble.js +17 -16
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +9 -8
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/typography/title/title.d.ts +2 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +24 -23
- package/dist/typography/title/title.js.map +1 -1
- package/dist/utils/dnd/context.d.ts +4 -0
- package/dist/utils/dnd/context.d.ts.map +1 -0
- package/dist/utils/dnd/context.js +20 -0
- package/dist/utils/dnd/context.js.map +1 -0
- package/dist/utils/dnd/draggable/draggable.d.ts +7 -0
- package/dist/utils/dnd/draggable/draggable.d.ts.map +1 -0
- package/dist/utils/dnd/draggable/draggable.js +27 -0
- package/dist/utils/dnd/draggable/draggable.js.map +1 -0
- package/dist/utils/dnd/handle.d.ts +6 -0
- package/dist/utils/dnd/handle.d.ts.map +1 -0
- package/dist/utils/dnd/handle.js +22 -0
- package/dist/utils/dnd/handle.js.map +1 -0
- package/dist/utils/dnd/hooks/use_drag_container.d.ts +7 -0
- package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -0
- package/dist/utils/dnd/hooks/use_drag_container.js +30 -0
- package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -0
- package/dist/utils/{hooks → dnd/hooks}/use_draggable.d.ts +3 -3
- package/dist/utils/dnd/hooks/use_draggable.d.ts.map +1 -0
- package/dist/utils/dnd/hooks/use_draggable.js +41 -0
- package/dist/utils/dnd/hooks/use_draggable.js.map +1 -0
- package/dist/utils/dnd/types.d.ts +10 -0
- package/dist/utils/dnd/types.d.ts.map +1 -0
- package/dist/utils/dnd/types.js +2 -0
- package/dist/utils/dnd/types.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +9 -3
- package/src/actions/button/base_button/base_button.tsx +7 -2
- package/src/actions/button/button/button.module.css +0 -78
- package/src/actions/button/button/button.tsx +2 -4
- package/src/actions/button/slim_button/slim_button.module.css +0 -26
- package/src/actions/button/slim_button/slim_button.tsx +1 -1
- package/src/inputs/input/input.tsx +3 -2
- package/src/inputs/options/option.tsx +1 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +12 -0
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +8 -0
- package/src/inputs/phone_number_input/phone_number_input.tsx +107 -21
- package/src/inputs/suggestions/suggestion_item.tsx +12 -2
- package/src/inputs/suggestions/suggestion_list.tsx +22 -3
- package/src/inputs/textarea/textarea.tsx +2 -2
- package/src/layouts/footer/footer.module.css +0 -1
- package/src/layouts/footer/footer.tsx +1 -1
- package/src/layouts/header/header.tsx +0 -1
- package/src/layouts/index.ts +3 -2
- package/src/layouts/list/item.tsx +10 -2
- package/src/layouts/list/list.tsx +2 -2
- package/src/overlay/frame/frame.stories.tsx +40 -0
- package/src/overlay/frame/frame.tsx +34 -0
- package/src/overlay/frame/frame_stories.module.css +14 -0
- package/src/overlay/index.ts +1 -0
- package/src/stacks/box/box.tsx +8 -2
- package/src/surfaces/card/card.tsx +2 -8
- package/src/surfaces/index.ts +2 -2
- package/src/surfaces/modal/__stories__/modal.stories.tsx +19 -27
- package/src/surfaces/modal/modal.tsx +13 -10
- package/src/surfaces/panel/__stories__/panel.stories.tsx +13 -12
- package/src/surfaces/window/window.stories.tsx +37 -4
- package/src/surfaces/window/window.tsx +14 -6
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +34 -0
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_material_picker.tsx +52 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_card.module.css +5 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +40 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +83 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/types.ts +7 -0
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +154 -0
- package/src/themes/themes/ergo/__stories__/sb_materials.module.css +110 -0
- package/src/themes/themes/ergo/__stories__/utils.ts +92 -0
- package/src/themes/themes/ergo/ergo_theme.css +358 -26
- package/src/typography/title/title.tsx +23 -19
- package/src/utils/dnd/__stories__/draggable.stories.tsx +48 -0
- package/src/utils/dnd/__stories__/draggable_stories.module.css +21 -0
- package/src/utils/{__stories__ → dnd/__stories__}/use_draggable.stories.tsx +15 -10
- package/src/utils/dnd/context.ts +24 -0
- package/src/utils/dnd/draggable/draggable.module.css +8 -0
- package/src/utils/dnd/draggable/draggable.tsx +42 -0
- package/src/utils/dnd/handle.tsx +32 -0
- package/src/utils/dnd/hooks/use_drag_container.ts +42 -0
- package/src/utils/{hooks → dnd/hooks}/use_draggable.ts +23 -17
- package/src/utils/dnd/types.ts +6 -0
- package/src/utils/index.ts +1 -1
- package/tsconfig.json +0 -3
- package/dist/card.css +0 -1
- package/dist/portal-qqIp4SIl.js.map +0 -1
- package/dist/themes/stylesheets/reset.css +0 -1
- package/dist/themes/themes/ergo/ergo_theme.css +0 -1
- package/dist/themes/themes/windows_98/windows_98.css +0 -1
- package/dist/title.module-B16de2jd.js +0 -5
- package/dist/title.module-B16de2jd.js.map +0 -1
- package/dist/utils/hooks/use_draggable.d.ts.map +0 -1
- package/dist/utils/hooks/use_draggable.js +0 -30
- package/dist/utils/hooks/use_draggable.js.map +0 -1
- package/src/surfaces/card/card.module.css +0 -5
- /package/dist/{overlay/portal/portal.css → portal_platform.css} +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
# @tcn/ui
|
|
2
2
|
|
|
3
|
+
A comprehensive React component library providing a complete set of UI components for building modern web applications.
|
|
3
4
|
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`@tcn/ui` is the main UI component package in the Blackcat design system. It provides a unified API with organized sub-exports for different component categories.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Import components from the main package or use sub-exports for better tree-shaking:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
// Use sub-exports for better tree-shaking
|
|
15
|
+
import { Button } from '@tcn/ui/actions';
|
|
16
|
+
import { Input } from '@tcn/ui/inputs';
|
|
17
|
+
import { VStack } from '@tcn/ui/stacks';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Available Sub-exports
|
|
21
|
+
|
|
22
|
+
- **`@tcn/ui/actions`** - Buttons, button groups, and action elements
|
|
23
|
+
- **`@tcn/ui/inputs`** - Text inputs, selects, date pickers, checkboxes, switches, and more
|
|
24
|
+
- **`@tcn/ui/form`** - Form fields, field sets, and form components
|
|
25
|
+
- **`@tcn/ui/layouts`** - Grid, columns, lists, headers, footers, and page structure
|
|
26
|
+
- **`@tcn/ui/stacks`** - Horizontal, vertical, and z-stack components
|
|
27
|
+
- **`@tcn/ui/overlay`** - Modals, tooltips, popovers, menus, and portals
|
|
28
|
+
- **`@tcn/ui/feedback`** - Loading indicators and progress bars
|
|
29
|
+
- **`@tcn/ui/surfaces`** - Cards, panels, drawers, modals, and windows
|
|
30
|
+
- **`@tcn/ui/typography`** - Text components, headings, and typography utilities
|
|
31
|
+
- **`@tcn/ui/tokens`** - Badges, bubbles, and chips
|
|
32
|
+
- **`@tcn/ui/themes`** - Theme system and preconfigured themes
|
|
33
|
+
- **`@tcn/ui/utils`** - Utility functions, hooks, and helpers
|
|
34
|
+
- **`@tcn/ui/dnd`** - Drag and drop utilities
|
|
4
35
|
|
|
5
36
|
## Scripts
|
|
6
37
|
|
|
7
|
-
- build
|
|
8
|
-
- storybook
|
|
9
|
-
- test
|
|
38
|
+
- **build**: `pnpm ws ui build` - Build the package
|
|
39
|
+
- **storybook**: `pnpm ws ui start` - Start Storybook development server
|
|
40
|
+
- **test**: `pnpm ws ui test` - Run tests
|
|
41
|
+
- **check-all**: `pnpm ws ui check-all` - Run all checks (types, lint, format)
|
|
42
|
+
|
|
43
|
+
## Development
|
|
10
44
|
|
|
45
|
+
Each component category is organized in its own directory under `src/` with its own index file for clean sub-exports. The package uses Vite for building and Storybook for component documentation.
|
|
11
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_button.d.ts","sourceRoot":"","sources":["../../../../src/actions/button/base_button/base_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GACvD,cAAc,GAAG;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AAExF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"base_button.d.ts","sourceRoot":"","sources":["../../../../src/actions/button/base_button/base_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GACvD,cAAc,GAAG;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,wBAAwB,EAAE,QAAQ,CAAC,CAAC;AAExF,eAAO,MAAM,UAAU,wGAgEtB,CAAC"}
|
|
@@ -2,24 +2,24 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { clsx as B } from "clsx";
|
|
4
4
|
import { HStack as p } from "../../../stacks/h_stack.js";
|
|
5
|
-
import '../../../base_button.css';const y = "_base-button_d33aa84", x = { "base-button": y },
|
|
5
|
+
import '../../../base_button.css';const y = "_base-button_d33aa84", x = { "base-button": y }, R = h.forwardRef(
|
|
6
6
|
function({
|
|
7
7
|
children: s,
|
|
8
|
-
className:
|
|
8
|
+
className: i,
|
|
9
9
|
style: l,
|
|
10
|
-
color:
|
|
11
|
-
hierarchy:
|
|
12
|
-
size: c = "
|
|
13
|
-
onTouchStart:
|
|
10
|
+
color: n,
|
|
11
|
+
hierarchy: u = "secondary",
|
|
12
|
+
size: c = "md",
|
|
13
|
+
onTouchStart: e,
|
|
14
14
|
onContextMenu: a,
|
|
15
15
|
...o
|
|
16
16
|
}, b) {
|
|
17
17
|
const d = (t) => {
|
|
18
|
-
if (
|
|
18
|
+
if (e == null) {
|
|
19
19
|
t.preventDefault();
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
e(t);
|
|
23
23
|
}, f = (t) => {
|
|
24
24
|
if (a == null) {
|
|
25
25
|
t.preventDefault();
|
|
@@ -29,7 +29,7 @@ import '../../../base_button.css';const y = "_base-button_d33aa84", x = { "base-
|
|
|
29
29
|
}, r = {
|
|
30
30
|
...l
|
|
31
31
|
};
|
|
32
|
-
return
|
|
32
|
+
return n && (r["--button-color"] = n), /* @__PURE__ */ m(
|
|
33
33
|
p,
|
|
34
34
|
{
|
|
35
35
|
ref: b,
|
|
@@ -37,10 +37,15 @@ import '../../../base_button.css';const y = "_base-button_d33aa84", x = { "base-
|
|
|
37
37
|
inline: !0,
|
|
38
38
|
vAlign: "center",
|
|
39
39
|
hAlign: "center",
|
|
40
|
-
"data-hierarchy":
|
|
40
|
+
"data-hierarchy": u,
|
|
41
41
|
"data-size": c,
|
|
42
42
|
"data-is-disabled": !!o.disabled,
|
|
43
|
-
className: B(
|
|
43
|
+
className: B(
|
|
44
|
+
x["base-button"],
|
|
45
|
+
"tcn-interactive",
|
|
46
|
+
"tcn-base-button",
|
|
47
|
+
i
|
|
48
|
+
),
|
|
44
49
|
style: r,
|
|
45
50
|
onTouchStart: d,
|
|
46
51
|
onContextMenu: f,
|
|
@@ -51,6 +56,6 @@ import '../../../base_button.css';const y = "_base-button_d33aa84", x = { "base-
|
|
|
51
56
|
}
|
|
52
57
|
);
|
|
53
58
|
export {
|
|
54
|
-
|
|
59
|
+
R as BaseButton
|
|
55
60
|
};
|
|
56
61
|
//# sourceMappingURL=base_button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base_button.js","sources":["../../../../src/actions/button/base_button/base_button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport type { Hierarchy, Size } from '../../../utils/index.js';\nimport { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport styles from './base_button.module.css';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\n\nexport interface BaseButtonOwnProps {\n hierarchy?: Hierarchy;\n size?: Size;\n color?: string;\n}\n\nexport type BaseButtonWithStackProps = BaseButtonOwnProps &\n HStackOwnProps & {\n children?: React.ReactNode;\n };\n\nexport type BaseButtonProps = WithDetailedHTMLProps<BaseButtonWithStackProps, 'button'>;\n\nexport const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(\n function BaseButton(\n {\n children,\n className,\n style,\n color,\n hierarchy = 'secondary',\n size = '
|
|
1
|
+
{"version":3,"file":"base_button.js","sources":["../../../../src/actions/button/base_button/base_button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport type { Hierarchy, Size } from '../../../utils/index.js';\nimport { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport styles from './base_button.module.css';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\n\nexport interface BaseButtonOwnProps {\n hierarchy?: Hierarchy;\n size?: Size;\n color?: string;\n}\n\nexport type BaseButtonWithStackProps = BaseButtonOwnProps &\n HStackOwnProps & {\n children?: React.ReactNode;\n };\n\nexport type BaseButtonProps = WithDetailedHTMLProps<BaseButtonWithStackProps, 'button'>;\n\nexport const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(\n function BaseButton(\n {\n children,\n className,\n style,\n color,\n hierarchy = 'secondary',\n size = 'md',\n onTouchStart,\n onContextMenu,\n ...props\n },\n ref\n ) {\n const handleTouchStart = (event: React.TouchEvent<HTMLButtonElement>) => {\n if (onTouchStart == null) {\n event.preventDefault();\n return;\n }\n onTouchStart(event);\n };\n\n const handleContextMenu = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onContextMenu == null) {\n event.preventDefault();\n return;\n }\n onContextMenu(event);\n };\n\n const finalStyle: React.CSSProperties = {\n ...style,\n };\n\n if (color) {\n finalStyle['--button-color'] = color;\n }\n\n return (\n <HStack\n ref={ref}\n as=\"button\"\n inline\n vAlign=\"center\"\n hAlign=\"center\"\n data-hierarchy={hierarchy}\n data-size={size}\n data-is-disabled={Boolean(props.disabled)}\n className={clsx(\n styles['base-button'],\n 'tcn-interactive',\n 'tcn-base-button',\n className\n )}\n style={finalStyle}\n onTouchStart={handleTouchStart}\n onContextMenu={handleContextMenu}\n {...props}\n >\n {children}\n </HStack>\n );\n }\n);\n"],"names":["BaseButton","React","children","className","style","color","hierarchy","size","onTouchStart","onContextMenu","props","ref","handleTouchStart","event","handleContextMenu","finalStyle","jsx","HStack","clsx","styles"],"mappings":";;;;4DAqBaA,IAAaC,EAAM;AAAA,EAC9B,SACE;AAAA,IACE,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AACA,UAAMC,IAAmB,CAACC,MAA+C;AACvE,UAAIL,KAAgB,MAAM;AACxB,QAAAK,EAAM,eAAA;AACN;AAAA,MACF;AACA,MAAAL,EAAaK,CAAK;AAAA,IACpB,GAEMC,IAAoB,CAACD,MAA+C;AACxE,UAAIJ,KAAiB,MAAM;AACzB,QAAAI,EAAM,eAAA;AACN;AAAA,MACF;AACA,MAAAJ,EAAcI,CAAK;AAAA,IACrB,GAEME,IAAkC;AAAA,MACtC,GAAGX;AAAA,IAAA;AAGL,WAAIC,MACFU,EAAW,gBAAgB,IAAIV,IAI/B,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,IAAG;AAAA,QACH,QAAM;AAAA,QACN,QAAO;AAAA,QACP,QAAO;AAAA,QACP,kBAAgBL;AAAA,QAChB,aAAWC;AAAA,QACX,oBAAkB,EAAQG,EAAM;AAAA,QAChC,WAAWQ;AAAA,UACTC,EAAO,aAAa;AAAA,UACpB;AAAA,UACA;AAAA,UACAhB;AAAA,QAAA;AAAA,QAEF,OAAOY;AAAA,QACP,cAAcH;AAAA,QACd,eAAeE;AAAA,QACd,GAAGJ;AAAA,QAEH,UAAAR;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,oGAiBjB,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import c from "react";
|
|
3
3
|
import { clsx as n } from "clsx";
|
|
4
|
-
import { BaseButton as
|
|
5
|
-
import '../../../button.css';const f = "_button_fd354ec", m = "_button-text_5989b5f",
|
|
4
|
+
import { BaseButton as b } from "../base_button/base_button.js";
|
|
5
|
+
import '../../../button.css';const f = "_button_fd354ec", m = "_button-text_5989b5f", s = { button: f, "button-text": m }, _ = c.forwardRef(function({ children: t, className: e, ...u }, r) {
|
|
6
6
|
return /* @__PURE__ */ o(
|
|
7
|
-
|
|
7
|
+
b,
|
|
8
8
|
{
|
|
9
9
|
ref: r,
|
|
10
|
-
className: n(
|
|
11
|
-
...
|
|
12
|
-
children: typeof t == "string" ? /* @__PURE__ */ o("span", { className: n(
|
|
10
|
+
className: n(s.button, "tcn-button", e),
|
|
11
|
+
...u,
|
|
12
|
+
children: typeof t == "string" ? /* @__PURE__ */ o("span", { className: n(s["button-text"], "tcn-button-text"), children: t }) : t
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../src/actions/button/button/button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\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={clsx(styles.button, '
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../src/actions/button/button/button.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\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={clsx(styles.button, 'tcn-button', className)}\n {...props}\n >\n {typeof children === 'string' ? (\n <span className={clsx(styles['button-text'], 'tcn-button-text')}>{children}</span>\n ) : (\n children\n )}\n </BaseButton>\n );\n});\n"],"names":["Button","React","children","className","props","ref","jsx","BaseButton","clsx","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,EAAKC,EAAO,QAAQ,cAAcN,CAAS;AAAA,MACrD,GAAGC;AAAA,MAEH,UAAA,OAAOF,KAAa,WACnB,gBAAAI,EAAC,QAAA,EAAK,WAAWE,EAAKC,EAAO,aAAa,GAAG,iBAAiB,GAAI,UAAAP,GAAS,IAE3EA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -2,12 +2,12 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import n from "react";
|
|
3
3
|
import { Button as i } from "../button/button.js";
|
|
4
4
|
import { clsx as l } from "clsx";
|
|
5
|
-
import '../../../slim_button.css';const
|
|
5
|
+
import '../../../slim_button.css';const c = "_slim-button_188fdc3", u = { "slim-button": c }, b = n.forwardRef(
|
|
6
6
|
({ children: t, className: o, ...m }, s) => /* @__PURE__ */ r(
|
|
7
7
|
i,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
|
-
className: l(
|
|
10
|
+
className: l(u["slim-button"], "tcn-slim-button", o),
|
|
11
11
|
...m,
|
|
12
12
|
children: t
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slim_button.js","sources":["../../../../src/actions/button/slim_button/slim_button.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, ButtonProps } from '../button/button.js';\nimport { clsx } from 'clsx';\n// Styles\nimport styles from './slim_button.module.css';\n\nexport const SlimButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n className={clsx(styles['slim-button'], 'slim-button', className)}\n {...props}\n >\n {children}\n </Button>\n );\n }\n);\n"],"names":["SlimButton","React","children","className","props","ref","jsx","Button","clsx","styles"],"mappings":";;;;4DAMaA,IAAaC,EAAM;AAAA,EAC9B,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEhC,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG,EAAKC,EAAO,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"slim_button.js","sources":["../../../../src/actions/button/slim_button/slim_button.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, ButtonProps } from '../button/button.js';\nimport { clsx } from 'clsx';\n// Styles\nimport styles from './slim_button.module.css';\n\nexport const SlimButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, className, ...props }, ref) => {\n return (\n <Button\n ref={ref}\n className={clsx(styles['slim-button'], 'tcn-slim-button', className)}\n {...props}\n >\n {children}\n </Button>\n );\n }\n);\n"],"names":["SlimButton","React","children","className","props","ref","jsx","Button","clsx","styles"],"mappings":";;;;4DAMaA,IAAaC,EAAM;AAAA,EAC9B,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEhC,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,WAAWG,EAAKC,EAAO,aAAa,GAAG,mBAAmBN,CAAS;AAAA,MAClE,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAIT;"}
|
package/dist/button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._button_fd354ec{--button-height: calc(26px * var(--scalar, 1));--button-color: var(--accent-color);--button-color-hover: color-mix(in srgb, var(--button-color) 90%, black);--button-color-active: color-mix(in srgb, var(--button-color) 75%, black);--button-color-disabled: var(--status-disabled, #cccccc);min-height:var(--button-height);
|
|
1
|
+
._button_fd354ec{--button-height: calc(26px * var(--scalar, 1));--button-color: var(--accent-color);--button-color-hover: color-mix(in srgb, var(--button-color) 90%, black);--button-color-active: color-mix(in srgb, var(--button-color) 75%, black);--button-color-disabled: var(--status-disabled, #cccccc);min-height:var(--button-height);width:auto;cursor:pointer;font-size:calc(14px * var(--scalar, 1));line-height:calc(16px * var(--scalar, 1))}._button_fd354ec[data-size=sm]{--button-height: calc(22px * var(--scalar, 1))}._button_fd354ec[data-size=md]{--button-height: calc(26px * var(--scalar, 1))}._button_fd354ec[data-size=lg]{--button-height: calc(32px * var(--scalar, 1))}._button_fd354ec[data-size=sm] ._button-text_5989b5f{font-size:calc(12px * var(--scalar, 1))}._button_fd354ec[data-size=md] ._button-text_5989b5f{font-size:calc(14px * var(--scalar, 1))}._button_fd354ec[data-size=lg] ._button-text_5989b5f{font-size:calc(16px * var(--scalar, 1))}._button_fd354ec[data-size=sm]{font-size:calc(12px * var(--scalar, 1))}._button_fd354ec[data-size=md]{font-size:calc(14px * var(--scalar, 1))}._button_fd354ec[data-size=lg]{font-size:calc(16px * var(--scalar, 1))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._draggable_db40376{position:relative}._draggable_db40376[data-is-draggable=true]{left:var(--position-x);top:var(--position-y)}
|
|
@@ -7,7 +7,7 @@ import "../../caption.module-DDq0H4xZ.js";
|
|
|
7
7
|
import "../../footnote.module-DEyFuqOr.js";
|
|
8
8
|
import "../../headline.module-BiwHBtGf.js";
|
|
9
9
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
10
|
-
import "../../title.
|
|
10
|
+
import "../../typography/title/title.js";
|
|
11
11
|
import { HStack as l } from "../../stacks/h_stack.js";
|
|
12
12
|
import { Spacer as a } from "../../stacks/spacer.js";
|
|
13
13
|
import { VStack as d } from "../../stacks/v_stack.js";
|
package/dist/footer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._footer_4a43c3e{width:100%;min-height:0;
|
|
1
|
+
._footer_4a43c3e{width:100%;min-height:0;padding:var(--padding) var(--padding-large);gap:var(--gap)}._footer_4a43c3e[data-kind=app],._footer_4a43c3e[data-kind=nav],._footer_4a43c3e[data-kind=toolbar],._footer_4a43c3e[data-kind=window],._footer_4a43c3e[data-kind=status]{position:relative}
|
|
@@ -6,7 +6,7 @@ import "../../../caption.module-DDq0H4xZ.js";
|
|
|
6
6
|
import "../../../footnote.module-DEyFuqOr.js";
|
|
7
7
|
import "../../../headline.module-BiwHBtGf.js";
|
|
8
8
|
import "../../../subheadline.module-C-v7zMkQ.js";
|
|
9
|
-
import "../../../title.
|
|
9
|
+
import "../../../typography/title/title.js";
|
|
10
10
|
const y = ({ children: r, id: t }) => r ? typeof r == "string" ? /* @__PURE__ */ o(
|
|
11
11
|
i,
|
|
12
12
|
{
|
|
@@ -6,12 +6,13 @@ import "../../../caption.module-DDq0H4xZ.js";
|
|
|
6
6
|
import "../../../footnote.module-DEyFuqOr.js";
|
|
7
7
|
import "../../../headline.module-BiwHBtGf.js";
|
|
8
8
|
import "../../../subheadline.module-C-v7zMkQ.js";
|
|
9
|
-
import "../../../title.
|
|
9
|
+
import "../../../typography/title/title.js";
|
|
10
10
|
import { theme as i } from "../../../themes/theme_variables.js";
|
|
11
11
|
import "react";
|
|
12
|
+
import "../../../themes/stylesheets/reset.js";
|
|
12
13
|
import { AdornmentMap as s } from "./status_input/status_input.js";
|
|
13
14
|
import { HStack as p } from "../../../stacks/h_stack.js";
|
|
14
|
-
const
|
|
15
|
+
const v = ({ children: r }) => {
|
|
15
16
|
if (!r) return null;
|
|
16
17
|
let t = r;
|
|
17
18
|
return typeof r == "string" && (t = /* @__PURE__ */ o(
|
|
@@ -29,6 +30,6 @@ const k = ({ children: r }) => {
|
|
|
29
30
|
] });
|
|
30
31
|
};
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
v as FieldErrorMessage
|
|
33
34
|
};
|
|
34
35
|
//# sourceMappingURL=field_error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field_error.js","sources":["../../../../src/form/field/common/field_error.tsx"],"sourcesContent":["import React from 'react';\nimport { BodyText } from '../../../typography/index.js';\nimport { theme } from '../../../themes/index.js';\nimport { AdornmentMap } from './status_input/status_input.js';\nimport { HStack } from '../../../stacks/h_stack.js';\n\nexport interface FieldErrorMessageOwnProps {\n children?: React.ReactNode | string;\n}\n\nexport const FieldErrorMessage = ({ children }: FieldErrorMessageOwnProps) => {\n if (!children) return null;\n let finalChildren = children;\n\n if (typeof children === 'string') {\n finalChildren = (\n <BodyText\n breakWords\n size=\"sm\"\n className=\"field-error-message\"\n color={theme.statusColors.error}\n >\n {children}\n </BodyText>\n );\n }\n\n return (\n <HStack hAlign=\"end\" gap={theme.gap.md}>\n {finalChildren}\n {/* This is a hack to get the adornment to align with the text */}\n <div style={{ visibility: 'hidden' }}>\n <AdornmentMap state=\"error\" />\n </div>\n </HStack>\n );\n};\n"],"names":["FieldErrorMessage","children","finalChildren","jsx","BodyText","theme","HStack","AdornmentMap"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field_error.js","sources":["../../../../src/form/field/common/field_error.tsx"],"sourcesContent":["import React from 'react';\nimport { BodyText } from '../../../typography/index.js';\nimport { theme } from '../../../themes/index.js';\nimport { AdornmentMap } from './status_input/status_input.js';\nimport { HStack } from '../../../stacks/h_stack.js';\n\nexport interface FieldErrorMessageOwnProps {\n children?: React.ReactNode | string;\n}\n\nexport const FieldErrorMessage = ({ children }: FieldErrorMessageOwnProps) => {\n if (!children) return null;\n let finalChildren = children;\n\n if (typeof children === 'string') {\n finalChildren = (\n <BodyText\n breakWords\n size=\"sm\"\n className=\"field-error-message\"\n color={theme.statusColors.error}\n >\n {children}\n </BodyText>\n );\n }\n\n return (\n <HStack hAlign=\"end\" gap={theme.gap.md}>\n {finalChildren}\n {/* This is a hack to get the adornment to align with the text */}\n <div style={{ visibility: 'hidden' }}>\n <AdornmentMap state=\"error\" />\n </div>\n </HStack>\n );\n};\n"],"names":["FieldErrorMessage","children","finalChildren","jsx","BodyText","theme","HStack","AdornmentMap"],"mappings":";;;;;;;;;;;;;;AAUO,MAAMA,IAAoB,CAAC,EAAE,UAAAC,QAA0C;AAC5E,MAAI,CAACA,EAAU,QAAO;AACtB,MAAIC,IAAgBD;AAEpB,SAAI,OAAOA,KAAa,aACtBC,IACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,MAAK;AAAA,MACL,WAAU;AAAA,MACV,OAAOC,EAAM,aAAa;AAAA,MAEzB,UAAAJ;AAAA,IAAA;AAAA,EAAA,sBAMJK,GAAA,EAAO,QAAO,OAAM,KAAKD,EAAM,IAAI,IACjC,UAAA;AAAA,IAAAH;AAAA,IAED,gBAAAC,EAAC,OAAA,EAAI,OAAO,EAAE,YAAY,SAAA,GACxB,UAAA,gBAAAA,EAACI,GAAA,EAAa,OAAM,QAAA,CAAQ,EAAA,CAC9B;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -6,7 +6,7 @@ import "../../../caption.module-DDq0H4xZ.js";
|
|
|
6
6
|
import "../../../footnote.module-DEyFuqOr.js";
|
|
7
7
|
import "../../../headline.module-BiwHBtGf.js";
|
|
8
8
|
import "../../../subheadline.module-C-v7zMkQ.js";
|
|
9
|
-
import "../../../title.
|
|
9
|
+
import "../../../typography/title/title.js";
|
|
10
10
|
const x = ({ children: r, id: e, required: i }) => r ? typeof r == "string" ? /* @__PURE__ */ o(
|
|
11
11
|
t,
|
|
12
12
|
{
|
|
@@ -7,7 +7,7 @@ import "../../caption.module-DDq0H4xZ.js";
|
|
|
7
7
|
import "../../footnote.module-DEyFuqOr.js";
|
|
8
8
|
import "../../headline.module-BiwHBtGf.js";
|
|
9
9
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
10
|
-
import "../../title.
|
|
10
|
+
import "../../typography/title/title.js";
|
|
11
11
|
import { ZStack as M } from "../../stacks/z_stack.js";
|
|
12
12
|
import '../../date_picker_date.css';const B = "_date-picker-date_38d540e", _ = "_date-picker-today_af9d1ab", k = { "date-picker-date": B, "date-picker-today": _ };
|
|
13
13
|
function C({ presenter: i, date: t }) {
|
|
@@ -6,7 +6,7 @@ import "../../caption.module-DDq0H4xZ.js";
|
|
|
6
6
|
import "../../footnote.module-DEyFuqOr.js";
|
|
7
7
|
import { Headline as m } from "../../typography/headline/headline.js";
|
|
8
8
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
9
|
-
import "../../title.
|
|
9
|
+
import "../../typography/title/title.js";
|
|
10
10
|
import { ZStack as p } from "../../stacks/z_stack.js";
|
|
11
11
|
import { useMemo as s } from "react";
|
|
12
12
|
import '../../date_picker_day.css';const c = "_date-picker-day_2945845", r = { "date-picker-day": c };
|
|
@@ -14,7 +14,7 @@ import "../../caption.module-DDq0H4xZ.js";
|
|
|
14
14
|
import "../../footnote.module-DEyFuqOr.js";
|
|
15
15
|
import "../../headline.module-BiwHBtGf.js";
|
|
16
16
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
17
|
-
import "../../title.
|
|
17
|
+
import "../../typography/title/title.js";
|
|
18
18
|
import { ClockIcon as j } from "@tcn/icons/clock_icon.js";
|
|
19
19
|
import '../../date_picker_time_selector.css';const z = "_time-box_f3145be", P = "_time-box-title_6cc801b", Z = "_time-box-title-container_22add52", v = "_selected-time_33e3aa3", s = { "time-box": z, "time-box-title": P, "time-box-title-container": Z, "selected-time": v };
|
|
20
20
|
function it({
|
|
@@ -19,7 +19,7 @@ import "../../caption.module-DDq0H4xZ.js";
|
|
|
19
19
|
import "../../footnote.module-DEyFuqOr.js";
|
|
20
20
|
import { Headline as M } from "../../typography/headline/headline.js";
|
|
21
21
|
import "../../subheadline.module-C-v7zMkQ.js";
|
|
22
|
-
import "../../title.
|
|
22
|
+
import "../../typography/title/title.js";
|
|
23
23
|
import { FocusRedirect as T } from "../../utils/focus_redirect.js";
|
|
24
24
|
import "../../utils/click_away_listener.js";
|
|
25
25
|
import "../../utils/scroll_away_listener.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { default as React,
|
|
2
|
-
export interface InputProps extends Omit<
|
|
1
|
+
import { default as React, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
3
|
type?: React.HTMLInputTypeAttribute;
|
|
4
4
|
width?: string;
|
|
5
5
|
height?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/inputs/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/inputs/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjF;AAED,eAAO,MAAM,KAAK,qFAkBhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../src/inputs/input/input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../src/inputs/input/input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { InputHTMLAttributes } from 'react';\nimport styles from './input.module.css';\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n type?: React.HTMLInputTypeAttribute;\n width?: string;\n height?: string;\n value?: string;\n disabled?: boolean;\n min?: string;\n max?: string;\n placeholder?: string;\n onChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const Input = React.forwardRef(function Input(\n { type = 'text', style, className, width, height, onChange, ...props }: InputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n return (\n <input\n className={clsx(styles.input, className, 'input')}\n type={type}\n ref={ref}\n data-is-disabled={props.disabled || false}\n aria-disabled={props.disabled || false}\n onChange={e => {\n onChange && onChange(e.currentTarget.value, e);\n }}\n {...props}\n style={{ width, height, ...style }}\n />\n );\n});\n"],"names":["Input","React","type","style","className","width","height","onChange","props","ref","jsx","clsx","styles"],"mappings":";;;8CAkBaA,IAAQC,EAAM,WAAW,SACpC,EAAE,MAAAC,IAAO,QAAQ,OAAAC,GAAO,WAAAC,GAAW,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAA,GAC/DC,GACA;AACA,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,OAAOR,GAAW,OAAO;AAAA,MAChD,MAAAF;AAAA,MACA,KAAAO;AAAA,MACA,oBAAkBD,EAAM,YAAY;AAAA,MACpC,iBAAeA,EAAM,YAAY;AAAA,MACjC,UAAU,CAAA,MAAK;AACb,QAAAD,KAAYA,EAAS,EAAE,cAAc,OAAO,CAAC;AAAA,MAC/C;AAAA,MACC,GAAGC;AAAA,MACJ,OAAO,EAAE,OAAAH,GAAO,QAAAC,GAAQ,GAAGH,EAAA;AAAA,IAAM;AAAA,EAAA;AAGvC,CAAC;"}
|
|
@@ -6,6 +6,7 @@ export interface OptionProps {
|
|
|
6
6
|
keywords?: string[];
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
obfuscate?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare function Option({ children }: OptionProps): number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
11
12
|
//# sourceMappingURL=option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/inputs/options/option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/inputs/options/option.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,6GAS/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.js","sources":["../../../src/inputs/options/option.tsx"],"sourcesContent":["import { HStack } from '../../stacks/h_stack.js';\nimport { BodyText } from '../../typography/body_text/body_text.js';\nimport React from 'react';\n\nexport interface OptionProps {\n children: React.ReactNode;\n value: string;\n label?: string;\n keywords?: string[];\n selected?: boolean;\n disabled?: boolean;\n}\n\nexport function Option({ children }: OptionProps) {\n if (typeof children === 'string') {\n return (\n <HStack hAlign=\"start\" padding=\"4px\" height=\"auto\">\n <BodyText size=\"lg\">{children}</BodyText>\n </HStack>\n );\n }\n return children;\n}\n"],"names":["Option","children","jsx","HStack","BodyText"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"option.js","sources":["../../../src/inputs/options/option.tsx"],"sourcesContent":["import { HStack } from '../../stacks/h_stack.js';\nimport { BodyText } from '../../typography/body_text/body_text.js';\nimport React from 'react';\n\nexport interface OptionProps {\n children: React.ReactNode;\n value: string;\n label?: string;\n keywords?: string[];\n selected?: boolean;\n disabled?: boolean;\n obfuscate?: boolean;\n}\n\nexport function Option({ children }: OptionProps) {\n if (typeof children === 'string') {\n return (\n <HStack hAlign=\"start\" padding=\"4px\" height=\"auto\">\n <BodyText size=\"lg\">{children}</BodyText>\n </HStack>\n );\n }\n return children;\n}\n"],"names":["Option","children","jsx","HStack","BodyText"],"mappings":";;;AAcO,SAASA,EAAO,EAAE,UAAAC,KAAyB;AAChD,SAAI,OAAOA,KAAa,WAEpB,gBAAAC,EAACC,GAAA,EAAO,QAAO,SAAQ,SAAQ,OAAM,QAAO,QAC1C,UAAA,gBAAAD,EAACE,GAAA,EAAS,MAAK,MAAM,UAAAH,GAAS,GAChC,IAGGA;AACT;"}
|
|
@@ -3,8 +3,15 @@ import { default as React } from 'react';
|
|
|
3
3
|
import { OptionProps } from '../options/option.js';
|
|
4
4
|
export interface PhoneNumberInputProps extends Omit<HStackProps, 'onChange' | 'children'> {
|
|
5
5
|
value?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
autoComplete?: string;
|
|
6
8
|
defaultCountry?: string;
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Callback fired when the phone number value changes.
|
|
11
|
+
* @param value - The phone number value with country prefix
|
|
12
|
+
* @param obfuscate - Whether the selected phone number is obfuscated (e.g., from a phone book entry marked as obfuscated)
|
|
13
|
+
*/
|
|
14
|
+
onChange?: (value: string, obfuscate: boolean) => void;
|
|
8
15
|
countrySelectRef?: React.Ref<HTMLButtonElement>;
|
|
9
16
|
phoneNumberInputRef?: React.Ref<HTMLInputElement>;
|
|
10
17
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAQN,MAAM,OAAO,CAAC;AAUf,OAAO,EAAU,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"phone_number_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/phone_number_input/phone_number_input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAQN,MAAM,OAAO,CAAC;AAUf,OAAO,EAAU,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAiG3D,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChD,mBAAmB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;CAChF;AAED,eAAO,MAAM,gBAAgB,2FAwR3B,CAAC"}
|