@highpixel-co/palda-design-system 0.4.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.
- package/LICENSE +21 -0
- package/NOTICE +93 -0
- package/README.md +49 -0
- package/dist/chunk-EYFL232L.js +0 -0
- package/dist/chunk-GPCPGABI.js +976 -0
- package/dist/chunk-KMOB23O7.js +0 -0
- package/dist/chunk-Q4UXASZH.js +170 -0
- package/dist/chunk-TWYJ2UTC.js +1876 -0
- package/dist/icons.d.ts +128 -0
- package/dist/icons.js +129 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +186 -0
- package/dist/patterns.d.ts +162 -0
- package/dist/patterns.js +20 -0
- package/dist/styles.css +2193 -0
- package/dist/tokens.d.ts +290 -0
- package/dist/tokens.js +463 -0
- package/dist/ui.d.ts +243 -0
- package/dist/ui.js +44 -0
- package/package.json +56 -0
|
File without changes
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button
|
|
3
|
+
} from "./chunk-GPCPGABI.js";
|
|
4
|
+
import {
|
|
5
|
+
ChevronRightIcon
|
|
6
|
+
} from "./chunk-TWYJ2UTC.js";
|
|
7
|
+
|
|
8
|
+
// ../../patterns/src/AppShell/AppShell.tsx
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function AppShell({
|
|
11
|
+
children,
|
|
12
|
+
footer,
|
|
13
|
+
sidebar,
|
|
14
|
+
sidebarFooter,
|
|
15
|
+
statusBar,
|
|
16
|
+
topRow
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: "palda-app-shell", children: [
|
|
19
|
+
sidebar || sidebarFooter ? /* @__PURE__ */ jsxs("aside", { className: "palda-app-shell__sidebar", children: [
|
|
20
|
+
sidebar ? /* @__PURE__ */ jsx("div", { className: "palda-app-shell__sidebar-main", children: sidebar }) : null,
|
|
21
|
+
sidebarFooter ? /* @__PURE__ */ jsx("div", { className: "palda-app-shell__sidebar-footer", children: sidebarFooter }) : null
|
|
22
|
+
] }) : null,
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "palda-app-shell__content", children: [
|
|
24
|
+
topRow ? /* @__PURE__ */ jsx("header", { className: "palda-app-shell__top-row", children: /* @__PURE__ */ jsx("div", { className: "palda-app-shell__band palda-app-shell__band--inset", children: topRow }) }) : null,
|
|
25
|
+
statusBar ? /* @__PURE__ */ jsx("div", { className: "palda-app-shell__status-bar", children: /* @__PURE__ */ jsx("div", { className: "palda-app-shell__band palda-app-shell__band--inset", children: statusBar }) }) : null,
|
|
26
|
+
/* @__PURE__ */ jsx("main", { className: "palda-app-shell__body", children: /* @__PURE__ */ jsx("div", { className: "palda-app-shell__band palda-app-shell__band--body", children }) }),
|
|
27
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "palda-app-shell__footer", children: footer }) : null
|
|
28
|
+
] })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ../../patterns/src/BottomBar/BottomBar.tsx
|
|
33
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
34
|
+
var STATUS_TYPOGRAPHY_CLASS = "palda-text-body2-regular-medium";
|
|
35
|
+
function BottomBar({ children, status }) {
|
|
36
|
+
return /* @__PURE__ */ jsx2("div", { className: "palda-bottom-bar", children: /* @__PURE__ */ jsxs2("div", { className: "palda-bottom-bar__band", children: [
|
|
37
|
+
status ? /* @__PURE__ */ jsx2("span", { className: `palda-bottom-bar__status ${STATUS_TYPOGRAPHY_CLASS}`, children: status }) : null,
|
|
38
|
+
/* @__PURE__ */ jsx2("div", { className: "palda-bottom-bar__actions", children })
|
|
39
|
+
] }) });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ../../patterns/src/Card/Card.tsx
|
|
43
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
44
|
+
var TITLE_TYPOGRAPHY_CLASS = "palda-text-body1-regular-semibold";
|
|
45
|
+
var DESCRIPTION_TYPOGRAPHY_CLASS = "palda-text-body2-reading-medium";
|
|
46
|
+
function Card({
|
|
47
|
+
action,
|
|
48
|
+
children,
|
|
49
|
+
description,
|
|
50
|
+
footer,
|
|
51
|
+
onClick,
|
|
52
|
+
selected = false,
|
|
53
|
+
title,
|
|
54
|
+
tone = "plain"
|
|
55
|
+
}) {
|
|
56
|
+
const classes = ["palda-card", `palda-card--${tone}`, selected ? "palda-card--selected" : ""].filter(Boolean).join(" ");
|
|
57
|
+
const content = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
58
|
+
title || action ? /* @__PURE__ */ jsxs3("header", { className: "palda-card__header", children: [
|
|
59
|
+
/* @__PURE__ */ jsxs3("div", { className: "palda-card__heading", children: [
|
|
60
|
+
title ? /* @__PURE__ */ jsx3("h2", { className: TITLE_TYPOGRAPHY_CLASS, children: title }) : null,
|
|
61
|
+
description ? /* @__PURE__ */ jsx3("p", { className: DESCRIPTION_TYPOGRAPHY_CLASS, children: description }) : null
|
|
62
|
+
] }),
|
|
63
|
+
action ? /* @__PURE__ */ jsx3("div", { className: "palda-card__action", children: action }) : null
|
|
64
|
+
] }) : null,
|
|
65
|
+
/* @__PURE__ */ jsx3("div", { className: "palda-card__body", children }),
|
|
66
|
+
footer ? /* @__PURE__ */ jsx3("footer", { className: "palda-card__footer", children: footer }) : null
|
|
67
|
+
] });
|
|
68
|
+
if (!onClick) {
|
|
69
|
+
return /* @__PURE__ */ jsx3("section", { className: classes, children: content });
|
|
70
|
+
}
|
|
71
|
+
return /* @__PURE__ */ jsx3("button", { "aria-pressed": selected, className: classes, onClick, type: "button", children: content });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// ../../patterns/src/EmptyState/EmptyState.tsx
|
|
75
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
76
|
+
var TITLE_TYPOGRAPHY_CLASS2 = "palda-text-title";
|
|
77
|
+
var DESCRIPTION_TYPOGRAPHY_CLASS2 = "palda-text-body2-reading-medium";
|
|
78
|
+
function EmptyState({ actionLabel, description, icon, onAction, title }) {
|
|
79
|
+
return /* @__PURE__ */ jsxs4("section", { className: "palda-empty-state", children: [
|
|
80
|
+
icon ? /* @__PURE__ */ jsx4("div", { className: "palda-empty-state__icon", children: icon }) : null,
|
|
81
|
+
/* @__PURE__ */ jsxs4("div", { className: "palda-empty-state__copy", children: [
|
|
82
|
+
/* @__PURE__ */ jsx4("h2", { className: TITLE_TYPOGRAPHY_CLASS2, children: title }),
|
|
83
|
+
/* @__PURE__ */ jsx4("p", { className: DESCRIPTION_TYPOGRAPHY_CLASS2, children: description })
|
|
84
|
+
] }),
|
|
85
|
+
actionLabel ? /* @__PURE__ */ jsx4(Button, { onClick: onAction, children: actionLabel }) : null
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ../../patterns/src/FormSection/FormSection.tsx
|
|
90
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
91
|
+
var TITLE_TYPOGRAPHY_CLASS3 = "palda-text-body1-regular-semibold";
|
|
92
|
+
var DESCRIPTION_TYPOGRAPHY_CLASS3 = "palda-text-body2-reading-medium";
|
|
93
|
+
var ERROR_TYPOGRAPHY_CLASS = "palda-text-label-reading-medium";
|
|
94
|
+
function FormSection({ children, description, error, footer, title }) {
|
|
95
|
+
return /* @__PURE__ */ jsxs5("section", { className: "palda-form-section", children: [
|
|
96
|
+
/* @__PURE__ */ jsxs5("header", { className: "palda-form-section__header", children: [
|
|
97
|
+
/* @__PURE__ */ jsx5("h2", { className: TITLE_TYPOGRAPHY_CLASS3, children: title }),
|
|
98
|
+
description ? /* @__PURE__ */ jsx5("p", { className: DESCRIPTION_TYPOGRAPHY_CLASS3, children: description }) : null
|
|
99
|
+
] }),
|
|
100
|
+
error ? /* @__PURE__ */ jsx5("p", { className: `palda-form-section__error ${ERROR_TYPOGRAPHY_CLASS}`, role: "alert", children: error }) : null,
|
|
101
|
+
/* @__PURE__ */ jsx5("div", { className: "palda-form-section__fields", children }),
|
|
102
|
+
footer ? /* @__PURE__ */ jsx5("footer", { className: "palda-form-section__footer", children: footer }) : null
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ../../patterns/src/ListRow/ListRow.tsx
|
|
107
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
108
|
+
var TITLE_TYPOGRAPHY_CLASS4 = "palda-text-body2-regular-semibold";
|
|
109
|
+
var DESCRIPTION_TYPOGRAPHY_CLASS4 = "palda-text-label-reading-medium";
|
|
110
|
+
function ListRow({
|
|
111
|
+
chevron,
|
|
112
|
+
children,
|
|
113
|
+
description,
|
|
114
|
+
leading,
|
|
115
|
+
loading = false,
|
|
116
|
+
onClick,
|
|
117
|
+
selected = false,
|
|
118
|
+
title,
|
|
119
|
+
tone = "plain",
|
|
120
|
+
trailing
|
|
121
|
+
}) {
|
|
122
|
+
const classes = [
|
|
123
|
+
"palda-list-row",
|
|
124
|
+
`palda-list-row--${tone}`,
|
|
125
|
+
selected ? "palda-list-row--selected" : "",
|
|
126
|
+
loading ? "palda-list-row--loading" : ""
|
|
127
|
+
].filter(Boolean).join(" ");
|
|
128
|
+
if (loading) {
|
|
129
|
+
return /* @__PURE__ */ jsxs6("div", { "aria-hidden": "true", className: classes, children: [
|
|
130
|
+
/* @__PURE__ */ jsx6("span", { className: "palda-list-row__skeleton palda-list-row__skeleton--title" }),
|
|
131
|
+
/* @__PURE__ */ jsx6("span", { className: "palda-list-row__skeleton palda-list-row__skeleton--description" })
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
const showChevron = chevron ?? Boolean(onClick);
|
|
135
|
+
const content = /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
136
|
+
leading ? /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: "palda-list-row__leading", children: leading }) : null,
|
|
137
|
+
/* @__PURE__ */ jsxs6("span", { className: "palda-list-row__copy", children: [
|
|
138
|
+
/* @__PURE__ */ jsx6("span", { className: TITLE_TYPOGRAPHY_CLASS4, children: title }),
|
|
139
|
+
description ? /* @__PURE__ */ jsx6("span", { className: `palda-list-row__description ${DESCRIPTION_TYPOGRAPHY_CLASS4}`, children: description }) : null,
|
|
140
|
+
children
|
|
141
|
+
] }),
|
|
142
|
+
trailing ? /* @__PURE__ */ jsx6("span", { className: "palda-list-row__trailing", children: trailing }) : null,
|
|
143
|
+
showChevron ? /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: "palda-list-row__chevron", children: /* @__PURE__ */ jsx6(ChevronRightIcon, {}) }) : null
|
|
144
|
+
] });
|
|
145
|
+
if (!onClick) {
|
|
146
|
+
return /* @__PURE__ */ jsx6("div", { className: classes, children: content });
|
|
147
|
+
}
|
|
148
|
+
return /* @__PURE__ */ jsx6("button", { "aria-pressed": selected, className: classes, onClick, type: "button", children: content });
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ../../patterns/src/LivePreview/LivePreview.tsx
|
|
152
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
153
|
+
var TITLE_TYPOGRAPHY_CLASS5 = "palda-text-body2-regular-semibold";
|
|
154
|
+
var MESSAGE_TYPOGRAPHY_CLASS = "palda-text-body2-reading-medium";
|
|
155
|
+
function LivePreview({ children, message, status = "ready", title }) {
|
|
156
|
+
return /* @__PURE__ */ jsxs7("section", { className: `palda-live-preview palda-live-preview--${status}`, children: [
|
|
157
|
+
/* @__PURE__ */ jsx7("header", { className: "palda-live-preview__header", children: /* @__PURE__ */ jsx7("h2", { className: TITLE_TYPOGRAPHY_CLASS5, children: title }) }),
|
|
158
|
+
/* @__PURE__ */ jsx7("div", { "aria-live": "polite", className: "palda-live-preview__body", children: status === "ready" ? children : status === "loading" ? /* @__PURE__ */ jsx7("span", { className: "palda-live-preview__skeleton" }) : /* @__PURE__ */ jsx7("p", { className: `palda-live-preview__message ${MESSAGE_TYPOGRAPHY_CLASS}`, children: message }) })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export {
|
|
163
|
+
AppShell,
|
|
164
|
+
BottomBar,
|
|
165
|
+
Card,
|
|
166
|
+
EmptyState,
|
|
167
|
+
FormSection,
|
|
168
|
+
ListRow,
|
|
169
|
+
LivePreview
|
|
170
|
+
};
|