@fluixi-ui/skin-soft 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/soft.css +92 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluixi-ui/skin-soft",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "Soft corporate skin for Fluixi UI — clean, gently elevated dashboard look; activate with data-ui=\"soft\"",
5
5
  "license": "MIT",
6
6
  "private": false,
package/soft.css CHANGED
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  /* ---- Button: pill, flat by default, one accent, soft lift on primary ------ */
61
- [data-ui='soft'] :where([data-variant]) {
61
+ [data-ui='soft'] :where([data-variant]:not([data-badge])) {
62
62
  border-radius: 9999px;
63
63
  height: 40px;
64
64
  padding: 0 18px;
@@ -73,37 +73,53 @@
73
73
  }
74
74
  /* Filled primary: rests on a soft shadow, lifts a touch on hover, settles on
75
75
  press. Depth comes from elevation, not a colour sheen. */
76
- [data-ui='soft'] :where([data-variant='solid']) {
76
+ [data-ui='soft'] :where([data-variant='solid']:not([data-badge])) {
77
77
  box-shadow: var(--flx-ui-shadow-sm);
78
78
  }
79
- [data-ui='soft'] :where([data-variant='solid']:hover:not([data-disabled])) {
79
+ [data-ui='soft'] :where([data-variant='solid']:not([data-badge]):hover:not([data-disabled])) {
80
80
  box-shadow: var(--flx-ui-shadow-md);
81
81
  transform: translateY(-1px);
82
82
  }
83
- [data-ui='soft'] :where([data-variant='solid']:active:not([data-disabled])) {
83
+ [data-ui='soft'] :where([data-variant='solid']:not([data-badge]):active:not([data-disabled])) {
84
84
  box-shadow: var(--flx-ui-shadow-sm);
85
85
  transform: translateY(0);
86
86
  }
87
87
  /* Soft/outline/ghost stay flat; ghost is tighter. */
88
- [data-ui='soft'] :where([data-variant='ghost']) {
88
+ [data-ui='soft'] :where([data-variant='ghost']:not([data-badge])) {
89
89
  padding: 0 12px;
90
90
  }
91
- [data-ui='soft'] :where([data-variant]:focus-visible) {
91
+ [data-ui='soft'] :where([data-variant]:not([data-badge]):focus-visible) {
92
92
  outline: none;
93
93
  box-shadow: var(--flx-ui-ctl-ring);
94
94
  }
95
95
 
96
- /* Badges also carry [data-variant] — keep them as chips, not buttons. */
97
- [data-ui='soft'] :where(.flx-ui-badge[data-variant]) {
98
- height: auto;
99
- padding: 2px 10px;
100
- box-shadow: none;
101
- transform: none;
102
- font-weight: 600;
96
+ /* Badges carry [data-variant] too, but every button rule above excludes
97
+ [data-badge], so a badge is never treated as a button — no guard needed. */
98
+
99
+ /* Icon button + FAB carry [data-variant], so re-assert their square / circular
100
+ geometry over the fixed-40px pill the button rule above imposes. */
101
+ [data-ui='soft'] :where([data-icon-button]) {
102
+ padding: 0;
103
+ width: var(--flx-ui-size-md);
104
+ height: var(--flx-ui-size-md);
103
105
  }
106
+ [data-ui='soft'] :where([data-icon-button][data-size='sm']) { width: var(--flx-ui-size-sm); height: var(--flx-ui-size-sm); }
107
+ [data-ui='soft'] :where([data-icon-button][data-size='lg']) { width: var(--flx-ui-size-lg); height: var(--flx-ui-size-lg); }
108
+ [data-ui='soft'] :where([data-fab]) {
109
+ width: 56px;
110
+ height: 56px;
111
+ padding: 0;
112
+ box-shadow: var(--flx-ui-shadow-lg);
113
+ }
114
+ [data-ui='soft'] :where([data-fab][data-fab-size='sm']) { width: 40px; height: 40px; }
115
+ [data-ui='soft'] :where([data-fab][data-fab-size='lg']) { width: 64px; height: 64px; }
116
+ [data-ui='soft'] :where([data-fab][data-fab-extended]) { width: auto; height: 56px; padding: 0 20px; }
104
117
 
105
- /* ---- Text fields: clean, comfortable, soft focus ------------------------- */
106
- [data-ui='soft'] :where([data-input], button[role='combobox'], [data-combobox-control]) {
118
+ /* ---- Text fields: clean, comfortable, soft focus. Baseline only; the
119
+ outlined / filled variants are handled below. --------------------------- */
120
+ [data-ui='soft'] :where([data-input]:not([data-field-variant]),
121
+ button[role='combobox']:not([data-field-variant]),
122
+ [data-combobox-control]:not([data-field-variant])) {
107
123
  min-height: 40px;
108
124
  border-radius: var(--flx-ui-radius-md);
109
125
  border-color: var(--flx-ui-color-border);
@@ -112,17 +128,42 @@
112
128
  border-color var(--flx-ui-duration-fast) var(--flx-ui-ease-standard),
113
129
  box-shadow var(--flx-ui-duration-fast) var(--flx-ui-ease-standard);
114
130
  }
115
- [data-ui='soft'] :where([data-input]:hover:not(:focus):not([data-invalid]),
116
- button[role='combobox']:hover) {
131
+ [data-ui='soft'] :where([data-input]:not([data-field-variant]):hover:not(:focus):not([data-invalid]),
132
+ button[role='combobox']:not([data-field-variant]):hover) {
117
133
  border-color: var(--flx-ui-gray-7);
118
134
  }
119
- [data-ui='soft'] :where([data-input]:focus-visible,
120
- button[role='combobox']:focus-visible) {
135
+ [data-ui='soft'] :where([data-input]:not([data-field-variant]):focus-visible,
136
+ button[role='combobox']:not([data-field-variant]):focus-visible) {
121
137
  outline: none;
122
138
  border-color: var(--flx-ui-color-primary);
123
139
  box-shadow: var(--flx-ui-ctl-ring);
124
140
  }
125
141
 
142
+ /* Field variants — comfortable height + soft rounding, calm focus. */
143
+ [data-ui='soft'] :where([data-field-variant]) {
144
+ min-height: 40px;
145
+ }
146
+ [data-ui='soft'] :where([data-field-variant='outlined']) {
147
+ border-radius: var(--flx-ui-radius-md);
148
+ border-color: var(--flx-ui-color-border);
149
+ }
150
+ [data-ui='soft'] :where([data-field-variant='outlined']:focus, [data-field-variant='outlined']:focus-within) {
151
+ border-color: var(--flx-ui-color-primary);
152
+ box-shadow: var(--flx-ui-ctl-ring);
153
+ }
154
+ /* Filled: tinted fill, only a bottom rule (kill the side/top borders soft's
155
+ baseline would otherwise draw). */
156
+ [data-ui='soft'] :where([data-field-variant='filled']) {
157
+ border: var(--flx-ui-border-width-thin) solid transparent;
158
+ border-bottom-color: var(--flx-ui-color-border-strong);
159
+ border-radius: var(--flx-ui-radius-md) var(--flx-ui-radius-md) 0 0;
160
+ }
161
+ [data-ui='soft'] :where([data-field-variant='filled']:focus, [data-field-variant='filled']:focus-within) {
162
+ border-bottom-color: var(--flx-ui-color-primary);
163
+ border-bottom-width: 2px;
164
+ box-shadow: none;
165
+ }
166
+
126
167
  /* ---- Selection controls: rounder box, calm focus ------------------------- */
127
168
  [data-ui='soft'] :where([role='checkbox']) {
128
169
  border-radius: 6px;
@@ -217,4 +258,36 @@
217
258
  color: var(--flx-ui-color-fg);
218
259
  box-shadow: var(--flx-ui-shadow-sm);
219
260
  }
261
+
262
+ /* ---- Table: soft elevated surface — gentle shadow, rounded frame, airy
263
+ density, faint dividers, rounded-feeling selection --------------------- */
264
+ [data-ui='soft'] :where([data-table]) {
265
+ border: var(--flx-ui-border-width-thin) solid
266
+ color-mix(in oklab, var(--flx-ui-color-border) 60%, transparent);
267
+ border-radius: var(--flx-ui-radius-lg);
268
+ box-shadow: var(--flx-ui-shadow-sm);
269
+ overflow: hidden;
270
+ }
271
+ [data-ui='soft'] :where([data-table-head]) {
272
+ background: var(--flx-ui-color-bg-subtle);
273
+ padding: var(--flx-ui-space-3) var(--flx-ui-space-4);
274
+ }
275
+ [data-ui='soft'] :where([data-table-cell]) {
276
+ padding: var(--flx-ui-space-3) var(--flx-ui-space-4);
277
+ }
278
+ [data-ui='soft'] :where([data-table-body] > [data-table-row]) {
279
+ border-top-color: color-mix(in oklab, var(--flx-ui-color-border) 55%, transparent);
280
+ }
281
+ [data-ui='soft'] :where([data-table-body] > [data-table-row]:hover) {
282
+ background: color-mix(in oklab, var(--flx-ui-color-fg) 3%, transparent);
283
+ }
284
+ [data-ui='soft'] :where([data-table-row][data-selected]),
285
+ [data-ui='soft'] :where([data-table-row][data-selected]:hover) {
286
+ background: var(--flx-ui-color-primary-subtle);
287
+ }
288
+ /* Compact density under Soft. */
289
+ [data-ui='soft'] :where([data-table][data-density='compact'] [data-table-head]),
290
+ [data-ui='soft'] :where([data-table][data-density='compact'] [data-table-cell]) {
291
+ padding: var(--flx-ui-space-1) var(--flx-ui-space-2);
292
+ }
220
293
  }