@dataworkz/crystal 0.1.0-beta.2 → 0.1.0-beta.4
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/CHANGELOG.md +38 -0
- package/fesm2022/dataworkz-crystal-icons.mjs +1 -1
- package/fesm2022/dataworkz-crystal-icons.mjs.map +1 -1
- package/fesm2022/dataworkz-crystal-primeng.mjs +2 -2
- package/fesm2022/dataworkz-crystal-primeng.mjs.map +1 -1
- package/fesm2022/dataworkz-crystal.mjs +966 -32
- package/fesm2022/dataworkz-crystal.mjs.map +1 -1
- package/icons/index.d.ts +4 -2
- package/index.d.ts +429 -19
- package/package.json +4 -7
- package/primeng/index.d.ts +2 -2
- package/styles/components/content.css +5 -0
- package/styles/components/form.css +33 -2
- package/styles/crystal-no-fonts.css +2 -0
package/primeng/index.d.ts
CHANGED
|
@@ -608,7 +608,7 @@ declare const DW_PRESET_OVERRIDES: {
|
|
|
608
608
|
/** Dataworkz PrimeNG preset: Aura retargeted to the design system. */
|
|
609
609
|
declare const DwPreset: _primeuix_themes_types.Preset<_primeuix_themes_aura_base.AuraBaseDesignTokens>;
|
|
610
610
|
|
|
611
|
-
/** PrimeNG's dark mode follows the attribute ThemeService (and provideCrystal()) put on
|
|
611
|
+
/** PrimeNG's dark mode follows the attribute ThemeService (and provideCrystal()) put on `<html>`. */
|
|
612
612
|
declare const DW_DARK_MODE_SELECTOR = "[data-theme=\"dark\"]";
|
|
613
613
|
/** Panel class that sizes a select's option list for a small trigger (components/form.css). */
|
|
614
614
|
declare const DW_SELECT_PANEL_SM = "dw-select-panel--sm";
|
|
@@ -617,7 +617,7 @@ type SizedInstance = {
|
|
|
617
617
|
};
|
|
618
618
|
/**
|
|
619
619
|
* Crystal's pass-through defaults: a small `p-select` / `p-multiselect` gets small options even when its list is
|
|
620
|
-
* appended to
|
|
620
|
+
* appended to `<body>` (where CSS can't see the trigger).
|
|
621
621
|
*/
|
|
622
622
|
declare const DW_PRIMENG_PT: {
|
|
623
623
|
readonly select: {
|
|
@@ -156,3 +156,8 @@ dw-markdown.dw-prose { display: block; }
|
|
|
156
156
|
/* ── dw-icon: app SVG glyphs, drawn in currentColor at the text size ── */
|
|
157
157
|
.dw-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; line-height: 0; vertical-align: -0.125em; }
|
|
158
158
|
.dw-icon svg { display: block; }
|
|
159
|
+
/* A PrimeIcons glyph (dw-icon pi="…") is a font glyph: it needs a line box, which the SVG case sets to 0. */
|
|
160
|
+
.dw-icon.pi { line-height: 1; }
|
|
161
|
+
.dw-icon--spin { animation: dw-icon-spin 1s linear infinite; }
|
|
162
|
+
@keyframes dw-icon-spin { to { transform: rotate(360deg); } }
|
|
163
|
+
@media (prefers-reduced-motion: reduce) { .dw-icon--spin, .dw-icon.pi-spin { animation-duration: 3s; } }
|
|
@@ -225,14 +225,15 @@ dw-field.dw-field--inline:has(.dw-field__control :is(.p-inputtext-sm, .p-textare
|
|
|
225
225
|
.dw-field__control > :first-child:not([dwFieldSuffix]) { flex: 1 1 auto; min-width: 0; }
|
|
226
226
|
/* Switches, checkboxes and radios keep their own size — stretching one turns a toggle into a bar. */
|
|
227
227
|
/* (Same specificity as the stretch rule above, plus the element, so it wins.) */
|
|
228
|
-
.dw-field__control > :is(p-toggleswitch, p-checkbox, p-radiobutton):first-child:not([dwFieldSuffix]) { flex: none; }
|
|
228
|
+
.dw-field__control > :is(p-toggleswitch, p-checkbox, p-radiobutton, dw-switch, dw-checkbox, dw-radio):first-child:not([dwFieldSuffix]) { flex: none; }
|
|
229
229
|
.dw-field__control > input,
|
|
230
230
|
.dw-field__control > textarea,
|
|
231
231
|
.dw-field__control > p-select,
|
|
232
232
|
.dw-field__control > p-multiselect,
|
|
233
233
|
.dw-field__control > p-inputnumber,
|
|
234
234
|
.dw-field__control > p-datepicker,
|
|
235
|
-
.dw-field__control > p-autocomplete
|
|
235
|
+
.dw-field__control > p-autocomplete,
|
|
236
|
+
.dw-field__control > :is(dw-select, dw-multiselect, dw-number-input) { width: 100%; }
|
|
236
237
|
.dw-field__error { display: inline-flex; align-items: center; gap: var(--dw-space-1); }
|
|
237
238
|
/* Field errors are text only (the red text and border carry the state): no leading icon, even in
|
|
238
239
|
hand-written error lines. */
|
|
@@ -676,3 +677,33 @@ body .dw-var-field .p-textarea {
|
|
|
676
677
|
.config-form-body .toggle-label { margin: 0; cursor: pointer; }
|
|
677
678
|
/* Host of a config form component inside .config-drawer-body: fill the drawer height. */
|
|
678
679
|
.config-form-host { display: flex; flex: 1; flex-direction: column; min-height: 0; }
|
|
680
|
+
|
|
681
|
+
/* ── dw-select / dw-multiselect (components) ──
|
|
682
|
+
The host takes the screen's sizing (a width, `dw-w-full`, a grid track) and the PrimeNG control fills it; with no
|
|
683
|
+
width set, the host is as wide as the control would be on its own. */
|
|
684
|
+
.dw-select,
|
|
685
|
+
.dw-multiselect {
|
|
686
|
+
display: inline-flex;
|
|
687
|
+
min-width: 0;
|
|
688
|
+
max-width: 100%;
|
|
689
|
+
vertical-align: middle;
|
|
690
|
+
}
|
|
691
|
+
.dw-select > p-select,
|
|
692
|
+
.dw-multiselect > p-multiselect {
|
|
693
|
+
flex: 1 1 auto;
|
|
694
|
+
min-width: 0;
|
|
695
|
+
}
|
|
696
|
+
.dw-select.dw-select--fluid,
|
|
697
|
+
.dw-multiselect.dw-multiselect--fluid {
|
|
698
|
+
display: flex;
|
|
699
|
+
width: 100%;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/* ── dw-checkbox / dw-radio / dw-switch (components): the control and its label on one line (dw-check) ── */
|
|
703
|
+
.dw-checkbox__label--empty:empty,
|
|
704
|
+
.dw-radio__label--empty:empty { display: none; }
|
|
705
|
+
|
|
706
|
+
/* ── dw-number-input (component): sized by the screen like dw-select ── */
|
|
707
|
+
.dw-number-input { display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
|
|
708
|
+
.dw-number-input > p-inputnumber { flex: 1 1 auto; min-width: 0; }
|
|
709
|
+
.dw-number-input.dw-number-input--fluid { display: flex; width: 100%; }
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Rules: colours only in tokens/primitives.css (everything else uses semantic tokens); font-family only in base.css.
|
|
6
6
|
*/
|
|
7
|
+
/* PrimeIcons (pi pi-*): crystal's dependency, so an app never installs or loads it itself. Its font is local. */
|
|
8
|
+
@import 'primeicons/primeicons.css';
|
|
7
9
|
@import './tokens/primitives.css';
|
|
8
10
|
@import './tokens/semantic.css';
|
|
9
11
|
@import './tokens/semantic-dark.css';
|