@embleema/design-system 0.1.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.
Files changed (57) hide show
  1. package/README.md +2 -0
  2. package/dist/Accordion.d.ts +42 -0
  3. package/dist/Alert.d.ts +46 -0
  4. package/dist/Badge.d.ts +45 -0
  5. package/dist/Barcode.d.ts +38 -0
  6. package/dist/Boolean.d.ts +48 -0
  7. package/dist/Button.d.ts +55 -0
  8. package/dist/Cards.d.ts +95 -0
  9. package/dist/Checkbox.d.ts +47 -0
  10. package/dist/Chip.d.ts +63 -0
  11. package/dist/DateField.d.ts +44 -0
  12. package/dist/Dropdown.d.ts +68 -0
  13. package/dist/Field.d.ts +48 -0
  14. package/dist/FormStatusChip.d.ts +47 -0
  15. package/dist/Label.d.ts +39 -0
  16. package/dist/Link.d.ts +38 -0
  17. package/dist/Loading.d.ts +46 -0
  18. package/dist/MedicationCard.d.ts +54 -0
  19. package/dist/MenuDropdown.d.ts +51 -0
  20. package/dist/MenuItem.d.ts +38 -0
  21. package/dist/MenuTrigger.d.ts +37 -0
  22. package/dist/Modals.d.ts +96 -0
  23. package/dist/NativeBottomNav.d.ts +53 -0
  24. package/dist/ObjectGroupField.d.ts +63 -0
  25. package/dist/ParticipantActivityStatus.d.ts +39 -0
  26. package/dist/ProgressBar.d.ts +56 -0
  27. package/dist/Radio.d.ts +45 -0
  28. package/dist/Scrim.d.ts +34 -0
  29. package/dist/SectionHeader.d.ts +37 -0
  30. package/dist/Selector.d.ts +64 -0
  31. package/dist/SelectorOption.d.ts +44 -0
  32. package/dist/SelectorOptionGroup.d.ts +61 -0
  33. package/dist/SliderBar.d.ts +46 -0
  34. package/dist/SliderField.d.ts +47 -0
  35. package/dist/Snackbar.d.ts +67 -0
  36. package/dist/Spinner.d.ts +34 -0
  37. package/dist/StatusBadge.d.ts +40 -0
  38. package/dist/StatusMessage.d.ts +40 -0
  39. package/dist/StudyProgressSymbol.d.ts +29 -0
  40. package/dist/Tab.d.ts +64 -0
  41. package/dist/Table.d.ts +85 -0
  42. package/dist/Tag.d.ts +54 -0
  43. package/dist/TaskStatus.d.ts +35 -0
  44. package/dist/TaskStatusIcon.d.ts +29 -0
  45. package/dist/TextArea.d.ts +56 -0
  46. package/dist/TextField.d.ts +48 -0
  47. package/dist/TimePicker.d.ts +46 -0
  48. package/dist/Toggle.d.ts +42 -0
  49. package/dist/Tooltip.d.ts +59 -0
  50. package/dist/Upload.d.ts +50 -0
  51. package/dist/WebTopNav.d.ts +46 -0
  52. package/dist/index.cjs.js +9609 -0
  53. package/dist/index.cjs.js.map +1 -0
  54. package/dist/index.d.ts +50 -0
  55. package/dist/index.es.js +19521 -0
  56. package/dist/index.es.js.map +1 -0
  57. package/package.json +34 -0
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # embleema-design-system
2
+ Reference files for the Embleema design system.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Accordion — React port of Embleema Design System 2.0's
3
+ * Layout/Accordion Data component set (Figma node 61:198).
4
+ *
5
+ * Expandable content container for progressive disclosure. Two states per
6
+ * the Figma source:
7
+ * - Toggle=Closed → header row only (label + circled plus)
8
+ * - Toggle=Open → header row (label + circled minus) + expanded content
9
+ *
10
+ * Layout (per Figma):
11
+ * - Container : width 350 px default (min 200, max 550), Border/Focus
12
+ * 2 px bottom rule, overflow hidden
13
+ * - Header row : Background/Default, padding 12 px vertical / 8 px
14
+ * horizontal, flex items-center
15
+ * - Label : Nunito Light 16 / 1.5, Text/Primary, ellipsis
16
+ * - Toggle icon : 24 × 24, Action/Primary (#306AE8) — circled +/- glyph
17
+ * - Expanded content : Background/Default, padding 8 px top / 8 px sides /
18
+ * 20 px bottom, Nunito Light 16 / 1.5 Text/Primary,
19
+ * preserves explicit line breaks
20
+ *
21
+ * Accessibility (per Figma docs):
22
+ * - The toggle row is a <button> with role implicit, aria-expanded reflects
23
+ * open/closed and aria-controls points at the content region id.
24
+ * - The expanded content region uses role="region" + aria-labelledby
25
+ * pointing at the toggle id so screen readers announce the section.
26
+ */
27
+ import * as React from "react";
28
+ export type AccordionProps = {
29
+ /** Header label (Body Medium Light). */
30
+ label: string;
31
+ /** Content shown when open. */
32
+ children: React.ReactNode;
33
+ /** Controlled open state. */
34
+ open?: boolean;
35
+ defaultOpen?: boolean;
36
+ onToggle?: (open: boolean) => void;
37
+ id?: string;
38
+ className?: string;
39
+ };
40
+ export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
41
+ export default Accordion;
42
+ export declare function AccordionMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Alert — React port of Embleema Design System 2.0's Feedback/Alert
3
+ * component (Figma node 4668:4909). Per-type background, leading icon, and
4
+ * icon fill are pulled directly from the live Figma extraction.
5
+ *
6
+ * Five types: Success, Information, AI, Warning, Error. Each has:
7
+ * - Background fill (Feedback/{Type}/Background) — AI is a special stack:
8
+ * solid white with Gradient/AI overlaid at 40% opacity.
9
+ * - Accent color (Feedback/{Type}/Text) used for the icon and the action
10
+ * button text. AI uses the Gradient/AI as the icon fill.
11
+ * - Type-specific leading icon (24×24): Check / Info / Sparkles /
12
+ * Warning triangle / Close-circle.
13
+ * - No border — Figma alerts are borderless.
14
+ *
15
+ * Props:
16
+ * - type : Success | Information | AI | Warning | Error
17
+ * - title : optional bold first line
18
+ * - message : body text (or use children for richer content)
19
+ * - closeButton : show the X (default true). Color: Text/Secondary.
20
+ * - actionButton : show a text-link action (default false)
21
+ * - actionLabel : label for the action button (default "View")
22
+ * - onActionClick : action callback
23
+ * - onClose : dismiss callback
24
+ * - visible : controlled visibility
25
+ * - defaultVisible: uncontrolled initial visibility (default true)
26
+ */
27
+ import * as React from "react";
28
+ export type AlertType = "Success" | "Information" | "AI" | "Warning" | "Error";
29
+ export type AlertProps = {
30
+ type?: AlertType;
31
+ title?: string;
32
+ message?: string;
33
+ children?: React.ReactNode;
34
+ closeButton?: boolean;
35
+ actionButton?: boolean;
36
+ actionLabel?: string;
37
+ onActionClick?: () => void;
38
+ onClose?: () => void;
39
+ visible?: boolean;
40
+ defaultVisible?: boolean;
41
+ className?: string;
42
+ "aria-label"?: string;
43
+ };
44
+ export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
45
+ export default Alert;
46
+ export declare function AlertMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Badge — React port of Embleema Design System 2.0's Feedback/Badge component
3
+ * (Figma node 4860:38).
4
+ *
5
+ * Notification indicator for counts, status, or alerts anchored to nav items,
6
+ * tabs, or avatars. Three sizes × five semantic types.
7
+ *
8
+ * Sizes:
9
+ * - Dot → 6 × 6 solid circle, no content. Use for "unread" indicators.
10
+ * - Count → 16 × variable pill, numeric label (Nunito Bold 10/12). Falls
11
+ * back to "3" if no `label` is supplied (matches Figma default).
12
+ * - Icon → 16 × 16 circle with a 12 × 12 icon centered. Defaults to the
13
+ * Status/Alert glyph; pass a custom React node via `icon` to swap.
14
+ *
15
+ * Types (background colors):
16
+ * - Default → Action/Primary/Background (#306AE8) [semantic]
17
+ * - Error → Feedback/Error/Text (#B31A1A) [semantic]
18
+ * - Warning → Feedback/Warning/Text (#E15A00) [semantic]
19
+ * - Success → Feedback/Success/Text (#288028) [semantic]
20
+ * - Neutral → Text/Secondary (#5E5E5E) [semantic]
21
+ *
22
+ * Foreground (count text + icon fill) is always Text/Inverse (#FEFEFE).
23
+ *
24
+ * Props:
25
+ * - size : Dot | Count | Icon
26
+ * - type : Default | Error | Warning | Success | Neutral
27
+ * - label : string or number — only rendered for size=Count
28
+ * - icon : React node — only rendered for size=Icon; defaults to the
29
+ * Status/Alert glyph from the icon library
30
+ */
31
+ import * as React from "react";
32
+ export type BadgeSize = "Dot" | "Count" | "Icon";
33
+ export type BadgeType = "Default" | "Error" | "Warning" | "Success" | "Neutral";
34
+ export type BadgeProps = {
35
+ size?: BadgeSize;
36
+ type?: BadgeType;
37
+ label?: string | number;
38
+ icon?: React.ReactNode;
39
+ id?: string;
40
+ className?: string;
41
+ "aria-label"?: string;
42
+ };
43
+ export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
44
+ export default Badge;
45
+ export declare function BadgeMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { FieldAppearance } from './Field';
2
+ /**
3
+ * Barcode — React port of the Embleema Design System 2.0 Input/Barcode
4
+ * component (Figma node 4454:7). A molecule that wraps the base Field atom
5
+ * with a "Scan" primary button beside it and (when state="Complete") a
6
+ * BarcodePreview card showing the rendered barcode bars + scanned number.
7
+ *
8
+ * State handling:
9
+ * - Default / Hover / Focused / Disabled / ReadOnly are forwarded to Field's
10
+ * own state prop, so the browser's :hover and :focus pseudo-classes light
11
+ * up the field interactively (the explicit prop wins when supplied)
12
+ * - Error sets the field's validation to Error and tints the helper text
13
+ * - Complete renders the BarcodePreview card below the field/helper
14
+ */
15
+ import * as React from "react";
16
+ export type BarcodeState = "Default" | "Hover" | "Focused" | "Complete" | "Error" | "Disabled" | "ReadOnly";
17
+ export type BarcodeStyle = FieldAppearance;
18
+ export type BarcodeLabelPosition = "Top" | "Left";
19
+ export type BarcodeProps = {
20
+ state?: BarcodeState;
21
+ style?: BarcodeStyle;
22
+ labelPosition?: BarcodeLabelPosition;
23
+ label?: boolean | string;
24
+ helperText?: boolean | string;
25
+ required?: boolean;
26
+ value?: string;
27
+ defaultValue?: string;
28
+ onChange?: (value: string) => void;
29
+ /** Fires when the user clicks the Scan button. */
30
+ onScan?: () => void;
31
+ id?: string;
32
+ name?: string;
33
+ className?: string;
34
+ "aria-label"?: string;
35
+ };
36
+ export declare const Barcode: React.ForwardRefExoticComponent<BarcodeProps & React.RefAttributes<HTMLInputElement>>;
37
+ export default Barcode;
38
+ export declare function BarcodeMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Boolean — React port of the Embleema Design System 2.0 Input/Boolean
3
+ * component (Figma node 4498:1262). A binary yes/no toggle field used in
4
+ * clinical forms and surveys. Renders two card-style selector options with
5
+ * radio indicators, plus an optional label, in vertical or horizontal
6
+ * layouts, with the label positioned above or to the left.
7
+ *
8
+ * Color bindings:
9
+ * - Option card bg: Background/Field (#F8F8F8)
10
+ * - Option border: Border/Default (#DDDDDD) (Error: Border/Error 1.5px)
11
+ * - Selected radio: Action/Primary/Background (#306AE8) ring + dot
12
+ * - Error bg/border: Feedback/Error/Background / Border/Error
13
+ * - Error helper: Feedback/Error/Text (#B31A1A), body/sm-semibold
14
+ * - Disabled bg: Background/Disabled (#F1F1F1)
15
+ * - Label text: Text/Primary (#0E0E0E); Error → with red asterisk
16
+ * - ReadOnly: Background/Disabled fill, locked, but selection stays
17
+ */
18
+ import * as React from "react";
19
+ export type BooleanState = "Default" | "Error" | "Disabled" | "ReadOnly";
20
+ export type BooleanDirection = "Vertical" | "Horizontal";
21
+ export type BooleanLabelPosition = "Top" | "Left";
22
+ export type BooleanProps = {
23
+ state?: BooleanState;
24
+ direction?: BooleanDirection;
25
+ labelPosition?: BooleanLabelPosition;
26
+ label?: boolean | string;
27
+ required?: boolean;
28
+ /** Display text for the two options. Defaults to "Yes" / "No". */
29
+ yesLabel?: string;
30
+ noLabel?: string;
31
+ /** Underlying values returned via onChange. Defaults to true / false. */
32
+ yesValue?: boolean | string;
33
+ noValue?: boolean | string;
34
+ /** Controlled value. */
35
+ value?: boolean | string | null;
36
+ defaultValue?: boolean | string | null;
37
+ onChange?: (value: boolean | string | null) => void;
38
+ /** Override the default error/helper text. */
39
+ helperText?: string;
40
+ id?: string;
41
+ name?: string;
42
+ className?: string;
43
+ "aria-label"?: string;
44
+ };
45
+ export declare const Boolean_: React.ForwardRefExoticComponent<BooleanProps & React.RefAttributes<HTMLDivElement>>;
46
+ export { Boolean_ as Boolean };
47
+ export default Boolean_;
48
+ export declare function BooleanMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Button — React port of the Embleema Design System 2.0 Action/Button component
3
+ * (Figma node 5013:7). Variant, Kind (Figma's "Type"), Size, LeadingIcon, and
4
+ * TrailingIcon are props; Default / Hover / Focus / Disabled are wired to real
5
+ * browser states via :hover, :focus-visible, and :disabled.
6
+ *
7
+ * Colors mirror the bindings extracted directly from the Figma component:
8
+ * - Semantic tokens where the Figma fill is bound to a semantic variable
9
+ * (Action/Primary/Background, Action/Disabled/Text, Feedback/Error/Background, …).
10
+ * - Primitive tokens where the Figma fill is bound directly to a primitive
11
+ * (Blue/100, Blue/300, Red/100, Red/300, Neutral/50, Neutral/200, Neutral/300).
12
+ * - Border/FocusRing for the 4px outside focus ring.
13
+ *
14
+ * Sizes:
15
+ * - Large : 46px tall, 12 / 20 padding, 8px gap, 20×20 icon, button/lg (18 / 120%)
16
+ * - Medium: 39px tall, 10 / 20 padding, 6px gap, 18×18 icon, button/md (16 / 120%)
17
+ * - Small : 33px tall, 8 / 16 padding, 4px gap, 16×16 icon, button/sm (14 / 120%)
18
+ *
19
+ * Inverse buttons render light fills/text on the assumption the surrounding
20
+ * surface is dark.
21
+ */
22
+ import * as React from "react";
23
+ export type ButtonVariant = "Primary" | "Destructive" | "Inverse";
24
+ export type ButtonKind = "Filled" | "Outlined" | "Text";
25
+ export type ButtonSize = "Large" | "Medium" | "Small";
26
+ export type ButtonProps = {
27
+ variant?: ButtonVariant;
28
+ /** Figma's "Type" property. Renamed to avoid clashing with HTML <button type>. */
29
+ kind?: ButtonKind;
30
+ size?: ButtonSize;
31
+ disabled?: boolean;
32
+ leadingIcon?: React.ReactNode;
33
+ trailingIcon?: React.ReactNode;
34
+ children?: React.ReactNode;
35
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
36
+ /** HTML <button type>. Defaults to "button". */
37
+ type?: "button" | "submit" | "reset";
38
+ className?: string;
39
+ "aria-label"?: string;
40
+ };
41
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
42
+ export default Button;
43
+ /**
44
+ * Embleema icon set ports. SVG path data was extracted directly from the
45
+ * Icons page (node 18:451) of the Design System 2.0 Figma file:
46
+ * - Icon/Action/Add — node 4052:2912 (vector at 4052:2913)
47
+ * - Icon/Navigation/ArrowRight — node 4052:2944 (vector at 4052:2945)
48
+ * Both icons live inside a 24×24 component frame in Figma; the vector
49
+ * itself is 18×18 (Add) / 20×20 (ArrowRight), positioned at offset 3,3
50
+ * (Add) / 2,2 (ArrowRight) inside the frame. The translate keeps the
51
+ * react-rendered icons visually identical to the Figma source.
52
+ */
53
+ export declare function IconAdd(): import("react/jsx-runtime").JSX.Element;
54
+ export declare function IconArrowRight(): import("react/jsx-runtime").JSX.Element;
55
+ export declare function ButtonMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Cards — React ports of Embleema Design System 2.0's Layout card components:
3
+ * - TaskCard (Figma node 4985:211) — gradient task card with 5 colors
4
+ * - NavigationCard (Figma node 4986:77) — Stacked or Horizontal nav card
5
+ * - ContentCard (Figma node 5077:7) — tappable content card with logo,
6
+ * text, action buttons, chevron,
7
+ * and optional corner decoration
8
+ *
9
+ * Each export reads its layout, spacing, typography, icons, and colors from
10
+ * the Figma source directly. Hover affordances are added on top of the spec
11
+ * for interactivity (subtle lift via box-shadow + transform).
12
+ *
13
+ * Color tokens used (per embleema-design-system.md):
14
+ * - Background/Default #FEFEFE
15
+ * - Neutral/200 #F1F1F1
16
+ * - Text/Primary #0E0E0E
17
+ * - Text/Secondary #5E5E5E
18
+ * - Text/Inverse #FEFEFE (white on the Task Card gradients)
19
+ * - Action/Primary/Background #306AE8 (Content Card buttons)
20
+ *
21
+ * Task Card gradients are hardcoded per the Figma source (the spec notes the
22
+ * gradients cannot be variable-bound in Figma).
23
+ */
24
+ import * as React from "react";
25
+ export type TaskCardColor = "DarkBlue" | "Blue" | "Green" | "Magenta" | "Purple";
26
+ export type TaskCardAction = {
27
+ label: string;
28
+ leadingIcon?: React.ReactNode | boolean;
29
+ onClick?: () => void;
30
+ };
31
+ export type TaskCardProps = {
32
+ header: string;
33
+ body: string;
34
+ color?: TaskCardColor;
35
+ headerIcon?: React.ReactNode;
36
+ /** Show the time-estimate row in the action band. */
37
+ timeEstimate?: boolean;
38
+ time?: string;
39
+ primaryAction?: TaskCardAction;
40
+ secondaryAction?: TaskCardAction;
41
+ id?: string;
42
+ className?: string;
43
+ "aria-label"?: string;
44
+ };
45
+ export declare const TaskCard: React.ForwardRefExoticComponent<TaskCardProps & React.RefAttributes<HTMLDivElement>>;
46
+ export type NavigationCardType = "Stacked" | "Horizontal";
47
+ export type NavigationCardProps = {
48
+ label: string;
49
+ /** Only used on Horizontal. */
50
+ body?: string;
51
+ type?: NavigationCardType;
52
+ /** Optional image to fill the 80 × 80 circular image slot. Pass an <img>
53
+ or any node; omit to render the checkered placeholder per Figma. */
54
+ image?: React.ReactNode;
55
+ id?: string;
56
+ className?: string;
57
+ "aria-label"?: string;
58
+ };
59
+ export declare const NavigationCard: React.ForwardRefExoticComponent<NavigationCardProps & React.RefAttributes<HTMLDivElement>>;
60
+ export type ContentCardAction = {
61
+ label: string;
62
+ leadingIcon?: React.ReactNode | boolean;
63
+ onClick?: () => void;
64
+ };
65
+ export type ContentCardProps = {
66
+ header: string;
67
+ body: string;
68
+ tertiary?: string;
69
+ logo?: boolean | React.ReactNode;
70
+ tertiaryText?: boolean;
71
+ cornerDecoration?: boolean;
72
+ cornerIcon?: React.ReactNode;
73
+ divider?: boolean;
74
+ primaryAction?: ContentCardAction;
75
+ secondaryAction?: ContentCardAction;
76
+ id?: string;
77
+ className?: string;
78
+ "aria-label"?: string;
79
+ };
80
+ export declare const ContentCard: React.ForwardRefExoticComponent<ContentCardProps & React.RefAttributes<HTMLDivElement>>;
81
+ export type SurveyCardProps = {
82
+ title: string;
83
+ tagLabel?: string;
84
+ timeFrame?: string;
85
+ counter?: string;
86
+ primaryLabel?: string;
87
+ onStartClick?: () => void;
88
+ timeEstimate?: boolean;
89
+ time?: string;
90
+ id?: string;
91
+ className?: string;
92
+ "aria-label"?: string;
93
+ };
94
+ export declare const SurveyCard: React.ForwardRefExoticComponent<SurveyCardProps & React.RefAttributes<HTMLDivElement>>;
95
+ export declare function CardsMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Checkbox — React port of Embleema Design System 2.0's Selector/Checkbox
3
+ * component (Figma node 4258:271).
4
+ *
5
+ * Structure mirrors the Figma source:
6
+ * wrapper (HORIZONTAL, gap 8)
7
+ * ├── state-layer (34×34 circle, padding 8 — shows tint on hover/focus/pressed)
8
+ * │ └── container (18×18 rounded-2 square with 2px border, fills on
9
+ * │ selected/indeterminate, holds the check or dash icon)
10
+ * └── label (optional, body/md)
11
+ *
12
+ * Props:
13
+ * - state (forced) : Default | Hover | Focused | Pressed | Disabled
14
+ * Omit to let real browser :hover / :focus-within drive
15
+ * Hover and Focused naturally.
16
+ * - validation : None | Error (None = neutral palette, Error = red palette)
17
+ * - selected : controlled checked state
18
+ * - defaultSelected: uncontrolled initial state
19
+ * - indeterminate : forces the dash icon and the indeterminate fill,
20
+ * regardless of selected. Also sets the HTML
21
+ * `indeterminate` property via ref so screen readers
22
+ * announce the right state.
23
+ * - label : label string (clicking the label toggles the checkbox)
24
+ * - disabled : maps to data-state="Disabled" + HTML disabled
25
+ * - onChange : called with the new selected boolean
26
+ */
27
+ import * as React from "react";
28
+ export type CheckboxState = "Default" | "Hover" | "Focused" | "Pressed" | "Disabled";
29
+ export type CheckboxValidation = "None" | "Error";
30
+ export type CheckboxProps = {
31
+ state?: CheckboxState;
32
+ validation?: CheckboxValidation;
33
+ selected?: boolean;
34
+ defaultSelected?: boolean;
35
+ indeterminate?: boolean;
36
+ label?: string;
37
+ disabled?: boolean;
38
+ onChange?: (selected: boolean) => void;
39
+ id?: string;
40
+ name?: string;
41
+ value?: string;
42
+ className?: string;
43
+ "aria-label"?: string;
44
+ };
45
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
46
+ export default Checkbox;
47
+ export declare function CheckboxMatrix(): import("react/jsx-runtime").JSX.Element;
package/dist/Chip.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Chip — React port of Embleema Design System 2.0's Selector/Chip component
3
+ * (Figma node 5072:56).
4
+ *
5
+ * Interactive selection chip used for filtering, multi-select, and toggleable
6
+ * options. For read-only metadata labels, use Feedback/Tag — chips are
7
+ * interactive, tags are not.
8
+ *
9
+ * Structure mirrors the Figma source:
10
+ * chip (rounded pill, horizontal flex)
11
+ * ├── leading icon (optional, 16px, currentColor)
12
+ * ├── label (Nunito 16/150% — Regular by default, SemiBold on Selected)
13
+ * └── close button (optional, 16px)
14
+ *
15
+ * State coverage (all driven by data-checked + real :hover/:focus-visible):
16
+ * - Default → Background/Default + Border/Strong (1px)
17
+ * - Hover → Background/Default + Action/Primary/Background (1.5px) + 2px drop-shadow
18
+ * - Focus → Default chip + 2.5px Border/FocusRing outline
19
+ * - Selected → Blue/100 + Action/Primary/Background (2px), label SemiBold, 2px drop-shadow
20
+ * - SelectedHover → Blue/200 + Action/Primary/Background (2px), label Regular, 2px drop-shadow
21
+ * - SelectedFocus → Selected chip + 2.5px Border/FocusRing outline
22
+ * - Disabled → Action/Disabled/Background + Neutral/300 (border), text Action/Disabled/Text
23
+ *
24
+ * The borders use inset box-shadow rather than real CSS borders, so the
25
+ * 1 / 1.5 / 2 / 2.5 px width changes between states don't cause layout shift.
26
+ *
27
+ * Props:
28
+ * - state : forced visual override for previews (matches Figma's
29
+ * seven-state matrix). Omit in production — natural
30
+ * :hover / :focus-visible / disabled drive everything.
31
+ * - label : chip text (or pass children for richer content)
32
+ * - selected : controlled selection
33
+ * - defaultSelected: uncontrolled initial selection
34
+ * - disabled : non-interactive, gray fill
35
+ * - leadingIcon : boolean → default placeholder glyph; ReactNode → custom
36
+ * - dismissible : show the close button
37
+ * - onChange : called with the new selected boolean
38
+ * - onDismiss : called when the close button is clicked
39
+ * - visible : controlled visibility (for dismissal)
40
+ * - defaultVisible : uncontrolled initial visibility (default true)
41
+ */
42
+ import * as React from "react";
43
+ export type ChipState = "Default" | "Hover" | "Focus" | "Selected" | "SelectedHover" | "SelectedFocus" | "Disabled";
44
+ export type ChipProps = {
45
+ state?: ChipState;
46
+ label?: string;
47
+ children?: React.ReactNode;
48
+ selected?: boolean;
49
+ defaultSelected?: boolean;
50
+ disabled?: boolean;
51
+ leadingIcon?: boolean | React.ReactNode;
52
+ dismissible?: boolean;
53
+ onChange?: (selected: boolean) => void;
54
+ onDismiss?: () => void;
55
+ visible?: boolean;
56
+ defaultVisible?: boolean;
57
+ id?: string;
58
+ className?: string;
59
+ "aria-label"?: string;
60
+ };
61
+ export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
62
+ export default Chip;
63
+ export declare function ChipMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { FieldValidation } from './Field';
2
+ /**
3
+ * DateField — React port of the Embleema Design System 2.0 Input/Date Field
4
+ * component (Figma node 4621:1143). A molecule that wraps the base Field atom
5
+ * and adds:
6
+ * - "mm/dd/yyyy" placeholder
7
+ * - An inline "Today" button (Action/Link/Default blue outline) that fills
8
+ * in today's date
9
+ * - A calendar_month trailing icon that opens an inline Date Picker
10
+ * overlay (Figma node 4512:3325) anchored below the field
11
+ * - Optional Input/Label above (LabelPosition=Top) or to the left
12
+ * (LabelPosition=Left, fixed 120px column width per Figma)
13
+ * - Optional helper / error / warning / success message below the field
14
+ *
15
+ * The Date Picker (with Calendar / Month / Year views) and the Calendar
16
+ * Cell (Figma node 4583:7) are private sub-components — they only ship as
17
+ * part of DateField, not as standalone catalog entries.
18
+ */
19
+ import * as React from "react";
20
+ export type DateFieldValidation = FieldValidation;
21
+ export type DateFieldLabelPosition = "Top" | "Left";
22
+ export type DateFieldProps = {
23
+ validation?: DateFieldValidation;
24
+ labelPosition?: DateFieldLabelPosition;
25
+ /** true → renders the default "Date" label. String → custom label text. */
26
+ label?: boolean | string;
27
+ /** true → renders the default helper / validation message. String → custom. */
28
+ helperText?: boolean | string;
29
+ required?: boolean;
30
+ /** Controlled date string in mm/dd/yyyy format. */
31
+ value?: string;
32
+ defaultValue?: string;
33
+ onChange?: (value: string) => void;
34
+ onTodayClick?: (todayValue: string) => void;
35
+ id?: string;
36
+ name?: string;
37
+ disabled?: boolean;
38
+ readOnly?: boolean;
39
+ className?: string;
40
+ "aria-label"?: string;
41
+ };
42
+ export declare const DateField: React.ForwardRefExoticComponent<DateFieldProps & React.RefAttributes<HTMLInputElement>>;
43
+ export default DateField;
44
+ export declare function DateFieldMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { FieldState, FieldValidation, FieldAppearance } from './Field';
2
+ /**
3
+ * Dropdown — React port of Embleema Design System 2.0's Input/Dropdown
4
+ * (Figma node 4208:353) + Input/Dropdown Menu (Figma node 4278:501).
5
+ *
6
+ * Composes <Field /> as the visual trigger and renders a floating menu
7
+ * below when open. Supports Single and Multi selection, optional search,
8
+ * keyboard navigation, click-outside-to-close, and full controlled or
9
+ * uncontrolled value/open state.
10
+ *
11
+ * Dropdown props:
12
+ * - options : DropdownOption[] (value + label, optional disabled)
13
+ * - type : "Single" | "Multi"
14
+ * - search : show search input at top of menu, filters options
15
+ * - value : controlled selection (string for Single, string[] for Multi)
16
+ * - defaultValue : uncontrolled initial selection
17
+ * - onChange : called with the new selection
18
+ * - open / defaultOpen / onOpenChange : open-state passthrough
19
+ * - validation, appearance, labelPosition, label, required, helperText:
20
+ * Field-level props, behave identically to TextField
21
+ * - placeholder, disabled, state, id, name, aria-label
22
+ *
23
+ * Keyboard:
24
+ * - Click trigger or ArrowDown when closed → opens menu, highlights first option
25
+ * - ArrowDown / ArrowUp → move highlight
26
+ * - Enter / Space → select highlighted option (Multi: toggle; Single: select + close)
27
+ * - Escape → close menu
28
+ * - Tab → close menu, return focus to trigger
29
+ * - Typing in search input filters options (search-only mode)
30
+ */
31
+ import * as React from "react";
32
+ export type DropdownType = "Single" | "Multi";
33
+ export type DropdownLabelPosition = "Top" | "Left";
34
+ export type DropdownOption = {
35
+ value: string;
36
+ label: string;
37
+ disabled?: boolean;
38
+ };
39
+ export type DropdownProps = {
40
+ options: DropdownOption[];
41
+ type?: DropdownType;
42
+ /** Search is auto-enabled when options.length > 5. Override here only if
43
+ * you need to force it on (e.g., async-loaded options) or off. */
44
+ search?: boolean;
45
+ searchPlaceholder?: string;
46
+ value?: string | string[];
47
+ defaultValue?: string | string[];
48
+ onChange?: (value: string | string[]) => void;
49
+ open?: boolean;
50
+ defaultOpen?: boolean;
51
+ onOpenChange?: (open: boolean) => void;
52
+ validation?: FieldValidation;
53
+ appearance?: FieldAppearance;
54
+ labelPosition?: DropdownLabelPosition;
55
+ label?: string;
56
+ required?: boolean;
57
+ helperText?: string;
58
+ placeholder?: string;
59
+ state?: FieldState;
60
+ disabled?: boolean;
61
+ id?: string;
62
+ name?: string;
63
+ className?: string;
64
+ "aria-label"?: string;
65
+ };
66
+ export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
67
+ export default Dropdown;
68
+ export declare function DropdownMatrix(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Field — React port of Embleema Design System 2.0's Input/Field (base atom)
3
+ * component (Figma node 4127:5556). This is the visual shell that wraps an
4
+ * input, leading/trailing icons, and an optional inline button.
5
+ *
6
+ * Props:
7
+ * - state : Default | Hover | Focused | Pressed | Disabled | ReadOnly
8
+ * When omitted, browser pseudo-classes (:hover, :focus-within)
9
+ * drive Hover/Focused automatically. The Pressed/Disabled/
10
+ * ReadOnly forms can also be passed as `state` to force them
11
+ * for previews — but `disabled` and `readOnly` HTML attrs
12
+ * are also supported and produce the same look.
13
+ * - validation : None | Error | Warning | Success | AI
14
+ * - appearance : Filled | Outlined (renamed from Figma's "Style" to avoid
15
+ * collision with React's reserved `style` prop)
16
+ * - leadingIcon : React node rendered to the left of the input
17
+ * - trailingIcon: React node rendered to the right (after the inline button)
18
+ * - inlineButton: React node rendered between input and trailing icon
19
+ *
20
+ * Sizes/structure match the Figma source: 12 px padding all sides, 4 px gap,
21
+ * 4 px border radius, 20×20 icon slots, body/md-light typography.
22
+ */
23
+ import * as React from "react";
24
+ export type FieldState = "Default" | "Hover" | "Focused" | "Pressed" | "Disabled" | "ReadOnly";
25
+ export type FieldValidation = "None" | "Error" | "Warning" | "Success" | "AI";
26
+ export type FieldAppearance = "Filled" | "Outlined";
27
+ export type FieldProps = {
28
+ state?: FieldState;
29
+ validation?: FieldValidation;
30
+ appearance?: FieldAppearance;
31
+ leadingIcon?: React.ReactNode;
32
+ trailingIcon?: React.ReactNode;
33
+ inlineButton?: React.ReactNode;
34
+ placeholder?: string;
35
+ value?: string;
36
+ defaultValue?: string;
37
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
38
+ disabled?: boolean;
39
+ readOnly?: boolean;
40
+ className?: string;
41
+ id?: string;
42
+ name?: string;
43
+ type?: "text" | "email" | "password" | "number" | "tel" | "url" | "search";
44
+ "aria-label"?: string;
45
+ };
46
+ export declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLInputElement>>;
47
+ export default Field;
48
+ export declare function FieldMatrix(): import("react/jsx-runtime").JSX.Element;