@ksojecki/purpose-ui 0.0.0-stage → 0.2.1

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 (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -2
  3. package/assets/fonts/Karla[wght].ttf +0 -0
  4. package/assets/fonts/OFL.txt +93 -0
  5. package/dist/Alert-D-5k0maf.js +23 -0
  6. package/dist/Button-T8UI5igR.js +112 -0
  7. package/dist/Dropdown-BZKzAbKB.js +56 -0
  8. package/dist/Heading-CWDWXU_n.js +27 -0
  9. package/dist/IconButton-P7nSooA3.js +18 -0
  10. package/dist/Link-9mNYgEzY.js +36 -0
  11. package/dist/Paragraph-DFwfb2Yt.js +14 -0
  12. package/dist/Switch-CI8vMkGz.js +84 -0
  13. package/dist/actions/Button.d.ts +69 -0
  14. package/dist/actions/ButtonGroup.d.ts +20 -0
  15. package/dist/actions/IconActionButtons.d.ts +34 -0
  16. package/dist/actions/IconButton.d.ts +21 -0
  17. package/dist/actions/index.d.ts +10 -0
  18. package/dist/actions/index.js +41 -0
  19. package/dist/classNames-x6JVYA2t.js +5 -0
  20. package/dist/data/DataTable.d.ts +47 -0
  21. package/dist/data/Metric.d.ts +46 -0
  22. package/dist/data/Table.d.ts +33 -0
  23. package/dist/data/index.d.ts +8 -0
  24. package/dist/data/index.js +85 -0
  25. package/dist/feedback/Alert.d.ts +23 -0
  26. package/dist/feedback/Badge.d.ts +23 -0
  27. package/dist/feedback/ConfirmDeletePanel.d.ts +32 -0
  28. package/dist/feedback/EmptyState.d.ts +22 -0
  29. package/dist/feedback/Progress.d.ts +24 -0
  30. package/dist/feedback/Skeleton.d.ts +10 -0
  31. package/dist/feedback/Spinner.d.ts +16 -0
  32. package/dist/feedback/Toast.d.ts +48 -0
  33. package/dist/feedback/Tooltip.d.ts +21 -0
  34. package/dist/feedback/index.d.ts +15 -0
  35. package/dist/feedback/index.js +138 -0
  36. package/dist/forms/Checkbox.d.ts +16 -0
  37. package/dist/forms/DatePicker.d.ts +51 -0
  38. package/dist/forms/Field.d.ts +65 -0
  39. package/dist/forms/FileInput.d.ts +20 -0
  40. package/dist/forms/FilterBar.d.ts +21 -0
  41. package/dist/forms/FilterRow.d.ts +20 -0
  42. package/dist/forms/FormActions.d.ts +28 -0
  43. package/dist/forms/FormField.d.ts +39 -0
  44. package/dist/forms/Input.d.ts +20 -0
  45. package/dist/forms/Radio.d.ts +52 -0
  46. package/dist/forms/Range.d.ts +24 -0
  47. package/dist/forms/SegmentedControl.d.ts +33 -0
  48. package/dist/forms/Select.d.ts +23 -0
  49. package/dist/forms/Switch.d.ts +15 -0
  50. package/dist/forms/Textarea.d.ts +20 -0
  51. package/dist/forms/TimePicker.d.ts +29 -0
  52. package/dist/forms/index.d.ts +21 -0
  53. package/dist/forms/index.js +429 -0
  54. package/dist/icons/index.d.ts +2 -0
  55. package/dist/icons/index.js +2 -0
  56. package/dist/icons-CMOARHwx.js +18 -0
  57. package/dist/internal/classNames.d.ts +1 -0
  58. package/dist/internal/purpose.d.ts +7 -0
  59. package/dist/layout/BottomSheet.d.ts +25 -0
  60. package/dist/layout/Card.d.ts +22 -0
  61. package/dist/layout/Disclosure.d.ts +18 -0
  62. package/dist/layout/Divider.d.ts +16 -0
  63. package/dist/layout/Page/Content.d.ts +11 -0
  64. package/dist/layout/Page/Page.d.ts +6 -0
  65. package/dist/layout/Page/index.d.ts +19 -0
  66. package/dist/layout/PageContainer.d.ts +18 -0
  67. package/dist/layout/PageHeader.d.ts +25 -0
  68. package/dist/layout/Section.d.ts +22 -0
  69. package/dist/layout/index.d.ts +13 -0
  70. package/dist/layout/index.js +173 -0
  71. package/dist/navigation/Dropdown.d.ts +47 -0
  72. package/dist/navigation/Link.d.ts +32 -0
  73. package/dist/navigation/Menu.d.ts +89 -0
  74. package/dist/navigation/NavMenu.d.ts +56 -0
  75. package/dist/navigation/index.d.ts +9 -0
  76. package/dist/navigation/index.js +128 -0
  77. package/dist/navigation/popoverFade.d.ts +5 -0
  78. package/dist/overlays/ConsentBanner/ConsentBanner.d.ts +35 -0
  79. package/dist/overlays/ConsentBanner/index.d.ts +1 -0
  80. package/dist/overlays/ConsentSettings/ConsentSettings.d.ts +48 -0
  81. package/dist/overlays/ConsentSettings/index.d.ts +1 -0
  82. package/dist/overlays/ModalWindow/ModalWindow.d.ts +60 -0
  83. package/dist/overlays/ModalWindow/index.d.ts +3 -0
  84. package/dist/overlays/index.d.ts +8 -0
  85. package/dist/overlays/index.js +195 -0
  86. package/dist/typography/Heading/Heading.d.ts +24 -0
  87. package/dist/typography/Heading/index.d.ts +1 -0
  88. package/dist/typography/Paragraph.d.ts +16 -0
  89. package/dist/typography/Prose.d.ts +17 -0
  90. package/dist/typography/index.d.ts +8 -0
  91. package/dist/typography/index.js +12 -0
  92. package/package.json +121 -4
  93. package/styles/budget.css +9 -0
  94. package/styles/generic.css +9 -0
  95. package/styles/roadsign.css +9 -0
  96. package/styles/traffic.css +9 -0
  97. package/theme.css +341 -0
  98. package/themes/budget.css +103 -0
  99. package/themes/generic.css +103 -0
  100. package/themes/roadsign.css +103 -0
  101. package/themes/traffic.css +103 -0
@@ -0,0 +1,60 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ export type DialogSize = 'sm' | 'md' | 'lg';
3
+ export type ModalWindowApi = {
4
+ show: () => void;
5
+ close: () => void;
6
+ };
7
+ export type ModalWindowProps = {
8
+ api: RefObject<ModalWindowApi | null>;
9
+ actions?: ReactNode;
10
+ children: ReactNode;
11
+ title: string;
12
+ onClose?: () => void;
13
+ closeLabel?: string;
14
+ /** Dialog width. Default `lg`. */
15
+ size?: DialogSize;
16
+ };
17
+ export type NativeDialogProps = {
18
+ children: ReactNode;
19
+ api?: RefObject<ModalWindowApi | null>;
20
+ open?: boolean;
21
+ saving?: boolean;
22
+ onClose?: () => void;
23
+ backdropLabel?: string;
24
+ boxClassName?: string;
25
+ labelledBy?: string;
26
+ /** Dialog width. Omit to keep the daisyUI default width of `boxClassName`. */
27
+ size?: DialogSize;
28
+ /** Heading rendered at the top of the box. Labels the dialog unless `labelledBy` is set. */
29
+ title?: ReactNode;
30
+ };
31
+ /**
32
+ * Bare native `<dialog>` box. Control it with `open` or the `api` ref; while `saving` is true, Escape does not close it.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <NativeDialog backdropLabel="Close" onClose={close} open={isOpen} size="sm" title="Rename">
37
+ * <Input label="Name" />
38
+ * </NativeDialog>
39
+ * ```
40
+ */
41
+ export declare const NativeDialog: ({ children, api, open, saving, onClose, backdropLabel, boxClassName, labelledBy, size, title, }: NativeDialogProps) => import("react").JSX.Element;
42
+ /**
43
+ * Modal dialog with a title, a close button and an actions row. Open and close it through the `api` ref.
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * const modal = useRef<ModalWindowApi | null>(null);
48
+ *
49
+ * <Button onClick={() => modal.current?.show()}>Edit</Button>
50
+ * <ModalWindow
51
+ * actions={<Button purpose="save">Save</Button>}
52
+ * api={modal}
53
+ * closeLabel="Close"
54
+ * title="Edit item"
55
+ * >
56
+ * <Paragraph>Edit the item details before saving.</Paragraph>
57
+ * </ModalWindow>
58
+ * ```
59
+ */
60
+ export declare const ModalWindow: ({ actions, api, children, title, onClose, closeLabel, size, }: ModalWindowProps) => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { ModalWindow } from './ModalWindow';
2
+ export { NativeDialog } from './ModalWindow';
3
+ export type { ModalWindowApi, ModalWindowProps, NativeDialogProps } from './ModalWindow';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Modal dialogs and the cookie consent banner and settings.
3
+ *
4
+ * @module @ksojecki/purpose-ui/overlays
5
+ */
6
+ export * from './ModalWindow';
7
+ export * from './ConsentBanner';
8
+ export * from './ConsentSettings';
@@ -0,0 +1,195 @@
1
+ import { t as e } from "../IconButton-P7nSooA3.js";
2
+ import { t } from "../classNames-x6JVYA2t.js";
3
+ import { t as n } from "../icons-CMOARHwx.js";
4
+ import { t as r } from "../Heading-CWDWXU_n.js";
5
+ import { t as i } from "../Button-T8UI5igR.js";
6
+ import { t as a } from "../Link-9mNYgEzY.js";
7
+ import { t as o } from "../Paragraph-DFwfb2Yt.js";
8
+ import { t as s } from "../Switch-CI8vMkGz.js";
9
+ import { useId as c, useLayoutEffect as l, useRef as u, useState as d } from "react";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ // src/overlays/ModalWindow/ModalWindow.tsx
12
+ var m = {
13
+ sm: "w-11/12 max-w-md",
14
+ md: "w-11/12 max-w-2xl",
15
+ lg: "w-11/12 max-w-5xl"
16
+ }, h = ({ children: e, api: n, open: i, saving: a = !1, onClose: o, backdropLabel: s, boxClassName: d = "modal-box", labelledBy: h, size: g, title: y }) => {
17
+ let b = u(null), x = c();
18
+ return l(() => {
19
+ n && (n.current = {
20
+ show: () => _(b.current),
21
+ close: () => v(b.current)
22
+ });
23
+ }, [n]), l(() => {
24
+ if (i === void 0) return;
25
+ let e = b.current;
26
+ i && !e?.open ? _(e) : !i && e?.open && v(e);
27
+ }, [i]), /* @__PURE__ */ p("dialog", {
28
+ "aria-labelledby": h ?? (y ? x : void 0),
29
+ className: "modal",
30
+ onCancel: (e) => {
31
+ a ? e.preventDefault() : e.currentTarget.close();
32
+ },
33
+ onClose: () => {
34
+ (i === void 0 || i && !a) && o?.();
35
+ },
36
+ ref: b,
37
+ children: [/* @__PURE__ */ p("div", {
38
+ className: t(d, g ? m[g] : void 0, "animate-scale-in"),
39
+ children: [y ? /* @__PURE__ */ f(r, {
40
+ id: x,
41
+ level: 3,
42
+ children: y
43
+ }) : null, e]
44
+ }), s ? /* @__PURE__ */ f("form", {
45
+ className: "modal-backdrop",
46
+ method: "dialog",
47
+ children: /* @__PURE__ */ f("button", {
48
+ "aria-label": s,
49
+ disabled: a,
50
+ type: "submit",
51
+ children: s
52
+ })
53
+ }) : null]
54
+ });
55
+ }, g = ({ actions: t, api: r, children: i, title: a, onClose: o, closeLabel: s, size: c = "lg" }) => /* @__PURE__ */ p(h, {
56
+ api: r,
57
+ onClose: o,
58
+ size: c,
59
+ title: a,
60
+ children: [/* @__PURE__ */ f("div", {
61
+ className: "py-4",
62
+ children: i
63
+ }), /* @__PURE__ */ p("form", {
64
+ method: "dialog",
65
+ className: "modal-action",
66
+ children: [/* @__PURE__ */ f(e, {
67
+ className: "absolute right-4 top-4 rounded-full",
68
+ icon: /* @__PURE__ */ f(n.TbX, { className: "h-4 w-4" }),
69
+ label: s ?? "Close",
70
+ size: "sm",
71
+ type: "submit"
72
+ }), t ?? null]
73
+ })]
74
+ });
75
+ function _(e) {
76
+ e !== null && (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", ""));
77
+ }
78
+ function v(e) {
79
+ e !== null && (typeof e.close == "function" ? e.close() : e.removeAttribute("open"));
80
+ }
81
+ // src/overlays/ConsentBanner/ConsentBanner.tsx
82
+ var y = {
83
+ size: "md",
84
+ tone: "neutral",
85
+ variant: "outline"
86
+ };
87
+ function b({ title: e, body: t, policyLink: n, settingsLabel: s, rejectLabel: l, acceptLabel: u, onSettings: d, onReject: m, onAccept: h }) {
88
+ let g = c();
89
+ return /* @__PURE__ */ f("section", {
90
+ "aria-labelledby": g,
91
+ className: "fixed inset-x-0 bottom-0 z-[1200] border-t border-base-300 bg-base-100 px-4 pt-4 pb-[max(1rem,env(safe-area-inset-bottom))] shadow-lg",
92
+ children: /* @__PURE__ */ p("div", {
93
+ className: "mx-auto flex max-w-5xl flex-col gap-3 md:flex-row md:items-center md:justify-between",
94
+ children: [/* @__PURE__ */ p("div", {
95
+ className: "min-w-0 flex-1 space-y-1",
96
+ children: [/* @__PURE__ */ f(r, {
97
+ id: g,
98
+ level: 2,
99
+ size: 4,
100
+ children: e
101
+ }), /* @__PURE__ */ p(o, {
102
+ className: "text-sm",
103
+ tone: "muted",
104
+ children: [
105
+ t,
106
+ " ",
107
+ /* @__PURE__ */ f(a, {
108
+ className: "text-sm",
109
+ to: n.to,
110
+ children: n.label
111
+ })
112
+ ]
113
+ })]
114
+ }), /* @__PURE__ */ p("div", {
115
+ className: "flex flex-wrap items-center gap-2 md:shrink-0 md:flex-nowrap",
116
+ children: [
117
+ /* @__PURE__ */ f(i, {
118
+ onClick: d,
119
+ size: "md",
120
+ tone: "ghost",
121
+ children: s
122
+ }),
123
+ /* @__PURE__ */ f(i, {
124
+ ...y,
125
+ onClick: m,
126
+ children: l
127
+ }),
128
+ /* @__PURE__ */ f(i, {
129
+ ...y,
130
+ onClick: h,
131
+ children: u
132
+ })
133
+ ]
134
+ })]
135
+ })
136
+ });
137
+ }
138
+ // src/overlays/ConsentSettings/ConsentSettings.tsx
139
+ function x({ open: t, rumEnabled: r, onSave: c, onAcceptAll: l, onClose: u, title: m, intro: g, necessaryLabel: _, necessaryDescription: v, rumLabel: y, rumDescription: b, saveLabel: x, acceptAllLabel: S, closeLabel: C, policyLink: w }) {
140
+ let [T, E] = d(r), [D, O] = d(t);
141
+ return t !== D && (O(t), t && E(r)), /* @__PURE__ */ p(h, {
142
+ backdropLabel: C,
143
+ onClose: u,
144
+ open: t,
145
+ size: "md",
146
+ title: m,
147
+ children: [/* @__PURE__ */ p("div", {
148
+ className: "space-y-4 py-4",
149
+ children: [
150
+ /* @__PURE__ */ f(o, { children: g }),
151
+ /* @__PURE__ */ f(s, {
152
+ checked: !0,
153
+ disabled: !0,
154
+ hint: v,
155
+ label: _,
156
+ readOnly: !0
157
+ }),
158
+ /* @__PURE__ */ f(s, {
159
+ checked: T,
160
+ hint: b,
161
+ label: y,
162
+ onChange: (e) => E(e.currentTarget.checked)
163
+ }),
164
+ /* @__PURE__ */ f(a, {
165
+ className: "text-sm",
166
+ to: w.to,
167
+ children: w.label
168
+ })
169
+ ]
170
+ }), /* @__PURE__ */ p("div", {
171
+ className: "flex flex-wrap justify-end gap-2",
172
+ children: [
173
+ /* @__PURE__ */ f(e, {
174
+ className: "absolute right-4 top-4 rounded-full",
175
+ icon: /* @__PURE__ */ f(n.TbX, { className: "h-4 w-4" }),
176
+ label: C,
177
+ onClick: u,
178
+ size: "sm"
179
+ }),
180
+ /* @__PURE__ */ f(i, {
181
+ onClick: () => c(T),
182
+ tone: "neutral",
183
+ variant: "outline",
184
+ children: x
185
+ }),
186
+ /* @__PURE__ */ f(i, {
187
+ onClick: l,
188
+ tone: "primary",
189
+ children: S
190
+ })
191
+ ]
192
+ })]
193
+ });
194
+ }
195
+ export { b as ConsentBanner, x as ConsentSettings, g as ModalWindow, h as NativeDialog };
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+ export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
3
+ export interface HeadingProps {
4
+ children?: ReactNode;
5
+ className?: string;
6
+ level: HeadingLevel;
7
+ /** Visual size when it differs from the level, so the tag can keep the document outline. `label` is a small bold section label. Defaults to `level`. */
8
+ size?: HeadingLevel | 'label';
9
+ id?: string;
10
+ /** Full text shown on hover, for truncated headings. */
11
+ title?: string;
12
+ }
13
+ /**
14
+ * Heading whose tag (`level`) and visual size (`size`) are set separately, so the document outline stays correct.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <Heading level={2}>Invoices</Heading>
19
+ * <Heading level={3} size="label">
20
+ * Totals
21
+ * </Heading>
22
+ * ```
23
+ */
24
+ export declare const Heading: ({ children, className, id, level, size, title }: HeadingProps) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Heading, type HeadingProps, type HeadingLevel } from './Heading';
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ export type ParagraphTone = 'default' | 'muted';
3
+ export interface ParagraphProps {
4
+ children: ReactNode;
5
+ className?: string;
6
+ tone?: ParagraphTone;
7
+ }
8
+ /**
9
+ * Body text paragraph. `tone="muted"` for secondary text.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <Paragraph tone="muted">Updated two hours ago.</Paragraph>
14
+ * ```
15
+ */
16
+ export declare function Paragraph({ children, className, tone }: ParagraphProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ProseProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * Long-form reading column: caps the line length at about 65 characters and sets rhythm for the headings, paragraphs and lists inside.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Prose>
12
+ * <h2>Terms</h2>
13
+ * <p>By using the service you agree to these terms.</p>
14
+ * </Prose>
15
+ * ```
16
+ */
17
+ export declare function Prose({ children, className }: ProseProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Headings, paragraphs and long-form prose.
3
+ *
4
+ * @module @ksojecki/purpose-ui/typography
5
+ */
6
+ export * from './Heading';
7
+ export * from './Paragraph';
8
+ export * from './Prose';
@@ -0,0 +1,12 @@
1
+ import { t as e } from "../Paragraph-DFwfb2Yt.js";
2
+ import { t } from "../Heading-CWDWXU_n.js";
3
+ import { t as n } from "../classNames-x6JVYA2t.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ // src/typography/Prose.tsx
6
+ function i({ children: e, className: t }) {
7
+ return /* @__PURE__ */ r("div", {
8
+ className: n("flex max-w-prose flex-col gap-4", "[&_h1]:font-bold [&_h1]:tracking-tight [&_h1]:text-balance", "[&_h2]:mt-6 [&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:text-balance", "[&_h3]:mt-4 [&_h3]:font-semibold", "[&_li]:leading-7 [&_p]:leading-7 [&_p]:text-pretty", "[&_ol]:list-decimal [&_ol]:pl-6 [&_ul]:list-disc [&_ul]:pl-6", t),
9
+ children: e
10
+ });
11
+ }
12
+ export { t as Heading, e as Paragraph, i as Prose };
package/package.json CHANGED
@@ -1,6 +1,123 @@
1
1
  {
2
2
  "name": "@ksojecki/purpose-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.1",
4
+ "description": "React UI components and daisyUI themes with semantic purpose props.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/ksojecki/purpose-ui.git"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "assets",
13
+ "theme.css",
14
+ "themes",
15
+ "styles",
16
+ "LICENSE",
17
+ "!**/*.tsbuildinfo"
18
+ ],
19
+ "type": "module",
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
23
+ "exports": {
24
+ "./package.json": "./package.json",
25
+ "./theme.css": "./theme.css",
26
+ "./themes/*.css": "./themes/*.css",
27
+ "./styles/*.css": "./styles/*.css",
28
+ "./actions": {
29
+ "types": "./dist/actions/index.d.ts",
30
+ "import": "./dist/actions/index.js",
31
+ "default": "./dist/actions/index.js"
32
+ },
33
+ "./data": {
34
+ "types": "./dist/data/index.d.ts",
35
+ "import": "./dist/data/index.js",
36
+ "default": "./dist/data/index.js"
37
+ },
38
+ "./feedback": {
39
+ "types": "./dist/feedback/index.d.ts",
40
+ "import": "./dist/feedback/index.js",
41
+ "default": "./dist/feedback/index.js"
42
+ },
43
+ "./forms": {
44
+ "types": "./dist/forms/index.d.ts",
45
+ "import": "./dist/forms/index.js",
46
+ "default": "./dist/forms/index.js"
47
+ },
48
+ "./icons": {
49
+ "types": "./dist/icons/index.d.ts",
50
+ "import": "./dist/icons/index.js",
51
+ "default": "./dist/icons/index.js"
52
+ },
53
+ "./layout": {
54
+ "types": "./dist/layout/index.d.ts",
55
+ "import": "./dist/layout/index.js",
56
+ "default": "./dist/layout/index.js"
57
+ },
58
+ "./navigation": {
59
+ "types": "./dist/navigation/index.d.ts",
60
+ "import": "./dist/navigation/index.js",
61
+ "default": "./dist/navigation/index.js"
62
+ },
63
+ "./overlays": {
64
+ "types": "./dist/overlays/index.d.ts",
65
+ "import": "./dist/overlays/index.js",
66
+ "default": "./dist/overlays/index.js"
67
+ },
68
+ "./typography": {
69
+ "types": "./dist/typography/index.d.ts",
70
+ "import": "./dist/typography/index.js",
71
+ "default": "./dist/typography/index.js"
72
+ }
73
+ },
74
+ "publishConfig": {
75
+ "access": "public"
76
+ },
77
+ "scripts": {
78
+ "build": "vite build && tsc -p tsconfig.lib.json",
79
+ "build:docs": "pnpm --filter @ksojecki/ui-docs build",
80
+ "changeset": "changeset",
81
+ "dev:docs": "pnpm --filter @ksojecki/ui-docs dev",
82
+ "format": "oxfmt --write",
83
+ "format:check": "oxfmt --check",
84
+ "lint": "oxlint src tests vite.config.mts docs/src docs/astro.config.mjs",
85
+ "test": "vitest run --config vite.config.mts",
86
+ "typecheck": "tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.spec.json"
87
+ },
88
+ "dependencies": {
89
+ "cally": "0.9.2",
90
+ "react-icons": "^5.7.0"
91
+ },
92
+ "devDependencies": {
93
+ "@changesets/cli": "3.0.3",
94
+ "@testing-library/dom": "10.4.2",
95
+ "@testing-library/jest-dom": "7.0.1",
96
+ "@testing-library/react": "16.3.3",
97
+ "@types/node": "26.6.6",
98
+ "@types/react": "19.3.0",
99
+ "@types/react-dom": "19.3.0",
100
+ "@vitejs/plugin-react": "6.3.0",
101
+ "daisyui": "5.8.1",
102
+ "jsdom": "31.0.1",
103
+ "oxfmt": "0.79.0",
104
+ "oxlint": "1.94.0",
105
+ "react": "19.3.1",
106
+ "react-dom": "19.3.1",
107
+ "react-hook-form": "7.92.0",
108
+ "react-router": "8.5.2",
109
+ "tailwindcss": "4.3.5",
110
+ "tslib": "2.9.1",
111
+ "typescript": "7.0.2",
112
+ "vite": "8.3.8",
113
+ "vitest": "5.1.1"
114
+ },
115
+ "peerDependencies": {
116
+ "daisyui": "^5.6.0",
117
+ "react": "^19.0.0",
118
+ "react-dom": "^19.0.0",
119
+ "react-router": "^8.4.0",
120
+ "tailwindcss": "^4.0.0"
121
+ },
122
+ "packageManager": "pnpm@12.16.1"
123
+ }
@@ -0,0 +1,9 @@
1
+ /* One-line setup: `@import '@ksojecki/purpose-ui/styles/budget.css';` after `@import 'tailwindcss';`. */
2
+ @plugin 'daisyui' {
3
+ themes: false;
4
+ }
5
+
6
+ @import '../theme.css';
7
+ @import '../themes/budget.css';
8
+
9
+ @source '../dist';
@@ -0,0 +1,9 @@
1
+ /* One-line setup: `@import '@ksojecki/purpose-ui/styles/generic.css';` after `@import 'tailwindcss';`. */
2
+ @plugin 'daisyui' {
3
+ themes: false;
4
+ }
5
+
6
+ @import '../theme.css';
7
+ @import '../themes/generic.css';
8
+
9
+ @source '../dist';
@@ -0,0 +1,9 @@
1
+ /* One-line setup: `@import '@ksojecki/purpose-ui/styles/roadsign.css';` after `@import 'tailwindcss';`. */
2
+ @plugin 'daisyui' {
3
+ themes: false;
4
+ }
5
+
6
+ @import '../theme.css';
7
+ @import '../themes/roadsign.css';
8
+
9
+ @source '../dist';
@@ -0,0 +1,9 @@
1
+ /* One-line setup: `@import '@ksojecki/purpose-ui/styles/traffic.css';` after `@import 'tailwindcss';`. */
2
+ @plugin 'daisyui' {
3
+ themes: false;
4
+ }
5
+
6
+ @import '../theme.css';
7
+ @import '../themes/traffic.css';
8
+
9
+ @source '../dist';