@flytedan/flytebot-design-system 0.37.0 → 0.38.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.
- package/dist/index.cjs +36 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +36 -36
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/styles/components.css +53 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flytedan/flytebot-design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "flytedesk Design System — shared component library, tokens, and business-logic kits for flytedesk apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
"dev": "tsup --watch",
|
|
44
44
|
"typecheck": "tsc --noEmit",
|
|
45
45
|
"lint": "eslint .",
|
|
46
|
-
"test": "vitest run",
|
|
46
|
+
"test": "vitest run --project unit && vitest run --project browser",
|
|
47
47
|
"test:dist": "tsup && vitest run --config scripts/vitest.dist.config.ts",
|
|
48
|
+
"test:unit": "vitest run --project unit",
|
|
48
49
|
"test:browser": "vitest run --project browser",
|
|
49
50
|
"sync-icons": "node scripts/sync-icons.mjs",
|
|
50
51
|
"docs": "vite --config vite.docs.config.ts",
|
package/styles/components.css
CHANGED
|
@@ -44,6 +44,59 @@
|
|
|
44
44
|
box-shadow: none;
|
|
45
45
|
transform: none;
|
|
46
46
|
}
|
|
47
|
+
/* A focusableWhenDisabled button (aria-disabled, never native disabled) keeps the same
|
|
48
|
+
:focus-visible ring an enabled button gets — that is the whole point of keeping it in
|
|
49
|
+
the tab order. Restated here because the box-shadow:none above is a compound selector
|
|
50
|
+
(0,2,0: one class + one attribute) that beats plain button:focus-visible from
|
|
51
|
+
foundations.css (0,1,1: one element + one pseudo-class), so without this the ring never
|
|
52
|
+
shows on a control Tab can still land on. Native [disabled] is included for symmetry —
|
|
53
|
+
a real browser never actually gives a natively disabled control focus at all, so it
|
|
54
|
+
never matches there, but nothing here should depend on that platform behaviour to stay
|
|
55
|
+
correct. */
|
|
56
|
+
.fd-btn[disabled]:focus-visible,
|
|
57
|
+
.fd-btn[aria-disabled="true"]:focus-visible {
|
|
58
|
+
box-shadow: var(--focus-ring);
|
|
59
|
+
}
|
|
60
|
+
/* A disabled or aria-disabled button never shows a hover or pressed look, in any variant —
|
|
61
|
+
each compound selector below (variant class + [disabled]/[aria-disabled] + :hover/
|
|
62
|
+
:active) is specificity 0,3,0, which beats that variant's own :hover/:active (0,2,0)
|
|
63
|
+
regardless of source order, so a real mouse hovering or pressing a disabled button sees
|
|
64
|
+
only its resting look. Every value restated here is the same token the variant's own
|
|
65
|
+
resting rule already uses above — nothing new, just re-declared at higher specificity. */
|
|
66
|
+
.fd-btn-primary[disabled]:hover,
|
|
67
|
+
.fd-btn-primary[aria-disabled="true"]:hover,
|
|
68
|
+
.fd-btn-primary[disabled]:active,
|
|
69
|
+
.fd-btn-primary[aria-disabled="true"]:active {
|
|
70
|
+
background: var(--grad-primary);
|
|
71
|
+
}
|
|
72
|
+
.fd-btn-brandsoft[disabled]:hover,
|
|
73
|
+
.fd-btn-brandsoft[aria-disabled="true"]:hover {
|
|
74
|
+
background: var(--grad-brand-soft);
|
|
75
|
+
}
|
|
76
|
+
.fd-btn-secondary[disabled]:hover,
|
|
77
|
+
.fd-btn-secondary[aria-disabled="true"]:hover,
|
|
78
|
+
.fd-btn-secondary[disabled]:active,
|
|
79
|
+
.fd-btn-secondary[aria-disabled="true"]:active {
|
|
80
|
+
background: var(--surface);
|
|
81
|
+
border-color: var(--border);
|
|
82
|
+
}
|
|
83
|
+
.fd-btn-ghost[disabled]:hover,
|
|
84
|
+
.fd-btn-ghost[aria-disabled="true"]:hover,
|
|
85
|
+
.fd-btn-ghost[disabled]:active,
|
|
86
|
+
.fd-btn-ghost[aria-disabled="true"]:active {
|
|
87
|
+
background: transparent;
|
|
88
|
+
color: var(--text-2);
|
|
89
|
+
}
|
|
90
|
+
.fd-btn-danger[disabled]:hover,
|
|
91
|
+
.fd-btn-danger[aria-disabled="true"]:hover,
|
|
92
|
+
.fd-btn-danger[disabled]:active,
|
|
93
|
+
.fd-btn-danger[aria-disabled="true"]:active {
|
|
94
|
+
background: var(--danger-solid);
|
|
95
|
+
}
|
|
96
|
+
.fd-btn-link[disabled]:hover,
|
|
97
|
+
.fd-btn-link[aria-disabled="true"]:hover {
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
}
|
|
47
100
|
.fd-btn-sm {
|
|
48
101
|
height: var(--control-h-sm);
|
|
49
102
|
padding: 0 14px;
|