@kosdev-code/kos-ddk-styles 3.0.7 → 3.1.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/index.cjs +73 -45
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +73 -45
- package/index.js.map +1 -1
- package/layout.d.ts +19 -0
- package/layout.d.ts.map +1 -0
- package/package.json +2 -2
- package/styles.d.ts.map +1 -1
- package/tokens/base/base-component.d.ts.map +1 -1
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/kos-ddk-styles/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/kos-ddk-styles/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/index.js
CHANGED
|
@@ -72,6 +72,50 @@ const fontStyles = css`
|
|
|
72
72
|
font-weight: 600;
|
|
73
73
|
}
|
|
74
74
|
`;
|
|
75
|
+
const layoutStyles = css`
|
|
76
|
+
body[data-orientation="landscape"] {
|
|
77
|
+
/* --- page width (the single knob Container/View consume) --- */
|
|
78
|
+
--ddk-component-shell-max-width: 1920px;
|
|
79
|
+
--ddk-component-page-max-width: 1820px;
|
|
80
|
+
/* kept for any consumer still reading the large-container token directly */
|
|
81
|
+
--ddk-component-container-max-width-large: 1820px;
|
|
82
|
+
|
|
83
|
+
/* --- dashboard structure: holder rows stack full-width, cards reflow --- */
|
|
84
|
+
--ddk-component-dashboard-card-flex-direction: var(--ddk-component-dashboard-card-flex-direction-horizontal);
|
|
85
|
+
--ddk-component-dashboard-card-flex-wrap: wrap;
|
|
86
|
+
--ddk-component-dashboard-overflow: visible;
|
|
87
|
+
|
|
88
|
+
/* grid: macros & assembly share the last row */
|
|
89
|
+
--ddk-component-dashboard-grid-template-areas: var(--ddk-component-dashboard-grid-template-areas-horizontal);
|
|
90
|
+
--ddk-component-dashboard-grid-template-columns: var(--ddk-component-dashboard-grid-template-columns-horizontal);
|
|
91
|
+
--ddk-component-dashboard-grid-template-rows: var(--ddk-component-dashboard-grid-template-rows-horizontal);
|
|
92
|
+
--ddk-component-dashboard-grid-template-areas-3col: var(--ddk-component-dashboard-grid-template-areas-3col-horizontal);
|
|
93
|
+
--ddk-component-dashboard-grid-template-columns-3col: var(--ddk-component-dashboard-grid-template-columns-3col-horizontal);
|
|
94
|
+
--ddk-component-dashboard-grid-template-rows-3col: var(--ddk-component-dashboard-grid-template-rows-3col-horizontal);
|
|
95
|
+
|
|
96
|
+
/* spacing */
|
|
97
|
+
--ddk-component-dashboard-row-gap: var(--ddk-component-dashboard-row-gap-horizontal);
|
|
98
|
+
--ddk-component-dashboard-column-gap: var(--ddk-component-dashboard-column-gap-horizontal);
|
|
99
|
+
|
|
100
|
+
/* --- card value defaults for landscape (themes/overlay may refine) --- */
|
|
101
|
+
--ddk-component-dashboard-card-height: var(--ddk-component-dashboard-card-height-horizontal);
|
|
102
|
+
--ddk-component-dashboard-card-small-height: var(--ddk-component-dashboard-card-small-height-horizontal);
|
|
103
|
+
--ddk-component-dashboard-card-large-width: var(--ddk-component-dashboard-card-large-width-horizontal);
|
|
104
|
+
--ddk-component-dashboard-card-small-width: var(--ddk-component-dashboard-card-small-width-horizontal);
|
|
105
|
+
--ddk-component-dashboard-card-min-width: var(--ddk-component-dashboard-card-min-width-horizontal);
|
|
106
|
+
--ddk-component-dashboard-card-max-height: var(--ddk-component-dashboard-card-max-height-horizontal);
|
|
107
|
+
--ddk-component-macro-card-height: var(--ddk-component-macro-card-height-horizontal);
|
|
108
|
+
|
|
109
|
+
/* modal */
|
|
110
|
+
--ddk-component-modal-max-width: 1000px;
|
|
111
|
+
--ddk-component-modal-max-height: 750px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* small cards (macros & assembly) take the shorter macro height */
|
|
115
|
+
body[data-orientation="landscape"] [data-card-size="small"] {
|
|
116
|
+
--ddk-component-dashboard-card-height: var(--ddk-component-macro-card-height-horizontal);
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
75
119
|
const rootStyles = css`
|
|
76
120
|
::-webkit-scrollbar {
|
|
77
121
|
background-color: transparent;
|
|
@@ -871,6 +915,11 @@ const baseComponentStyles = css`
|
|
|
871
915
|
--ddk-component-container-max-width-medium: 640px;
|
|
872
916
|
--ddk-component-container-max-width-small: 408px;
|
|
873
917
|
|
|
918
|
+
// page width — single knob consumed by Container/View (decoupled from
|
|
919
|
+
// container-max-width-large so the orientation skeleton/overlay can widen
|
|
920
|
+
// pages without disturbing other consumers). Landscape widens it in layout.ts.
|
|
921
|
+
--ddk-component-page-max-width: var(--ddk-component-container-max-width-large);
|
|
922
|
+
|
|
874
923
|
// frame-container
|
|
875
924
|
--ddk-component-frame-body-padding: var(--ddk-semantic-control-padding-small);
|
|
876
925
|
--ddk-component-frame-container-background-color: var(--ddk-generic-color-grey-5);
|
|
@@ -1495,6 +1544,10 @@ const baseComponentStyles = css`
|
|
|
1495
1544
|
// dashboard layout mode flag (set to 'horizontal' to activate horizontal layout)
|
|
1496
1545
|
--ddk-component-dashboard-layout-mode: vertical;
|
|
1497
1546
|
|
|
1547
|
+
// dashboard - structural defaults (orientation skeleton refines these in layout.ts)
|
|
1548
|
+
--ddk-component-dashboard-card-flex-wrap: nowrap;
|
|
1549
|
+
--ddk-component-dashboard-overflow: visible;
|
|
1550
|
+
|
|
1498
1551
|
// dashboard-card
|
|
1499
1552
|
--ddk-component-dashboard-card-background-color-unassigned: var(--ddk-generic-color-grey-10);
|
|
1500
1553
|
--ddk-component-dashboard-card-background-color-removed: var(--ddk-generic-color-grey-10);
|
|
@@ -1508,17 +1561,21 @@ const baseComponentStyles = css`
|
|
|
1508
1561
|
--ddk-component-dashboard-card-small-width: 216px; // validated
|
|
1509
1562
|
--ddk-component-dashboard-card-max-height: 92px; // validated
|
|
1510
1563
|
|
|
1511
|
-
// dashboard-card - horizontal layout overrides (cards
|
|
1564
|
+
// dashboard-card - horizontal layout overrides (cards reflow into a wrapping grid)
|
|
1565
|
+
// Heights sized for actual content (title + small fuel gauge + footer/troubles);
|
|
1566
|
+
// the old 284px was tuned for a single horizontal-scroll row. ~1.5x the 115px
|
|
1567
|
+
// portrait height gives the wider landscape card visual balance without empty
|
|
1568
|
+
// space. Tune per device via theme :root or the device theme-overlay.css.
|
|
1512
1569
|
--ddk-component-dashboard-card-flex-direction-horizontal: row;
|
|
1513
|
-
--ddk-component-dashboard-card-height-horizontal:
|
|
1514
|
-
--ddk-component-dashboard-card-small-height-horizontal:
|
|
1570
|
+
--ddk-component-dashboard-card-height-horizontal: 176px;
|
|
1571
|
+
--ddk-component-dashboard-card-small-height-horizontal: 176px;
|
|
1515
1572
|
--ddk-component-dashboard-card-large-width-horizontal: 217px;
|
|
1516
1573
|
--ddk-component-dashboard-card-small-width-horizontal: 217px;
|
|
1517
1574
|
--ddk-component-dashboard-card-min-width-horizontal: 217px;
|
|
1518
1575
|
--ddk-component-dashboard-card-max-height-horizontal: none;
|
|
1519
1576
|
|
|
1520
1577
|
// macro-card - horizontal layout overrides (different height than holder cards)
|
|
1521
|
-
--ddk-component-macro-card-height-horizontal:
|
|
1578
|
+
--ddk-component-macro-card-height-horizontal: 148px;
|
|
1522
1579
|
|
|
1523
1580
|
// dashboard - horizontal layout overrides (macros and assembly on same row)
|
|
1524
1581
|
--ddk-component-dashboard-grid-template-areas-horizontal: "holder1 holder1" "holder2 holder2" "macros assembly";
|
|
@@ -1635,46 +1692,13 @@ const baseComponentStyles = css`
|
|
|
1635
1692
|
--ddk-component-setup-sidebar-step-item-padding: 0px;
|
|
1636
1693
|
}
|
|
1637
1694
|
|
|
1638
|
-
/*
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
--ddk-component-dashboard-grid-template-columns: var(--ddk-component-dashboard-grid-template-columns-horizontal);
|
|
1646
|
-
--ddk-component-dashboard-grid-template-rows: var(--ddk-component-dashboard-grid-template-rows-horizontal);
|
|
1647
|
-
|
|
1648
|
-
/* Override 3-column layout */
|
|
1649
|
-
--ddk-component-dashboard-grid-template-areas-3col: var(--ddk-component-dashboard-grid-template-areas-3col-horizontal);
|
|
1650
|
-
--ddk-component-dashboard-grid-template-columns-3col: var(--ddk-component-dashboard-grid-template-columns-3col-horizontal);
|
|
1651
|
-
--ddk-component-dashboard-grid-template-rows-3col: var(--ddk-component-dashboard-grid-template-rows-3col-horizontal);
|
|
1652
|
-
|
|
1653
|
-
/* Override spacing */
|
|
1654
|
-
--ddk-component-dashboard-row-gap: var(--ddk-component-dashboard-row-gap-horizontal);
|
|
1655
|
-
--ddk-component-dashboard-column-gap: var(--ddk-component-dashboard-column-gap-horizontal);
|
|
1656
|
-
|
|
1657
|
-
/* Override card properties - large cards (holders) */
|
|
1658
|
-
--ddk-component-dashboard-card-flex-direction: var(--ddk-component-dashboard-card-flex-direction-horizontal);
|
|
1659
|
-
--ddk-component-dashboard-card-height: var(--ddk-component-dashboard-card-height-horizontal);
|
|
1660
|
-
--ddk-component-dashboard-card-small-height: var(--ddk-component-dashboard-card-small-height-horizontal);
|
|
1661
|
-
--ddk-component-dashboard-card-large-width: var(--ddk-component-dashboard-card-large-width-horizontal);
|
|
1662
|
-
--ddk-component-dashboard-card-small-width: var(--ddk-component-dashboard-card-small-width-horizontal);
|
|
1663
|
-
--ddk-component-dashboard-card-min-width: var(--ddk-component-dashboard-card-min-width-horizontal);
|
|
1664
|
-
--ddk-component-dashboard-card-max-height: var(--ddk-component-dashboard-card-max-height-horizontal);
|
|
1665
|
-
|
|
1666
|
-
/* Override macro card height (macros are shorter than holder cards) */
|
|
1667
|
-
--ddk-component-macro-card-height: var(--ddk-component-macro-card-height-horizontal);
|
|
1668
|
-
|
|
1669
|
-
/* Modal dimensions in horizontal mode */
|
|
1670
|
-
--ddk-component-modal-max-width: 1000px;
|
|
1671
|
-
--ddk-component-modal-max-height: 750px;
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
/* Small cards in horizontal mode (macros and assembly cards) */
|
|
1675
|
-
[data-dashboard-layout="horizontal"] [data-card-size="small"] {
|
|
1676
|
-
--ddk-component-dashboard-card-height: var(--ddk-component-macro-card-height-horizontal);
|
|
1677
|
-
}
|
|
1695
|
+
/*
|
|
1696
|
+
* Landscape orientation overrides have moved to the always-on structural
|
|
1697
|
+
* skeleton in ./layout.ts (selector body[data-orientation="landscape"]), so
|
|
1698
|
+
* they win over any theme :root by specificity instead of being clobbered.
|
|
1699
|
+
* The *-horizontal value tokens above remain here as the values that skeleton
|
|
1700
|
+
* reads.
|
|
1701
|
+
*/
|
|
1678
1702
|
`;
|
|
1679
1703
|
const baseGenericStyles = css`
|
|
1680
1704
|
:root {
|
|
@@ -2112,6 +2136,7 @@ const getStyles = (temporaryThemeID) => temporaryThemeID === "flex-eu" ? [
|
|
|
2112
2136
|
baseGenericStyles,
|
|
2113
2137
|
baseComponentStyles,
|
|
2114
2138
|
baseSemanticStyles,
|
|
2139
|
+
layoutStyles,
|
|
2115
2140
|
flexEUComponentStyles,
|
|
2116
2141
|
flexEUSemanticStyles
|
|
2117
2142
|
] : temporaryThemeID === "compact" ? [
|
|
@@ -2120,6 +2145,7 @@ const getStyles = (temporaryThemeID) => temporaryThemeID === "flex-eu" ? [
|
|
|
2120
2145
|
baseGenericStyles,
|
|
2121
2146
|
baseComponentStyles,
|
|
2122
2147
|
baseSemanticStyles,
|
|
2148
|
+
layoutStyles,
|
|
2123
2149
|
flexEUComponentStyles,
|
|
2124
2150
|
flexEUSemanticStyles,
|
|
2125
2151
|
compactComponentStyles,
|
|
@@ -2129,7 +2155,8 @@ const getStyles = (temporaryThemeID) => temporaryThemeID === "flex-eu" ? [
|
|
|
2129
2155
|
rootStyles,
|
|
2130
2156
|
baseGenericStyles,
|
|
2131
2157
|
baseComponentStyles,
|
|
2132
|
-
baseSemanticStyles
|
|
2158
|
+
baseSemanticStyles,
|
|
2159
|
+
layoutStyles
|
|
2133
2160
|
];
|
|
2134
2161
|
const SvgAlertFilled = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12.0009 7.23564C11.6963 7.23613 11.4496 7.48285 11.4491 7.78735V15.1544C11.4491 15.4591 11.6961 15.7061 12.0009 15.7061C12.3056 15.7061 12.5526 15.4591 12.5526 15.1544V7.78735C12.5521 7.48285 12.3054 7.23613 12.0009 7.23564Z", fill: "currentColor" }), /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.07318 20.7783L11.5263 2.67477C11.6239 2.50482 11.8049 2.40002 12.0009 2.40002C12.1969 2.40002 12.3779 2.50482 12.4755 2.67477L22.9268 20.7783C23.0245 20.9478 23.0244 21.1566 22.9265 21.326C22.8287 21.4955 22.6479 21.5999 22.4522 21.6H1.54779C1.35211 21.5999 1.17134 21.4955 1.07348 21.326C0.975613 21.1566 0.975501 20.9478 1.07318 20.7783ZM12.0009 16.4238C11.3001 16.4228 10.7323 15.855 10.7313 15.1544V7.78735C10.7313 7.08629 11.2997 6.51796 12.0009 6.51796C12.702 6.51796 13.2704 7.08629 13.2704 7.78735V15.1544C13.2694 15.855 12.7016 16.4228 12.0009 16.4238ZM12.0009 19.6291C11.9067 19.6289 11.8129 19.6184 11.721 19.5977C11.3898 19.5246 11.1014 19.3227 10.9194 19.0365C10.7374 18.7503 10.6769 18.4035 10.7511 18.0726C10.7943 17.8791 10.9861 17.7572 11.1795 17.8004C11.373 17.8435 11.495 18.0352 11.4518 18.2287C11.3849 18.5305 11.5753 18.8293 11.877 18.8963C12.1788 18.9634 12.4778 18.7732 12.5449 18.4715C12.612 18.1698 12.4219 17.8708 12.1202 17.8035C12.054 17.7883 11.9856 17.7856 11.9184 17.7954C11.7889 17.8197 11.6565 17.7712 11.5735 17.6689C11.4904 17.5666 11.4701 17.427 11.5206 17.3053C11.5711 17.1836 11.6841 17.0994 11.8152 17.0858C12.2862 17.0219 12.7537 17.2248 13.0288 17.6124C13.3039 18.0001 13.341 18.5083 13.1252 18.9318C12.9093 19.3552 12.4762 19.6239 12.0009 19.6291Z", fill: "currentColor" }));
|
|
2135
2162
|
const SvgCloseSidebar = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { clipPath: "url(#clip0_1054_40209)" }, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12C0 5.36842 5.36842 0 12 0C18.6316 0 24 5.36842 24 12C24 18.6316 18.6316 24 12 24C5.36842 24 0 18.6316 0 12ZM1.38947 12C1.38947 17.8737 6.12632 22.6105 12 22.6105C17.8737 22.6105 22.6105 17.8737 22.6105 12C22.6105 6.12632 17.8737 1.38947 12 1.38947C6.12632 1.38947 1.38947 6.12632 1.38947 12ZM14.9684 7.38947L10.3579 12L14.9684 16.6105C15.2211 16.8632 15.2211 17.2737 14.9684 17.5263C14.7158 17.8105 14.2737 17.8105 14.0211 17.5579L9.41053 12.9474L8.46316 12L9.41053 11.0526L14.0211 6.44211C14.3053 6.18947 14.7158 6.18947 14.9684 6.44211C15.2211 6.69474 15.2211 7.13684 14.9684 7.38947Z", fill: "currentColor" })), /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("clipPath", { id: "clip0_1054_40209" }, /* @__PURE__ */ React.createElement("rect", { width: 24, height: 24, fill: "white" }))));
|
|
@@ -2407,6 +2434,7 @@ export {
|
|
|
2407
2434
|
getRgb,
|
|
2408
2435
|
getStyles,
|
|
2409
2436
|
hsvToRgb,
|
|
2437
|
+
layoutStyles,
|
|
2410
2438
|
padHex,
|
|
2411
2439
|
rgbToHex,
|
|
2412
2440
|
seedRandom,
|