@cngx/common 0.1.0-rc.8 → 0.3.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.
Files changed (90) hide show
  1. package/a11y/README.md +15 -2
  2. package/button/README.md +258 -0
  3. package/command/README.md +42 -2
  4. package/data/README.md +15 -12
  5. package/fesm2022/cngx-common-a11y.mjs +1076 -319
  6. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  7. package/fesm2022/cngx-common-audio.mjs +99 -77
  8. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  9. package/fesm2022/cngx-common-button.mjs +1084 -0
  10. package/fesm2022/cngx-common-button.mjs.map +1 -0
  11. package/fesm2022/cngx-common-card.mjs +138 -78
  12. package/fesm2022/cngx-common-card.mjs.map +1 -1
  13. package/fesm2022/cngx-common-chart.mjs +799 -327
  14. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  15. package/fesm2022/cngx-common-command.mjs +101 -25
  16. package/fesm2022/cngx-common-command.mjs.map +1 -1
  17. package/fesm2022/cngx-common-data.mjs +861 -423
  18. package/fesm2022/cngx-common-data.mjs.map +1 -1
  19. package/fesm2022/cngx-common-dialog.mjs +198 -160
  20. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  21. package/fesm2022/cngx-common-display.mjs +693 -329
  22. package/fesm2022/cngx-common-display.mjs.map +1 -1
  23. package/fesm2022/cngx-common-interactive.mjs +7303 -2774
  24. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  25. package/fesm2022/cngx-common-layout.mjs +2174 -442
  26. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  27. package/fesm2022/cngx-common-menu-button.mjs +557 -0
  28. package/fesm2022/cngx-common-menu-button.mjs.map +1 -0
  29. package/fesm2022/cngx-common-popover.mjs +2109 -557
  30. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  31. package/fesm2022/cngx-common-stepper.mjs +548 -419
  32. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  33. package/fesm2022/cngx-common-tabs.mjs +442 -331
  34. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  35. package/fesm2022/cngx-common-timeline.mjs +44 -71
  36. package/fesm2022/cngx-common-timeline.mjs.map +1 -1
  37. package/fesm2022/cngx-common.mjs +10 -10
  38. package/fesm2022/cngx-common.mjs.map +1 -1
  39. package/interactive/README.md +30 -19
  40. package/layout/README.md +17 -1
  41. package/menu-button/README.md +234 -0
  42. package/package.json +31 -8
  43. package/popover/README.md +81 -4
  44. package/popover/tooltip-indicator.scss +52 -0
  45. package/schematics/collection.json +9 -0
  46. package/schematics/ng-add/index.js +9 -0
  47. package/schematics/ng-add/schema.json +96 -0
  48. package/schematics/package.json +3 -0
  49. package/stepper/README.md +5 -5
  50. package/theming/components/cngx-accordion.css +36 -7
  51. package/theming/components/cngx-async.css +185 -37
  52. package/theming/components/cngx-backdrop.css +3 -1
  53. package/theming/components/cngx-badge.css +20 -5
  54. package/theming/components/cngx-bottom-sheet.css +2 -0
  55. package/theming/components/cngx-breadcrumb.css +3 -1
  56. package/theming/components/cngx-button-group.css +325 -0
  57. package/theming/components/cngx-button-toggle.css +55 -23
  58. package/theming/components/cngx-button.css +975 -0
  59. package/theming/components/cngx-data-grid.css +2 -0
  60. package/theming/components/cngx-dialog.css +3 -1
  61. package/theming/components/cngx-divider.css +24 -9
  62. package/theming/components/cngx-drawer.css +153 -0
  63. package/theming/components/cngx-icon-glyph.css +76 -0
  64. package/theming/components/cngx-listbox.css +79 -25
  65. package/theming/components/cngx-menu.css +112 -52
  66. package/theming/components/cngx-nav.css +1220 -0
  67. package/theming/components/cngx-popover-sheet.css +434 -0
  68. package/theming/components/cngx-popover.css +37 -9
  69. package/theming/components/cngx-recycler-placeholder.css +2 -0
  70. package/theming/components/cngx-ripple.css +74 -16
  71. package/theming/components/cngx-sidebar.css +71 -0
  72. package/theming/components/cngx-slider.css +3 -1
  73. package/theming/components/cngx-tooltip.css +2 -0
  74. package/timeline/README.md +2 -2
  75. package/types/cngx-common-a11y.d.ts +488 -112
  76. package/types/cngx-common-audio.d.ts +60 -88
  77. package/types/cngx-common-button.d.ts +698 -0
  78. package/types/cngx-common-card.d.ts +104 -78
  79. package/types/cngx-common-chart.d.ts +677 -389
  80. package/types/cngx-common-command.d.ts +55 -41
  81. package/types/cngx-common-data.d.ts +506 -360
  82. package/types/cngx-common-dialog.d.ts +94 -127
  83. package/types/cngx-common-display.d.ts +475 -300
  84. package/types/cngx-common-interactive.d.ts +4383 -1721
  85. package/types/cngx-common-layout.d.ts +1399 -288
  86. package/types/cngx-common-menu-button.d.ts +382 -0
  87. package/types/cngx-common-popover.d.ts +990 -268
  88. package/types/cngx-common-stepper.d.ts +374 -465
  89. package/types/cngx-common-tabs.d.ts +309 -403
  90. package/types/cngx-common-timeline.d.ts +50 -109
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @overview
3
+ * Base skin for `CngxSidebar`. Opt-in: add the `.cngx-sidebar` class
4
+ * alongside `[cngxSidebar]`. The class, not the attribute, keeps the skin
5
+ * out of `cngx-sidenav`, which composes `CngxSidebar` as a host directive
6
+ * and ships its own stylesheet.
7
+ *
8
+ * The skin styles the sidebar box only: a scrolling flex column on a
9
+ * surface with a border on the side facing the content (`data-sidebar-side`,
10
+ * written by the directive; none while `data-sidebar-state` is `hidden`, so
11
+ * a hidden sidebar paints nothing), and a shadow over the content while it
12
+ * peeks.
13
+ * It sets no padding or gap for the content and selects nothing inside it.
14
+ *
15
+ * What the content does on the rail is the content's business: nav rows
16
+ * crop themselves under `[cngxNavRailed]` (`cngx-nav.css`). The page shell
17
+ * around the sidebar is the consumer's.
18
+ *
19
+ * **Inheritance**
20
+ *
21
+ * - `--cngx-sidebar-bg` -> `--cngx-color-surface` with a 3% tint of
22
+ * `--cngx-color-text`, so it sets off from the page in light and dark
23
+ * - `--cngx-sidebar-border-color` -> `--cngx-color-border`
24
+ * - `--cngx-sidebar-border-width` -> `1px`
25
+ * - `--cngx-sidebar-peek-shadow` -> `--cngx-shadow-md`
26
+ *
27
+ * @themes CngxSidebar
28
+ */
29
+
30
+ @layer cngx.components {
31
+ @scope (.cngx-sidebar) {
32
+ :scope {
33
+ /* Functional - a flex column that scrolls */
34
+ position: relative;
35
+ display: flex;
36
+ flex-direction: column;
37
+ flex: none;
38
+ box-sizing: border-box;
39
+ min-block-size: 0;
40
+ overflow-x: clip;
41
+ overflow-y: auto;
42
+
43
+ /* Themable - token-driven */
44
+ background: var(
45
+ --cngx-sidebar-bg,
46
+ color-mix(
47
+ in oklab,
48
+ var(--cngx-color-surface, oklch(1 0 0)) 97%,
49
+ var(--cngx-color-text, oklch(0.2 0.01 250))
50
+ )
51
+ );
52
+ }
53
+
54
+ :scope[data-sidebar-side='start']:not([data-sidebar-state='hidden']) {
55
+ border-inline-end: var(--cngx-sidebar-border-width, 1px) solid
56
+ var(--cngx-sidebar-border-color, var(--cngx-color-border, oklch(0.92 0 0)));
57
+ }
58
+
59
+ :scope[data-sidebar-side='end']:not([data-sidebar-state='hidden']) {
60
+ border-inline-start: var(--cngx-sidebar-border-width, 1px) solid
61
+ var(--cngx-sidebar-border-color, var(--cngx-color-border, oklch(0.92 0 0)));
62
+ }
63
+
64
+ :scope[data-sidebar-state='peek'] {
65
+ box-shadow: var(
66
+ --cngx-sidebar-peek-shadow,
67
+ var(--cngx-shadow-md, 0 4px 16px oklch(0 0 0 / 0.12))
68
+ );
69
+ }
70
+ }
71
+ }
@@ -28,6 +28,8 @@
28
28
  * - track / fill colour -> `--cngx-color-border` / `--cngx-color-primary`
29
29
  * - thumb fill -> `--cngx-color-surface`, border -> `--cngx-color-primary`
30
30
  * - focus ring -> `--cngx-color-primary` (contrast >= 3:1 against the surface)
31
+ *
32
+ * @themes CngxSliderTrack, CngxRangeSliderTrack
31
33
  */
32
34
 
33
35
  @layer cngx.tokens {
@@ -198,7 +200,7 @@
198
200
  flex-direction: column;
199
201
  inline-size: max-content;
200
202
  min-inline-size: var(--cngx-slider-thumb-size, 16px);
201
- block-size: var(--cngx-slider-length, 9rem);
203
+ block-size: var(--cngx-slider-length);
202
204
  min-block-size: 0;
203
205
  }
204
206
 
@@ -43,6 +43,8 @@
43
43
  * **Pair with**
44
44
  *
45
45
  * - `@cngx/themes/material/tooltip-theme` - Material 3 inverse-surface
46
+ *
47
+ * @themes CngxTooltip
46
48
  */
47
49
 
48
50
  @layer cngx.tokens {
@@ -150,6 +150,6 @@ What the headless layer contributes, before any organism ARIA:
150
150
  - [`@cngx/ui/timeline`](../../ui/timeline/) - the styled organism: grouping inputs, layout, skins, async body, Material bridge
151
151
  - [`@cngx/common/stepper`](../stepper/) - guided process; timeline is history
152
152
  - [`CngxTime`](../display/) - relative timestamp formatting for `[cngxTimelineTime]`
153
- - [`CngxAsyncState`](../../core/) - the per-row `[state]` contract
154
- - [API on compodocx](https://cngxjs.github.io/cngx/)
153
+ - [`CngxAsyncState`](../../core/utils/) - the per-row `[state]` contract
154
+ - [API on compodocx](https://cngxjs.github.io/cngx/main/common/timeline/)
155
155
  - Tests: `projects/common/timeline/*.spec.ts`