@wallarm-org/design-system 4.12.2 → 4.12.3
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/dist/components/Drawer/DrawerClose.js +2 -0
- package/dist/components/Drawer/DrawerDescription.js +1 -1
- package/dist/components/Drawer/DrawerHeader.js +1 -1
- package/dist/components/Drawer/DrawerTitle.js +2 -1
- package/dist/metadata/components.json +2 -2
- package/dist/metadata/guidelines.json +1 -1
- package/package.json +1 -1
|
@@ -37,6 +37,7 @@ const DrawerClose = (t0)=>{
|
|
|
37
37
|
let t2;
|
|
38
38
|
if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== testIdProp) {
|
|
39
39
|
t2 = /*#__PURE__*/ jsx(Dialog.CloseTrigger, {
|
|
40
|
+
"data-slot": "drawer-close",
|
|
40
41
|
...rest,
|
|
41
42
|
ref: ref,
|
|
42
43
|
asChild: true,
|
|
@@ -70,6 +71,7 @@ const DrawerClose = (t0)=>{
|
|
|
70
71
|
color: "neutral",
|
|
71
72
|
size: "small",
|
|
72
73
|
"aria-label": "Close drawer",
|
|
74
|
+
"data-slot": "drawer-close",
|
|
73
75
|
...rest,
|
|
74
76
|
"data-testid": testId,
|
|
75
77
|
children: t2
|
|
@@ -9,7 +9,7 @@ const DrawerDescription = (t0)=>{
|
|
|
9
9
|
const testId = useTestId("description");
|
|
10
10
|
let t1;
|
|
11
11
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
-
t1 = cn("text-sm font-normal text-text-secondary");
|
|
12
|
+
t1 = cn("col-start-1 row-start-2 text-sm font-normal text-text-secondary");
|
|
13
13
|
$[0] = t1;
|
|
14
14
|
} else t1 = $[0];
|
|
15
15
|
let t2;
|
|
@@ -37,7 +37,7 @@ const DrawerHeader = (t0)=>{
|
|
|
37
37
|
const rest = t1;
|
|
38
38
|
let t2;
|
|
39
39
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
40
|
-
t2 = cn("relative shrink-0 w-full", "bg-bg-surface-2", "flex items-start justify-between gap-12", "pt-16 pb-12 pl-24 pr-16", "rounded-t-12", "outline-none");
|
|
40
|
+
t2 = cn("relative shrink-0 w-full", "bg-bg-surface-2", "flex items-start justify-between gap-12", "[&:has(>[data-slot=drawer-description])]:grid [&:has(>[data-slot=drawer-description])]:grid-cols-[minmax(0,1fr)]", "[&:has(>[data-slot=drawer-description])]:grid-rows-[auto_1fr] [&:has(>[data-slot=drawer-description])]:auto-cols-max", "[&:has(>[data-slot=drawer-description])]:gap-y-0", "[&:has(>[data-slot=drawer-description])>*:not([data-slot=drawer-title]):not([data-slot=drawer-description])]:row-[1/span_2]", "[&>[data-slot=drawer-close]~[data-slot=drawer-close]]:hidden", "pt-16 pb-12 pl-24 pr-16", "rounded-t-12", "outline-none");
|
|
41
41
|
$[5] = t2;
|
|
42
42
|
} else t2 = $[5];
|
|
43
43
|
let t3;
|
|
@@ -9,7 +9,7 @@ const DrawerTitle = (t0)=>{
|
|
|
9
9
|
const testId = useTestId("title");
|
|
10
10
|
let t1;
|
|
11
11
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
12
|
-
t1 = cn("flex-1 min-w-0", "font-sans-display font-medium text-lg leading-28", "text-text-primary");
|
|
12
|
+
t1 = cn("flex-1 min-w-0 col-start-1 row-start-1", "font-sans-display font-medium text-lg leading-28", "text-text-primary");
|
|
13
13
|
$[0] = t1;
|
|
14
14
|
} else t1 = $[0];
|
|
15
15
|
let t2;
|
|
@@ -17,6 +17,7 @@ const DrawerTitle = (t0)=>{
|
|
|
17
17
|
t2 = /*#__PURE__*/ jsx(Dialog.Title, {
|
|
18
18
|
ref: ref,
|
|
19
19
|
"data-testid": testId,
|
|
20
|
+
"data-slot": "drawer-title",
|
|
20
21
|
className: t1,
|
|
21
22
|
children: children
|
|
22
23
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.12.
|
|
2
|
+
"version": "4.12.2",
|
|
3
3
|
"rules": "Every numeric utility is in px, not 4px steps: p-16 is 16px, p-4 is 4px. Translate Tailwind habits (p-4 → p-16, gap-6 → gap-24, w-64 → w-256).\n\nBefore composing a screen, call get_guideline for the pattern (app shell, list page, table, drawer, form, dialog, filters, empty state, settings, auth). Wrong → right:\n\n- p-5, gap-3, p-10 → stay on the scale: 1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 40, 48, 64…\n- space-y-4, margins per child → <VStack gap={16}>, <HStack gap={8}>\n- Padded page wrapper → PageHeader / PageToolbar / PageContent own the 24px gutter\n- p-* on Card, DrawerBody, DialogBody, PageToolbar, Table → none; they own their padding\n- className on Text, Heading, Field, Drawer/Dialog Header/Body/Footer → wrap in your own element\n- Raw <h1>, <p>, <label> → <Heading as=\"h2\" size=\"lg\">, <Text size=\"sm\">, Field\n- <Text> default (16px) for body → size=\"sm\"\n- leading-none (0px), leading-5 (5px) → leading-sm, leading-20\n- weight=\"semibold\" → weight is light|regular|medium|bold (medium = 450)\n- bg-primary, text-muted, bg-card, bg-white → bg-bg-primary, text-text-secondary, bg-bg-surface-1\n- text-error, bg-red-500 → danger tokens; categorical color → Badge color\n- dark: variant, setting data-theme → semantic tokens, useTheme().setTheme()\n- rounded-lg, rounded, rounded-[15px] → rounded-8 (controls), rounded-12 (panels)\n- shadow-* on DS components, z-* on overlays → never; they own both\n- focus:ring → focus-visible:ring-3 ring-focus-primary outline-none\n- size, DIALOG/DRAWER_SIZES → width: Dialog 400 confirm, 560 default, 960 picker; Drawer 640 default, 700 Timeline form\n- Dialog, useToast from the root → @wallarm-org/design-system/Dialog, /Toast\n- Field invalid → error on the control + FieldError\n- Table actions column → meta.renderMenuAction on the master column\n- Hand-built side menu → RemoteShell config={NavConfig}\n- ConfirmDialog, FilterBar, Combobox → compose Dialog parts, PageToolbar + FilterDropdown, Select + useSelectSearch\n- data-slot in tests → data-testid\n",
|
|
4
4
|
"guidelines": [
|
|
5
5
|
{
|