react-ecosphere 0.0.0-stage → 1.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 (151) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +21 -0
  3. package/README.md +126 -2
  4. package/dist/components/actions/EcoButton.d.ts +34 -0
  5. package/dist/components/actions/EcoIconButton.d.ts +43 -0
  6. package/dist/components/actions/EcoLink.d.ts +20 -0
  7. package/dist/components/actions/EcoSplitButton.d.ts +28 -0
  8. package/dist/components/actions/index.d.ts +8 -0
  9. package/dist/components/charts/ChartFrame.d.ts +33 -0
  10. package/dist/components/charts/EcoAreaChart.d.ts +38 -0
  11. package/dist/components/charts/EcoBarChart.d.ts +65 -0
  12. package/dist/components/charts/EcoBarList.d.ts +33 -0
  13. package/dist/components/charts/EcoChartTooltip.d.ts +28 -0
  14. package/dist/components/charts/EcoDivergingBarChart.d.ts +33 -0
  15. package/dist/components/charts/EcoDonutChart.d.ts +27 -0
  16. package/dist/components/charts/EcoLineChart.d.ts +35 -0
  17. package/dist/components/charts/EcoPieChart.d.ts +26 -0
  18. package/dist/components/charts/EcoRadarChart.d.ts +31 -0
  19. package/dist/components/charts/EcoStepLineChart.d.ts +31 -0
  20. package/dist/components/charts/index.d.ts +21 -0
  21. package/dist/components/charts/types.d.ts +99 -0
  22. package/dist/components/charts/useChart.d.ts +19 -0
  23. package/dist/components/charts/utils.d.ts +113 -0
  24. package/dist/components/data/EcoChecklist.d.ts +16 -0
  25. package/dist/components/data/EcoDataTable.d.ts +98 -0
  26. package/dist/components/data/EcoFindings.d.ts +15 -0
  27. package/dist/components/data/EcoKpi.d.ts +26 -0
  28. package/dist/components/data/EcoLeaderRow.d.ts +28 -0
  29. package/dist/components/data/EcoListRow.d.ts +51 -0
  30. package/dist/components/data/EcoListRows.d.ts +6 -0
  31. package/dist/components/data/EcoQuestionItem.d.ts +25 -0
  32. package/dist/components/data/EcoRowGroup.d.ts +29 -0
  33. package/dist/components/data/EcoRowItem.d.ts +31 -0
  34. package/dist/components/data/EcoSourceRow.d.ts +21 -0
  35. package/dist/components/data/EcoStat.d.ts +22 -0
  36. package/dist/components/data/EcoTable.d.ts +97 -0
  37. package/dist/components/data/EcoTaskRow.d.ts +37 -0
  38. package/dist/components/data/EcoTaskRows.d.ts +7 -0
  39. package/dist/components/data/EcoTimeline.d.ts +23 -0
  40. package/dist/components/data/EcoTreeTable.d.ts +43 -0
  41. package/dist/components/data/EcoTreeView.d.ts +46 -0
  42. package/dist/components/data/EcoTreeViewNode.d.ts +14 -0
  43. package/dist/components/data/EcoValueChange.d.ts +18 -0
  44. package/dist/components/data/index.d.ts +39 -0
  45. package/dist/components/data/treeContext.d.ts +17 -0
  46. package/dist/components/data/types.d.ts +175 -0
  47. package/dist/components/display/EcoAvatar.d.ts +19 -0
  48. package/dist/components/display/EcoBadge.d.ts +20 -0
  49. package/dist/components/display/EcoEmptyState.d.ts +28 -0
  50. package/dist/components/display/EcoKeyValue.d.ts +24 -0
  51. package/dist/components/display/EcoMeter.d.ts +21 -0
  52. package/dist/components/display/EcoPlaceholder.d.ts +19 -0
  53. package/dist/components/display/EcoPlanCard.d.ts +32 -0
  54. package/dist/components/display/EcoScore.d.ts +14 -0
  55. package/dist/components/display/EcoSkeleton.d.ts +32 -0
  56. package/dist/components/display/EcoTag.d.ts +8 -0
  57. package/dist/components/display/EcoTags.d.ts +9 -0
  58. package/dist/components/display/index.d.ts +23 -0
  59. package/dist/components/display/types.d.ts +17 -0
  60. package/dist/components/feedback/EcoComposeModal.d.ts +80 -0
  61. package/dist/components/feedback/EcoConfirmHost.d.ts +9 -0
  62. package/dist/components/feedback/EcoDialog.d.ts +58 -0
  63. package/dist/components/feedback/EcoDrawer.d.ts +41 -0
  64. package/dist/components/feedback/EcoMenu.d.ts +76 -0
  65. package/dist/components/feedback/EcoNotice.d.ts +38 -0
  66. package/dist/components/feedback/EcoNotifications.d.ts +52 -0
  67. package/dist/components/feedback/EcoSpinner.d.ts +29 -0
  68. package/dist/components/feedback/EcoToast.d.ts +35 -0
  69. package/dist/components/feedback/EcoToaster.d.ts +9 -0
  70. package/dist/components/feedback/EcoTooltip.d.ts +26 -0
  71. package/dist/components/feedback/index.d.ts +25 -0
  72. package/dist/components/feedback/types.d.ts +94 -0
  73. package/dist/components/feedback/useConfirm.d.ts +43 -0
  74. package/dist/components/feedback/useToast.d.ts +38 -0
  75. package/dist/components/forms/EcoCheckbox.d.ts +28 -0
  76. package/dist/components/forms/EcoCheckboxGroup.d.ts +27 -0
  77. package/dist/components/forms/EcoChoicePills.d.ts +27 -0
  78. package/dist/components/forms/EcoComposer.d.ts +45 -0
  79. package/dist/components/forms/EcoCycleSelect.d.ts +24 -0
  80. package/dist/components/forms/EcoDatePicker.d.ts +42 -0
  81. package/dist/components/forms/EcoEmailField.d.ts +13 -0
  82. package/dist/components/forms/EcoField.d.ts +34 -0
  83. package/dist/components/forms/EcoFieldGrid.d.ts +9 -0
  84. package/dist/components/forms/EcoFileUpload.d.ts +48 -0
  85. package/dist/components/forms/EcoNumberField.d.ts +27 -0
  86. package/dist/components/forms/EcoOtpField.d.ts +37 -0
  87. package/dist/components/forms/EcoPhoneField.d.ts +38 -0
  88. package/dist/components/forms/EcoSearchField.d.ts +36 -0
  89. package/dist/components/forms/EcoSegmented.d.ts +23 -0
  90. package/dist/components/forms/EcoSelect.d.ts +82 -0
  91. package/dist/components/forms/EcoSelectButton.d.ts +43 -0
  92. package/dist/components/forms/EcoSwitch.d.ts +34 -0
  93. package/dist/components/forms/EcoTextField.d.ts +32 -0
  94. package/dist/components/forms/EcoTextarea.d.ts +20 -0
  95. package/dist/components/forms/EcoTimePicker.d.ts +39 -0
  96. package/dist/components/forms/index.d.ts +43 -0
  97. package/dist/components/forms/types.d.ts +47 -0
  98. package/dist/components/general/EcoAuroraBackground.d.ts +13 -0
  99. package/dist/components/general/EcoIcon.d.ts +13 -0
  100. package/dist/components/general/index.d.ts +4 -0
  101. package/dist/components/index.d.ts +9 -0
  102. package/dist/components/layout/EcoAppShell.d.ts +46 -0
  103. package/dist/components/layout/EcoCard.d.ts +29 -0
  104. package/dist/components/layout/EcoDivider.d.ts +18 -0
  105. package/dist/components/layout/EcoHero.d.ts +40 -0
  106. package/dist/components/layout/EcoHeroPanelRow.d.ts +18 -0
  107. package/dist/components/layout/EcoMasthead.d.ts +31 -0
  108. package/dist/components/layout/EcoNavItem.d.ts +40 -0
  109. package/dist/components/layout/EcoNavSection.d.ts +11 -0
  110. package/dist/components/layout/EcoPageGrid.d.ts +13 -0
  111. package/dist/components/layout/EcoPageHeader.d.ts +20 -0
  112. package/dist/components/layout/EcoSection.d.ts +17 -0
  113. package/dist/components/layout/EcoThread.d.ts +66 -0
  114. package/dist/components/layout/EcoTimetable.d.ts +32 -0
  115. package/dist/components/layout/index.d.ts +27 -0
  116. package/dist/components/layout/types.d.ts +81 -0
  117. package/dist/components/navigation/EcoDisclosure.d.ts +29 -0
  118. package/dist/components/navigation/EcoDisclosureGroup.d.ts +14 -0
  119. package/dist/components/navigation/EcoFilterChips.d.ts +23 -0
  120. package/dist/components/navigation/EcoPagination.d.ts +40 -0
  121. package/dist/components/navigation/EcoProgressSteps.d.ts +24 -0
  122. package/dist/components/navigation/EcoTabs.d.ts +33 -0
  123. package/dist/components/navigation/disclosure.d.ts +9 -0
  124. package/dist/components/navigation/index.d.ts +13 -0
  125. package/dist/components/navigation/types.d.ts +66 -0
  126. package/dist/ecosphere.css +5789 -0
  127. package/dist/fonts/GoogleSans.woff2 +0 -0
  128. package/dist/fonts/fraunces-latin-ext-opsz-normal.woff2 +0 -0
  129. package/dist/fonts/fraunces-latin-opsz-normal.woff2 +0 -0
  130. package/dist/fonts/fraunces-vietnamese-opsz-normal.woff2 +0 -0
  131. package/dist/fonts/remixicon.woff2 +0 -0
  132. package/dist/hooks/index.d.ts +1 -0
  133. package/dist/hooks/useEcoId.d.ts +6 -0
  134. package/dist/index.d.ts +3 -0
  135. package/dist/internal/Portal.d.ts +8 -0
  136. package/dist/internal/attrs.d.ts +5 -0
  137. package/dist/internal/cx.d.ts +4 -0
  138. package/dist/internal/data-slot.d.ts +16 -0
  139. package/dist/internal/feedback-node.d.ts +8 -0
  140. package/dist/internal/feedback-value.d.ts +10 -0
  141. package/dist/internal/forms-hooks.d.ts +14 -0
  142. package/dist/internal/forms-popover.d.ts +11 -0
  143. package/dist/internal/layout-watch.d.ts +6 -0
  144. package/dist/internal/overlay.d.ts +28 -0
  145. package/dist/internal/useControllableState.d.ts +8 -0
  146. package/dist/internal/useIsClient.d.ts +5 -0
  147. package/dist/react-ecosphere.cjs +1 -0
  148. package/dist/react-ecosphere.js +8710 -0
  149. package/dist/tokens.json +690 -0
  150. package/dist/types.d.ts +15 -0
  151. package/package.json +66 -5
@@ -0,0 +1,37 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoOtpFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
3
+ /** Field label. Text or a node (`#label`). */
4
+ label?: ReactNode;
5
+ required?: boolean;
6
+ hint?: string;
7
+ error?: string;
8
+ invalid?: boolean;
9
+ first?: boolean;
10
+ disabled?: boolean;
11
+ /** Number of digits: 4, 5 or 6. */
12
+ length?: 4 | 5 | 6;
13
+ /** Smaller boxes (`otp--sm`). */
14
+ size?: "md" | "sm";
15
+ /** Put a separator (`otp__sep`) after this many digits, e.g. 2 for "42 891". */
16
+ groupAfter?: number;
17
+ /** Accessible name of the group when there is no label. */
18
+ groupLabel?: string;
19
+ /** The digits typed so far (controlled; v-model). */
20
+ value?: string;
21
+ /** Initial digits when uncontrolled. */
22
+ defaultValue?: string;
23
+ /** The digits changed. */
24
+ onChange?: (value: string) => void;
25
+ /** Every box is filled. */
26
+ onComplete?: (code: string) => void;
27
+ }
28
+ /** What the ref exposes: `focus()` moves to the first empty box. */
29
+ export interface EcoOtpFieldHandle {
30
+ focus: () => void;
31
+ }
32
+ /**
33
+ * OtpField — a one-time code, one box per digit, so a person sees how long the code is before
34
+ * typing. Typing advances, Backspace goes back, a paste fills every box. A wrong code is wrong as
35
+ * a whole: the group turns `is-invalid`. Say where the code went in the hint, masked.
36
+ */
37
+ export declare const EcoOtpField: import('react').ForwardRefExoticComponent<EcoOtpFieldProps & import('react').RefAttributes<EcoOtpFieldHandle>>;
@@ -0,0 +1,38 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { EcoDialCode } from './types';
3
+ export interface EcoPhoneFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children" | "id" | "placeholder"> {
4
+ /** Field label. Text or a node (`#label`). */
5
+ label?: ReactNode;
6
+ required?: boolean;
7
+ hint?: string;
8
+ error?: string;
9
+ invalid?: boolean;
10
+ first?: boolean;
11
+ disabled?: boolean;
12
+ /** Id of the number input; generated when omitted. */
13
+ id?: string;
14
+ placeholder?: string;
15
+ /** Dial codes offered in the menu. Without them the code is shown but not changeable. */
16
+ codes?: EcoDialCode[];
17
+ numberLabel?: string;
18
+ /** The number as typed (controlled; v-model). */
19
+ value?: string;
20
+ /** Initial number when uncontrolled. */
21
+ defaultValue?: string;
22
+ /** The number changed (receives the value, not the event). */
23
+ onChange?: (value: string) => void;
24
+ /** The dial code (controlled; v-model:code). */
25
+ code?: string;
26
+ /** Initial dial code when uncontrolled. */
27
+ defaultCode?: string;
28
+ /** The dial code changed. */
29
+ onCodeChange?: (code: string) => void;
30
+ }
31
+ /**
32
+ * PhoneField — a dial code and a number in one box: one border, one focus ring. The number keeps
33
+ * its formatting as typed. On an invalid number the whole `phonefield` turns, and the error says
34
+ * what a valid number looks like in that country.
35
+ * `value` is the number, `code` the dial code; `codes` fills the dial-code menu. The ref goes to
36
+ * the number `<input>`; other attributes to the field.
37
+ */
38
+ export declare const EcoPhoneField: import('react').ForwardRefExoticComponent<EcoPhoneFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,36 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoSearchFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
3
+ variant?: "search" | "finder";
4
+ placeholder?: string;
5
+ /** Accessible name of the input. */
6
+ label?: string;
7
+ clearLabel?: string;
8
+ /** Finder only: show the filter button. */
9
+ filter?: boolean;
10
+ /** Finder only: a filter is applied (`filb is-on`). */
11
+ filterActive?: boolean;
12
+ filterLabel?: string;
13
+ /** Finder only: the filter menu is open (`aria-expanded`). */
14
+ filterOpen?: boolean;
15
+ disabled?: boolean;
16
+ /** Finder only: replaces the filter button, e.g. with a menu trigger (vue-ecosphere's `#filter` slot). */
17
+ filterButton?: ReactNode;
18
+ /** The query (controlled; v-model). */
19
+ value?: string;
20
+ /** Initial query when uncontrolled. */
21
+ defaultValue?: string;
22
+ /** The query changed (receives the value, not the event). */
23
+ onChange?: (value: string) => void;
24
+ /** Enter in the field. */
25
+ onSearch?: (value: string) => void;
26
+ /** The clear button (or Escape) emptied the field. */
27
+ onClear?: () => void;
28
+ /** The filter button was pressed. */
29
+ onFilter?: () => void;
30
+ }
31
+ /**
32
+ * SearchField — `search` is the full-width page bar; `finder` is the compact one that sits in a
33
+ * toolbar and carries its own filter button. The clear button shows only while there is a value.
34
+ * Enter calls `onSearch`; Escape clears. The ref goes to the `<input>`.
35
+ */
36
+ export declare const EcoSearchField: import('react').ForwardRefExoticComponent<EcoSearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { EcoSegmentedOption } from './types';
3
+ export interface EcoSegmentedProps<V extends string | number = string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children"> {
4
+ options: EcoSegmentedOption<V>[];
5
+ /** Accessible name of the group. */
6
+ label?: string;
7
+ /** Narrow padding (`seg--tight`). */
8
+ tight?: boolean;
9
+ disabled?: boolean;
10
+ /** The chosen value, or `null` (controlled; v-model). */
11
+ value?: V | null;
12
+ /** Initial value when uncontrolled. */
13
+ defaultValue?: V | null;
14
+ /** An option was chosen. */
15
+ onChange?: (value: V | null) => void;
16
+ }
17
+ /**
18
+ * Segmented — one choice over a few exclusive options (up to about six), all visible at once.
19
+ * Put the count inside the option ("Received 78") so the control doubles as the summary.
20
+ * `mark` colours the selected option in a register (present, absent, late); `tight` narrows it
21
+ * for a control that repeats down a column.
22
+ */
23
+ export declare function EcoSegmented<V extends string | number>({ options, label, tight, disabled, value, defaultValue, onChange, className, ...rest }: EcoSegmentedProps<V>): import('react').JSX.Element;
@@ -0,0 +1,82 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { EcoOption } from '../../types';
3
+ import { EcoSelectFilter } from './types';
4
+ export interface EcoSelectProps<V extends string | number = string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children" | "id" | "placeholder"> {
5
+ options: EcoOption<V>[];
6
+ /** Field label. Text or a node (`#label`). */
7
+ label?: ReactNode;
8
+ required?: boolean;
9
+ hint?: string;
10
+ error?: string;
11
+ invalid?: boolean;
12
+ first?: boolean;
13
+ disabled?: boolean;
14
+ placeholder?: string;
15
+ /** `sm` (32px) for toolbars and table headers; keep `md` inside forms. */
16
+ size?: "md" | "sm";
17
+ /** Id of an external label, when there is no `label` (e.g. a caption in a toolbar). */
18
+ labelledby?: string;
19
+ /** Id of the trigger button; generated when omitted. */
20
+ id?: string;
21
+ /**
22
+ * A search box (`menu__find`) at the top of the open list. It takes focus when the list
23
+ * opens and filters as you type; the query resets when the list closes.
24
+ */
25
+ searchable?: boolean;
26
+ /** Placeholder of the search box. */
27
+ searchPlaceholder?: string;
28
+ /**
29
+ * How a `searchable` list filters: `true` keeps options whose `label` or `hint` contains
30
+ * the query (case-insensitive), `false` keeps `options` as given (the parent filters on
31
+ * `onSearch`, for server-side search), or a function `(option, query) => boolean`.
32
+ */
33
+ filter?: boolean | EcoSelectFilter<V>;
34
+ /**
35
+ * A × inside the trigger while a value is chosen. It, and Delete or Backspace on the closed
36
+ * trigger, set the value to `null` and call `onClear`. Leave it off a required choice.
37
+ */
38
+ clearable?: boolean;
39
+ /** Accessible name of the × button. */
40
+ clearLabel?: string;
41
+ /** The open list shows `loadingText` in a status row instead of the options, and the listbox is `aria-busy`. */
42
+ loading?: boolean;
43
+ /** Text of the status row while `loading`. */
44
+ loadingText?: string;
45
+ /** Shown in the open list when there is nothing to choose. Defaults to "No matches" while a query is typed, "No options" otherwise. */
46
+ emptyText?: string;
47
+ /** The chosen value, or `null` (controlled; v-model). */
48
+ value?: V | null;
49
+ /** Initial value when uncontrolled. */
50
+ defaultValue?: V | null;
51
+ /** A value was chosen, or cleared (`null`). */
52
+ onChange?: (value: V | null) => void;
53
+ /** Whether the list is open (controlled; v-model:open). */
54
+ open?: boolean;
55
+ defaultOpen?: boolean;
56
+ onOpenChange?: (open: boolean) => void;
57
+ /** The search box's query as it is typed; `""` when the list closes and the query resets. */
58
+ onSearch?: (query: string) => void;
59
+ /** The value was cleared with the × or Delete/Backspace. */
60
+ onClear?: () => void;
61
+ /** Trigger content for the chosen option (`#value`); `option` is undefined while nothing is chosen. */
62
+ renderValue?: (scope: {
63
+ option: EcoOption<V> | undefined;
64
+ }) => ReactNode;
65
+ /** Content of each option row (`#option`). */
66
+ renderOption?: (scope: {
67
+ option: EcoOption<V>;
68
+ selected: boolean;
69
+ }) => ReactNode;
70
+ }
71
+ /**
72
+ * Select — a single choice from a short list: the `selbtn` combobox opens a `menu--select`
73
+ * listbox under it. Arrow keys move the highlight, Enter chooses, Escape closes, typing jumps.
74
+ * A disabled option stays in the list with a `hint` saying why. While nothing is chosen the
75
+ * placeholder says what to choose ("Choose a region"), not "Select…".
76
+ *
77
+ * Past about twenty options, or when they come from a server, make it `searchable`: the open
78
+ * list gets a `menu__find` box that takes focus and filters as you type. For server-side search
79
+ * set `filter={false}`, answer `onSearch` by replacing `options`, and show `loading` meanwhile.
80
+ * `clearable` adds a × while a value is chosen; use it only where "nothing" is a valid answer.
81
+ */
82
+ export declare function EcoSelect<V extends string | number>({ options, label, required, hint, error, invalid, first, disabled, placeholder, size, labelledby: labelledbyProp, id, searchable, searchPlaceholder, filter, clearable, clearLabel, loading, loadingText, emptyText, value, defaultValue, onChange, open: openProp, defaultOpen, onOpenChange, onSearch, onClear, renderValue, renderOption, className, ...rest }: EcoSelectProps<V>): import('react').JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { EcoOption } from '../../types';
3
+ export interface EcoSelectButtonProps<V extends string | number = string | number> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children" | "placeholder" | "aria-label"> {
4
+ options: EcoOption<V>[];
5
+ /** Field label. Text or a node (`#label`). */
6
+ label?: ReactNode;
7
+ required?: boolean;
8
+ hint?: string;
9
+ error?: string;
10
+ first?: boolean;
11
+ disabled?: boolean;
12
+ placeholder?: string;
13
+ /** Accessible name of the trigger when there is no `label`. */
14
+ "aria-label"?: string;
15
+ /** Join between an option's label and hint in the trigger. */
16
+ separator?: string;
17
+ /** The chosen value, or `null` (controlled; v-model). */
18
+ value?: V | null;
19
+ /** Initial value when uncontrolled. */
20
+ defaultValue?: V | null;
21
+ /** A value was chosen. */
22
+ onChange?: (value: V | null) => void;
23
+ /** Whether the menu is open (controlled; v-model:open). */
24
+ open?: boolean;
25
+ defaultOpen?: boolean;
26
+ onOpenChange?: (open: boolean) => void;
27
+ /** Trigger content for the chosen option (`#value`); `option` is undefined while nothing is chosen. */
28
+ renderValue?: (scope: {
29
+ option: EcoOption<V> | undefined;
30
+ }) => ReactNode;
31
+ /** Content of each menu row before the tick (`#option`). */
32
+ renderOption?: (scope: {
33
+ option: EcoOption<V>;
34
+ selected: boolean;
35
+ }) => ReactNode;
36
+ }
37
+ /**
38
+ * SelectButton — a disclosure button opening a `Menu`, for a choice a native select cannot show:
39
+ * "Block A · 9 rooms, 4 unassigned" is the decision, "Block A" a guess at it. It matches `input`
40
+ * exactly, so it sits in an `fgrid` beside real inputs. The trigger shows the chosen value; the
41
+ * label sits above it.
42
+ */
43
+ export declare function EcoSelectButton<V extends string | number>({ options, label, required, hint, error, first, disabled, placeholder, "aria-label": ariaLabel, separator, value, defaultValue, onChange, open: openProp, defaultOpen, onOpenChange, renderValue, renderOption, className, ...rest }: EcoSelectButtonProps<V>): import('react').JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "checked" | "defaultChecked" | "onChange" | "children"> {
3
+ /** Visible label beside the track: the thing that is true while it is on. `children` override it. */
4
+ label?: string;
5
+ /** Second line under the label (`switch__h`), wired with `aria-describedby`; say why it is disabled here. Text or a node (`#hint`). */
6
+ hint?: ReactNode;
7
+ disabled?: boolean;
8
+ /** A save in flight: `aria-busy`, a small indicator in the thumb, and the switch ignores input. */
9
+ loading?: boolean;
10
+ /** `sm` for dense rows and table cells. */
11
+ size?: "md" | "sm";
12
+ /** Native name attribute; the form posts `on` (or `value`) while it is on. */
13
+ name?: string;
14
+ /** Input id; generated when omitted. */
15
+ id?: string;
16
+ /** On state (controlled; v-model). */
17
+ checked?: boolean;
18
+ /** Initial on state when uncontrolled. */
19
+ defaultChecked?: boolean;
20
+ /** The on state changed (receives the new state, not the event). */
21
+ onChange?: (checked: boolean) => void;
22
+ children?: ReactNode;
23
+ }
24
+ /**
25
+ * Switch — an on/off setting that takes effect the moment it flips ("Email me when a request is
26
+ * assigned"). When the choice only applies on Save, use a Checkbox instead. Write the label as
27
+ * the thing that is true while the switch is on, never "Enable …", and do not add an On/Off word
28
+ * beside it: the track already says so. A native `input type="checkbox" role="switch"`, so it
29
+ * posts with a form and Space toggles it; the whole line is the label. Set `loading` while the
30
+ * change saves: the switch is `aria-busy` and ignores input until it clears. Extra attributes
31
+ * (aria-label for a switch without a visible label, value, listeners) and the ref go to the
32
+ * `<input>`; `className` and `style` to the `<label>`.
33
+ */
34
+ export declare const EcoSwitch: import('react').ForwardRefExoticComponent<EcoSwitchProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,32 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { IconName } from '../../types';
3
+ import { EcoFieldProps } from './types';
4
+ export interface EcoTextFieldProps extends EcoFieldProps, Omit<InputHTMLAttributes<HTMLInputElement>, keyof EcoFieldProps | "type" | "value" | "defaultValue" | "onChange" | "children"> {
5
+ type?: "text" | "email" | "password" | "tel" | "url" | "search" | "number";
6
+ placeholder?: string;
7
+ /** Leading glyph inside the box (`ifield` + `ifield__ico`). */
8
+ icon?: IconName;
9
+ /** Trailing glyph inside the box (`ifield--end`). Ignored while `reveal` shows its button. */
10
+ iconEnd?: IconName;
11
+ /** With `type="password"`: a show/hide button at the end of the box (`aria-pressed` while shown). */
12
+ reveal?: boolean;
13
+ /** Accessible name of the reveal button while the password is hidden. */
14
+ showLabel?: string;
15
+ /** Accessible name of the reveal button while the password is shown. */
16
+ hideLabel?: string;
17
+ /** The input's value (controlled; v-model). */
18
+ value?: string;
19
+ /** Initial value when uncontrolled. */
20
+ defaultValue?: string;
21
+ /** The value changed (receives the value, not the event). */
22
+ onChange?: (value: string) => void;
23
+ }
24
+ /**
25
+ * TextField — a labelled `input` with an optional required mark and one line of help.
26
+ * Put a glyph inside the box with `icon` (or `iconEnd`); the glyph is inert and never a button.
27
+ * For a password, add `reveal`: an eye button at the end of the box shows and hides what was
28
+ * typed (it takes the end of the box over `iconEnd`). Extra attributes (name, autoComplete,
29
+ * inputMode, readOnly, listeners) go to the `<input>`, and so does the ref; `className` and
30
+ * `style` go to the field.
31
+ */
32
+ export declare const EcoTextField: import('react').ForwardRefExoticComponent<EcoTextFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,20 @@
1
+ import { TextareaHTMLAttributes } from 'react';
2
+ import { EcoFieldProps } from './types';
3
+ export interface EcoTextareaProps extends EcoFieldProps, Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, keyof EcoFieldProps | "value" | "defaultValue" | "onChange" | "children" | "maxLength"> {
4
+ placeholder?: string;
5
+ size?: "sm" | "md" | "lg";
6
+ /** Character limit: shows the `charcount`. Not enforced natively, so the over-limit state can show. */
7
+ maxLength?: number;
8
+ /** The text (controlled; v-model). */
9
+ value?: string;
10
+ /** Initial text when uncontrolled. */
11
+ defaultValue?: string;
12
+ /** The text changed (receives the value, not the event). */
13
+ onChange?: (value: string) => void;
14
+ }
15
+ /**
16
+ * Textarea — the multi-line field in three heights: `sm` for a sentence, `md` for a paragraph,
17
+ * `lg` for a handover note. Show a counter only where a real limit exists (`maxLength`);
18
+ * it turns `is-over` past the limit and the fix goes in the error beside it.
19
+ */
20
+ export declare const EcoTextarea: import('react').ForwardRefExoticComponent<EcoTextareaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,39 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoTimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue" | "children" | "id" | "placeholder"> {
3
+ /** Field label. Text or a node (`#label`). */
4
+ label?: ReactNode;
5
+ required?: boolean;
6
+ hint?: string;
7
+ error?: string;
8
+ invalid?: boolean;
9
+ first?: boolean;
10
+ disabled?: boolean;
11
+ /** Id of the input; generated when omitted. */
12
+ id?: string;
13
+ placeholder?: string;
14
+ /** Minutes between options. */
15
+ step?: number;
16
+ /** First option, `HH:mm`. */
17
+ start?: string;
18
+ /** Last option, `HH:mm`. */
19
+ end?: string;
20
+ /** Show "09:30 AM" rather than "09:30". */
21
+ hour12?: boolean;
22
+ /** The time as 24-hour `HH:mm`, or `""` (controlled; v-model). */
23
+ value?: string;
24
+ /** Initial time when uncontrolled. */
25
+ defaultValue?: string;
26
+ /** The time changed (`HH:mm`, or `""` when cleared). */
27
+ onChange?: (value: string) => void;
28
+ /** Whether the list is open (controlled; v-model:open). */
29
+ open?: boolean;
30
+ defaultOpen?: boolean;
31
+ onOpenChange?: (open: boolean) => void;
32
+ }
33
+ /**
34
+ * TimePicker — a time field with a clock glyph, and the `timelist` of times that opens from it,
35
+ * banded by `timelist__sec` (Morning, Afternoon, Evening). Offer the times people actually pick
36
+ * (`step`, `start`, `end`) and keep the field typed for anything the list does not hold.
37
+ * Say the timezone in the hint. `value` is 24-hour `HH:mm`. The ref goes to the `<input>`.
38
+ */
39
+ export declare const EcoTimePicker: import('react').ForwardRefExoticComponent<EcoTimePickerProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,43 @@
1
+ export { EcoField } from './EcoField';
2
+ export type { EcoFieldComponentProps } from './EcoField';
3
+ export { EcoFieldGrid } from './EcoFieldGrid';
4
+ export type { EcoFieldGridProps } from './EcoFieldGrid';
5
+ export { EcoTextField } from './EcoTextField';
6
+ export type { EcoTextFieldProps } from './EcoTextField';
7
+ export { EcoTextarea } from './EcoTextarea';
8
+ export type { EcoTextareaProps } from './EcoTextarea';
9
+ export { EcoCheckbox } from './EcoCheckbox';
10
+ export type { EcoCheckboxProps } from './EcoCheckbox';
11
+ export { EcoCheckboxGroup } from './EcoCheckboxGroup';
12
+ export type { EcoCheckboxGroupProps } from './EcoCheckboxGroup';
13
+ export { EcoSwitch } from './EcoSwitch';
14
+ export type { EcoSwitchProps } from './EcoSwitch';
15
+ export { EcoSearchField } from './EcoSearchField';
16
+ export type { EcoSearchFieldProps } from './EcoSearchField';
17
+ export { EcoNumberField } from './EcoNumberField';
18
+ export type { EcoNumberFieldProps } from './EcoNumberField';
19
+ export { EcoEmailField } from './EcoEmailField';
20
+ export type { EcoEmailFieldProps } from './EcoEmailField';
21
+ export { EcoPhoneField } from './EcoPhoneField';
22
+ export type { EcoPhoneFieldProps } from './EcoPhoneField';
23
+ export { EcoOtpField } from './EcoOtpField';
24
+ export type { EcoOtpFieldProps, EcoOtpFieldHandle } from './EcoOtpField';
25
+ export { EcoSelect } from './EcoSelect';
26
+ export type { EcoSelectProps } from './EcoSelect';
27
+ export { EcoSelectButton } from './EcoSelectButton';
28
+ export type { EcoSelectButtonProps } from './EcoSelectButton';
29
+ export { EcoChoicePills } from './EcoChoicePills';
30
+ export type { EcoChoicePillsProps } from './EcoChoicePills';
31
+ export { EcoSegmented } from './EcoSegmented';
32
+ export type { EcoSegmentedProps } from './EcoSegmented';
33
+ export { EcoCycleSelect } from './EcoCycleSelect';
34
+ export type { EcoCycleSelectProps } from './EcoCycleSelect';
35
+ export { EcoDatePicker } from './EcoDatePicker';
36
+ export type { EcoDatePickerProps } from './EcoDatePicker';
37
+ export { EcoTimePicker } from './EcoTimePicker';
38
+ export type { EcoTimePickerProps } from './EcoTimePicker';
39
+ export { EcoComposer } from './EcoComposer';
40
+ export type { EcoComposerProps } from './EcoComposer';
41
+ export { EcoFileUpload } from './EcoFileUpload';
42
+ export type { EcoFileUploadProps } from './EcoFileUpload';
43
+ export type * from './types';
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ import { EcoOption } from '../../types';
3
+ /** Props every field-style component shares: they render the `field` wrapper. */
4
+ export interface EcoFieldProps {
5
+ /** Field label (`field__l`). Text, or a node (vue-ecosphere's `#label` slot). */
6
+ label?: ReactNode;
7
+ /** Adds the `req` mark after the label. */
8
+ required?: boolean;
9
+ /** One line of help (`field__hint`): the format or the range. */
10
+ hint?: string;
11
+ /** Error text (`field__err`). Replaces the hint while set — never both. */
12
+ error?: string;
13
+ /** Invalid without a message (sets `aria-invalid`). */
14
+ invalid?: boolean;
15
+ /** First field in its container: drops the top margin (`field--first`). */
16
+ first?: boolean;
17
+ disabled?: boolean;
18
+ /** Id for the control; generated when omitted. */
19
+ id?: string;
20
+ }
21
+ /**
22
+ * EcoSelect's `filter` as a function: whether an option stays listed for the typed query.
23
+ * The query arrives trimmed and is never empty (an empty query lists every option).
24
+ */
25
+ export type EcoSelectFilter<V = string | number> = (option: EcoOption<V>, query: string) => boolean;
26
+ /** Option for EcoSegmented: `mark` colours the selected option in a register (`on--p` `on--a` `on--l`). */
27
+ export interface EcoSegmentedOption<V = string | number> extends EcoOption<V> {
28
+ mark?: "p" | "a" | "l";
29
+ }
30
+ /** One dial code in EcoPhoneField's menu. */
31
+ export interface EcoDialCode {
32
+ /** "+91" */
33
+ code: string;
34
+ /** "India" */
35
+ label?: string;
36
+ }
37
+ /** Upload state of one file in EcoFileUpload's queue. */
38
+ export type EcoFileState = "waiting" | "uploading" | "saved" | "failed" | "invalid";
39
+ export interface EcoFileStatus {
40
+ state: EcoFileState;
41
+ /** 0–100 while uploading; leave out when the transport reports no progress. */
42
+ progress?: number;
43
+ /** What went wrong, in the reader's terms (shown in `uplist__err`). */
44
+ error?: string;
45
+ /** Badge text override, e.g. "Already saved". */
46
+ label?: string;
47
+ }
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface EcoAuroraBackgroundProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
3
+ /** Three gradient colours as `r, g, b` triplets. Defaults to accent, p3 and p1. */
4
+ colors?: [string, string, string];
5
+ /** Opacity of the `--app-canvas` veil laid over the colour (0 = none). */
6
+ veil?: number;
7
+ }
8
+ /**
9
+ * The Ecosphere landing background: three radial gradients drifting and rotating
10
+ * at co-prime periods so the pattern never visibly repeats. Motion stops under
11
+ * `prefers-reduced-motion`. Place it inside a `position: relative` container.
12
+ */
13
+ export declare function EcoAuroraBackground({ colors, veil, className, ...rest }: EcoAuroraBackgroundProps): import('react').JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { IconName } from '../../types';
3
+ export interface EcoIconProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
4
+ /** RemixIcon name without `ri-`, e.g. `"add-line"`. A full `"ri-add-line"` also works. */
5
+ name: IconName;
6
+ /** Accessible name. Omit for a decorative icon (`aria-hidden`). */
7
+ label?: string;
8
+ }
9
+ /**
10
+ * A RemixIcon glyph (the icon font ships with the stylesheet).
11
+ * Decorative by default; pass `label` to make it meaningful to assistive tech.
12
+ */
13
+ export declare function EcoIcon({ name, label, className, ...rest }: EcoIconProps): import('react').JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { EcoIcon } from './EcoIcon';
2
+ export type { EcoIconProps } from './EcoIcon';
3
+ export { EcoAuroraBackground } from './EcoAuroraBackground';
4
+ export type { EcoAuroraBackgroundProps } from './EcoAuroraBackground';
@@ -0,0 +1,9 @@
1
+ export * from './actions';
2
+ export * from './general';
3
+ export * from './display';
4
+ export * from './data';
5
+ export * from './charts';
6
+ export * from './forms';
7
+ export * from './navigation';
8
+ export * from './feedback';
9
+ export * from './layout';
@@ -0,0 +1,46 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoAppShellProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Product name in the lockup. */
4
+ brand?: string;
5
+ /** Qualifier after the name, set in `--text-muted` ("Campus"). */
6
+ brandSuffix?: string;
7
+ /** Letter on the accent tile; defaults to the first letter of `brand`. */
8
+ brandLetter?: string;
9
+ /** Where you are, in the topbar (`topbar__where`). `topbar` replaces it. */
10
+ where?: string;
11
+ /** Accessible name of the sidebar landmark. */
12
+ sidebarLabel?: string;
13
+ /** Accessible name of the primary navigation. */
14
+ navLabel?: string;
15
+ /** Collapsed to the rail (controlled; v-model:rail). Mirrored onto `document.body` as `data-rail`. */
16
+ rail?: boolean;
17
+ defaultRail?: boolean;
18
+ onRailChange?: (rail: boolean) => void;
19
+ /** The off-canvas drawer below 1024px (controlled; v-model:open). */
20
+ open?: boolean;
21
+ defaultOpen?: boolean;
22
+ onOpenChange?: (open: boolean) => void;
23
+ /** Replaces the lockup (`span.brand`) with your own mark (vue-ecosphere's `#brand` slot). */
24
+ lockup?: ReactNode;
25
+ /** `EcoNavSection` and `EcoNavItem` children of the primary navigation. */
26
+ nav?: ReactNode;
27
+ /** Content in the sidebar foot, before the rail button. */
28
+ sidebarFoot?: ReactNode;
29
+ /** Replaces `topbar__where`. */
30
+ topbar?: ReactNode;
31
+ /** Controls at the end of the topbar (notifications, account). */
32
+ topbarEnd?: ReactNode;
33
+ /** The work area. */
34
+ children?: ReactNode;
35
+ }
36
+ /**
37
+ * AppShell — the frame every screen sits in: a fixed sidebar, a topbar, and the work area
38
+ * between them. The brand lockup is type, not an asset: an accent tile with one letter, then
39
+ * the product name with its qualifier muted. Collapsing to the rail is a layout state
40
+ * (`data-rail` on `body`), not a theme. Below 1024px the sidebar becomes an off-canvas
41
+ * drawer opened from the topbar burger.
42
+ *
43
+ * It renders three siblings (sidebar, scrim, main): `className`, `style` and other attributes
44
+ * land on `.main`.
45
+ */
46
+ export declare function EcoAppShell({ brand, brandSuffix, brandLetter, where, sidebarLabel, navLabel, rail: railProp, defaultRail, onRailChange, open: openProp, defaultOpen, onOpenChange, lockup, nav, sidebarFoot, topbar, topbarEnd, className, children, ...rest }: EcoAppShellProps): import('react').JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoCardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
3
+ /** Small caps label at the top of the head (text or a node). */
4
+ eyebrow?: ReactNode;
5
+ /** Card title (`card-title`), text or a node. */
6
+ title?: ReactNode;
7
+ /** Heading level of the title. */
8
+ as?: "h2" | "h3" | "h4";
9
+ /** Element to render. */
10
+ tag?: ElementType;
11
+ /** Drop the body padding (tables, timetables and charts that run to the edge). */
12
+ flush?: boolean;
13
+ /** Inline style on `card__body`, as the artifact uses for a chart under a stat head (`paddingTop: 6`). */
14
+ bodyStyle?: CSSProperties;
15
+ /** More content under the eyebrow on the left of the head (a stat value). */
16
+ head?: ReactNode;
17
+ /** Controls on the right of the head: a link, a range picker, icon buttons. */
18
+ actions?: ReactNode;
19
+ /** After the body, edge to edge. */
20
+ footer?: ReactNode;
21
+ /** The body (`card__body`). */
22
+ children?: ReactNode;
23
+ }
24
+ /**
25
+ * Card — the resting surface: `--el-rest` and nothing more, and it does not lift on hover.
26
+ * An optional head carries an eyebrow or a card title on the left and controls on the right
27
+ * (`actions`); the body holds the content. `footer` sits after the body, edge to edge.
28
+ */
29
+ export declare function EcoCard({ eyebrow, title, as: As, tag: Tag, flush, bodyStyle, head, actions, footer, className, children, ...rest }: EcoCardProps): import('react').JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface EcoDividerProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
3
+ /** Text set on the rule (`divider__t`); `children` override it. Without either, a plain `<hr>`. */
4
+ label?: string;
5
+ /** Where the label sits: at the start of the rule (the usual case) or centred on it. */
6
+ align?: "start" | "center";
7
+ /** First thing in its container: drops the top margin (`divider--first`). */
8
+ first?: boolean;
9
+ children?: ReactNode;
10
+ }
11
+ /**
12
+ * Divider — a hairline between two runs of content that belong to the same surface. With a
13
+ * `label` it names the run below it ("Guardian details") in small caps, so it sits further from
14
+ * what came before than from what follows; keep the label to a few words. Between cards or page
15
+ * sections, use the section's own spacing instead of a rule. Set `first` when it opens its
16
+ * container (drops the top margin).
17
+ */
18
+ export declare function EcoDivider({ label, align, first, className, children, ...rest }: EcoDividerProps): import('react').JSX.Element;