@fiestaboard/ui 3.0.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/components/containment/json-tree.d.ts +59 -0
  2. package/dist/components/containment/json-tree.js +122 -0
  3. package/dist/components/containment/json-tree.js.map +1 -0
  4. package/dist/components/editor/color-picker-content.d.ts +25 -0
  5. package/dist/components/editor/color-picker-content.js +118 -0
  6. package/dist/components/editor/color-picker-content.js.map +1 -0
  7. package/dist/components/editor/constants.d.ts +87 -0
  8. package/dist/components/editor/constants.js +29 -0
  9. package/dist/components/editor/constants.js.map +1 -0
  10. package/dist/components/editor/draw-char-picker-content.d.ts +22 -0
  11. package/dist/components/editor/draw-char-picker-content.js +79 -0
  12. package/dist/components/editor/draw-char-picker-content.js.map +1 -0
  13. package/dist/components/editor/extensions/color-tile-node.d.ts +10 -0
  14. package/dist/components/editor/extensions/color-tile-node.js +43 -0
  15. package/dist/components/editor/extensions/color-tile-node.js.map +1 -0
  16. package/dist/components/editor/extensions/fill-space-node.d.ts +10 -0
  17. package/dist/components/editor/extensions/fill-space-node.js +40 -0
  18. package/dist/components/editor/extensions/fill-space-node.js.map +1 -0
  19. package/dist/components/editor/extensions/formula-node.d.ts +6 -0
  20. package/dist/components/editor/extensions/formula-node.js +40 -0
  21. package/dist/components/editor/extensions/formula-node.js.map +1 -0
  22. package/dist/components/editor/extensions/line-navigation.d.ts +18 -0
  23. package/dist/components/editor/extensions/line-navigation.js +16 -0
  24. package/dist/components/editor/extensions/line-navigation.js.map +1 -0
  25. package/dist/components/editor/extensions/single-paragraph-doc.d.ts +15 -0
  26. package/dist/components/editor/extensions/single-paragraph-doc.js +11 -0
  27. package/dist/components/editor/extensions/single-paragraph-doc.js.map +1 -0
  28. package/dist/components/editor/extensions/trailing-newline.d.ts +13 -0
  29. package/dist/components/editor/extensions/trailing-newline.js +27 -0
  30. package/dist/components/editor/extensions/trailing-newline.js.map +1 -0
  31. package/dist/components/editor/extensions/variable-node.d.ts +15 -0
  32. package/dist/components/editor/extensions/variable-node.js +56 -0
  33. package/dist/components/editor/extensions/variable-node.js.map +1 -0
  34. package/dist/components/editor/extensions/wrapped-text-node.d.ts +9 -0
  35. package/dist/components/editor/extensions/wrapped-text-node.js +31 -0
  36. package/dist/components/editor/extensions/wrapped-text-node.js.map +1 -0
  37. package/dist/components/editor/filter-picker-content.d.ts +24 -0
  38. package/dist/components/editor/filter-picker-content.js +146 -0
  39. package/dist/components/editor/filter-picker-content.js.map +1 -0
  40. package/dist/components/editor/formatting-picker-content.d.ts +30 -0
  41. package/dist/components/editor/formatting-picker-content.js +154 -0
  42. package/dist/components/editor/formatting-picker-content.js.map +1 -0
  43. package/dist/components/editor/formula/formula-editor-panel.d.ts +102 -0
  44. package/dist/components/editor/formula/formula-editor-panel.js +527 -0
  45. package/dist/components/editor/formula/formula-editor-panel.js.map +1 -0
  46. package/dist/components/editor/node-views/color-tile-node-view.d.ts +21 -0
  47. package/dist/components/editor/node-views/color-tile-node-view.js +66 -0
  48. package/dist/components/editor/node-views/color-tile-node-view.js.map +1 -0
  49. package/dist/components/editor/node-views/fill-space-node-view.d.ts +16 -0
  50. package/dist/components/editor/node-views/fill-space-node-view.js +43 -0
  51. package/dist/components/editor/node-views/fill-space-node-view.js.map +1 -0
  52. package/dist/components/editor/node-views/formula-node-view.d.ts +39 -0
  53. package/dist/components/editor/node-views/formula-node-view.js +109 -0
  54. package/dist/components/editor/node-views/formula-node-view.js.map +1 -0
  55. package/dist/components/editor/node-views/node-view-context.d.ts +58 -0
  56. package/dist/components/editor/node-views/node-view-context.js +22 -0
  57. package/dist/components/editor/node-views/node-view-context.js.map +1 -0
  58. package/dist/components/editor/node-views/variable-node-view.d.ts +16 -0
  59. package/dist/components/editor/node-views/variable-node-view.js +63 -0
  60. package/dist/components/editor/node-views/variable-node-view.js.map +1 -0
  61. package/dist/components/editor/node-views/wrapped-text-view.d.ts +14 -0
  62. package/dist/components/editor/node-views/wrapped-text-view.js +46 -0
  63. package/dist/components/editor/node-views/wrapped-text-view.js.map +1 -0
  64. package/dist/components/editor/template-editor-toolbar.d.ts +146 -0
  65. package/dist/components/editor/template-editor-toolbar.js +434 -0
  66. package/dist/components/editor/template-editor-toolbar.js.map +1 -0
  67. package/dist/components/editor/template-editor.d.ts +109 -0
  68. package/dist/components/editor/template-editor.js +662 -0
  69. package/dist/components/editor/template-editor.js.map +1 -0
  70. package/dist/components/editor/toolbar-dropdown.d.ts +20 -0
  71. package/dist/components/editor/toolbar-dropdown.js +88 -0
  72. package/dist/components/editor/toolbar-dropdown.js.map +1 -0
  73. package/dist/components/editor/utils/draw-mode.d.ts +55 -0
  74. package/dist/components/editor/utils/draw-mode.js +79 -0
  75. package/dist/components/editor/utils/draw-mode.js.map +1 -0
  76. package/dist/components/editor/utils/insertion.d.ts +11 -0
  77. package/dist/components/editor/utils/insertion.js +26 -0
  78. package/dist/components/editor/utils/insertion.js.map +1 -0
  79. package/dist/components/editor/utils/length-calculator.d.ts +36 -0
  80. package/dist/components/editor/utils/length-calculator.js +32 -0
  81. package/dist/components/editor/utils/length-calculator.js.map +1 -0
  82. package/dist/components/editor/utils/serialization.d.ts +34 -0
  83. package/dist/components/editor/utils/serialization.js +184 -0
  84. package/dist/components/editor/utils/serialization.js.map +1 -0
  85. package/dist/components/editor/utils/stroke-transaction.d.ts +36 -0
  86. package/dist/components/editor/utils/stroke-transaction.js +57 -0
  87. package/dist/components/editor/utils/stroke-transaction.js.map +1 -0
  88. package/dist/components/editor/variable-picker-content.d.ts +130 -0
  89. package/dist/components/editor/variable-picker-content.js +422 -0
  90. package/dist/components/editor/variable-picker-content.js.map +1 -0
  91. package/dist/components/feedback/status-dot.d.ts +49 -0
  92. package/dist/components/feedback/status-dot.js +58 -0
  93. package/dist/components/feedback/status-dot.js.map +1 -0
  94. package/dist/components/forms/secret-input.d.ts +38 -0
  95. package/dist/components/forms/secret-input.js +42 -0
  96. package/dist/components/forms/secret-input.js.map +1 -0
  97. package/dist/components/forms/time-picker.d.ts +87 -0
  98. package/dist/components/forms/time-picker.js +260 -0
  99. package/dist/components/forms/time-picker.js.map +1 -0
  100. package/dist/components/forms/toggle-card.d.ts +120 -0
  101. package/dist/components/forms/toggle-card.js +211 -0
  102. package/dist/components/forms/toggle-card.js.map +1 -0
  103. package/dist/components/overlays/popover.d.ts +65 -0
  104. package/dist/components/overlays/popover.js +89 -0
  105. package/dist/components/overlays/popover.js.map +1 -0
  106. package/dist/editor.css +164 -0
  107. package/dist/index.d.ts +34 -0
  108. package/dist/index.js +95 -61
  109. package/dist/lib/board-colors.d.ts +16 -0
  110. package/dist/lib/board-colors.js +14 -14
  111. package/dist/lib/board-colors.js.map +1 -1
  112. package/dist/lib/use-deps-changed.d.ts +33 -0
  113. package/dist/lib/use-deps-changed.js +11 -0
  114. package/dist/lib/use-deps-changed.js.map +1 -0
  115. package/package.json +50 -2
@@ -0,0 +1,49 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import * as React from "react";
3
+ declare const statusDotVariants: (props?: ({
4
+ status?: "info" | "success" | "warning" | "danger" | "neutral" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ pulse?: boolean | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export interface StatusDotProps extends Omit<React.ComponentProps<"span">, "children" | "color">, VariantProps<typeof statusDotVariants> {
9
+ /**
10
+ * Soft halo in the dot's own colour, colour-mixed to 50%. Purely
11
+ * decorative emphasis — it is never the only signal of anything.
12
+ */
13
+ glow?: boolean;
14
+ /**
15
+ * Text announced to assistive technology.
16
+ *
17
+ * Defaults to `null` — a DECORATIVE dot, `aria-hidden`, for the common case
18
+ * where the dot sits immediately beside text that already states the status
19
+ * ("● Running"). Announcing it there would produce "Running Running", and a
20
+ * bare unlabelled dot in the tree is worse than none.
21
+ *
22
+ * Pass a string for a STANDALONE dot that is the only carrier of the state
23
+ * (a header service indicator, a cell in a dense table). The dot then gets
24
+ * `role="status"` and an `sr-only` label, so the state is announced when it
25
+ * changes — which is also what keeps it clear of WCAG 1.4.1 (Use of Colour),
26
+ * since hue alone would otherwise be the entire message.
27
+ *
28
+ * There is deliberately no default label per status: "success" is not a
29
+ * sentence, and the real one ("Service running", "3 boards offline") is
30
+ * always the caller's to write.
31
+ */
32
+ label?: string | null;
33
+ }
34
+ /**
35
+ * Small coloured state indicator.
36
+ *
37
+ * Two supported shapes, and the `label` prop is what selects between them:
38
+ *
39
+ * <StatusDot status="success" /> Running decorative, aria-hidden
40
+ * <StatusDot status="success" label="Running" /> standalone, role="status"
41
+ *
42
+ * `role="status"` is a polite live region: the label is announced when it
43
+ * changes, which is the right behaviour for a dot tracking a connection. For
44
+ * a dot describing something static (a legend swatch, a row that never
45
+ * updates in place) pass `role="img"` — props spread over the computed
46
+ * attributes, so the override lands.
47
+ */
48
+ declare function StatusDot({ className, status, size, pulse, glow, label, style, ...props }: StatusDotProps): React.JSX.Element;
49
+ export { StatusDot, statusDotVariants };
@@ -0,0 +1,58 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import "react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { cva as n } from "class-variance-authority";
5
+ //#region src/components/feedback/status-dot.tsx
6
+ var r = n("inline-block shrink-0 rounded-full align-middle transition-[background-color,box-shadow] duration-control", {
7
+ variants: {
8
+ status: {
9
+ success: "bg-success [--status-dot-color:var(--color-success)]",
10
+ warning: "bg-warning [--status-dot-color:var(--color-warning)]",
11
+ danger: "bg-destructive [--status-dot-color:var(--color-destructive)]",
12
+ info: "bg-info [--status-dot-color:var(--color-info)]",
13
+ neutral: "bg-muted-foreground [--status-dot-color:var(--color-muted-foreground)]"
14
+ },
15
+ size: {
16
+ sm: "size-1.5 [--status-dot-glow:4px]",
17
+ md: "size-2 [--status-dot-glow:6px]",
18
+ lg: "size-3 [--status-dot-glow:8px]"
19
+ },
20
+ pulse: {
21
+ true: "animate-pulse motion-reduce:animate-none",
22
+ false: ""
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ status: "neutral",
27
+ size: "md",
28
+ pulse: !1
29
+ }
30
+ }), i = { boxShadow: "0 0 var(--status-dot-glow) color-mix(in oklch, var(--status-dot-color) 50%, transparent)" };
31
+ function a({ className: n, status: a = "neutral", size: o = "md", pulse: s = !1, glow: c = !1, label: l = null, style: u, ...d }) {
32
+ let f = l == null;
33
+ return /* @__PURE__ */ t("span", {
34
+ "data-slot": "status-dot",
35
+ "data-status": a,
36
+ "data-size": o,
37
+ role: f ? void 0 : "status",
38
+ "aria-hidden": f || void 0,
39
+ className: e(r({
40
+ status: a,
41
+ size: o,
42
+ pulse: s
43
+ }), n),
44
+ style: c ? {
45
+ ...i,
46
+ ...u
47
+ } : u,
48
+ ...d,
49
+ children: f ? null : /* @__PURE__ */ t("span", {
50
+ className: "sr-only",
51
+ children: l
52
+ })
53
+ });
54
+ }
55
+ //#endregion
56
+ export { a as StatusDot, r as statusDotVariants };
57
+
58
+ //# sourceMappingURL=status-dot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-dot.js","names":[],"sources":["../../../src/components/feedback/status-dot.tsx"],"mappings":";;;;;AAkBA,IAAM,IAAoB,EACxB,6GACA;CACE,UAAU;EACR,QAAQ;GACN,SAAS;GACT,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;EACX;EAIA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EAOA,OAAO;GACL,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,OAAO;CACT;AACF,CACF,GAMM,IAAkC,EACtC,WAAW,2FACb;AA4CA,SAAS,EAAU,EACjB,cACA,YAAS,WACT,UAAO,MACP,WAAQ,IACR,UAAO,IACP,WAAQ,MACR,UACA,GAAG,KACc;CACjB,IAAM,IAAa,KAAS;CAC5B,OACE,kBAAC,QAAD;EACE,aAAU;EACV,eAAa;EACb,aAAW;EACX,MAAM,IAAa,KAAA,IAAY;EAC/B,eAAa,KAAc,KAAA;EAC3B,WAAW,EAAG,EAAkB;GAAE;GAAQ;GAAM;EAAM,CAAC,GAAG,CAAS;EAEnE,OAAO,IAAO;GAAE,GAAG;GAAY,GAAG;EAAM,IAAI;EAC5C,GAAI;EASH,UAAA,IAAa,OAAO,kBAAC,QAAD;GAAM,WAAU;GAAW,UAAA;EAAY,CAAA;CACxD,CAAA;AAEV"}
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ import { type InputProps } from "./input";
3
+ export interface SecretInputProps extends Omit<InputProps, "type"> {
4
+ /**
5
+ * Accessible name for the toggle while the secret is masked — i.e. the
6
+ * action the button performs. Defaults to English "Show"; apps that
7
+ * localize pass their own string (this package never depends on i18n).
8
+ */
9
+ showLabel?: string;
10
+ /** Accessible name for the toggle while the secret is revealed. Default "Hide". */
11
+ hideLabel?: string;
12
+ /** Initial visibility for the uncontrolled case. */
13
+ defaultVisible?: boolean;
14
+ /** Controlled visibility; pair with {@link SecretInputProps.onVisibleChange}. */
15
+ visible?: boolean;
16
+ /** Fired with the next visibility whenever the toggle is activated. */
17
+ onVisibleChange?: (visible: boolean) => void;
18
+ /**
19
+ * Disables only the toggle, leaving the field editable. For write-only
20
+ * secrets the server returns a placeholder (`"***"`) rather than the value,
21
+ * so there is nothing to reveal — but the user may still type a new one.
22
+ */
23
+ revealDisabled?: boolean;
24
+ /** Classes for the relative wrapper (e.g. `flex-1` in a settings row). */
25
+ containerClassName?: string;
26
+ }
27
+ /**
28
+ * Password/token field with a reveal toggle.
29
+ *
30
+ * Composes {@link Input} rather than re-declaring a bordered control, so the
31
+ * field can never drift from the design system's control tokens, and mounts
32
+ * the toggle inside the field as a ghost icon {@link Button}.
33
+ *
34
+ * Value styling defaults to `font-mono` — secrets are keys and tokens, where
35
+ * character-level legibility matters — and is overridable through `className`.
36
+ */
37
+ declare function SecretInput({ className, containerClassName, showLabel, hideLabel, defaultVisible, visible: visibleProp, onVisibleChange, revealDisabled, disabled, ref, ...props }: SecretInputProps): React.JSX.Element;
38
+ export { SecretInput };
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Button as t } from "./button.js";
4
+ import { Input as n } from "./input.js";
5
+ import { Eye as r, EyeOff as i } from "lucide-react";
6
+ import * as a from "react";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
+ //#region src/components/forms/secret-input.tsx
9
+ function c({ className: c, containerClassName: l, showLabel: u = "Show", hideLabel: d = "Hide", defaultVisible: f = !1, visible: p, onVisibleChange: m, revealDisabled: h = !1, disabled: g, ref: _, ...v }) {
10
+ let [y, b] = a.useState(f), x = p !== void 0, S = (x ? p : y) && !h, C = () => {
11
+ let e = !S;
12
+ x || b(e), m?.(e);
13
+ }, w = S ? i : r;
14
+ return /* @__PURE__ */ s("div", {
15
+ "data-slot": "secret-input",
16
+ "data-visible": S ? "" : void 0,
17
+ className: e("relative w-full", l),
18
+ children: [/* @__PURE__ */ o(n, {
19
+ ref: _,
20
+ type: S ? "text" : "password",
21
+ disabled: g,
22
+ spellCheck: !1,
23
+ autoCapitalize: "none",
24
+ autoCorrect: "off",
25
+ className: e("pr-9 font-mono", c),
26
+ ...v
27
+ }), /* @__PURE__ */ o(t, {
28
+ type: "button",
29
+ variant: "ghost",
30
+ size: "icon-sm",
31
+ onClick: C,
32
+ disabled: g || h,
33
+ "aria-label": S ? d : u,
34
+ className: "absolute right-0.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",
35
+ children: /* @__PURE__ */ o(w, { "aria-hidden": "true" })
36
+ })]
37
+ });
38
+ }
39
+ //#endregion
40
+ export { c as SecretInput };
41
+
42
+ //# sourceMappingURL=secret-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secret-input.js","names":[],"sources":["../../../src/components/forms/secret-input.tsx"],"mappings":";;;;;;;;AA4CA,SAAS,EAAY,EACnB,cACA,uBACA,eAAY,QACZ,eAAY,QACZ,oBAAiB,IACjB,SAAS,GACT,oBACA,oBAAiB,IACjB,aACA,QACA,GAAG,KACgB;CACnB,IAAM,CAAC,GAAqB,KAA0B,EAAM,SAAS,CAAc,GAC7E,IAAe,MAAgB,KAAA,GAO/B,KANU,IAAe,IAAc,MAMP,CAAC,GAEjC,UAAqB;EACzB,IAAM,IAAO,CAAC;EAEd,AADK,KAAc,EAAuB,CAAI,GAC9C,IAAkB,CAAI;CACxB,GAEM,IAAO,IAAqB,IAAS;CAE3C,OACE,kBAAC,OAAD;EACE,aAAU;EACV,gBAAc,IAAqB,KAAK,KAAA;EACxC,WAAW,EAAG,mBAAmB,CAAkB;EAHrD,UAAA,CAKE,kBAAC,GAAD;GACO;GACL,MAAM,IAAqB,SAAS;GAC1B;GAIV,YAAY;GACZ,gBAAe;GACf,aAAY;GACZ,WAAW,EAAG,kBAAkB,CAAS;GACzC,GAAI;EACL,CAAA,GACD,kBAAC,GAAD;GACE,MAAK;GACL,SAAQ;GACR,MAAK;GAGL,SAAS;GACT,UAAU,KAAY;GAOtB,cAAY,IAAqB,IAAY;GAC7C,WAAU;GAEV,UAAA,kBAAC,GAAD,EAAM,eAAY,OAAQ,CAAA;EACpB,CAAA,CACL;;AAET"}
@@ -0,0 +1,87 @@
1
+ import * as React from "react";
2
+ type HourCycle = "12" | "24";
3
+ export interface TimePickerPreset {
4
+ /** `HH:MM` value applied when the chip is activated. */
5
+ value: string;
6
+ /** Chip text. Defaults to the formatted `value`, so it follows `hourCycle`. */
7
+ label?: string;
8
+ }
9
+ /**
10
+ * Every user-visible string the picker renders on its own. All optional with
11
+ * English defaults — the package never resolves i18n, the app passes copy in.
12
+ */
13
+ export interface TimePickerLabels {
14
+ /** Accessible name of the popover panel. Default `"Choose a time"`. */
15
+ panel?: string;
16
+ /** Heading above the hour listbox. Default `"Hour"`. */
17
+ hour?: string;
18
+ /** Heading above the minute listbox. Default `"Minute"`. */
19
+ minute?: string;
20
+ /** Heading above the preset chips. Default `"Quick presets"`. */
21
+ quickPresets?: string;
22
+ /** Morning period suffix in 12-hour display. Default `"AM"`. */
23
+ am?: string;
24
+ /** Afternoon period suffix in 12-hour display. Default `"PM"`. */
25
+ pm?: string;
26
+ }
27
+ export interface TimePickerProps {
28
+ /**
29
+ * Current time as `HH:MM` (24-hour), controlled. Empty string means "unset".
30
+ * Pair with {@link TimePickerProps.onValueChange}; omit both for the
31
+ * uncontrolled form seeded by `defaultValue`.
32
+ */
33
+ value?: string;
34
+ /** Initial `HH:MM` value (uncontrolled). Default `""` — unset. */
35
+ defaultValue?: string;
36
+ /** Fired with the new `HH:MM` value whenever an hour, minute, or preset is chosen. */
37
+ onValueChange?: (value: string) => void;
38
+ /** Trigger text while the value is empty. Default `"00:00"`. */
39
+ placeholder?: string;
40
+ /** Classes for the trigger button. */
41
+ className?: string;
42
+ /** Classes for the popover panel. */
43
+ contentClassName?: string;
44
+ disabled?: boolean;
45
+ /** Forwarded to the trigger so an external `<Label htmlFor>` can name it. */
46
+ id?: string;
47
+ /**
48
+ * Accessible name when no visible label is associated. Composed with the
49
+ * trigger's own value text rather than replacing it, so the name reads
50
+ * `"Start time 8:00 PM"` — a bare `aria-label` would override the content
51
+ * and stop announcing the very value the control exists to report.
52
+ */
53
+ "aria-label"?: string;
54
+ /**
55
+ * Id of an external label. It is composed with the trigger's own value text,
56
+ * so the accessible name stays `"Start time 8:00 PM"` rather than collapsing
57
+ * to `"Start time"` the way a bare `<Label htmlFor>` association would.
58
+ */
59
+ "aria-labelledby"?: string;
60
+ "aria-describedby"?: string;
61
+ "aria-invalid"?: React.AriaAttributes["aria-invalid"];
62
+ /** Display format of the trigger and the hour list. Default `"12"`. */
63
+ hourCycle?: HourCycle;
64
+ /** Granularity of the minute list, in minutes. Default `5`. */
65
+ minuteStep?: number;
66
+ /** Preset chips. Pass `[]` to drop the section. Defaults to 8 AM / 12 PM / 6 PM / 8 PM / 12 AM. */
67
+ presets?: TimePickerPreset[];
68
+ labels?: TimePickerLabels;
69
+ /** Open the panel on first render (uncontrolled). */
70
+ defaultOpen?: boolean;
71
+ /** Controlled open state; pair with `onOpenChange`. */
72
+ open?: boolean;
73
+ onOpenChange?: (open: boolean) => void;
74
+ ref?: React.Ref<HTMLButtonElement>;
75
+ }
76
+ /**
77
+ * Time-of-day picker: a button showing the current time that opens a popover
78
+ * with an hour listbox, a minute listbox, and preset chips.
79
+ *
80
+ * Fully keyboard operable — Enter/Space on the trigger opens the panel and
81
+ * moves focus to the selected hour, Arrow/Home/End/PageUp/PageDown walk a
82
+ * list, Tab crosses to the minutes and the presets, Escape closes and returns
83
+ * focus to the trigger. Selection follows focus inside each list, so arrowing
84
+ * through hours updates `value` live the way a native `<select>` does.
85
+ */
86
+ declare function TimePicker({ value: valueProp, defaultValue, onValueChange, placeholder, className, contentClassName, disabled, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, hourCycle, minuteStep, presets, labels, defaultOpen, open: openProp, onOpenChange, ref, }: TimePickerProps): React.JSX.Element;
87
+ export { TimePicker };
@@ -0,0 +1,260 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Button as t } from "./button.js";
4
+ import { Flex as n } from "../layout/flex.js";
5
+ import { Popover as r, PopoverContent as i, PopoverTrigger as a } from "../overlays/popover.js";
6
+ import { Text as o } from "../typography/text.js";
7
+ import { Clock as s } from "lucide-react";
8
+ import * as c from "react";
9
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ //#region src/components/forms/time-picker.tsx
11
+ var f = /^(\d{1,2}):(\d{1,2})$/, p = {
12
+ hours: "00",
13
+ minutes: "00"
14
+ };
15
+ function m(e) {
16
+ if (!e) return null;
17
+ let t = f.exec(e.trim());
18
+ if (!t) return null;
19
+ let n = Number(t[1]), r = Number(t[2]);
20
+ return n > 23 || r > 59 ? null : {
21
+ hours: String(n).padStart(2, "0"),
22
+ minutes: String(r).padStart(2, "0")
23
+ };
24
+ }
25
+ function h({ hours: e, minutes: t }, n, r, i) {
26
+ if (n === "24") return `${e}:${t}`;
27
+ let a = Number(e), o = a >= 12 ? i : r;
28
+ return `${a % 12 == 0 ? 12 : a % 12}:${t} ${o}`;
29
+ }
30
+ function g(e, t, n, r) {
31
+ return t === "24" ? String(e).padStart(2, "0") : `${e % 12 == 0 ? 12 : e % 12} ${e >= 12 ? r : n}`;
32
+ }
33
+ var _ = [
34
+ "08:00",
35
+ "12:00",
36
+ "18:00",
37
+ "20:00",
38
+ "00:00"
39
+ ], v = "[role=\"option\"]";
40
+ function y(e, t) {
41
+ let n = e.findIndex((e) => e.value === t);
42
+ if (n >= 0) return n;
43
+ let r = Number(t), i = 0;
44
+ for (let t = 1; t < e.length; t += 1) Math.abs(Number(e[t].value) - r) < Math.abs(Number(e[i].value) - r) && (i = t);
45
+ return i;
46
+ }
47
+ var b = {
48
+ panel: "Choose a time",
49
+ hour: "Hour",
50
+ minute: "Minute",
51
+ quickPresets: "Quick presets",
52
+ am: "AM",
53
+ pm: "PM"
54
+ };
55
+ function x({ value: n, defaultValue: o = "", onValueChange: l, placeholder: f = "00:00", className: g, contentClassName: _, disabled: v, id: y, "aria-label": x, "aria-labelledby": C, "aria-describedby": w, "aria-invalid": T, hourCycle: E = "12", minuteStep: D = 5, presets: O, labels: k, defaultOpen: A = !1, open: j, onOpenChange: M, ref: N }) {
56
+ let [P, F] = c.useState(A), I = j ?? P, [L, R] = c.useState(o), z = n ?? L, B = c.useId(), V = {
57
+ ...b,
58
+ ...k
59
+ }, H = m(z), U = H ?? p, W = (e) => {
60
+ j === void 0 && F(e), M?.(e);
61
+ }, G = (e) => {
62
+ n === void 0 && R(e), l?.(e);
63
+ }, K = H ? h(H, E, V.am, V.pm) : f, q = `${B}-value`, J = `${B}-label`, Y = C ?? (x ? J : void 0);
64
+ return /* @__PURE__ */ d(r, {
65
+ open: I,
66
+ onOpenChange: W,
67
+ children: [/* @__PURE__ */ u(a, {
68
+ asChild: !0,
69
+ children: /* @__PURE__ */ d(t, {
70
+ ref: N,
71
+ id: y,
72
+ type: "button",
73
+ variant: "outline",
74
+ disabled: v,
75
+ "aria-labelledby": Y ? `${Y} ${q}` : void 0,
76
+ "aria-describedby": w,
77
+ "aria-invalid": T,
78
+ className: e("h-9 w-full justify-start px-3 text-sm font-normal", !H && "text-muted-foreground", g),
79
+ children: [
80
+ /* @__PURE__ */ u(s, {
81
+ className: "size-4",
82
+ "aria-hidden": "true"
83
+ }),
84
+ x && !C ? /* @__PURE__ */ u("span", {
85
+ id: J,
86
+ className: "sr-only",
87
+ children: x
88
+ }) : null,
89
+ /* @__PURE__ */ u("span", {
90
+ id: q,
91
+ children: K
92
+ })
93
+ ]
94
+ })
95
+ }), /* @__PURE__ */ u(i, {
96
+ className: e("w-64", _),
97
+ align: "start",
98
+ label: V.panel,
99
+ children: I ? /* @__PURE__ */ u(S, {
100
+ baseId: B,
101
+ parts: U,
102
+ hasValue: H !== null,
103
+ hourCycle: E,
104
+ minuteStep: D,
105
+ presets: O,
106
+ text: V,
107
+ onChange: G,
108
+ onClose: () => W(!1)
109
+ }) : null
110
+ })]
111
+ });
112
+ }
113
+ function S({ baseId: e, parts: r, hasValue: i, hourCycle: a, minuteStep: s, presets: f, text: y, onChange: b, onClose: x }) {
114
+ let S = c.useRef(null), w = c.useMemo(() => Array.from({ length: 24 }, (e, t) => ({
115
+ value: String(t).padStart(2, "0"),
116
+ label: g(t, a, y.am, y.pm)
117
+ })), [
118
+ a,
119
+ y.am,
120
+ y.pm
121
+ ]), T = c.useMemo(() => {
122
+ let e = Math.min(60, Math.max(1, Math.floor(s) || 1));
123
+ return Array.from({ length: Math.ceil(60 / e) }, (t, n) => {
124
+ let r = String(n * e).padStart(2, "0");
125
+ return {
126
+ value: r,
127
+ label: r
128
+ };
129
+ });
130
+ }, [s]), E = c.useMemo(() => (f ?? _.map((e) => ({ value: e }))).filter((e) => m(e.value) !== null), [f]);
131
+ c.useEffect(() => {
132
+ let e = requestAnimationFrame(() => {
133
+ S.current?.querySelector(`${v}[tabindex="0"]`)?.focus({ preventScroll: !0 });
134
+ });
135
+ return () => cancelAnimationFrame(e);
136
+ }, []);
137
+ let D = `${e}-hour`, O = `${e}-minute`, k = `${e}-presets`;
138
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d(n, {
139
+ gap: "4",
140
+ children: [/* @__PURE__ */ d("div", {
141
+ className: "flex-1",
142
+ ref: S,
143
+ children: [/* @__PURE__ */ u(o, {
144
+ as: "span",
145
+ id: D,
146
+ size: "xs",
147
+ weight: "medium",
148
+ tone: "muted",
149
+ className: "mb-2 block",
150
+ children: y.hour
151
+ }), /* @__PURE__ */ u(C, {
152
+ labelId: D,
153
+ options: w,
154
+ selected: r.hours,
155
+ onSelect: (e) => b(`${e}:${r.minutes}`)
156
+ })]
157
+ }), /* @__PURE__ */ d("div", {
158
+ className: "flex-1",
159
+ children: [/* @__PURE__ */ u(o, {
160
+ as: "span",
161
+ id: O,
162
+ size: "xs",
163
+ weight: "medium",
164
+ tone: "muted",
165
+ className: "mb-2 block",
166
+ children: y.minute
167
+ }), /* @__PURE__ */ u(C, {
168
+ labelId: O,
169
+ options: T,
170
+ selected: r.minutes,
171
+ onSelect: (e) => b(`${r.hours}:${e}`)
172
+ })]
173
+ })]
174
+ }), E.length > 0 && /* @__PURE__ */ d("div", {
175
+ className: "mt-4 border-t pt-4",
176
+ children: [/* @__PURE__ */ u(o, {
177
+ as: "span",
178
+ id: k,
179
+ size: "xs",
180
+ weight: "medium",
181
+ tone: "muted",
182
+ className: "mb-2 block",
183
+ children: y.quickPresets
184
+ }), /* @__PURE__ */ u(n, {
185
+ gap: "2",
186
+ wrap: !0,
187
+ role: "group",
188
+ "aria-labelledby": k,
189
+ children: E.map((e) => {
190
+ let n = m(e.value) ?? p, o = `${n.hours}:${n.minutes}`;
191
+ return /* @__PURE__ */ u(t, {
192
+ type: "button",
193
+ variant: "outline",
194
+ size: "sm",
195
+ "aria-current": i && o === `${r.hours}:${r.minutes}` ? !0 : void 0,
196
+ onClick: () => {
197
+ b(o), x();
198
+ },
199
+ className: "h-7 px-2 text-xs aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",
200
+ children: e.label ?? h(n, a, y.am, y.pm)
201
+ }, e.value);
202
+ })
203
+ })]
204
+ })] });
205
+ }
206
+ function C({ labelId: t, options: n, selected: r, onSelect: i }) {
207
+ let a = c.useRef(null), o = y(n, r);
208
+ c.useEffect(() => {
209
+ let e = a.current, t = e?.querySelectorAll(v)[o];
210
+ if (!e || !t) return;
211
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
212
+ e.scrollTop += r.top - n.top - (e.clientHeight - r.height) / 2;
213
+ }, []);
214
+ let s = (e) => {
215
+ let t = Math.max(0, Math.min(n.length - 1, e));
216
+ i(n[t].value), (a.current?.querySelectorAll(v))?.[t]?.focus();
217
+ }, l = (e, t) => {
218
+ switch (e.key) {
219
+ case "ArrowDown":
220
+ e.preventDefault(), s(t + 1);
221
+ break;
222
+ case "ArrowUp":
223
+ e.preventDefault(), s(t - 1);
224
+ break;
225
+ case "PageDown":
226
+ e.preventDefault(), s(t + 5);
227
+ break;
228
+ case "PageUp":
229
+ e.preventDefault(), s(t - 5);
230
+ break;
231
+ case "Home":
232
+ e.preventDefault(), s(0);
233
+ break;
234
+ case "End":
235
+ e.preventDefault(), s(n.length - 1);
236
+ break;
237
+ case "Enter":
238
+ case " ": e.preventDefault(), i(n[t].value);
239
+ }
240
+ };
241
+ return /* @__PURE__ */ u("div", {
242
+ ref: a,
243
+ role: "listbox",
244
+ "aria-labelledby": t,
245
+ className: "max-h-48 overflow-y-auto rounded-md border bg-background",
246
+ children: n.map((t, n) => /* @__PURE__ */ u("div", {
247
+ role: "option",
248
+ "aria-selected": t.value === r,
249
+ tabIndex: n === o ? 0 : -1,
250
+ onClick: () => i(t.value),
251
+ onKeyDown: (e) => l(e, n),
252
+ className: e("cursor-default px-3 py-2 text-left text-sm transition-colors duration-control", "hover:bg-accent hover:text-accent-foreground", "outline-none focus:bg-accent focus:text-accent-foreground focus:ring-[3px] focus:ring-inset focus:ring-ring/50", t.value === r && "bg-accent font-medium text-accent-foreground"),
253
+ children: t.label
254
+ }, t.value))
255
+ });
256
+ }
257
+ //#endregion
258
+ export { x as TimePicker };
259
+
260
+ //# sourceMappingURL=time-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker.js","names":[],"sources":["../../../src/components/forms/time-picker.tsx"],"mappings":";;;;;;;;;;AAYA,IAAM,IAAe,yBAEf,IAAuB;CAAE,OAAO;CAAM,SAAS;AAAK;AAY1D,SAAS,EAAU,GAAqD;CACtE,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAQ,EAAa,KAAK,EAAM,KAAK,CAAC;CAC5C,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAQ,OAAO,EAAM,EAAE,GACvB,IAAU,OAAO,EAAM,EAAE;CAE/B,OADI,IAAQ,MAAM,IAAU,KAAW,OAChC;EAAE,OAAO,OAAO,CAAK,CAAC,CAAC,SAAS,GAAG,GAAG;EAAG,SAAS,OAAO,CAAO,CAAC,CAAC,SAAS,GAAG,GAAG;CAAE;AAC5F;AAEA,SAAS,EAAW,EAAE,UAAO,cAAuB,GAAsB,GAAY,GAAoB;CACxG,IAAI,MAAc,MAAM,OAAO,GAAG,EAAM,GAAG;CAC3C,IAAM,IAAO,OAAO,CAAK,GACnB,IAAS,KAAQ,KAAK,IAAK;CACjC,OAAO,GAAG,IAAO,MAAO,IAAI,KAAK,IAAO,GAAG,GAAG,EAAQ,GAAG;AAC3D;AAEA,SAAS,EAAiB,GAAc,GAAsB,GAAY,GAAoB;CAE5F,OADI,MAAc,OAAa,OAAO,CAAI,CAAC,CAAC,SAAS,GAAG,GAAG,IACpD,GAAG,IAAO,MAAO,IAAI,KAAK,IAAO,GAAG,GAAG,KAAQ,KAAK,IAAK;AAClE;AAEA,IAAM,IAAwB;CAAC;CAAS;CAAS;CAAS;CAAS;AAAO,GAE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