@prestack/thread-ui 0.1.1 → 0.1.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/CHANGELOG.md +518 -0
- package/dist/ui/animations/anm_appear.d.ts +8 -8
- package/dist/ui/animations/anm_blur_in.d.ts +12 -12
- package/dist/ui/animations/anm_blur_out.d.ts +12 -12
- package/dist/ui/animations/anm_dismiss.d.ts +12 -12
- package/dist/ui/animations/anm_drop.d.ts +12 -12
- package/dist/ui/animations/anm_fall.d.ts +12 -12
- package/dist/ui/animations/anm_flash.d.ts +9 -9
- package/dist/ui/animations/anm_glow.d.ts +8 -8
- package/dist/ui/animations/anm_lift.d.ts +8 -8
- package/dist/ui/animations/anm_nudge.d.ts +8 -8
- package/dist/ui/animations/anm_pop_in.d.ts +16 -16
- package/dist/ui/animations/anm_pop_out.d.ts +16 -16
- package/dist/ui/animations/anm_press.d.ts +9 -9
- package/dist/ui/animations/anm_pulse.d.ts +10 -10
- package/dist/ui/animations/anm_rise.d.ts +12 -12
- package/dist/ui/animations/anm_shake.d.ts +11 -11
- package/dist/ui/animations/anm_slide_in_left.d.ts +12 -12
- package/dist/ui/animations/anm_slide_in_right.d.ts +12 -12
- package/dist/ui/animations/anm_slide_out_left.d.ts +12 -12
- package/dist/ui/animations/anm_slide_out_right.d.ts +12 -12
- package/dist/ui/animations/anm_spin.d.ts +8 -8
- package/dist/ui/animations/anm_swell.d.ts +8 -8
- package/dist/ui/animations/anm_wobble.d.ts +13 -13
- package/dist/ui/animations/anm_zoom_in.d.ts +12 -12
- package/dist/ui/animations/anm_zoom_out.d.ts +12 -12
- package/dist/ui/animations.d.ts +8 -8
- package/dist/ui/animations.js +4 -4
- package/dist/ui/animations.ts +1 -1
- package/dist/ui/attach.js +25 -80
- package/dist/ui/attach.ts +12 -69
- package/dist/ui/charts.d.ts +0 -3
- package/dist/ui/charts.js +3 -7
- package/dist/ui/charts.tsx +0 -4
- package/dist/ui/checked.d.ts +1 -1
- package/dist/ui/checked.ts +1 -1
- package/dist/ui/collector.js +1 -1
- package/dist/ui/collector.ts +1 -1
- package/dist/ui/compositions.d.ts +9 -3
- package/dist/ui/compositions.js +9 -158
- package/dist/ui/compositions.ts +6 -170
- package/dist/ui/content.js +4 -7
- package/dist/ui/content.tsx +4 -15
- package/dist/ui/controls.js +1 -1
- package/dist/ui/door.d.ts +1 -1
- package/dist/ui/elements/accordion.d.ts +2 -1
- package/dist/ui/elements/accordion.js +4 -4
- package/dist/ui/elements/accordion.tsx +2 -1
- package/dist/ui/elements/aspect-ratio.d.ts +2 -1
- package/dist/ui/elements/aspect-ratio.js +1 -1
- package/dist/ui/elements/aspect-ratio.tsx +2 -1
- package/dist/ui/elements/avatar.d.ts +2 -1
- package/dist/ui/elements/avatar.js +3 -3
- package/dist/ui/elements/avatar.tsx +2 -1
- package/dist/ui/elements/badge.d.ts +2 -1
- package/dist/ui/elements/badge.js +3 -3
- package/dist/ui/elements/badge.tsx +2 -1
- package/dist/ui/elements/bars.d.ts +2 -1
- package/dist/ui/elements/bars.js +5 -5
- package/dist/ui/elements/bars.tsx +2 -1
- package/dist/ui/elements/bars.works.js +3 -3
- package/dist/ui/elements/box.d.ts +2 -1
- package/dist/ui/elements/box.js +1 -1
- package/dist/ui/elements/box.tsx +2 -1
- package/dist/ui/elements/breadcrumb.d.ts +2 -1
- package/dist/ui/elements/breadcrumb.js +5 -5
- package/dist/ui/elements/breadcrumb.tsx +2 -1
- package/dist/ui/elements/breadcrumb.works.js +1 -1
- package/dist/ui/elements/button.d.ts +2 -1
- package/dist/ui/elements/button.js +3 -3
- package/dist/ui/elements/button.tsx +2 -1
- package/dist/ui/elements/button.works.js +2 -2
- package/dist/ui/elements/column.d.ts +2 -1
- package/dist/ui/elements/column.js +1 -1
- package/dist/ui/elements/column.tsx +2 -1
- package/dist/ui/elements/consent.d.ts +2 -1
- package/dist/ui/elements/consent.js +10 -10
- package/dist/ui/elements/consent.tsx +2 -1
- package/dist/ui/elements/consent.works.js +1 -1
- package/dist/ui/elements/donut.d.ts +2 -1
- package/dist/ui/elements/donut.js +4 -4
- package/dist/ui/elements/donut.tsx +2 -1
- package/dist/ui/elements/donut.works.js +2 -2
- package/dist/ui/elements/each.d.ts +2 -1
- package/dist/ui/elements/each.js +3 -3
- package/dist/ui/elements/each.tsx +2 -1
- package/dist/ui/elements/each.works.js +2 -2
- package/dist/ui/elements/empty.d.ts +2 -1
- package/dist/ui/elements/empty.js +2 -2
- package/dist/ui/elements/empty.tsx +2 -1
- package/dist/ui/elements/field.d.ts +2 -1
- package/dist/ui/elements/field.js +3 -3
- package/dist/ui/elements/field.tsx +2 -1
- package/dist/ui/elements/field.works.js +1 -1
- package/dist/ui/elements/funnel.d.ts +2 -1
- package/dist/ui/elements/funnel.js +5 -5
- package/dist/ui/elements/funnel.tsx +2 -1
- package/dist/ui/elements/funnel.works.js +3 -3
- package/dist/ui/elements/gauge.d.ts +2 -1
- package/dist/ui/elements/gauge.js +3 -3
- package/dist/ui/elements/gauge.tsx +2 -1
- package/dist/ui/elements/gauge.works.js +1 -1
- package/dist/ui/elements/glyph.d.ts +2 -1
- package/dist/ui/elements/glyph.js +3 -3
- package/dist/ui/elements/glyph.tsx +2 -1
- package/dist/ui/elements/glyph.works.js +1 -1
- package/dist/ui/elements/grid.d.ts +2 -1
- package/dist/ui/elements/grid.js +1 -1
- package/dist/ui/elements/grid.tsx +2 -1
- package/dist/ui/elements/heatmap.d.ts +2 -1
- package/dist/ui/elements/heatmap.js +5 -5
- package/dist/ui/elements/heatmap.tsx +2 -1
- package/dist/ui/elements/heatmap.works.js +1 -1
- package/dist/ui/elements/hit-box.d.ts +2 -1
- package/dist/ui/elements/hit-box.js +2 -2
- package/dist/ui/elements/hit-box.tsx +2 -1
- package/dist/ui/elements/hit-box.works.d.ts +2 -2
- package/dist/ui/elements/hit-box.works.js +5 -5
- package/dist/ui/elements/hit-box.works.tsx +2 -1
- package/dist/ui/elements/image.d.ts +2 -1
- package/dist/ui/elements/image.js +2 -2
- package/dist/ui/elements/image.tsx +2 -1
- package/dist/ui/elements/line-chart.d.ts +2 -1
- package/dist/ui/elements/line-chart.js +4 -4
- package/dist/ui/elements/line-chart.tsx +2 -1
- package/dist/ui/elements/line-chart.works.js +2 -2
- package/dist/ui/elements/link.d.ts +2 -1
- package/dist/ui/elements/link.js +3 -3
- package/dist/ui/elements/link.tsx +2 -1
- package/dist/ui/elements/link.works.js +1 -1
- package/dist/ui/elements/media.d.ts +2 -1
- package/dist/ui/elements/media.js +2 -2
- package/dist/ui/elements/media.tsx +2 -1
- package/dist/ui/elements/menu.d.ts +2 -1
- package/dist/ui/elements/menu.js +5 -5
- package/dist/ui/elements/menu.tsx +2 -1
- package/dist/ui/elements/menu.works.d.ts +2 -1
- package/dist/ui/elements/menu.works.js +5 -5
- package/dist/ui/elements/menu.works.tsx +2 -1
- package/dist/ui/elements/money.d.ts +3 -1
- package/dist/ui/elements/money.js +10 -5
- package/dist/ui/elements/money.tsx +12 -3
- package/dist/ui/elements/money.works.js +1 -1
- package/dist/ui/elements/pagination.d.ts +2 -1
- package/dist/ui/elements/pagination.js +5 -5
- package/dist/ui/elements/pagination.tsx +2 -1
- package/dist/ui/elements/progress.d.ts +2 -1
- package/dist/ui/elements/progress.js +3 -3
- package/dist/ui/elements/progress.tsx +2 -1
- package/dist/ui/elements/radio-group.d.ts +2 -1
- package/dist/ui/elements/radio-group.js +4 -4
- package/dist/ui/elements/radio-group.tsx +2 -1
- package/dist/ui/elements/radio-group.works.js +1 -1
- package/dist/ui/elements/row.d.ts +2 -1
- package/dist/ui/elements/row.js +1 -1
- package/dist/ui/elements/row.tsx +2 -1
- package/dist/ui/elements/scatter.d.ts +2 -1
- package/dist/ui/elements/scatter.js +3 -3
- package/dist/ui/elements/scatter.tsx +2 -1
- package/dist/ui/elements/scatter.works.js +1 -1
- package/dist/ui/elements/select.d.ts +2 -1
- package/dist/ui/elements/select.js +4 -4
- package/dist/ui/elements/select.tsx +2 -1
- package/dist/ui/elements/separator.d.ts +2 -1
- package/dist/ui/elements/separator.js +2 -2
- package/dist/ui/elements/separator.tsx +2 -1
- package/dist/ui/elements/skeleton.d.ts +2 -1
- package/dist/ui/elements/skeleton.js +2 -2
- package/dist/ui/elements/skeleton.tsx +2 -1
- package/dist/ui/elements/slider.d.ts +2 -1
- package/dist/ui/elements/slider.js +3 -3
- package/dist/ui/elements/slider.tsx +2 -1
- package/dist/ui/elements/sparkline.d.ts +2 -1
- package/dist/ui/elements/sparkline.js +3 -3
- package/dist/ui/elements/sparkline.tsx +2 -1
- package/dist/ui/elements/sparkline.works.js +1 -1
- package/dist/ui/elements/spinner.d.ts +2 -1
- package/dist/ui/elements/spinner.js +2 -2
- package/dist/ui/elements/spinner.tsx +2 -1
- package/dist/ui/elements/stack.d.ts +2 -1
- package/dist/ui/elements/stack.js +1 -1
- package/dist/ui/elements/stack.tsx +2 -1
- package/dist/ui/elements/stat.d.ts +2 -1
- package/dist/ui/elements/stat.js +3 -3
- package/dist/ui/elements/stat.tsx +2 -1
- package/dist/ui/elements/stat.works.js +1 -1
- package/dist/ui/elements/surface.d.ts +2 -1
- package/dist/ui/elements/surface.js +2 -2
- package/dist/ui/elements/surface.tsx +2 -1
- package/dist/ui/elements/surface.works.js +1 -1
- package/dist/ui/elements/table.d.ts +2 -1
- package/dist/ui/elements/table.js +4 -4
- package/dist/ui/elements/table.tsx +2 -1
- package/dist/ui/elements/table.works.js +1 -1
- package/dist/ui/elements/tabs.d.ts +2 -1
- package/dist/ui/elements/tabs.js +4 -4
- package/dist/ui/elements/tabs.tsx +2 -1
- package/dist/ui/elements/tabs.works.js +1 -1
- package/dist/ui/elements/text.d.ts +2 -1
- package/dist/ui/elements/text.js +2 -2
- package/dist/ui/elements/text.tsx +2 -1
- package/dist/ui/elements/textarea.d.ts +2 -1
- package/dist/ui/elements/textarea.js +4 -4
- package/dist/ui/elements/textarea.tsx +2 -1
- package/dist/ui/elements/time.d.ts +3 -1
- package/dist/ui/elements/time.js +7 -4
- package/dist/ui/elements/time.tsx +9 -2
- package/dist/ui/elements/time.works.d.ts +1 -0
- package/dist/ui/elements/time.works.js +7 -3
- package/dist/ui/elements/time.works.ts +6 -2
- package/dist/ui/elements/toggle.d.ts +2 -1
- package/dist/ui/elements/toggle.js +3 -3
- package/dist/ui/elements/toggle.tsx +2 -1
- package/dist/ui/elements/tooltip.d.ts +2 -1
- package/dist/ui/elements/tooltip.js +2 -2
- package/dist/ui/elements/tooltip.tsx +2 -1
- package/dist/ui/elements/tooltip.works.js +2 -2
- package/dist/ui/elements/value.d.ts +3 -1
- package/dist/ui/elements/value.js +10 -5
- package/dist/ui/elements/value.tsx +12 -3
- package/dist/ui/elements/value.works.js +1 -1
- package/dist/ui/elements.d.ts +15 -11
- package/dist/ui/elements.js +6 -6
- package/dist/ui/elements.ts +7 -7
- package/dist/ui/fonts.d.ts +1 -1
- package/dist/ui/fonts.js +1 -1
- package/dist/ui/generators/dev.d.ts +1 -2
- package/dist/ui/generators/dev.js +33 -37
- package/dist/ui/generators/dev.ts +30 -37
- package/dist/ui/generators/elements.d.ts +1 -0
- package/dist/ui/generators/elements.js +11 -9
- package/dist/ui/generators/elements.ts +12 -9
- package/dist/ui/generators/i18n.js +6 -23
- package/dist/ui/generators/i18n.ts +1 -18
- package/dist/ui/generators/icons.js +5 -14
- package/dist/ui/generators/icons.ts +1 -10
- package/dist/ui/generators/react.js +4 -5
- package/dist/ui/generators/react.ts +2 -3
- package/dist/ui/generators/routes.js +66 -51
- package/dist/ui/generators/routes.ts +67 -46
- package/dist/ui/generators/show.js +9 -6
- package/dist/ui/generators/show.ts +4 -2
- package/dist/ui/generators/styles.js +12 -16
- package/dist/ui/generators/styles.ts +1 -5
- package/dist/ui/generators/variants.js +3 -3
- package/dist/ui/generators/variants.ts +1 -1
- package/dist/ui/i18n/catalogs/en.js +1 -1
- package/dist/ui/i18n/format.js +1 -1
- package/dist/ui/i18n/translator.js +2 -2
- package/dist/ui/material.d.ts +11 -11
- package/dist/ui/material.js +1 -1
- package/dist/ui/materials/mat_bordered.d.ts +13 -13
- package/dist/ui/materials/mat_bordered.js +1 -1
- package/dist/ui/materials/mat_ceramic.d.ts +13 -13
- package/dist/ui/materials/mat_ceramic.js +1 -1
- package/dist/ui/materials/mat_clay.d.ts +13 -13
- package/dist/ui/materials/mat_clay.js +1 -1
- package/dist/ui/materials/mat_elevated.d.ts +13 -13
- package/dist/ui/materials/mat_elevated.js +1 -1
- package/dist/ui/materials/mat_flat.d.ts +25 -25
- package/dist/ui/materials/mat_flat.js +1 -1
- package/dist/ui/materials/mat_glass.d.ts +17 -17
- package/dist/ui/materials/mat_glass.js +1 -1
- package/dist/ui/materials/mat_lit.d.ts +13 -13
- package/dist/ui/materials/mat_lit.js +1 -1
- package/dist/ui/materials/mat_moulded.d.ts +9 -9
- package/dist/ui/materials/mat_moulded.js +1 -1
- package/dist/ui/materials.d.ts +30 -30
- package/dist/ui/materials.js +3 -3
- package/dist/ui/materials.ts +1 -1
- package/dist/ui/modes.d.ts +2 -2
- package/dist/ui/presented.js +5 -5
- package/dist/ui/provider.d.ts +3 -0
- package/dist/ui/provider.js +9 -10
- package/dist/ui/provider.tsx +7 -5
- package/dist/ui/screens.js +6 -6
- package/dist/ui/screens.ts +1 -1
- package/dist/ui/scroll-lock.js +1 -1
- package/dist/ui/series.js +1 -1
- package/dist/ui/styleguide.js +1 -1
- package/dist/ui/tokens.d.ts +2 -2
- package/dist/ui/tokens.js +3 -3
- package/dist/ui/tokens.ts +1 -1
- package/dist/ui/validators.js +1 -1
- package/dist/ui/variant.d.ts +37 -37
- package/dist/ui/variant.js +2 -2
- package/dist/ui/variants/var_avatar-round.d.ts +13 -13
- package/dist/ui/variants/var_avatar-round.js +1 -1
- package/dist/ui/variants/var_bubble-me.d.ts +12 -12
- package/dist/ui/variants/var_bubble-me.js +1 -1
- package/dist/ui/variants/var_bubble-them.d.ts +10 -10
- package/dist/ui/variants/var_bubble-them.js +1 -1
- package/dist/ui/variants/var_button-border.d.ts +61 -61
- package/dist/ui/variants/var_button-border.js +1 -1
- package/dist/ui/variants/var_button-cta.d.ts +61 -61
- package/dist/ui/variants/var_button-cta.js +1 -1
- package/dist/ui/variants/var_button-destructive-ghost.d.ts +59 -59
- package/dist/ui/variants/var_button-destructive-ghost.js +1 -1
- package/dist/ui/variants/var_button-destructive.d.ts +61 -61
- package/dist/ui/variants/var_button-destructive.js +1 -1
- package/dist/ui/variants/var_button-fill.d.ts +61 -61
- package/dist/ui/variants/var_button-fill.js +1 -1
- package/dist/ui/variants/var_button-ghost.d.ts +59 -59
- package/dist/ui/variants/var_button-ghost.js +1 -1
- package/dist/ui/variants/var_button-glass.d.ts +40 -40
- package/dist/ui/variants/var_button-glass.js +1 -1
- package/dist/ui/variants/var_button-normal.d.ts +61 -61
- package/dist/ui/variants/var_button-normal.js +1 -1
- package/dist/ui/variants/var_button-quiet.d.ts +63 -63
- package/dist/ui/variants/var_button-quiet.js +1 -1
- package/dist/ui/variants/var_card.d.ts +17 -17
- package/dist/ui/variants/var_card.js +1 -1
- package/dist/ui/variants/var_chip.d.ts +10 -10
- package/dist/ui/variants/var_chip.js +1 -1
- package/dist/ui/variants/var_choice.d.ts +15 -15
- package/dist/ui/variants/var_choice.js +1 -1
- package/dist/ui/variants/var_framed.d.ts +5 -5
- package/dist/ui/variants/var_framed.js +1 -1
- package/dist/ui/variants/var_glyph-plain.d.ts +7 -7
- package/dist/ui/variants/var_glyph-plain.js +1 -1
- package/dist/ui/variants/var_input.d.ts +30 -30
- package/dist/ui/variants/var_input.js +1 -1
- package/dist/ui/variants/var_link-inline.d.ts +17 -17
- package/dist/ui/variants/var_link-inline.js +1 -1
- package/dist/ui/variants/var_list-row.d.ts +22 -22
- package/dist/ui/variants/var_list-row.js +1 -1
- package/dist/ui/variants/var_rule.d.ts +5 -5
- package/dist/ui/variants/var_rule.js +1 -1
- package/dist/ui/variants/var_skeleton-block.d.ts +9 -9
- package/dist/ui/variants/var_skeleton-block.js +1 -1
- package/dist/ui/variants/var_spinner-turning.d.ts +9 -9
- package/dist/ui/variants/var_spinner-turning.js +1 -1
- package/dist/ui/variants/var_stat-tile.d.ts +10 -10
- package/dist/ui/variants/var_stat-tile.js +1 -1
- package/dist/ui/variants/var_tab-bar.d.ts +14 -14
- package/dist/ui/variants/var_tab-bar.js +1 -1
- package/dist/ui/variants/var_tap-target.d.ts +11 -11
- package/dist/ui/variants/var_tap-target.js +1 -1
- package/dist/ui/variants.d.ts +88 -88
- package/dist/ui/wrappers.d.ts +7 -6
- package/dist/ui/wrappers.js +16 -14
- package/dist/ui/wrappers.tsx +21 -18
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { element, useSurface } from
|
|
5
|
-
import { shown, iconed, worded, uses, wires } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { element, useSurface } from '../wrappers.js';
|
|
5
|
+
import { shown, iconed, worded, uses, wires } from './button.works.js';
|
|
6
6
|
export const Button = element('Button', (props, className) => {
|
|
7
7
|
const kept = uses(props);
|
|
8
8
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { MessageKey } from '../content.tsx'
|
|
4
4
|
import { roleClass } from '../fonts.ts'
|
|
5
5
|
|
|
6
|
+
import type { Dispatching } from '../checked.ts'
|
|
6
7
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
7
8
|
import { shown, iconed, worded, uses, wires } from './button.works.tsx'
|
|
8
9
|
|
|
@@ -15,10 +16,10 @@ export interface ButtonProps {
|
|
|
15
16
|
readonly type?: string
|
|
16
17
|
readonly disabled?: boolean
|
|
17
18
|
readonly loading?: boolean
|
|
18
|
-
readonly dispatch?: string
|
|
19
19
|
readonly input?: Readonly<Record<string, unknown>>
|
|
20
20
|
readonly navigateTo?: string
|
|
21
21
|
readonly onPress?: () => void
|
|
22
|
+
readonly dispatch?: keyof Dispatching
|
|
22
23
|
readonly invokeOn?: 'press' | 'shown'
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface ColumnProps {
|
|
4
5
|
readonly children: ReactNode;
|
|
5
|
-
readonly dispatch?:
|
|
6
|
+
readonly dispatch?: keyof Dispatching;
|
|
6
7
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
7
8
|
readonly invokeOn?: 'press' | 'shown';
|
|
8
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { element, useSurface } from
|
|
3
|
+
import { element, useSurface } from '../wrappers.js';
|
|
4
4
|
export const Column = element('Column', (props, className) => {
|
|
5
5
|
const surface = useSurface({ className,
|
|
6
6
|
invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ReactNode } from 'react'
|
|
4
4
|
|
|
5
|
+
import type { Dispatching } from '../checked.ts'
|
|
5
6
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
export interface ColumnProps {
|
|
9
10
|
readonly children: ReactNode
|
|
10
|
-
readonly dispatch?:
|
|
11
|
+
readonly dispatch?: keyof Dispatching
|
|
11
12
|
readonly input?: Readonly<Record<string, unknown>>
|
|
12
13
|
readonly invokeOn?: 'press' | 'shown'
|
|
13
14
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
2
|
import type { ConsentDecision } from '../consent.ts';
|
|
3
|
+
import type { Dispatching } from '../checked.ts';
|
|
3
4
|
import { type Element } from '../wrappers.tsx';
|
|
4
5
|
export interface ConsentProps {
|
|
5
6
|
readonly decision?: ConsentDecision;
|
|
6
7
|
readonly onDecide: (said: ConsentDecision) => void;
|
|
7
8
|
readonly policyKey?: MessageKey;
|
|
8
9
|
readonly preselected: readonly string[];
|
|
9
|
-
readonly dispatch?:
|
|
10
|
+
readonly dispatch?: keyof Dispatching;
|
|
10
11
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
11
12
|
readonly invokeOn?: 'press' | 'shown';
|
|
12
13
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { Box } from
|
|
5
|
-
import { Column } from
|
|
6
|
-
import { Text } from
|
|
7
|
-
import { Toggle } from
|
|
8
|
-
import { Button } from
|
|
9
|
-
import { element, useSurface } from
|
|
10
|
-
import { Each } from
|
|
11
|
-
import { title, policy, hasPolicy, categories, label, describe, chooser, optional, fixed, required, withdraw, withdrawable, decline, accept, acceptAll, uses } from
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { Box } from './box.js';
|
|
5
|
+
import { Column } from './column.js';
|
|
6
|
+
import { Text } from './text.js';
|
|
7
|
+
import { Toggle } from './toggle.js';
|
|
8
|
+
import { Button } from './button.js';
|
|
9
|
+
import { element, useSurface } from '../wrappers.js';
|
|
10
|
+
import { Each } from '../elements/each.js';
|
|
11
|
+
import { title, policy, hasPolicy, categories, label, describe, chooser, optional, fixed, required, withdraw, withdrawable, decline, accept, acceptAll, uses } from './consent.works.js';
|
|
12
12
|
export const Consent = element('Consent', (props, className) => {
|
|
13
13
|
const kept = uses(props);
|
|
14
14
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -9,6 +9,7 @@ import { Text } from './text.tsx'
|
|
|
9
9
|
import { Toggle } from './toggle.tsx'
|
|
10
10
|
import { Button } from './button.tsx'
|
|
11
11
|
|
|
12
|
+
import type { Dispatching } from '../checked.ts'
|
|
12
13
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
13
14
|
import { Each } from '../elements/each.tsx'
|
|
14
15
|
import { title, policy, hasPolicy, categories, label, describe, chooser, optional, fixed, required, withdraw, withdrawable, decline, accept, acceptAll, uses } from './consent.works.tsx'
|
|
@@ -19,7 +20,7 @@ export interface ConsentProps {
|
|
|
19
20
|
readonly onDecide: (said: ConsentDecision) => void
|
|
20
21
|
readonly policyKey?: MessageKey
|
|
21
22
|
readonly preselected: readonly string[]
|
|
22
|
-
readonly dispatch?:
|
|
23
|
+
readonly dispatch?: keyof Dispatching
|
|
23
24
|
readonly input?: Readonly<Record<string, unknown>>
|
|
24
25
|
readonly invokeOn?: 'press' | 'shown'
|
|
25
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { consentCategories } from
|
|
3
|
+
import { consentCategories } from '../consent.js';
|
|
4
4
|
function firstSelection(categories, decision, preselected) {
|
|
5
5
|
const answered = decision !== undefined;
|
|
6
6
|
return categories
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
2
|
import type { Row } from '../charts.tsx';
|
|
3
|
+
import type { Dispatching } from '../checked.ts';
|
|
3
4
|
import { type Element } from '../wrappers.tsx';
|
|
4
5
|
export interface DonutProps {
|
|
5
6
|
readonly rows: readonly Row[];
|
|
6
7
|
readonly by: string;
|
|
7
8
|
readonly value: string;
|
|
8
9
|
readonly titleKey?: MessageKey;
|
|
9
|
-
readonly dispatch?:
|
|
10
|
+
readonly dispatch?: keyof Dispatching;
|
|
10
11
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
11
12
|
readonly invokeOn?: 'press' | 'shown';
|
|
12
13
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { element, useSurface } from
|
|
5
|
-
import { Each } from
|
|
6
|
-
import { slice, uses } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { element, useSurface } from '../wrappers.js';
|
|
5
|
+
import { Each } from '../elements/each.js';
|
|
6
|
+
import { slice, uses } from './donut.works.js';
|
|
7
7
|
export const Donut = element('Donut', (props, className) => {
|
|
8
8
|
const kept = uses(props);
|
|
9
9
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -4,6 +4,7 @@ import type { MessageKey } from '../content.tsx'
|
|
|
4
4
|
import type { Row } from '../charts.tsx'
|
|
5
5
|
import { roleClass } from '../fonts.ts'
|
|
6
6
|
|
|
7
|
+
import type { Dispatching } from '../checked.ts'
|
|
7
8
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
8
9
|
import { Each } from '../elements/each.tsx'
|
|
9
10
|
import { slice, uses } from './donut.works.ts'
|
|
@@ -14,7 +15,7 @@ export interface DonutProps {
|
|
|
14
15
|
readonly by: string
|
|
15
16
|
readonly value: string
|
|
16
17
|
readonly titleKey?: MessageKey
|
|
17
|
-
readonly dispatch?:
|
|
18
|
+
readonly dispatch?: keyof Dispatching
|
|
18
19
|
readonly input?: Readonly<Record<string, unknown>>
|
|
19
20
|
readonly invokeOn?: 'press' | 'shown'
|
|
20
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { seriesColour } from
|
|
2
|
-
import { num, useRamp } from
|
|
1
|
+
import { seriesColour } from '../series.js';
|
|
2
|
+
import { num, useRamp } from '../charts.js';
|
|
3
3
|
const RADIUS = 40;
|
|
4
4
|
const ROUND = 2 * Math.PI * RADIUS;
|
|
5
5
|
export function uses(props) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { Row } from '../charts.tsx';
|
|
3
|
+
import type { Dispatching } from '../checked.ts';
|
|
3
4
|
import { type Element } from '../wrappers.tsx';
|
|
4
5
|
export interface EachProps {
|
|
5
6
|
readonly rows: readonly object[];
|
|
@@ -7,7 +8,7 @@ export interface EachProps {
|
|
|
7
8
|
readonly children: (row: Row, at: number) => ReactNode;
|
|
8
9
|
readonly settles?: string;
|
|
9
10
|
readonly paced?: string;
|
|
10
|
-
readonly dispatch?:
|
|
11
|
+
readonly dispatch?: keyof Dispatching;
|
|
11
12
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
12
13
|
readonly invokeOn?: 'press' | 'shown';
|
|
13
14
|
}
|
package/dist/ui/elements/each.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { roleClass } from
|
|
3
|
-
import { element, useSurface } from
|
|
4
|
-
import { shows } from
|
|
2
|
+
import { roleClass } from '../fonts.js';
|
|
3
|
+
import { element, useSurface } from '../wrappers.js';
|
|
4
|
+
import { shows } from './each.works.js';
|
|
5
5
|
export const Each = element('Each', (props, className) => {
|
|
6
6
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
7
7
|
invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
|
|
@@ -4,6 +4,7 @@ import type { ReactNode } from 'react'
|
|
|
4
4
|
import type { Row } from '../charts.tsx'
|
|
5
5
|
import { roleClass } from '../fonts.ts'
|
|
6
6
|
|
|
7
|
+
import type { Dispatching } from '../checked.ts'
|
|
7
8
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
8
9
|
import { shows } from './each.works.tsx'
|
|
9
10
|
|
|
@@ -14,7 +15,7 @@ export interface EachProps {
|
|
|
14
15
|
readonly children: (row: Row, at: number) => ReactNode
|
|
15
16
|
readonly settles?: string
|
|
16
17
|
readonly paced?: string
|
|
17
|
-
readonly dispatch?:
|
|
18
|
+
readonly dispatch?: keyof Dispatching
|
|
18
19
|
readonly input?: Readonly<Record<string, unknown>>
|
|
19
20
|
readonly invokeOn?: 'press' | 'shown'
|
|
20
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment, useLayoutEffect, useRef } from 'react';
|
|
3
|
-
import { nameOf } from
|
|
3
|
+
import { nameOf } from '../token.js';
|
|
4
4
|
function keyOf(row, by, at) {
|
|
5
5
|
const value = row[by];
|
|
6
6
|
if (value === undefined || value === null) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface EmptyProps {
|
|
4
5
|
readonly labelKey: MessageKey;
|
|
5
|
-
readonly dispatch?:
|
|
6
|
+
readonly dispatch?: keyof Dispatching;
|
|
6
7
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
7
8
|
readonly invokeOn?: 'press' | 'shown';
|
|
8
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { element, useSurface } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { element, useSurface } from '../wrappers.js';
|
|
5
5
|
export const Empty = element('Empty', (props, className) => {
|
|
6
6
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
7
7
|
invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) },
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
import type { MessageKey } from '../content.tsx'
|
|
4
4
|
import { roleClass } from '../fonts.ts'
|
|
5
5
|
|
|
6
|
+
import type { Dispatching } from '../checked.ts'
|
|
6
7
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
export interface EmptyProps {
|
|
10
11
|
readonly labelKey: MessageKey
|
|
11
|
-
readonly dispatch?:
|
|
12
|
+
readonly dispatch?: keyof Dispatching
|
|
12
13
|
readonly input?: Readonly<Record<string, unknown>>
|
|
13
14
|
readonly invokeOn?: 'press' | 'shown'
|
|
14
15
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface FieldProps {
|
|
4
5
|
readonly name: string;
|
|
@@ -9,7 +10,7 @@ export interface FieldProps {
|
|
|
9
10
|
readonly context?: Readonly<Record<string, unknown>>;
|
|
10
11
|
readonly autocomplete?: string;
|
|
11
12
|
readonly disabled?: boolean;
|
|
12
|
-
readonly dispatch?:
|
|
13
|
+
readonly dispatch?: keyof Dispatching;
|
|
13
14
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
14
15
|
readonly invokeOn?: 'press' | 'shown';
|
|
15
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { element, useSurface } from
|
|
5
|
-
import { shown, entry, uses } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { element, useSurface } from '../wrappers.js';
|
|
5
|
+
import { shown, entry, uses } from './field.works.js';
|
|
6
6
|
export const Field = element('Field', (props, className) => {
|
|
7
7
|
const kept = uses(props);
|
|
8
8
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { MessageKey } from '../content.tsx'
|
|
4
4
|
import { roleClass } from '../fonts.ts'
|
|
5
5
|
|
|
6
|
+
import type { Dispatching } from '../checked.ts'
|
|
6
7
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
7
8
|
import { shown, entry, uses } from './field.works.ts'
|
|
8
9
|
|
|
@@ -16,7 +17,7 @@ export interface FieldProps {
|
|
|
16
17
|
readonly context?: Readonly<Record<string, unknown>>
|
|
17
18
|
readonly autocomplete?: string
|
|
18
19
|
readonly disabled?: boolean
|
|
19
|
-
readonly dispatch?:
|
|
20
|
+
readonly dispatch?: keyof Dispatching
|
|
20
21
|
readonly input?: Readonly<Record<string, unknown>>
|
|
21
22
|
readonly invokeOn?: 'press' | 'shown'
|
|
22
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import { acceptsKeystroke, applyMask, entryConstraints, evaluateMoney, runValidator } from
|
|
2
|
+
import { acceptsKeystroke, applyMask, entryConstraints, evaluateMoney, runValidator } from '../validators.js';
|
|
3
3
|
export function uses(props) {
|
|
4
4
|
const [wrong, said] = useState(null);
|
|
5
5
|
return { ...(props.disabled === true ? { holds: ['disabled'] } : {}), wrong, said };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
2
|
import type { Row } from '../charts.tsx';
|
|
3
|
+
import type { Dispatching } from '../checked.ts';
|
|
3
4
|
import { type Element } from '../wrappers.tsx';
|
|
4
5
|
export interface FunnelProps {
|
|
5
6
|
readonly rows: readonly Row[];
|
|
@@ -7,7 +8,7 @@ export interface FunnelProps {
|
|
|
7
8
|
readonly value: string;
|
|
8
9
|
readonly format?: string;
|
|
9
10
|
readonly titleKey?: MessageKey;
|
|
10
|
-
readonly dispatch?:
|
|
11
|
+
readonly dispatch?: keyof Dispatching;
|
|
11
12
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
12
13
|
readonly invokeOn?: 'press' | 'shown';
|
|
13
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { measured as marking } from
|
|
5
|
-
import { element, useSurface } from
|
|
6
|
-
import { Each } from
|
|
7
|
-
import { shown, sized, uses } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { measured as marking } from '../charts.js';
|
|
5
|
+
import { element, useSurface } from '../wrappers.js';
|
|
6
|
+
import { Each } from '../elements/each.js';
|
|
7
|
+
import { shown, sized, uses } from './funnel.works.js';
|
|
8
8
|
export const Funnel = element('Funnel', (props, className) => {
|
|
9
9
|
const kept = uses(props);
|
|
10
10
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -5,6 +5,7 @@ import type { Row } from '../charts.tsx'
|
|
|
5
5
|
import { roleClass } from '../fonts.ts'
|
|
6
6
|
import { measured as marking } from '../charts.tsx'
|
|
7
7
|
|
|
8
|
+
import type { Dispatching } from '../checked.ts'
|
|
8
9
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
9
10
|
import { Each } from '../elements/each.tsx'
|
|
10
11
|
import { shown, sized, uses } from './funnel.works.ts'
|
|
@@ -16,7 +17,7 @@ export interface FunnelProps {
|
|
|
16
17
|
readonly value: string
|
|
17
18
|
readonly format?: string
|
|
18
19
|
readonly titleKey?: MessageKey
|
|
19
|
-
readonly dispatch?:
|
|
20
|
+
readonly dispatch?: keyof Dispatching
|
|
20
21
|
readonly input?: Readonly<Record<string, unknown>>
|
|
21
22
|
readonly invokeOn?: 'press' | 'shown'
|
|
22
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { formatValue } from
|
|
2
|
-
import { seriesColour } from
|
|
3
|
-
import { num, str, useRamp } from
|
|
1
|
+
import { formatValue } from '../validators.js';
|
|
2
|
+
import { seriesColour } from '../series.js';
|
|
3
|
+
import { num, str, useRamp } from '../charts.js';
|
|
4
4
|
export function uses(props) {
|
|
5
5
|
const ramp = useRamp(props.rows.length);
|
|
6
6
|
return { ...(props.rows.length === 0 ? { holds: ['empty'] } : {}), ramp };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface GaugeProps {
|
|
4
5
|
readonly value?: number;
|
|
5
6
|
readonly min?: number;
|
|
6
7
|
readonly max?: number;
|
|
7
8
|
readonly labelKey: MessageKey;
|
|
8
|
-
readonly dispatch?:
|
|
9
|
+
readonly dispatch?: keyof Dispatching;
|
|
9
10
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
10
11
|
readonly invokeOn?: 'press' | 'shown';
|
|
11
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { element, useSurface } from
|
|
5
|
-
import { track, needle, uses } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { element, useSurface } from '../wrappers.js';
|
|
5
|
+
import { track, needle, uses } from './gauge.works.js';
|
|
6
6
|
export const Gauge = element('Gauge', (props, className) => {
|
|
7
7
|
const kept = uses(props);
|
|
8
8
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { MessageKey } from '../content.tsx'
|
|
4
4
|
import { roleClass } from '../fonts.ts'
|
|
5
5
|
|
|
6
|
+
import type { Dispatching } from '../checked.ts'
|
|
6
7
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
7
8
|
import { track, needle, uses } from './gauge.works.ts'
|
|
8
9
|
|
|
@@ -12,7 +13,7 @@ export interface GaugeProps {
|
|
|
12
13
|
readonly min?: number
|
|
13
14
|
readonly max?: number
|
|
14
15
|
readonly labelKey: MessageKey
|
|
15
|
-
readonly dispatch?:
|
|
16
|
+
readonly dispatch?: keyof Dispatching
|
|
16
17
|
readonly input?: Readonly<Record<string, unknown>>
|
|
17
18
|
readonly invokeOn?: 'press' | 'shown'
|
|
18
19
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface GlyphProps {
|
|
4
5
|
readonly name: string;
|
|
5
6
|
readonly labelKey?: MessageKey;
|
|
6
|
-
readonly dispatch?:
|
|
7
|
+
readonly dispatch?: keyof Dispatching;
|
|
7
8
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
8
9
|
readonly invokeOn?: 'press' | 'shown';
|
|
9
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { roleClass } from
|
|
3
|
-
import { element, useSurface } from
|
|
4
|
-
import { shows } from
|
|
2
|
+
import { roleClass } from '../fonts.js';
|
|
3
|
+
import { element, useSurface } from '../wrappers.js';
|
|
4
|
+
import { shows } from './glyph.works.js';
|
|
5
5
|
export const Glyph = element('Glyph', (props, className) => {
|
|
6
6
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
7
7
|
invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type { MessageKey } from '../content.tsx'
|
|
4
4
|
import { roleClass } from '../fonts.ts'
|
|
5
5
|
|
|
6
|
+
import type { Dispatching } from '../checked.ts'
|
|
6
7
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
7
8
|
import { shows } from './glyph.works.tsx'
|
|
8
9
|
|
|
@@ -10,7 +11,7 @@ import { shows } from './glyph.works.tsx'
|
|
|
10
11
|
export interface GlyphProps {
|
|
11
12
|
readonly name: string
|
|
12
13
|
readonly labelKey?: MessageKey
|
|
13
|
-
readonly dispatch?:
|
|
14
|
+
readonly dispatch?: keyof Dispatching
|
|
14
15
|
readonly input?: Readonly<Record<string, unknown>>
|
|
15
16
|
readonly invokeOn?: 'press' | 'shown'
|
|
16
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { drawnFor, iconSize, installedSet, strokeFor } from
|
|
2
|
+
import { drawnFor, iconSize, installedSet, strokeFor } from '../icons.js';
|
|
3
3
|
export function drawn(name, semantics, className) {
|
|
4
4
|
const Symbol = drawnFor(name);
|
|
5
5
|
const set = installedSet();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Dispatching } from '../checked.ts';
|
|
2
3
|
import { type Element } from '../wrappers.tsx';
|
|
3
4
|
export interface GridProps {
|
|
4
5
|
readonly children: ReactNode;
|
|
5
|
-
readonly dispatch?:
|
|
6
|
+
readonly dispatch?: keyof Dispatching;
|
|
6
7
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
7
8
|
readonly invokeOn?: 'press' | 'shown';
|
|
8
9
|
}
|
package/dist/ui/elements/grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { element, useSurface } from
|
|
3
|
+
import { element, useSurface } from '../wrappers.js';
|
|
4
4
|
export const Grid = element('Grid', (props, className) => {
|
|
5
5
|
const surface = useSurface({ className,
|
|
6
6
|
invokes: { ...(props.dispatch === undefined ? {} : { dispatch: props.dispatch }), ...(props.input === undefined ? {} : { input: props.input }), ...(props.invokeOn === undefined ? {} : { on: props.invokeOn }) }, });
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ReactNode } from 'react'
|
|
4
4
|
|
|
5
|
+
import type { Dispatching } from '../checked.ts'
|
|
5
6
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
export interface GridProps {
|
|
9
10
|
readonly children: ReactNode
|
|
10
|
-
readonly dispatch?:
|
|
11
|
+
readonly dispatch?: keyof Dispatching
|
|
11
12
|
readonly input?: Readonly<Record<string, unknown>>
|
|
12
13
|
readonly invokeOn?: 'press' | 'shown'
|
|
13
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MessageKey } from '../content.tsx';
|
|
2
2
|
import type { Row } from '../charts.tsx';
|
|
3
|
+
import type { Dispatching } from '../checked.ts';
|
|
3
4
|
import { type Element } from '../wrappers.tsx';
|
|
4
5
|
export interface HeatmapProps {
|
|
5
6
|
readonly rows: readonly Row[];
|
|
@@ -8,7 +9,7 @@ export interface HeatmapProps {
|
|
|
8
9
|
readonly y: string;
|
|
9
10
|
readonly value?: string;
|
|
10
11
|
readonly titleKey?: MessageKey;
|
|
11
|
-
readonly dispatch?:
|
|
12
|
+
readonly dispatch?: keyof Dispatching;
|
|
12
13
|
readonly input?: Readonly<Record<string, unknown>>;
|
|
13
14
|
readonly invokeOn?: 'press' | 'shown';
|
|
14
15
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { roleClass } from
|
|
4
|
-
import { measured as marking } from
|
|
5
|
-
import { element, useSurface } from
|
|
6
|
-
import { Each } from
|
|
7
|
-
import { sized, uses } from
|
|
3
|
+
import { roleClass } from '../fonts.js';
|
|
4
|
+
import { measured as marking } from '../charts.js';
|
|
5
|
+
import { element, useSurface } from '../wrappers.js';
|
|
6
|
+
import { Each } from '../elements/each.js';
|
|
7
|
+
import { sized, uses } from './heatmap.works.js';
|
|
8
8
|
export const Heatmap = element('Heatmap', (props, className) => {
|
|
9
9
|
const kept = uses(props);
|
|
10
10
|
const surface = useSurface({ className: roleClass(undefined, className),
|
|
@@ -5,6 +5,7 @@ import type { Row } from '../charts.tsx'
|
|
|
5
5
|
import { roleClass } from '../fonts.ts'
|
|
6
6
|
import { measured as marking } from '../charts.tsx'
|
|
7
7
|
|
|
8
|
+
import type { Dispatching } from '../checked.ts'
|
|
8
9
|
import { type Element, element, useSurface } from '../wrappers.tsx'
|
|
9
10
|
import { Each } from '../elements/each.tsx'
|
|
10
11
|
import { sized, uses } from './heatmap.works.ts'
|
|
@@ -17,7 +18,7 @@ export interface HeatmapProps {
|
|
|
17
18
|
readonly y: string
|
|
18
19
|
readonly value?: string
|
|
19
20
|
readonly titleKey?: MessageKey
|
|
20
|
-
readonly dispatch?:
|
|
21
|
+
readonly dispatch?: keyof Dispatching
|
|
21
22
|
readonly input?: Readonly<Record<string, unknown>>
|
|
22
23
|
readonly invokeOn?: 'press' | 'shown'
|
|
23
24
|
}
|