@lofid/web 0.0.0-stage → 1.0.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/README.md +85 -2
- package/custom-elements.json +11166 -0
- package/dist/index.d.ts +2784 -0
- package/dist/index.js +18710 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/ag-grid.css +145 -0
- package/dist/styles/motion.css +32 -0
- package/dist/styles/motion.tokens.json +38 -0
- package/dist/styles/vars.css +870 -0
- package/package.json +44 -4
- package/readmes/lof-accordion/README.md +140 -0
- package/readmes/lof-alert/README.md +142 -0
- package/readmes/lof-autocomplete/README.md +209 -0
- package/readmes/lof-avatar/README.md +228 -0
- package/readmes/lof-badge/README.md +102 -0
- package/readmes/lof-breadcrumb/README.md +97 -0
- package/readmes/lof-button/README.md +190 -0
- package/readmes/lof-calendar/README.md +111 -0
- package/readmes/lof-card/README.md +75 -0
- package/readmes/lof-cardmedia/README.md +100 -0
- package/readmes/lof-carousel/README.md +187 -0
- package/readmes/lof-checkbox/README.md +159 -0
- package/readmes/lof-chip/README.md +141 -0
- package/readmes/lof-container/README.md +107 -0
- package/readmes/lof-date-picker/README.md +221 -0
- package/readmes/lof-divider/README.md +88 -0
- package/readmes/lof-drawer/README.md +188 -0
- package/readmes/lof-kbd/README.md +188 -0
- package/readmes/lof-layout/README.md +122 -0
- package/readmes/lof-menu/README.md +187 -0
- package/readmes/lof-menubar/README.md +218 -0
- package/readmes/lof-otp/README.md +167 -0
- package/readmes/lof-pagination/README.md +141 -0
- package/readmes/lof-popover/README.md +220 -0
- package/readmes/lof-progress/README.md +88 -0
- package/readmes/lof-radio/README.md +142 -0
- package/readmes/lof-range-picker/README.md +194 -0
- package/readmes/lof-resizable/README.md +220 -0
- package/readmes/lof-segmented-button/README.md +158 -0
- package/readmes/lof-select/README.md +193 -0
- package/readmes/lof-sheet/README.md +170 -0
- package/readmes/lof-signature-pad/README.md +161 -0
- package/readmes/lof-skeleton/README.md +104 -0
- package/readmes/lof-slider/README.md +140 -0
- package/readmes/lof-snackbar/README.md +170 -0
- package/readmes/lof-split-button/README.md +129 -0
- package/readmes/lof-stepper/README.md +171 -0
- package/readmes/lof-switch/README.md +122 -0
- package/readmes/lof-tab/README.md +184 -0
- package/readmes/lof-textfield/README.md +206 -0
- package/readmes/lof-time-picker/README.md +188 -0
- package/readmes/lof-toast/README.md +174 -0
- package/readmes/lof-tooltip/README.md +120 -0
- package/readmes/lof-tree/README.md +157 -0
- package/readmes/lof-upload/README.md +223 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Lofid Design System: AG Grid theme ("Data Table"), new in 1.5.0.
|
|
3
|
+
*
|
|
4
|
+
* import "@lofid/web/vars.css";
|
|
5
|
+
* import "@lofid/web/ag-grid.css";
|
|
6
|
+
*
|
|
7
|
+
* <div class="lof-data-table" data-density="dense | comfortable"> (no attribute = default)
|
|
8
|
+
* …toolbar… <ag-grid> …footer…
|
|
9
|
+
* </div>
|
|
10
|
+
*
|
|
11
|
+
* For AG Grid 33+ (the Theming API, whose default theme is themeQuartz) or 32.2–32.3
|
|
12
|
+
* when the app passes `theme: themeQuartz`. It maps AG Grid's theme parameters, which
|
|
13
|
+
* the grid reads as --ag-* custom properties, to the --lof-* tokens, so it follows light
|
|
14
|
+
* and dark mode with the rest of the page. AG Grid itself is not a dependency.
|
|
15
|
+
*
|
|
16
|
+
* Rows: 56px by default (header 48px), 40px with data-density="dense", 64px with
|
|
17
|
+
* data-density="comfortable". Row-state classes for `rowClassRules`:
|
|
18
|
+
* lof-data-table__row--error (wins over selected)
|
|
19
|
+
* lof-data-table__row--disabled
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
.lof-data-table {
|
|
23
|
+
/* surface and type */
|
|
24
|
+
--ag-background-color: var(--lof-bg-neutral);
|
|
25
|
+
--ag-foreground-color: var(--lof-text-default);
|
|
26
|
+
--ag-text-color: var(--lof-text-default);
|
|
27
|
+
--ag-data-color: var(--lof-text-default);
|
|
28
|
+
--ag-secondary-foreground-color: var(--lof-text-caption);
|
|
29
|
+
--ag-subtle-text-color: var(--lof-text-caption);
|
|
30
|
+
--ag-font-family: var(--lof-fonts-font-family, Poppins, sans-serif);
|
|
31
|
+
--ag-font-size: 14px;
|
|
32
|
+
--ag-data-font-size: 14px;
|
|
33
|
+
--ag-header-font-family: var(--lof-fonts-font-family, Poppins, sans-serif);
|
|
34
|
+
--ag-header-font-size: 14px;
|
|
35
|
+
--ag-header-font-weight: 600;
|
|
36
|
+
--ag-accent-color: var(--lof-bg-brand);
|
|
37
|
+
|
|
38
|
+
/* header */
|
|
39
|
+
--ag-header-background-color: var(--lof-bg-neutral-elevated-1);
|
|
40
|
+
--ag-header-text-color: var(--lof-text-label);
|
|
41
|
+
--ag-header-foreground-color: var(--lof-text-label);
|
|
42
|
+
--ag-header-height: 48px;
|
|
43
|
+
--ag-header-column-border: none;
|
|
44
|
+
--ag-header-column-resize-handle-color: var(--lof-border-subtle);
|
|
45
|
+
|
|
46
|
+
/* rows */
|
|
47
|
+
--ag-row-height: 56px;
|
|
48
|
+
--ag-list-item-height: 40px;
|
|
49
|
+
--ag-odd-row-background-color: var(--lof-bg-neutral);
|
|
50
|
+
--ag-row-hover-color: var(--lof-action-overlay-hover);
|
|
51
|
+
--ag-selected-row-background-color: var(--lof-bg-neutral-elevated-2);
|
|
52
|
+
--ag-range-selection-border-color: var(--lof-border-focus);
|
|
53
|
+
|
|
54
|
+
/* borders: dividers stay on the subtle border; the outer edge is the field border */
|
|
55
|
+
--ag-border-color: var(--lof-border-subtle);
|
|
56
|
+
--ag-row-border: 1px solid var(--lof-border-subtle);
|
|
57
|
+
--ag-wrapper-border: 1px solid var(--lof-border-default);
|
|
58
|
+
--ag-wrapper-border-radius: var(--lof-border-radius-sm, 8px);
|
|
59
|
+
--ag-border-radius: var(--lof-border-radius-xs, 4px);
|
|
60
|
+
--ag-column-border: none;
|
|
61
|
+
|
|
62
|
+
/* controls inside the grid */
|
|
63
|
+
--ag-input-border: 1px solid var(--lof-border-default);
|
|
64
|
+
--ag-input-focus-border: 1px solid var(--lof-border-strong);
|
|
65
|
+
--ag-input-focus-shadow: 0 0 0 2px var(--lof-border-focus);
|
|
66
|
+
--ag-checkbox-checked-background-color: var(--lof-bg-neutral-inverse-2);
|
|
67
|
+
--ag-checkbox-checked-border-color: var(--lof-bg-neutral-inverse-2);
|
|
68
|
+
--ag-checkbox-checked-shape-color: var(--lof-text-inverse);
|
|
69
|
+
--ag-checkbox-unchecked-border-color: var(--lof-border-strong);
|
|
70
|
+
--ag-icon-color: var(--lof-text-default);
|
|
71
|
+
--ag-focus-shadow: inset 0 0 0 2px var(--lof-border-focus);
|
|
72
|
+
|
|
73
|
+
/* menus, popups and the side bar */
|
|
74
|
+
--ag-menu-background-color: var(--lof-bg-neutral);
|
|
75
|
+
--ag-menu-border: none;
|
|
76
|
+
--ag-menu-shadow: var(--lof-shadows-md);
|
|
77
|
+
--ag-popup-shadow: var(--lof-shadows-md);
|
|
78
|
+
--ag-card-shadow: var(--lof-shadows-md);
|
|
79
|
+
--ag-tooltip-background-color: var(--lof-bg-surface-inverse);
|
|
80
|
+
--ag-tooltip-text-color: var(--lof-text-inverse);
|
|
81
|
+
--ag-chrome-background-color: var(--lof-bg-neutral-elevated-1);
|
|
82
|
+
--ag-side-bar-background-color: var(--lof-bg-neutral);
|
|
83
|
+
|
|
84
|
+
/* scale */
|
|
85
|
+
--ag-spacing: 8px;
|
|
86
|
+
--ag-cell-horizontal-padding: 16px;
|
|
87
|
+
|
|
88
|
+
color: var(--lof-text-default);
|
|
89
|
+
font-family: var(--lof-fonts-font-family, Poppins, sans-serif);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.lof-data-table[data-density="dense"] {
|
|
93
|
+
--ag-row-height: 40px;
|
|
94
|
+
--ag-cell-horizontal-padding: 12px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.lof-data-table[data-density="comfortable"] {
|
|
98
|
+
--ag-row-height: 64px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* sortable headers show the unsorted icon at rest (as unSortIcon: true would) */
|
|
102
|
+
.lof-data-table .ag-header-cell-sortable .ag-sort-none-icon,
|
|
103
|
+
.lof-data-table .ag-header-cell-sortable .ag-sort-indicator-icon.ag-sort-none-icon {
|
|
104
|
+
display: inline-flex !important;
|
|
105
|
+
opacity: 0.6;
|
|
106
|
+
}
|
|
107
|
+
.lof-data-table .ag-header-cell-sortable:hover .ag-sort-none-icon {
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* row states for rowClassRules: error wins over selected */
|
|
112
|
+
.lof-data-table .lof-data-table__row--disabled {
|
|
113
|
+
color: var(--lof-text-disabled);
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
}
|
|
116
|
+
.lof-data-table .lof-data-table__row--disabled .ag-cell {
|
|
117
|
+
color: var(--lof-text-disabled);
|
|
118
|
+
}
|
|
119
|
+
.lof-data-table .lof-data-table__row--error,
|
|
120
|
+
.lof-data-table .lof-data-table__row--error.ag-row-selected,
|
|
121
|
+
.lof-data-table .lof-data-table__row--error.ag-row-hover {
|
|
122
|
+
background-color: var(--lof-bg-danger-light);
|
|
123
|
+
--ag-selected-row-background-color: var(--lof-bg-danger-light);
|
|
124
|
+
}
|
|
125
|
+
.lof-data-table .lof-data-table__row--error .ag-cell:first-child {
|
|
126
|
+
box-shadow: inset 2px 0 0 var(--lof-border-danger);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* keyboard focus on a cell: the system 2px ring, inset */
|
|
130
|
+
.lof-data-table .ag-cell-focus:not(.ag-cell-range-selected) {
|
|
131
|
+
border-color: transparent !important;
|
|
132
|
+
box-shadow: inset 0 0 0 2px var(--lof-border-focus);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media (forced-colors: active) {
|
|
136
|
+
.lof-data-table .ag-row-selected {
|
|
137
|
+
forced-color-adjust: none;
|
|
138
|
+
background: Highlight;
|
|
139
|
+
color: HighlightText;
|
|
140
|
+
}
|
|
141
|
+
.lof-data-table .ag-cell-focus {
|
|
142
|
+
outline: 2px solid Highlight;
|
|
143
|
+
outline-offset: -2px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* Lofid Design System 1.0.0. */
|
|
2
|
+
/* Motion v1 (new in 1.5.0): opt-in tokens; no component timing reads them yet.
|
|
3
|
+
Generated from tokens/motion.tokens.json by scripts/build-vars.mjs. Do not edit. */
|
|
4
|
+
:root {
|
|
5
|
+
--lof-motion-duration-instant: 0ms;
|
|
6
|
+
--lof-motion-duration-fast: 100ms;
|
|
7
|
+
--lof-motion-duration-standard: 150ms;
|
|
8
|
+
--lof-motion-duration-moderate: 200ms;
|
|
9
|
+
--lof-motion-duration-slow: 250ms;
|
|
10
|
+
--lof-motion-duration-extended: 300ms;
|
|
11
|
+
--lof-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
12
|
+
--lof-motion-easing-enter: cubic-bezier(0, 0, 0, 1);
|
|
13
|
+
--lof-motion-easing-exit: cubic-bezier(0.3, 0, 1, 1);
|
|
14
|
+
--lof-motion-easing-linear: cubic-bezier(0, 0, 1, 1);
|
|
15
|
+
--lof-motion-feedback-duration: var(--lof-motion-duration-standard);
|
|
16
|
+
--lof-motion-feedback-easing: var(--lof-motion-easing-standard);
|
|
17
|
+
--lof-motion-disclosure-duration: var(--lof-motion-duration-slow);
|
|
18
|
+
--lof-motion-disclosure-easing: var(--lof-motion-easing-standard);
|
|
19
|
+
--lof-motion-overlay-enter-duration: var(--lof-motion-duration-moderate);
|
|
20
|
+
--lof-motion-overlay-enter-easing: var(--lof-motion-easing-enter);
|
|
21
|
+
--lof-motion-overlay-exit-duration: var(--lof-motion-duration-standard);
|
|
22
|
+
--lof-motion-overlay-exit-easing: var(--lof-motion-easing-exit);
|
|
23
|
+
--lof-motion-loading-cycle: 1500ms;
|
|
24
|
+
}
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
:root {
|
|
27
|
+
--lof-motion-feedback-duration: 0ms;
|
|
28
|
+
--lof-motion-disclosure-duration: 0ms;
|
|
29
|
+
--lof-motion-overlay-enter-duration: 0ms;
|
|
30
|
+
--lof-motion-overlay-exit-duration: 0ms;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Motion v1: code-owned, additive foundation. Existing component timings are unchanged. Finite semantic durations reduce to zero under prefers-reduced-motion; loading still needs an explicit static alternative.",
|
|
3
|
+
"motion": {
|
|
4
|
+
"duration": {
|
|
5
|
+
"instant": { "$type": "duration", "$value": { "value": 0, "unit": "ms" } },
|
|
6
|
+
"fast": { "$type": "duration", "$value": { "value": 100, "unit": "ms" } },
|
|
7
|
+
"standard": { "$type": "duration", "$value": { "value": 150, "unit": "ms" } },
|
|
8
|
+
"moderate": { "$type": "duration", "$value": { "value": 200, "unit": "ms" } },
|
|
9
|
+
"slow": { "$type": "duration", "$value": { "value": 250, "unit": "ms" } },
|
|
10
|
+
"extended": { "$type": "duration", "$value": { "value": 300, "unit": "ms" } }
|
|
11
|
+
},
|
|
12
|
+
"easing": {
|
|
13
|
+
"standard": { "$type": "cubicBezier", "$value": [0.2, 0, 0, 1] },
|
|
14
|
+
"enter": { "$type": "cubicBezier", "$value": [0, 0, 0, 1] },
|
|
15
|
+
"exit": { "$type": "cubicBezier", "$value": [0.3, 0, 1, 1] },
|
|
16
|
+
"linear": { "$type": "cubicBezier", "$value": [0, 0, 1, 1] }
|
|
17
|
+
},
|
|
18
|
+
"feedback": {
|
|
19
|
+
"duration": { "$type": "duration", "$value": "{motion.duration.standard}" },
|
|
20
|
+
"easing": { "$type": "cubicBezier", "$value": "{motion.easing.standard}" }
|
|
21
|
+
},
|
|
22
|
+
"disclosure": {
|
|
23
|
+
"duration": { "$type": "duration", "$value": "{motion.duration.slow}" },
|
|
24
|
+
"easing": { "$type": "cubicBezier", "$value": "{motion.easing.standard}" }
|
|
25
|
+
},
|
|
26
|
+
"overlay-enter": {
|
|
27
|
+
"duration": { "$type": "duration", "$value": "{motion.duration.moderate}" },
|
|
28
|
+
"easing": { "$type": "cubicBezier", "$value": "{motion.easing.enter}" }
|
|
29
|
+
},
|
|
30
|
+
"overlay-exit": {
|
|
31
|
+
"duration": { "$type": "duration", "$value": "{motion.duration.standard}" },
|
|
32
|
+
"easing": { "$type": "cubicBezier", "$value": "{motion.easing.exit}" }
|
|
33
|
+
},
|
|
34
|
+
"loading": {
|
|
35
|
+
"cycle": { "$type": "duration", "$value": { "value": 1500, "unit": "ms" }, "$description": "Repeating indicator period, not a finite transition. Never zero this value to implement reduced motion; disable animation and retain a readable loading status." }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|