@designa8/vibedesign-nestora-ds-v1-176b 0.2.1 → 0.2.2
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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-nestora-ds-v1-176b
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.2.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.2.2**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -578,6 +578,7 @@ var SURFACE = "shrink-0 flex-col justify-center whitespace-nowrap cursor-pointer
|
|
|
578
578
|
var ROW = "w-full justify-between text-left cursor-pointer transition duration-150 ease-out focus-visible:ring-inset";
|
|
579
579
|
var CARD = "h-full w-full min-w-0 flex-col items-stretch justify-between text-left cursor-pointer transition duration-150 ease-out focus-visible:ring-inset";
|
|
580
580
|
var LABEL = "inline-flex min-w-0 items-center gap-xs truncate";
|
|
581
|
+
var ROW_LABEL = `${LABEL} flex-1 justify-start text-left`;
|
|
581
582
|
var SLOT = "inline-flex shrink-0 items-center";
|
|
582
583
|
var VARIANTS = {
|
|
583
584
|
primary: "border border-hairline-soft bg-primary-soft text-ink hover:border-transparent hover:bg-primary-tint active:border-transparent active:bg-primary-tint-strong disabled:border-transparent disabled:bg-surface-strong disabled:text-muted",
|
|
@@ -857,6 +858,7 @@ var Button = React4.forwardRef(
|
|
|
857
858
|
].filter(Boolean).join(" ");
|
|
858
859
|
const rawChildren = isRow || isCard || iconOnly || isSurface || isSegment;
|
|
859
860
|
const showSlots = !iconOnly && (leadingIcon != null || trailingIcon != null);
|
|
861
|
+
const labelClass = isRow ? ROW_LABEL : LABEL;
|
|
860
862
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
861
863
|
"button",
|
|
862
864
|
{
|
|
@@ -887,8 +889,8 @@ var Button = React4.forwardRef(
|
|
|
887
889
|
showSlots ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
888
890
|
leadingIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: SLOT, children: leadingIcon }) : null,
|
|
889
891
|
trailingIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: `${SLOT} order-last`, children: trailingIcon }) : null,
|
|
890
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className:
|
|
891
|
-
] }) : rawChildren ? children : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className:
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: labelClass, children })
|
|
893
|
+
] }) : rawChildren ? children : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: labelClass, children })
|
|
892
894
|
]
|
|
893
895
|
}
|
|
894
896
|
);
|
|
@@ -8430,6 +8432,8 @@ var DataTableDesktop = React59.forwardRef(function DataTableDesktop2({
|
|
|
8430
8432
|
{
|
|
8431
8433
|
className: cn8(
|
|
8432
8434
|
"inline-flex items-center gap-xxs rounded-sm px-xs py-xxs",
|
|
8435
|
+
"-my-xxs",
|
|
8436
|
+
selectable ? "" : "-ml-xs",
|
|
8433
8437
|
"transition-colors duration-150 ease-out",
|
|
8434
8438
|
sorted ? "bg-primary-tint-soft" : "bg-transparent"
|
|
8435
8439
|
),
|
package/dist/index.js
CHANGED
|
@@ -453,6 +453,7 @@ var SURFACE = "shrink-0 flex-col justify-center whitespace-nowrap cursor-pointer
|
|
|
453
453
|
var ROW = "w-full justify-between text-left cursor-pointer transition duration-150 ease-out focus-visible:ring-inset";
|
|
454
454
|
var CARD = "h-full w-full min-w-0 flex-col items-stretch justify-between text-left cursor-pointer transition duration-150 ease-out focus-visible:ring-inset";
|
|
455
455
|
var LABEL = "inline-flex min-w-0 items-center gap-xs truncate";
|
|
456
|
+
var ROW_LABEL = `${LABEL} flex-1 justify-start text-left`;
|
|
456
457
|
var SLOT = "inline-flex shrink-0 items-center";
|
|
457
458
|
var VARIANTS = {
|
|
458
459
|
primary: "border border-hairline-soft bg-primary-soft text-ink hover:border-transparent hover:bg-primary-tint active:border-transparent active:bg-primary-tint-strong disabled:border-transparent disabled:bg-surface-strong disabled:text-muted",
|
|
@@ -732,6 +733,7 @@ var Button = React4.forwardRef(
|
|
|
732
733
|
].filter(Boolean).join(" ");
|
|
733
734
|
const rawChildren = isRow || isCard || iconOnly || isSurface || isSegment;
|
|
734
735
|
const showSlots = !iconOnly && (leadingIcon != null || trailingIcon != null);
|
|
736
|
+
const labelClass = isRow ? ROW_LABEL : LABEL;
|
|
735
737
|
return /* @__PURE__ */ jsxs3(
|
|
736
738
|
"button",
|
|
737
739
|
{
|
|
@@ -762,8 +764,8 @@ var Button = React4.forwardRef(
|
|
|
762
764
|
showSlots ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
763
765
|
leadingIcon != null ? /* @__PURE__ */ jsx4("span", { className: SLOT, children: leadingIcon }) : null,
|
|
764
766
|
trailingIcon != null ? /* @__PURE__ */ jsx4("span", { className: `${SLOT} order-last`, children: trailingIcon }) : null,
|
|
765
|
-
/* @__PURE__ */ jsx4("span", { className:
|
|
766
|
-
] }) : rawChildren ? children : /* @__PURE__ */ jsx4("span", { className:
|
|
767
|
+
/* @__PURE__ */ jsx4("span", { className: labelClass, children })
|
|
768
|
+
] }) : rawChildren ? children : /* @__PURE__ */ jsx4("span", { className: labelClass, children })
|
|
767
769
|
]
|
|
768
770
|
}
|
|
769
771
|
);
|
|
@@ -8305,6 +8307,8 @@ var DataTableDesktop = React59.forwardRef(function DataTableDesktop2({
|
|
|
8305
8307
|
{
|
|
8306
8308
|
className: cn8(
|
|
8307
8309
|
"inline-flex items-center gap-xxs rounded-sm px-xs py-xxs",
|
|
8310
|
+
"-my-xxs",
|
|
8311
|
+
selectable ? "" : "-ml-xs",
|
|
8308
8312
|
"transition-colors duration-150 ease-out",
|
|
8309
8313
|
sorted ? "bg-primary-tint-soft" : "bg-transparent"
|
|
8310
8314
|
),
|
package/package.json
CHANGED
|
@@ -133,6 +133,16 @@ const CARD =
|
|
|
133
133
|
*/
|
|
134
134
|
const LABEL = "inline-flex min-w-0 items-center gap-xs truncate";
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* The label inside a full-width row. A row lays its slots and label out with
|
|
138
|
+
* `justify-between`, so a label that only sizes to its content would float in
|
|
139
|
+
* the middle of the trigger. Growing the label makes it fill everything
|
|
140
|
+
* between the leading slot and the trailing slot, so the value starts on the
|
|
141
|
+
* row's left inset like every other field and the trailing glyph stays pinned
|
|
142
|
+
* to the right edge.
|
|
143
|
+
*/
|
|
144
|
+
const ROW_LABEL = `${LABEL} flex-1 justify-start text-left`;
|
|
145
|
+
|
|
136
146
|
/** An icon slot is a non-shrinking sibling of the label. */
|
|
137
147
|
const SLOT = "inline-flex shrink-0 items-center";
|
|
138
148
|
|
|
@@ -596,6 +606,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
596
606
|
const rawChildren = isRow || isCard || iconOnly || isSurface || isSegment;
|
|
597
607
|
/* Icon slots only make sense around a label, never around a lone glyph. */
|
|
598
608
|
const showSlots = !iconOnly && (leadingIcon != null || trailingIcon != null);
|
|
609
|
+
/* A row's label fills the space between its slots, so it starts left. */
|
|
610
|
+
const labelClass = isRow ? ROW_LABEL : LABEL;
|
|
599
611
|
|
|
600
612
|
return (
|
|
601
613
|
<button
|
|
@@ -630,12 +642,12 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
630
642
|
{trailingIcon != null ? (
|
|
631
643
|
<span className={`${SLOT} order-last`}>{trailingIcon}</span>
|
|
632
644
|
) : null}
|
|
633
|
-
<span className={
|
|
645
|
+
<span className={labelClass}>{children}</span>
|
|
634
646
|
</>
|
|
635
647
|
) : rawChildren ? (
|
|
636
648
|
children
|
|
637
649
|
) : (
|
|
638
|
-
<span className={
|
|
650
|
+
<span className={labelClass}>{children}</span>
|
|
639
651
|
)}
|
|
640
652
|
</button>
|
|
641
653
|
);
|
|
@@ -2,8 +2,11 @@ import * as React from "react";
|
|
|
2
2
|
import { Button } from "./Button";
|
|
3
3
|
import { Icon } from "../Icon";
|
|
4
4
|
|
|
5
|
+
const GUEST_STEPS = ["2 adults · 1 room", "3 adults · 1 room", "4 adults · 2 rooms"];
|
|
6
|
+
|
|
5
7
|
export default function ButtonPreview() {
|
|
6
8
|
const [searching, setSearching] = React.useState(false);
|
|
9
|
+
const [guestStep, setGuestStep] = React.useState(0);
|
|
7
10
|
|
|
8
11
|
const handleSearch = () => {
|
|
9
12
|
setSearching(true);
|
|
@@ -77,52 +80,84 @@ export default function ButtonPreview() {
|
|
|
77
80
|
Leading and trailing icons — glyphs sit beside the label
|
|
78
81
|
</h3>
|
|
79
82
|
<div className="flex flex-wrap items-center gap-sm">
|
|
80
|
-
<Button
|
|
81
|
-
shape="pill"
|
|
82
|
-
size="lg"
|
|
83
|
-
leadingIcon={<Icon name="search" size={16} strokeWidth={2} />}
|
|
84
|
-
>
|
|
83
|
+
<Button shape="pill" size="lg" leadingIcon={<Icon name="search" size={16} />}>
|
|
85
84
|
Find a stay
|
|
86
85
|
</Button>
|
|
87
86
|
<Button
|
|
88
87
|
variant="solid"
|
|
89
88
|
shape="pill"
|
|
90
89
|
size="lg"
|
|
91
|
-
leadingIcon={<Icon name="calendar" size={16}
|
|
90
|
+
leadingIcon={<Icon name="calendar" size={16} />}
|
|
92
91
|
>
|
|
93
92
|
Edit dates
|
|
94
93
|
</Button>
|
|
95
94
|
<Button
|
|
96
95
|
variant="secondary"
|
|
97
96
|
shape="pill"
|
|
98
|
-
leadingIcon={<Icon name="map-pin" size={16}
|
|
97
|
+
leadingIcon={<Icon name="map-pin" size={16} />}
|
|
99
98
|
>
|
|
100
99
|
Add a destination
|
|
101
100
|
</Button>
|
|
102
101
|
<Button
|
|
103
102
|
variant="ghost"
|
|
104
103
|
size="sm"
|
|
105
|
-
trailingIcon={<Icon name="chevron-right" size={14}
|
|
104
|
+
trailingIcon={<Icon name="chevron-right" size={14} />}
|
|
106
105
|
>
|
|
107
106
|
Details
|
|
108
107
|
</Button>
|
|
109
108
|
<Button
|
|
110
109
|
variant="secondary"
|
|
111
|
-
leadingIcon={<Icon name="plus" size={16}
|
|
110
|
+
leadingIcon={<Icon name="plus" size={16} />}
|
|
112
111
|
disabled
|
|
113
112
|
>
|
|
114
113
|
Add a destination
|
|
115
114
|
</Button>
|
|
116
115
|
</div>
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
</section>
|
|
117
|
+
|
|
118
|
+
<section className="space-y-md">
|
|
119
|
+
<h3 className="text-label-md text-muted">
|
|
120
|
+
Field and option rows — the label fills the space and starts on the
|
|
121
|
+
left inset, the trailing glyph stays pinned right
|
|
122
|
+
</h3>
|
|
123
|
+
<div className="space-y-sm">
|
|
124
|
+
<Button
|
|
125
|
+
variant="field"
|
|
126
|
+
size="md"
|
|
127
|
+
onClick={() =>
|
|
128
|
+
setGuestStep((step) => (step + 1) % GUEST_STEPS.length)
|
|
129
|
+
}
|
|
130
|
+
leadingIcon={<Icon name="users" size={16} />}
|
|
131
|
+
trailingIcon={<Icon name="chevron-down" size={16} />}
|
|
132
|
+
>
|
|
133
|
+
{GUEST_STEPS[guestStep]}
|
|
134
|
+
</Button>
|
|
135
|
+
|
|
136
|
+
<Button
|
|
137
|
+
variant="field"
|
|
138
|
+
size="md"
|
|
139
|
+
disabled
|
|
140
|
+
leadingIcon={<Icon name="calendar" size={16} />}
|
|
141
|
+
trailingIcon={<Icon name="chevron-down" size={16} />}
|
|
142
|
+
>
|
|
143
|
+
Add dates
|
|
144
|
+
</Button>
|
|
145
|
+
|
|
146
|
+
<div className="rounded-md border border-hairline bg-surface p-xs">
|
|
147
|
+
<Button
|
|
148
|
+
variant="option"
|
|
149
|
+
size="md"
|
|
150
|
+
leadingIcon={<Icon name="users" size={16} />}
|
|
151
|
+
trailingIcon={<Icon name="check" size={16} />}
|
|
152
|
+
>
|
|
153
|
+
Entire place
|
|
154
|
+
</Button>
|
|
119
155
|
<Button
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
leadingIcon={<Icon name="search" size={16} strokeWidth={2} />}
|
|
156
|
+
variant="row-quiet"
|
|
157
|
+
size="md"
|
|
158
|
+
leadingIcon={<Icon name="map-pin" size={16} />}
|
|
124
159
|
>
|
|
125
|
-
|
|
160
|
+
Central district, near the water
|
|
126
161
|
</Button>
|
|
127
162
|
</div>
|
|
128
163
|
</div>
|
|
@@ -298,9 +298,21 @@ export const DataTableDesktop = React.forwardRef<
|
|
|
298
298
|
}
|
|
299
299
|
className="text-body-sm font-weight-label-md text-ink"
|
|
300
300
|
>
|
|
301
|
+
{/*
|
|
302
|
+
The sort button carries its own horizontal and vertical
|
|
303
|
+
padding so the hover/focus fill has breathing room. The
|
|
304
|
+
matching negative margins cancel that padding out of
|
|
305
|
+
layout, so "Date" starts on the column's left edge and
|
|
306
|
+
sits on the same baseline as the plain header labels.
|
|
307
|
+
When the selection column is present the date column is
|
|
308
|
+
inset by the same `pl-md` as its cells, so no left
|
|
309
|
+
correction is needed there.
|
|
310
|
+
*/}
|
|
301
311
|
<span
|
|
302
312
|
className={cn(
|
|
303
313
|
"inline-flex items-center gap-xxs rounded-sm px-xs py-xxs",
|
|
314
|
+
"-my-xxs",
|
|
315
|
+
selectable ? "" : "-ml-xs",
|
|
304
316
|
"transition-colors duration-150 ease-out",
|
|
305
317
|
sorted ? "bg-primary-tint-soft" : "bg-transparent",
|
|
306
318
|
)}
|