@g9tm/lynxcontrols 2.5.5 → 2.5.7
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/catalog/cards/G9AppBar.md +2 -2
- package/catalog/cards/G9Avatar.md +2 -1
- package/catalog/cards/G9CarryContexts.md +10 -0
- package/catalog/cards/G9CheckBox.md +1 -1
- package/catalog/cards/G9ChoiceList.md +1 -1
- package/catalog/cards/G9ConnectionBanner.md +4 -2
- package/catalog/cards/G9FlatTabBar.md +17 -0
- package/catalog/cards/G9FormField.md +2 -2
- package/catalog/cards/G9IconSlot.md +1 -1
- package/catalog/cards/G9ListRow.md +1 -1
- package/catalog/cards/G9RangeSlider.md +2 -2
- package/catalog/cards/G9Stepper.md +1 -1
- package/catalog/cards/G9SwitchRow.md +1 -1
- package/catalog/cards/G9UpdateBar.md +2 -1
- package/catalog/catalog.json +2418 -650
- package/catalog/index.md +5 -3
- package/dist/.tsbuildinfo +1 -1
- package/dist/base/selection-item.d.ts +5 -0
- package/dist/base/selection-item.d.ts.map +1 -1
- package/dist/button/button.d.ts +4 -0
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.jsx +8 -2
- package/dist/button/icon-button.d.ts +2 -0
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.jsx +3 -1
- package/dist/display/figures.d.ts +13 -0
- package/dist/display/figures.d.ts.map +1 -1
- package/dist/display/figures.jsx +53 -14
- package/dist/display/status.d.ts +1 -1
- package/dist/display/status.d.ts.map +1 -1
- package/dist/display/status.jsx +15 -3
- package/dist/effects/effects.css +6 -0
- package/dist/effects/effects.css.map +1 -1
- package/dist/effects/effects.d.ts +9 -0
- package/dist/effects/effects.d.ts.map +1 -1
- package/dist/effects/effects.jsx +55 -1
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +3 -0
- package/dist/fields/extra-entries.d.ts +2 -1
- package/dist/fields/extra-entries.d.ts.map +1 -1
- package/dist/fields/extra-entries.jsx +51 -17
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/outlined-field.d.ts +14 -0
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +6 -1
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +36 -3
- package/dist/fields/text-entry.d.ts +4 -0
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +33 -26
- package/dist/fields/use-text-input.d.ts +3 -2
- package/dist/fields/use-text-input.d.ts.map +1 -1
- package/dist/fields/use-text-input.jsx +3 -0
- package/dist/header/app-bar.d.ts +13 -1
- package/dist/header/app-bar.d.ts.map +1 -1
- package/dist/header/app-bar.jsx +31 -11
- package/dist/header/header.css +12 -0
- package/dist/header/header.css.map +1 -1
- package/dist/host/bottom-overlays.d.ts +5 -0
- package/dist/host/bottom-overlays.d.ts.map +1 -1
- package/dist/host/bottom-overlays.jsx +17 -1
- package/dist/host/carry-contexts.d.ts +28 -0
- package/dist/host/carry-contexts.d.ts.map +1 -0
- package/dist/host/carry-contexts.jsx +62 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +5 -1
- package/dist/host/index.d.ts +2 -0
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.jsx +2 -0
- package/dist/icon/icon.css +0 -1
- package/dist/icon/icon.css.map +1 -1
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +15 -10
- package/dist/icon/slot.d.ts +2 -0
- package/dist/icon/slot.d.ts.map +1 -1
- package/dist/icon/slot.jsx +2 -0
- package/dist/layout/containers.d.ts.map +1 -1
- package/dist/layout/containers.jsx +2 -1
- package/dist/layout/layout.css +5 -0
- package/dist/layout/layout.css.map +1 -1
- package/dist/layout/scroll-spy.d.ts.map +1 -1
- package/dist/layout/scroll-spy.jsx +4 -2
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.d.ts.map +1 -1
- package/dist/list/index.jsx +1 -1
- package/dist/list/list.css +28 -0
- package/dist/list/list.css.map +1 -1
- package/dist/list/rows.d.ts +13 -1
- package/dist/list/rows.d.ts.map +1 -1
- package/dist/list/rows.jsx +39 -20
- package/dist/list/virtual-list.d.ts +52 -1
- package/dist/list/virtual-list.d.ts.map +1 -1
- package/dist/list/virtual-list.jsx +123 -18
- package/dist/provider/direction-scope.d.ts +8 -0
- package/dist/provider/direction-scope.d.ts.map +1 -1
- package/dist/provider/direction-scope.jsx +13 -2
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/provider.css +7 -0
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/settings.d.ts +14 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +4 -1
- package/dist/range-slider/index.d.ts +1 -1
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/range-slider.css +69 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.d.ts +22 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -1
- package/dist/range-slider/range-slider.jsx +34 -5
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +23 -10
- package/dist/selection/selection.css +16 -1
- package/dist/selection/selection.css.map +1 -1
- package/dist/shell/shell.css +7 -0
- package/dist/shell/shell.css.map +1 -1
- package/dist/shell/shell.d.ts +24 -3
- package/dist/shell/shell.d.ts.map +1 -1
- package/dist/shell/shell.jsx +12 -9
- package/dist/survey/survey.css +71 -0
- package/dist/survey/survey.css.map +1 -1
- package/dist/survey/survey.d.ts +15 -0
- package/dist/survey/survey.d.ts.map +1 -1
- package/dist/survey/survey.jsx +45 -2
- package/dist/tab-bar/flat.d.ts +18 -0
- package/dist/tab-bar/flat.d.ts.map +1 -0
- package/dist/tab-bar/flat.jsx +124 -0
- package/dist/tab-bar/index.d.ts +1 -0
- package/dist/tab-bar/index.d.ts.map +1 -1
- package/dist/tab-bar/index.jsx +1 -0
- package/dist/tab-bar/metrics.d.ts +8 -2
- package/dist/tab-bar/metrics.d.ts.map +1 -1
- package/dist/tab-bar/metrics.jsx +12 -1
- package/dist/tab-bar/tab-bar.css +77 -0
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +32 -6
- package/dist/tabs/tab-view.jsx +10 -3
- package/dist/tabs/tabs.css +5 -0
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toggle/checkbox.d.ts +5 -0
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +7 -2
- package/dist/toggle/choice.css +8 -0
- package/dist/toggle/choice.css.map +1 -1
- package/dist/toggle/choice.d.ts +11 -0
- package/dist/toggle/choice.d.ts.map +1 -1
- package/dist/toggle/choice.jsx +25 -14
- package/package.json +2 -2
- package/skills/g9-lynx-app/references/catalog-index.md +3 -3
- package/skills/g9-lynx-app/references/components/barcode.md +3 -3
- package/skills/g9-lynx-app/references/components/charts.md +1 -1
- package/skills/g9-lynx-app/references/components/commerce.md +5 -5
- package/skills/g9-lynx-app/references/components/display-1.md +2 -1
- package/skills/g9-lynx-app/references/components/fields.md +2 -2
- package/skills/g9-lynx-app/references/components/header.md +2 -2
- package/skills/g9-lynx-app/references/components/host.md +11 -0
- package/skills/g9-lynx-app/references/components/icon.md +1 -1
- package/skills/g9-lynx-app/references/components/list.md +2 -2
- package/skills/g9-lynx-app/references/components/map.md +19 -1
- package/skills/g9-lynx-app/references/components/range-slider.md +2 -2
- package/skills/g9-lynx-app/references/components/shell.md +6 -3
- package/skills/g9-lynx-app/references/components/survey.md +1 -1
- package/skills/g9-lynx-app/references/components/tab-bar.md +18 -0
- package/skills/g9-lynx-app/references/components/toggle.md +2 -2
- package/skills/g9-lynx-app/references/provider-and-host.md +8 -0
package/dist/survey/survey.css
CHANGED
|
@@ -208,5 +208,76 @@
|
|
|
208
208
|
align-self: flex-end;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
.g9-choices--row {
|
|
212
|
+
width: 100%;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.g9-choices__strip {
|
|
216
|
+
column-gap: 8px;
|
|
217
|
+
padding: 2px 0;
|
|
218
|
+
display: flex;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.g9-choice-pill {
|
|
222
|
+
border-radius: var(--g9-radius-chip);
|
|
223
|
+
border-style: solid;
|
|
224
|
+
border-width: 1px;
|
|
225
|
+
border-color: var(--g9-outline-variant);
|
|
226
|
+
background-color: var(--g9-surface);
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
flex-shrink: 0;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
align-items: center;
|
|
231
|
+
row-gap: 2px;
|
|
232
|
+
min-width: 72px;
|
|
233
|
+
padding: 8px 14px;
|
|
234
|
+
display: flex;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.g9-choice-pill--on {
|
|
238
|
+
border-color: var(--g9-primary);
|
|
239
|
+
background-color: var(--g9-primary);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.g9-choice-pill__label {
|
|
243
|
+
font-size: 14px;
|
|
244
|
+
font-family: var(--g9-font-text-700);
|
|
245
|
+
text-align: center;
|
|
246
|
+
color: var(--g9-text-primary);
|
|
247
|
+
font-weight: 700;
|
|
248
|
+
line-height: 20px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.g9-choice-pill__label--on {
|
|
252
|
+
color: var(--g9-on-primary);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.g9-choice-pill__description {
|
|
256
|
+
font-size: 12px;
|
|
257
|
+
font-family: var(--g9-font-text);
|
|
258
|
+
text-align: center;
|
|
259
|
+
color: var(--g9-text-secondary);
|
|
260
|
+
line-height: 18px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.g9-choice-pill__description--on {
|
|
264
|
+
color: var(--g9-on-primary);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.g9-choice__badge {
|
|
268
|
+
font-size: 11px;
|
|
269
|
+
line-height: 16px;
|
|
270
|
+
font-family: var(--g9-font-text-700);
|
|
271
|
+
color: var(--g9-primary);
|
|
272
|
+
font-weight: 700;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.g9-choice__detail {
|
|
276
|
+
font-size: 12px;
|
|
277
|
+
font-family: var(--g9-font-text);
|
|
278
|
+
color: var(--g9-text-tertiary);
|
|
279
|
+
line-height: 18px;
|
|
280
|
+
}
|
|
281
|
+
|
|
211
282
|
|
|
212
283
|
/*# sourceMappingURL=survey.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/survey/survey.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,aAAa;EACb,aAAa;AACf;;AAGA;EAAE,gBAAgB;EAChB,aAAa;AACf;;AAGA;EAAE,OAAO;AACT;;AAGA;EAAE,oCAAoC;EACpC,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,YAAY;EACZ,aAAa;EACb,aAAa;AACf;;AAGA;EAAE,iBAAiB;EACjB,+BAA+B;EAC/B,6CAA6C;AAC/C;;AAGA;EAAE,YAAY;AACd;;AAGA;EAAE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,aAAa;AACf;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,eAAe;EACf,oCAAoC;EACpC,6BAA6B;EAC7B,gBAAgB;EAChB,iBAAiB;AACnB;;AAGA;EAAE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;EAC/B,iBAAiB;AACnB;;AAGA;EAAE,mBAAmB;EACnB,iBAAiB;EACjB,+BAA+B;EAC/B,mBAAmB;EACnB,uBAAuB;EACvB,mB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G9ScaleInput, G9AllocationInput. */\n.g9-choices {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n}\n\n.g9-choices__row {\n display: flex;\n column-gap: 10px;\n}\n\n.g9-choices__pad {\n flex: 1;\n}\n\n.g9-choice {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n padding: 14px;\n row-gap: 10px;\n border-radius: var(--g9-radius-card);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-choice--on {\n border-width: 2px;\n border-color: var(--g9-primary);\n background-color: var(--g9-primary-container);\n}\n\n.g9-choice--disabled {\n opacity: 0.38;\n}\n\n.g9-choice__line {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n}\n\n.g9-choice__text {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-choice__label {\n font-size: 15px;\n font-family: var(--g9-font-text-600);\n line-height: 24px;\n font-weight: 600;\n color: var(--g9-text-primary);\n}\n\n.g9-choice__description {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 20px;\n color: var(--g9-text-secondary);\n}\n\n.g9-choice__mark {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-outline);\n}\n\n.g9-choice__mark--square {\n border-radius: 6px;\n}\n\n.g9-choice__mark--on {\n border-color: var(--g9-primary);\n background-color: var(--g9-primary);\n}\n\n.g9-scale {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n}\n\n.g9-scale__row {\n display: flex;\n column-gap: 6px;\n}\n\n.g9-scale__step {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n height: 44px;\n border-radius: 12px;\n background-color: var(--g9-surface-container-high);\n transition: background-color 120ms ease-out;\n}\n\n.g9-scale__step--on {\n background-color: var(--g9-primary);\n}\n\n.g9-scale__num {\n font-size: 15px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-text-primary);\n}\n\n.g9-scale__num--on {\n color: var(--g9-on-primary);\n font-family: var(--g9-font-text);\n}\n\n.g9-scale__ends {\n display: flex;\n justify-content: space-between;\n}\n\n.g9-scale__end {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-alloc {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n}\n\n.g9-alloc__bar {\n display: flex;\n height: 14px;\n border-radius: 7px;\n overflow: hidden;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-alloc__share {\n height: 14px;\n}\n\n.g9-alloc__share--left {\n background-color: transparent;\n}\n\n.g9-alloc__row {\n display: flex;\n align-items: center;\n column-gap: 10px;\n min-height: 44px;\n}\n\n.g9-alloc__dot {\n width: 10px;\n height: 10px;\n border-radius: 5px;\n}\n\n.g9-alloc__label {\n flex: 1;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-alloc__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-alloc__btn--off {\n opacity: 0.35;\n}\n\n.g9-alloc__value {\n min-width: 52px;\n text-align: center;\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-text-primary);\n}\n\n.g9-alloc__left {\n align-self: flex-end;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/survey/survey.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,aAAa;EACb,aAAa;AACf;;AAGA;EAAE,gBAAgB;EAChB,aAAa;AACf;;AAGA;EAAE,OAAO;AACT;;AAGA;EAAE,oCAAoC;EACpC,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,sBAAsB;EACtB,O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AuB;AACzB;;AAGA;EAAE,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;AACf;;AAGA;EAAE,kBAAkB;EAClB,WAAW;EACX,YAAY;AACd;;AAGA;EAAE,eAAe;EACf,gCAAgC;EAChC,6BAA6B;EAC7B,OAAO;AACT;;AAGA;EAAE,kDAAkD;EAClD,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,YAAY;AACd;;AAGA;EAAE,kBAAkB;EAClB,eAAe;EACf,eAAe;EACf,oCAAoC;EACpC,6BAA6B;EAC7B,gBAAgB;AAClB;;AAGA;EAAE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;EAC/B,oBAAoB;AACtB;;AAIA;EADE,WAAW;AACb;;AAIA;EADE,eAAe;EACf,cAAc;EACd,aAAa;AACf;;AAIA;EADE,oCAAoC;EACpC,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,sBAAsB;EACtB,cAAc;EACd,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,eAAe;EACf,iBAAiB;EACjB,aAAa;AACf;;AAIA;EADE,+BAA+B;EAC/B,mCAAmC;AACrC;;AAIA;EADE,eAAe;EACf,oCAAoC;EACpC,kBAAkB;EAClB,6BAA6B;EAC7B,gBAAgB;EAChB,iBAAiB;AACnB;;AAIA;EADE,2BAA2B;AAC7B;;AAIA;EADE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,+BAA+B;EAC/B,iBAAiB;AACnB;;AAIA;EADE,2BAA2B;AAC7B;;AAKA;EAFE,eAAe;EACf,iBAAiB;EACjB,oCAAoC;EACpC,wBAAwB;EACxB,gBAAgB;AAClB;;AAKA;EAFE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;EAC9B,iBAAiB;AACnB","sourcesContent":["/* G9ChoiceList, G9ScaleInput, G9AllocationInput. */\n.g9-choices {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n}\n\n.g9-choices__row {\n display: flex;\n column-gap: 10px;\n}\n\n.g9-choices__pad {\n flex: 1;\n}\n\n.g9-choice {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n padding: 14px;\n row-gap: 10px;\n border-radius: var(--g9-radius-card);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-choice--on {\n border-width: 2px;\n border-color: var(--g9-primary);\n background-color: var(--g9-primary-container);\n}\n\n.g9-choice--disabled {\n opacity: 0.38;\n}\n\n.g9-choice__line {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n}\n\n.g9-choice__text {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-choice__label {\n font-size: 15px;\n font-family: var(--g9-font-text-600);\n line-height: 24px;\n font-weight: 600;\n color: var(--g9-text-primary);\n}\n\n.g9-choice__description {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 20px;\n color: var(--g9-text-secondary);\n}\n\n.g9-choice__mark {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: 11px;\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-outline);\n}\n\n.g9-choice__mark--square {\n border-radius: 6px;\n}\n\n.g9-choice__mark--on {\n border-color: var(--g9-primary);\n background-color: var(--g9-primary);\n}\n\n.g9-scale {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n}\n\n.g9-scale__row {\n display: flex;\n column-gap: 6px;\n}\n\n.g9-scale__step {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n height: 44px;\n border-radius: 12px;\n background-color: var(--g9-surface-container-high);\n transition: background-color 120ms ease-out;\n}\n\n.g9-scale__step--on {\n background-color: var(--g9-primary);\n}\n\n.g9-scale__num {\n font-size: 15px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-text-primary);\n}\n\n.g9-scale__num--on {\n color: var(--g9-on-primary);\n font-family: var(--g9-font-text);\n}\n\n.g9-scale__ends {\n display: flex;\n justify-content: space-between;\n}\n\n.g9-scale__end {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-alloc {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n}\n\n.g9-alloc__bar {\n display: flex;\n height: 14px;\n border-radius: 7px;\n overflow: hidden;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-alloc__share {\n height: 14px;\n}\n\n.g9-alloc__share--left {\n background-color: transparent;\n}\n\n.g9-alloc__row {\n display: flex;\n align-items: center;\n column-gap: 10px;\n min-height: 44px;\n}\n\n.g9-alloc__dot {\n width: 10px;\n height: 10px;\n border-radius: 5px;\n}\n\n.g9-alloc__label {\n flex: 1;\n font-size: 14px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-alloc__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-alloc__btn--off {\n opacity: 0.35;\n}\n\n.g9-alloc__value {\n min-width: 52px;\n text-align: center;\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-text-primary);\n}\n\n.g9-alloc__left {\n align-self: flex-end;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n/* A row of choices (ShopManager's day picker, 2.5.6): one scrolling line of two-line pills. */\n.g9-choices--row {\n width: 100%;\n}\n\n.g9-choices__strip {\n display: flex;\n column-gap: 8px;\n padding: 2px 0px;\n}\n\n.g9-choice-pill {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: 72px;\n padding: 8px 14px;\n row-gap: 2px;\n border-radius: var(--g9-radius-chip);\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-choice-pill--on {\n border-color: var(--g9-primary);\n background-color: var(--g9-primary);\n}\n\n.g9-choice-pill__label {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n line-height: 20px;\n text-align: center;\n color: var(--g9-text-primary);\n}\n\n.g9-choice-pill__label--on {\n color: var(--g9-on-primary);\n}\n\n.g9-choice-pill__description {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 18px;\n text-align: center;\n color: var(--g9-text-secondary);\n}\n\n.g9-choice-pill__description--on {\n color: var(--g9-on-primary);\n}\n\n/* An option's badge above its label and a detail line under its description (2.5.7). */\n.g9-choice__badge {\n font-size: 11px;\n line-height: 16px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-primary);\n}\n\n.g9-choice__detail {\n font-size: 12px;\n font-family: var(--g9-font-text);\n line-height: 18px;\n color: var(--g9-text-tertiary);\n}\n"],"sourceRoot":""}
|
package/dist/survey/survey.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import './survey.css';
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9ControlBaseProps } from '../base/control.js';
|
|
4
|
+
import { type G9Tone } from '../base/tone.js';
|
|
4
5
|
import { type G9IconInput } from '../icon/icon.js';
|
|
5
6
|
/** One choice. */
|
|
6
7
|
export interface G9ChoiceOption<K extends string = string> {
|
|
7
8
|
readonly key: K;
|
|
8
9
|
readonly label: string;
|
|
9
10
|
readonly description?: string;
|
|
11
|
+
/** The description's tone (a green «۲۰٪ ارزانتر», a busy slot's «+۱۵٬۰۰۰ تومان» in warning). Default secondary text. */
|
|
12
|
+
readonly descriptionTone?: G9Tone;
|
|
13
|
+
/** A second line under the description (a price · in stock). */
|
|
14
|
+
readonly detail?: string;
|
|
15
|
+
/** A small badge above the label (a substitute's «پیشنهاد اول»), in the primary colour. */
|
|
16
|
+
readonly badge?: string;
|
|
17
|
+
/** What a screen reader says for the option. Default its label, badge, description and detail together. */
|
|
18
|
+
readonly accessibilityLabel?: string;
|
|
10
19
|
readonly icon?: G9IconInput;
|
|
11
20
|
/** An illustration above the label (Riskara scenario cards). */
|
|
12
21
|
readonly art?: ReactNode;
|
|
@@ -24,6 +33,12 @@ export interface G9ChoiceListProps<K extends string = string> extends G9ControlB
|
|
|
24
33
|
readonly max?: number;
|
|
25
34
|
/** Cards per row. Default 1. */
|
|
26
35
|
readonly columns?: number;
|
|
36
|
+
/**
|
|
37
|
+
* `'cards'` (default): rows of cards. `'row'`: one horizontally scrolling row of pills, label over description (a day
|
|
38
|
+
* picker: «فردا» over «۲۱ آبان»), the chosen one filled in the brand colour (ShopManager, 2.5.6). `columns` and `art`
|
|
39
|
+
* are not used in a row.
|
|
40
|
+
*/
|
|
41
|
+
readonly layout?: 'cards' | 'row';
|
|
27
42
|
/** Single choice only: called right after a pick (a questionnaire moving to the next question). */
|
|
28
43
|
readonly onPicked?: (key: K) => void;
|
|
29
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"survey.d.ts","sourceRoot":"","sources":["../../src/survey/survey.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"survey.d.ts","sourceRoot":"","sources":["../../src/survey/survey.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,KAAK,kBAAkB,EAAkD,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAKxD,kBAAkB;AAClB,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACvD,QAAQ,CAAC,GAAG,EAA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,MAAM,CAAC;IACxB,iBAAiB;IACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC;IACjE,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C;AAED,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAClC,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAKnB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,SAAS,CAqExG"}
|
package/dist/survey/survey.jsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "./survey.css";
|
|
2
2
|
import { formatNumber, g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
3
3
|
import { memo } from "@lynx-js/react";
|
|
4
|
+
import { G9HorizontalStripContext } from "../anchor/context.jsx";
|
|
4
5
|
import { g9ChildId, g9IdProps, g9RowStyle, useG9Control } from "../base/control.jsx";
|
|
6
|
+
import { toneColors } from "../base/tone.jsx";
|
|
5
7
|
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
6
8
|
import { G9Icon } from "../icon/icon.jsx";
|
|
7
9
|
import { useG9Culture } from "../provider/hooks.jsx";
|
|
@@ -43,6 +45,13 @@ function G9ChoiceList(props) {
|
|
|
43
45
|
selectItem: (k)=>pick(k)
|
|
44
46
|
}
|
|
45
47
|
});
|
|
48
|
+
if ('row' === props.layout) return <scroll-view className={`${control.className} g9-choices--row`} {...control.idProps} style={control.rootStyle()} scroll-orientation="horizontal">
|
|
49
|
+
<view className="g9-choices__strip" style={g9RowStyle(control.direction)}>
|
|
50
|
+
<G9HorizontalStripContext.Provider value={true}>
|
|
51
|
+
{props.options.map((o)=><ChoicePill key={o.key} option={o} on={value.includes(o.key)} id={g9ChildId(props.id, o.key)} onTap={()=>pick(o.key)}/>)}
|
|
52
|
+
</G9HorizontalStripContext.Provider>
|
|
53
|
+
</view>
|
|
54
|
+
</scroll-view>;
|
|
46
55
|
const cols = Math.max(1, null != (_props_columns = props.columns) ? _props_columns : 1);
|
|
47
56
|
const rows = [];
|
|
48
57
|
for(let i = 0; i < props.options.length; i += cols)rows.push(props.options.slice(i, i + cols));
|
|
@@ -55,11 +64,20 @@ function G9ChoiceList(props) {
|
|
|
55
64
|
</view>)}
|
|
56
65
|
</view>;
|
|
57
66
|
}
|
|
67
|
+
function optionSpeech(o) {
|
|
68
|
+
if (o.accessibilityLabel) return o.accessibilityLabel;
|
|
69
|
+
return [
|
|
70
|
+
o.badge,
|
|
71
|
+
o.label,
|
|
72
|
+
o.description,
|
|
73
|
+
o.detail
|
|
74
|
+
].filter((x)=>!!x).join(', ');
|
|
75
|
+
}
|
|
58
76
|
const ChoiceCard = memo(function(p) {
|
|
59
77
|
const align = {
|
|
60
78
|
textAlign: 'rtl' === p.dir ? 'right' : 'left'
|
|
61
79
|
};
|
|
62
|
-
return <view className={`g9-choice${p.on ? ' g9-choice--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={p.option
|
|
80
|
+
return <view className={`g9-choice${p.on ? ' g9-choice--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={optionSpeech(p.option)} accessibility-status={p.on ? 'selected' : ''}>
|
|
63
81
|
{p.option.art}
|
|
64
82
|
<view className="g9-choice__line" style={g9RowStyle(p.dir)}>
|
|
65
83
|
{p.option.icon ? <G9Icon icon={p.option.icon} size={22} color={p.on ? 'var(--g9-primary)' : 'var(--g9-text-secondary)'}/> : null}
|
|
@@ -67,12 +85,23 @@ const ChoiceCard = memo(function(p) {
|
|
|
67
85
|
direction: 'ltr',
|
|
68
86
|
alignItems: 'rtl' === p.dir ? 'flex-end' : 'flex-start'
|
|
69
87
|
}}>
|
|
88
|
+
{p.option.badge ? <text className="g9-choice__badge" style={align}>
|
|
89
|
+
{p.option.badge}
|
|
90
|
+
</text> : null}
|
|
70
91
|
<text className="g9-choice__label" style={align}>
|
|
71
92
|
{p.option.label}
|
|
72
93
|
</text>
|
|
73
|
-
{p.option.description ? <text className="g9-choice__description" style={
|
|
94
|
+
{p.option.description ? <text className="g9-choice__description" style={{
|
|
95
|
+
...align,
|
|
96
|
+
...p.option.descriptionTone ? {
|
|
97
|
+
color: toneColors(p.option.descriptionTone, 'plain').foreground
|
|
98
|
+
} : {}
|
|
99
|
+
}}>
|
|
74
100
|
{p.option.description}
|
|
75
101
|
</text> : null}
|
|
102
|
+
{p.option.detail ? <text className="g9-choice__detail" style={align}>
|
|
103
|
+
{p.option.detail}
|
|
104
|
+
</text> : null}
|
|
76
105
|
</view>
|
|
77
106
|
<view className={`g9-choice__mark${p.multiple ? ' g9-choice__mark--square' : ''}${p.on ? ' g9-choice__mark--on' : ''}`}>
|
|
78
107
|
{p.on ? <G9Icon icon="check" size={14} color="var(--g9-on-primary)"/> : null}
|
|
@@ -80,6 +109,20 @@ const ChoiceCard = memo(function(p) {
|
|
|
80
109
|
</view>
|
|
81
110
|
</view>;
|
|
82
111
|
});
|
|
112
|
+
const ChoicePill = memo(function(p) {
|
|
113
|
+
const tone = p.option.descriptionTone && !p.on ? toneColors(p.option.descriptionTone, 'plain').foreground : null;
|
|
114
|
+
return <view className={`g9-choice-pill${p.on ? ' g9-choice-pill--on' : ''}${p.option.disabled ? ' g9-choice--disabled' : ''}`} {...g9IdProps(p.id)} bindtap={p.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={optionSpeech(p.option)} accessibility-status={p.on ? 'selected' : ''}>
|
|
115
|
+
{p.option.icon ? <G9Icon icon={p.option.icon} size={18} color={p.on ? 'var(--g9-on-primary)' : 'var(--g9-text-secondary)'}/> : null}
|
|
116
|
+
<text className={`g9-choice-pill__label${p.on ? ' g9-choice-pill__label--on' : ''}`}>{p.option.label}</text>
|
|
117
|
+
{p.option.description ? <text className={`g9-choice-pill__description${p.on ? " g9-choice-pill__description--on" : ''}`} {...tone ? {
|
|
118
|
+
style: {
|
|
119
|
+
color: tone
|
|
120
|
+
}
|
|
121
|
+
} : {}}>
|
|
122
|
+
{p.option.description}
|
|
123
|
+
</text> : null}
|
|
124
|
+
</view>;
|
|
125
|
+
});
|
|
83
126
|
function G9ScaleInput(props) {
|
|
84
127
|
var _props_min, _props_max, _props_defaultValue;
|
|
85
128
|
const culture = useG9Culture();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
2
|
+
import type { G9TabBarProps } from './tab-bar.js';
|
|
3
|
+
/** The flat bar's geometry (a host reserves `barHeight` under its content; the band above it is transparent). */
|
|
4
|
+
export declare const g9FlatTabBarMetrics: Readonly<{
|
|
5
|
+
band: 20;
|
|
6
|
+
barHeight: 76;
|
|
7
|
+
bottomPadding: 6;
|
|
8
|
+
sidePadding: 4;
|
|
9
|
+
pillWidth: 60;
|
|
10
|
+
pillHeight: 34;
|
|
11
|
+
iconSize: 22;
|
|
12
|
+
discSize: 64;
|
|
13
|
+
discRing: 4;
|
|
14
|
+
discIconSize: 28;
|
|
15
|
+
}>;
|
|
16
|
+
/** The flat style of {@link G9TabBar} (selected by `barStyle: 'flat'`). */
|
|
17
|
+
export declare function G9FlatTabBar(props: G9TabBarProps): ReactNode;
|
|
18
|
+
//# sourceMappingURL=flat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../src/tab-bar/flat.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAShD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,iHAAiH;AACjH,eAAO,MAAM,mBAAmB;;;;;;;;;;;EAW9B,CAAC;AAIH,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAyD5D"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { g9Haptic } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useG9Anchor } from "../anchor/hooks.jsx";
|
|
3
|
+
import { g9RowStyle } from "../base/control.jsx";
|
|
4
|
+
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
5
|
+
import { G9Badge } from "../display/status.jsx";
|
|
6
|
+
import { G9Icon } from "../icon/icon.jsx";
|
|
7
|
+
import { useG9Diagnostics, useG9Direction, useG9SafeInsets } from "../provider/hooks.jsx";
|
|
8
|
+
import { resolveTabBarFabIndex } from "./model.jsx";
|
|
9
|
+
const g9FlatTabBarMetrics = Object.freeze({
|
|
10
|
+
band: 20,
|
|
11
|
+
barHeight: 76,
|
|
12
|
+
bottomPadding: 6,
|
|
13
|
+
sidePadding: 4,
|
|
14
|
+
pillWidth: 60,
|
|
15
|
+
pillHeight: 34,
|
|
16
|
+
iconSize: 22,
|
|
17
|
+
discSize: 64,
|
|
18
|
+
discRing: 4,
|
|
19
|
+
discIconSize: 28
|
|
20
|
+
});
|
|
21
|
+
const F = g9FlatTabBarMetrics;
|
|
22
|
+
function G9FlatTabBar(props) {
|
|
23
|
+
var _props_defaultSelectedIndex;
|
|
24
|
+
const items = props.items;
|
|
25
|
+
const insets = useG9SafeInsets();
|
|
26
|
+
const dir = useG9Direction();
|
|
27
|
+
const diagnostics = useG9Diagnostics();
|
|
28
|
+
const [selected, setSelected] = useControllableState({
|
|
29
|
+
value: props.selectedIndex,
|
|
30
|
+
defaultValue: null != (_props_defaultSelectedIndex = props.defaultSelectedIndex) ? _props_defaultSelectedIndex : 0,
|
|
31
|
+
onChange: props.onSelectedIndexChange,
|
|
32
|
+
name: 'G9TabBar.selectedIndex'
|
|
33
|
+
});
|
|
34
|
+
const fab = void 0 !== props.fabIndex ? resolveTabBarFabIndex(props.fabIndex, items.length) : -1;
|
|
35
|
+
const bottom = props.safeBottom ? insets.bottom : 0;
|
|
36
|
+
const tap = (index)=>{
|
|
37
|
+
const item = items[index];
|
|
38
|
+
if (index !== selected) {
|
|
39
|
+
g9Haptic('select');
|
|
40
|
+
setSelected(index);
|
|
41
|
+
}
|
|
42
|
+
const context = {
|
|
43
|
+
index,
|
|
44
|
+
item,
|
|
45
|
+
isSubMenuItem: false
|
|
46
|
+
};
|
|
47
|
+
try {
|
|
48
|
+
var _item_onClick, _props_onItemSelected;
|
|
49
|
+
null == (_item_onClick = item.onClick) || _item_onClick.call(item, context);
|
|
50
|
+
if (item.command && false !== item.canExecute) item.command(item.commandParameter);
|
|
51
|
+
null == (_props_onItemSelected = props.onItemSelected) || _props_onItemSelected.call(props, context);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
diagnostics.log({
|
|
54
|
+
level: 'error',
|
|
55
|
+
message: 'G9TabBar: item handler failed.',
|
|
56
|
+
source: 'G9TabBar',
|
|
57
|
+
error
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return <view className={`g9-tab-flat${props.className ? ` ${props.className}` : ''}`} style={{
|
|
62
|
+
height: `${F.band + F.barHeight + bottom}px`
|
|
63
|
+
}}>
|
|
64
|
+
<view className="g9-tab-flat__bar" style={{
|
|
65
|
+
...g9RowStyle(dir),
|
|
66
|
+
height: `${F.barHeight + bottom}px`,
|
|
67
|
+
paddingBottom: `${F.bottomPadding + bottom}px`,
|
|
68
|
+
paddingLeft: `${F.sidePadding}px`,
|
|
69
|
+
paddingRight: `${F.sidePadding}px`
|
|
70
|
+
}}>
|
|
71
|
+
{items.map((item, index)=>{
|
|
72
|
+
var _item_automationId;
|
|
73
|
+
return <FlatTab key={null != (_item_automationId = item.automationId) ? _item_automationId : `${index}`} item={item} on={index === selected} raised={index === fab} dir={dir} onTap={()=>tap(index)}/>;
|
|
74
|
+
})}
|
|
75
|
+
</view>
|
|
76
|
+
</view>;
|
|
77
|
+
}
|
|
78
|
+
function FlatTab(props) {
|
|
79
|
+
var _item_text;
|
|
80
|
+
const { item, on, raised, dir } = props;
|
|
81
|
+
const icon = on && item.selectedIcon || item.icon || 'check';
|
|
82
|
+
const anchor = useG9Anchor(item.automationId, {
|
|
83
|
+
kind: 'tab',
|
|
84
|
+
label: ()=>{
|
|
85
|
+
var _item_text;
|
|
86
|
+
return null != (_item_text = item.text) ? _item_text : null;
|
|
87
|
+
},
|
|
88
|
+
capabilities: {
|
|
89
|
+
activate: ()=>props.onTap()
|
|
90
|
+
}
|
|
91
|
+
}, item.automationId ? {
|
|
92
|
+
domId: item.automationId
|
|
93
|
+
} : {});
|
|
94
|
+
return <view className="g9-tab-flat__item" {...anchor.props} bindtap={props.onTap} accessibility-element={true} accessibility-traits="button" accessibility-label={null != (_item_text = item.text) ? _item_text : ''} accessibility-status={on ? 'selected' : ''}>
|
|
95
|
+
{raised ? <view className={`g9-tab-flat__disc${on ? ' g9-tab-flat__disc--on' : ''}`} style={{
|
|
96
|
+
width: `${F.discSize}px`,
|
|
97
|
+
height: `${F.discSize}px`,
|
|
98
|
+
borderRadius: `${F.discSize / 2}px`,
|
|
99
|
+
borderWidth: `${F.discRing}px`,
|
|
100
|
+
marginTop: `-${F.band + 8}px`
|
|
101
|
+
}}>
|
|
102
|
+
<G9Icon icon={icon} size={F.discIconSize} color="var(--g9-on-primary)"/>
|
|
103
|
+
</view> : <view className={`g9-tab-flat__pill${on ? ' g9-tab-flat__pill--on' : ''}`} style={{
|
|
104
|
+
width: `${F.pillWidth}px`,
|
|
105
|
+
height: `${F.pillHeight}px`,
|
|
106
|
+
borderRadius: `${F.pillHeight / 2}px`
|
|
107
|
+
}}>
|
|
108
|
+
<G9Icon icon={icon} size={F.iconSize} color={on ? 'var(--g9-primary)' : 'var(--g9-text-secondary)'}/>
|
|
109
|
+
{item.badge ? <view className={`g9-tab-flat__badge g9-tab-flat__badge--${dir}`}>
|
|
110
|
+
<G9Badge {...true === item.badge ? {
|
|
111
|
+
dot: true
|
|
112
|
+
} : {
|
|
113
|
+
value: item.badge
|
|
114
|
+
}}/>
|
|
115
|
+
</view> : null}
|
|
116
|
+
</view>}
|
|
117
|
+
{item.text ? <text className={`g9-tab-flat__label${on ? ' g9-tab-flat__label--on' : ''}`} text-maxline="1" style={raised ? {
|
|
118
|
+
marginTop: '6px'
|
|
119
|
+
} : {}}>
|
|
120
|
+
{item.text}
|
|
121
|
+
</text> : null}
|
|
122
|
+
</view>;
|
|
123
|
+
}
|
|
124
|
+
export { G9FlatTabBar, g9FlatTabBarMetrics };
|
package/dist/tab-bar/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { G9FlatTabBar, g9FlatTabBarMetrics } from './flat.js';
|
|
1
2
|
export { easeOutBackCss, type G9TabBarShadowRecipe, type G9TabBarStyle, type G9TabBarStyleMetrics, g9TabBarMetrics, g9TabBarStyleMetrics, } from './metrics.js';
|
|
2
3
|
export { centerOutwardRank, clampTabBarNotchCenter, estimateTextEm, fitLabelFontSize, type G9TabBarClickContext, type G9TabBarConfig, type G9TabBarEffect, type G9TabBarFabTappedEventArgs, type G9TabBarItem, type G9TabBarSelectionChangedEventArgs, type G9TabBarSlot, type G9TabBarState, type G9TabBarTransition, g9TabBarItem, initialTabBarState, overflowColumnLayout, reconcileTabBarState, resolveTabBarFabIndex, subMenuRowLayout, TAB_LABEL_MIN_FONT_SIZE, tabBarBackdropTap, tabBarChromePath, tabBarChromeSvg, tabBarFabCenterX, tabBarFabPlusSvg, tabBarFabShadowSvg, tabBarFabTap, tabBarHasOverflow, tabBarIndicatorSlot, tabBarItemTap, tabBarOverflowIndices, tabBarOverflowItemTap, tabBarOverflowSlot, tabBarOverflowTriggerTap, tabBarReservedHeight, tabBarSlotCenterX, tabBarSlots, tabBarSubMenuTap, } from './model.js';
|
|
3
4
|
export { G9TabBar, type G9TabBarProps } from './tab-bar.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,iCAAiC,EACtC,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,eAAe,EACf,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,iCAAiC,EACtC,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/tab-bar/index.jsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { G9FlatTabBar, g9FlatTabBarMetrics } from "./flat.jsx";
|
|
1
2
|
export { easeOutBackCss, g9TabBarMetrics, g9TabBarStyleMetrics } from "./metrics.jsx";
|
|
2
3
|
export { TAB_LABEL_MIN_FONT_SIZE, centerOutwardRank, clampTabBarNotchCenter, estimateTextEm, fitLabelFontSize, g9TabBarItem, initialTabBarState, overflowColumnLayout, reconcileTabBarState, resolveTabBarFabIndex, subMenuRowLayout, tabBarBackdropTap, tabBarChromePath, tabBarChromeSvg, tabBarFabCenterX, tabBarFabPlusSvg, tabBarFabShadowSvg, tabBarFabTap, tabBarHasOverflow, tabBarIndicatorSlot, tabBarItemTap, tabBarOverflowIndices, tabBarOverflowItemTap, tabBarOverflowSlot, tabBarOverflowTriggerTap, tabBarReservedHeight, tabBarSlotCenterX, tabBarSlots, tabBarSubMenuTap } from "./model.jsx";
|
|
3
4
|
export { G9TabBar } from "./tab-bar.jsx";
|
|
@@ -119,8 +119,11 @@ export declare const g9TabBarMetrics: Readonly<{
|
|
|
119
119
|
* - `'sculpted'` («Bottom Navigation / Sculpted»): an opaque 68 px bar with 24 px corners and a soft shadow, a wide
|
|
120
120
|
* S-shouldered cradle, a flat 66 px primary disc sunk 9 px into the bar, and no pill: the selected item switches to
|
|
121
121
|
* its `selectedIcon` and the primary colour.
|
|
122
|
+
* - `'flat'` (2.5.6, ShopManager): full width and flush, a Surface fill under a 1 px line, a pill behind each selected
|
|
123
|
+
* item, and an optional raised centre disc that is a tab, not a menu (`G9TabBar` draws it with its own component;
|
|
124
|
+
* switching to or from it remounts the bar). Its geometry is `g9FlatTabBarMetrics`.
|
|
122
125
|
*/
|
|
123
|
-
export type G9TabBarStyle = 'classic' | 'sculpted';
|
|
126
|
+
export type G9TabBarStyle = 'classic' | 'sculpted' | 'flat';
|
|
124
127
|
/**
|
|
125
128
|
* The shadow painted under the bar and under the FAB disc (MAUI `G9TabBarShadowView`): the bar's own outline, notch
|
|
126
129
|
* included, filled black at `alpha`, blurred with a Gaussian of `blurSigma` (SVG `feGaussianBlur stdDeviation` is the
|
|
@@ -210,7 +213,10 @@ export declare const g9TabBarStyleMetrics: Readonly<{
|
|
|
210
213
|
sculpted: G9TabBarStyleMetrics;
|
|
211
214
|
/** Half the cradle's opening along the top edge in design px, before `cradleScale` (MAUI `CradleHalfWidth`). */
|
|
212
215
|
cradleHalfWidth: 57;
|
|
213
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* The metrics of `style` (MAUI `G9TabBarStyleMetrics.For`). `'flat'` answers Classic's with the flat bar's height
|
|
218
|
+
* (76) and its 64 dp disc rising 20 dp: what a host reserves; anything else unknown is Classic.
|
|
219
|
+
*/
|
|
214
220
|
for: (style: G9TabBarStyle | null | undefined) => G9TabBarStyleMetrics;
|
|
215
221
|
}>;
|
|
216
222
|
/** The Sculpted cradle in design px from the notch centre (x) and the top edge (y); multiplied by `cradleScale`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/tab-bar/metrics.ts"],"names":[],"mappings":"AAyBA,oGAAoG;AACpG,iBAAS,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAMlE;AAED,2FAA2F;AAC3F,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwH1B,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/tab-bar/metrics.ts"],"names":[],"mappings":"AAyBA,oGAAoG;AACpG,iBAAS,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAMlE;AAED,2FAA2F;AAC3F,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwH1B,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,MA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QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mDAAmD;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,gDAAgD;IAChD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,yEAAyE;IACzE,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,qFAAqF;IACrF,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC7C,sFAAsF;IACtF,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,2DAA2D;IAC3D,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5D;AAmCD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;IA4D/B,gHAAgH;;IAEhH;;;OAGG;iBACU,aAAa,GAAG,IAAI,GAAG,SAAS,KAAG,oBAAoB;EAMpE,CAAC;AAEH,oHAAoH;AACpH,eAAO,MAAM,kBAAkB;;;;;;;;;EAS7B,CAAC;AAEH,6GAA6G;AAC7G,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIhD"}
|
package/dist/tab-bar/metrics.jsx
CHANGED
|
@@ -200,7 +200,7 @@ const g9TabBarStyleMetrics = Object.freeze({
|
|
|
200
200
|
})
|
|
201
201
|
}),
|
|
202
202
|
cradleHalfWidth,
|
|
203
|
-
for: (style)=>'sculpted' === style ? g9TabBarStyleMetrics.sculpted : g9TabBarStyleMetrics.classic
|
|
203
|
+
for: (style)=>'sculpted' === style ? g9TabBarStyleMetrics.sculpted : 'flat' === style ? FLAT_METRICS : g9TabBarStyleMetrics.classic
|
|
204
204
|
});
|
|
205
205
|
const tabBarCradleDesign = Object.freeze({
|
|
206
206
|
halfWidth: cradleHalfWidth,
|
|
@@ -216,4 +216,15 @@ function easeOutBackCss(c) {
|
|
|
216
216
|
const y1 = 1 + 0.329 * c;
|
|
217
217
|
return `cubic-bezier(0.34, ${y1.toFixed(2)}, 0.64, 1)`;
|
|
218
218
|
}
|
|
219
|
+
const FLAT_METRICS = Object.freeze({
|
|
220
|
+
...g9TabBarStyleMetrics.classic,
|
|
221
|
+
style: 'flat',
|
|
222
|
+
barHeight: 76,
|
|
223
|
+
barTopRadius: 0,
|
|
224
|
+
barBottomRadius: 0,
|
|
225
|
+
fabSize: 64,
|
|
226
|
+
fabInnerSize: 56,
|
|
227
|
+
fabProtrusionAboveBar: 20,
|
|
228
|
+
floatingHeadroom: 20
|
|
229
|
+
});
|
|
219
230
|
export { easeOutBackCss, g9TabBarMetrics, g9TabBarStyleMetrics, tabBarCradleDesign };
|
package/dist/tab-bar/tab-bar.css
CHANGED
|
@@ -267,5 +267,82 @@
|
|
|
267
267
|
left: -10px;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
.g9-tab-flat {
|
|
271
|
+
flex-direction: column;
|
|
272
|
+
justify-content: flex-end;
|
|
273
|
+
width: 100%;
|
|
274
|
+
display: flex;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.g9-tab-flat__bar {
|
|
278
|
+
border-top-style: solid;
|
|
279
|
+
border-top-width: 1px;
|
|
280
|
+
border-top-color: var(--g9-outline-variant);
|
|
281
|
+
background-color: var(--g9-surface);
|
|
282
|
+
align-items: flex-start;
|
|
283
|
+
padding-top: 8px;
|
|
284
|
+
display: flex;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.g9-tab-flat__item {
|
|
288
|
+
flex-direction: column;
|
|
289
|
+
flex: 1 1 0;
|
|
290
|
+
align-items: center;
|
|
291
|
+
min-width: 0;
|
|
292
|
+
display: flex;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.g9-tab-flat__pill {
|
|
296
|
+
justify-content: center;
|
|
297
|
+
align-items: center;
|
|
298
|
+
display: flex;
|
|
299
|
+
position: relative;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.g9-tab-flat__pill--on {
|
|
303
|
+
background-color: var(--g9-primary-container);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.g9-tab-flat__badge {
|
|
307
|
+
position: absolute;
|
|
308
|
+
top: -2px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.g9-tab-flat__badge--ltr {
|
|
312
|
+
right: 4px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.g9-tab-flat__badge--rtl {
|
|
316
|
+
left: 4px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.g9-tab-flat__disc {
|
|
320
|
+
border-style: solid;
|
|
321
|
+
border-color: var(--g9-surface);
|
|
322
|
+
background-color: var(--g9-primary);
|
|
323
|
+
justify-content: center;
|
|
324
|
+
align-items: center;
|
|
325
|
+
display: flex;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.g9-tab-flat__disc--on {
|
|
329
|
+
border-color: var(--g9-primary-container);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.g9-tab-flat__label {
|
|
333
|
+
font-size: 11px;
|
|
334
|
+
line-height: 14px;
|
|
335
|
+
font-family: var(--g9-font-text-500);
|
|
336
|
+
color: var(--g9-text-secondary);
|
|
337
|
+
margin-top: 4px;
|
|
338
|
+
font-weight: 500;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.g9-tab-flat__label--on {
|
|
342
|
+
font-family: var(--g9-font-text-700);
|
|
343
|
+
color: var(--g9-on-primary-container);
|
|
344
|
+
font-weight: 700;
|
|
345
|
+
}
|
|
346
|
+
|
|
270
347
|
|
|
271
348
|
/*# sourceMappingURL=tab-bar.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/tab-bar/tab-bar.css"],"names":[],"mappings":"AAGA;EAFE,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,WAAW;AACb;;AAMA;EAHE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAUA;EAPE,cAAc;EACd,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;AACT;;AAWA;EARE,6CAA6C;EAC7C,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,SAAS;AACX;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,oBAAoB;EACtB;AACF;;AAUA;EAPE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,oBAAoB;EACtB;AACF;;AASA;EANE,cAAc;EACd,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AASA;EANE,sBAAsB;EACtB,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AASA;EANE,kBAAkB;EAClB,uBAAuB;EACvB,gCAAgC;AAClC;;AAUA;EAPE,UAAU;EACV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;AAyBA;EAtBE,WAAW;AACb","sourcesContent":["/* G9TabBar (MAUI G9TabBar): chrome with a notch, floating FAB, sub-menu row, overflow column. Classic: flat glass,\n no shadow. Sculpted (g9-tab-bar--sculpted): the shadow is painted inside the chrome and FAB SVGs, never box-shadow\n (plan/specs/02 §2). Sizes that differ per style are set inline from g9TabBarStyleMetrics. */\n.g9-tab-bar {\n position: relative;\n width: 100%;\n overflow: visible;\n}\n\n/* safeBottom: the band under the bar, as tall as the bottom safe inset (its padding inline) */\n.g9-tab-bar__safe {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tab-bar__backdrop {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__chrome {\n position: absolute;\n left: 14px;\n right: 14px;\n bottom: 14px;\n height: 62px;\n}\n\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 62px;\n}\n\n/* The slots are placed by `order` (mirrored in RTL by the component), so the row itself is always laid out left to\n right: a browser inherits `direction: rtl` and mirrored the row a second time — the items stood reversed while the\n indicator stood at the right slot (LC-17, Lynx for Web). The native engines do not inherit it; this states it. */\n.g9-tab-bar__slots {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n direction: ltr;\n}\n\n.g9-tab-bar__indicator-track {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n\n/* one slot wide, moved by transform (tab-bar.tsx) */\n.g9-tab-bar__indicator-cell {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__indicator {\n position: absolute;\n left: 50%;\n width: 48px;\n height: 32px;\n margin-left: -24px;\n border-radius: 13px;\n background-color: var(--g9-primary-container);\n}\n\n/* indicatorMotion=\"spring\": the pill stretches on the way; two names so each move restarts the keyframe */\n.g9-tab-bar__indicator--stretch0 {\n animation-name: g9-tab-pill-stretch-a;\n animation-timing-function: ease-out;\n}\n\n.g9-tab-bar__indicator--stretch1 {\n animation-name: g9-tab-pill-stretch-b;\n animation-timing-function: ease-out;\n}\n\n@keyframes g9-tab-pill-stretch-a {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n@keyframes g9-tab-pill-stretch-b {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n/* Each slot is an equal share of the bar (its width, inline), as the indicator moves by. */\n.g9-tab-bar__slot {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n}\n\n.g9-tab-bar__slot-body {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__label {\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* The labels' twins, each measuring its label's real width: one row out of sight, no room limit, never touched. */\n.g9-tab-bar__measure {\n position: absolute;\n left: 0;\n top: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n opacity: 0;\n}\n\n.g9-tab-bar__label--measure {\n white-space: nowrap;\n text-overflow: clip;\n}\n\n.g9-tab-bar__fab {\n position: absolute;\n width: 72px;\n height: 72px;\n border-radius: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__fab-inner {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__fab-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* The FAB disc's shadow: painted first, so the disc covers it; larger than the FAB box on every side. */\n.g9-tab-bar__fab-shadow {\n position: absolute;\n}\n\n/* Paint only: the chrome and shadow SVGs never take a touch (the Sculpted ones reach 14 px past their boxes, where a\n tap belongs to the backdrop or the page). Items, the FAB box and the backdrop handle every tap. */\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched,\n.g9-tab-bar__fab-shadow {\n pointer-events: none;\n}\n\n.g9-tab-bar__submenu {\n position: absolute;\n overflow: visible;\n}\n\n.g9-tab-bar__overflow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 56px;\n overflow: visible;\n}\n\n.g9-tab-bar__submenu-cell,\n.g9-tab-bar__overflow-item {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__cell-accent {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-bar__overflow-item .g9-tab-bar__cell-accent {\n width: 32px;\n height: 32px;\n background-color: transparent;\n}\n\n.g9-tab-bar__cell-label {\n margin-top: 1px;\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* Sculpted (MAUI 1.4.0): the chrome and FAB SVGs carry their shadows past their boxes; the FAB box is a transparent\n tap target around the flat primary disc; menu cells use the opaque bar surface, sub-menu accents are solid primary. */\n.g9-tab-bar--sculpted .g9-tab-bar__chrome,\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n overflow: visible;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n background-color: transparent;\n border-width: 0;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell,\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item {\n background-color: var(--g9-card-background);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell .g9-tab-bar__cell-accent {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__icon-box {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__badge {\n position: absolute;\n top: -5px;\n}\n\n/* the reading direction, explicit: Lynx does not inherit `direction`, so a logical property inside a page reads LTR */\n.g9-tab-bar__badge--ltr {\n right: -10px;\n}\n\n.g9-tab-bar__badge--rtl {\n left: -10px;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/tab-bar/tab-bar.css"],"names":[],"mappings":"AAGA;EAFE,WAAW;EACX,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAMA;EAHE,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ,UAAU;EACV,WAAW;AACb;;AAMA;EAHE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;AACT;;AAUA;EAPE,cAAc;EACd,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAWA;EARE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;AACT;;AAWA;EARE,6CAA6C;EAC7C,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,SAAS;AACX;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE,qCAAqC;EACrC,mCAAmC;AACrC;;AAYA;EATE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,oBAAoB;EACtB;AACF;;AAUA;EAPE;IACE,oBAAoB;EACtB;;EAEA;IACE,uBAAuB;EACzB;;EAEA;IACE,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BA;EAhBE,uBAAuB;EACvB,eAAe;AACjB;;AAmBA;EAhBE,2CAA2C;AAC7C;;AAoBA;EAjBE,mCAAmC;AACrC;;AAwBA;EArBE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAwBA;EArBE,kBAAkB;EAClB,SAAS;AACX;;AAyBA;EAtBE,YAAY;AACd;;AAyBA;EAtBE,WAAW;AACb;;AA0BA;EAvBE,sBAAsB;EACtB,yBAAyB;EACzB,WAAW;EACX,aAAa;AACf;;AA0BA;EAvBE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,mCAAmC;EACnC,uBAAuB;EACvB,gBAAgB;EAChB,aAAa;AACf;;AA0BA;EAvBE,sBAAsB;EACtB,WAAW;EACX,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AA4BA;EAzBE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AA4BA;EAzBE,6CAA6C;AAC/C;;AA4BA;EAzBE,kBAAkB;EAClB,SAAS;AACX;;AA4BA;EAzBE,UAAU;AACZ;;AA4BA;EAzBE,SAAS;AACX;;AA4BA;EAzBE,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AA4BA;EAzBE,yCAAyC;AAC3C;;AA4BA;EAzBE,eAAe;EACf,iBAAiB;EACjB,oCAAoC;EACpC,+BAA+B;EAC/B,eAAe;EACf,gBAAgB;AAClB;;AA4BA;EAzBE,oCAAoC;EACpC,qCAAqC;EACrC,gBAAgB;AAClB","sourcesContent":["/* G9TabBar (MAUI G9TabBar): chrome with a notch, floating FAB, sub-menu row, overflow column. Classic: flat glass,\n no shadow. Sculpted (g9-tab-bar--sculpted): the shadow is painted inside the chrome and FAB SVGs, never box-shadow\n (plan/specs/02 §2). Sizes that differ per style are set inline from g9TabBarStyleMetrics. */\n.g9-tab-bar {\n position: relative;\n width: 100%;\n overflow: visible;\n}\n\n/* safeBottom: the band under the bar, as tall as the bottom safe inset (its padding inline) */\n.g9-tab-bar__safe {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-tab-bar__backdrop {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__chrome {\n position: absolute;\n left: 14px;\n right: 14px;\n bottom: 14px;\n height: 62px;\n}\n\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 62px;\n}\n\n/* The slots are placed by `order` (mirrored in RTL by the component), so the row itself is always laid out left to\n right: a browser inherits `direction: rtl` and mirrored the row a second time — the items stood reversed while the\n indicator stood at the right slot (LC-17, Lynx for Web). The native engines do not inherit it; this states it. */\n.g9-tab-bar__slots {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n direction: ltr;\n}\n\n.g9-tab-bar__indicator-track {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n}\n\n/* one slot wide, moved by transform (tab-bar.tsx) */\n.g9-tab-bar__indicator-cell {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n.g9-tab-bar__indicator {\n position: absolute;\n left: 50%;\n width: 48px;\n height: 32px;\n margin-left: -24px;\n border-radius: 13px;\n background-color: var(--g9-primary-container);\n}\n\n/* indicatorMotion=\"spring\": the pill stretches on the way; two names so each move restarts the keyframe */\n.g9-tab-bar__indicator--stretch0 {\n animation-name: g9-tab-pill-stretch-a;\n animation-timing-function: ease-out;\n}\n\n.g9-tab-bar__indicator--stretch1 {\n animation-name: g9-tab-pill-stretch-b;\n animation-timing-function: ease-out;\n}\n\n@keyframes g9-tab-pill-stretch-a {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n@keyframes g9-tab-pill-stretch-b {\n 0% {\n transform: scaleX(1);\n }\n 35% {\n transform: scaleX(1.32);\n }\n 100% {\n transform: scaleX(1);\n }\n}\n\n/* Each slot is an equal share of the bar (its width, inline), as the indicator moves by. */\n.g9-tab-bar__slot {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n}\n\n.g9-tab-bar__slot-body {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__label {\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* The labels' twins, each measuring its label's real width: one row out of sight, no room limit, never touched. */\n.g9-tab-bar__measure {\n position: absolute;\n left: 0;\n top: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n opacity: 0;\n}\n\n.g9-tab-bar__label--measure {\n white-space: nowrap;\n text-overflow: clip;\n}\n\n.g9-tab-bar__fab {\n position: absolute;\n width: 72px;\n height: 72px;\n border-radius: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__fab-inner {\n width: 56px;\n height: 56px;\n border-radius: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__fab-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* The FAB disc's shadow: painted first, so the disc covers it; larger than the FAB box on every side. */\n.g9-tab-bar__fab-shadow {\n position: absolute;\n}\n\n/* Paint only: the chrome and shadow SVGs never take a touch (the Sculpted ones reach 14 px past their boxes, where a\n tap belongs to the backdrop or the page). Items, the FAB box and the backdrop handle every tap. */\n.g9-tab-bar__chrome-flat,\n.g9-tab-bar__chrome-notched,\n.g9-tab-bar__fab-shadow {\n pointer-events: none;\n}\n\n.g9-tab-bar__submenu {\n position: absolute;\n overflow: visible;\n}\n\n.g9-tab-bar__overflow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 56px;\n overflow: visible;\n}\n\n.g9-tab-bar__submenu-cell,\n.g9-tab-bar__overflow-item {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border-radius: 18px;\n background-color: var(--g9-surface-container-high);\n border: 1px solid var(--g9-outline-variant);\n}\n\n.g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__cell-accent {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-bar__overflow-item .g9-tab-bar__cell-accent {\n width: 32px;\n height: 32px;\n background-color: transparent;\n}\n\n.g9-tab-bar__cell-label {\n margin-top: 1px;\n text-align: center;\n text-overflow: ellipsis;\n font-family: var(--g9-font-text);\n}\n\n/* Sculpted (MAUI 1.4.0): the chrome and FAB SVGs carry their shadows past their boxes; the FAB box is a transparent\n tap target around the flat primary disc; menu cells use the opaque bar surface, sub-menu accents are solid primary. */\n.g9-tab-bar--sculpted .g9-tab-bar__chrome,\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n overflow: visible;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__fab {\n background-color: transparent;\n border-width: 0;\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell,\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item {\n background-color: var(--g9-card-background);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__overflow-item--selected {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar--sculpted .g9-tab-bar__submenu-cell .g9-tab-bar__cell-accent {\n background-color: var(--g9-primary);\n}\n\n.g9-tab-bar__icon-box {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-bar__badge {\n position: absolute;\n top: -5px;\n}\n\n/* the reading direction, explicit: Lynx does not inherit `direction`, so a logical property inside a page reads LTR */\n.g9-tab-bar__badge--ltr {\n right: -10px;\n}\n\n.g9-tab-bar__badge--rtl {\n left: -10px;\n}\n\n/* The flat bar (2.5.6): a transparent band on top for the raised disc, then the full-width surface bar. */\n.g9-tab-flat {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n width: 100%;\n}\n\n.g9-tab-flat__bar {\n display: flex;\n align-items: flex-start;\n padding-top: 8px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n}\n\n.g9-tab-flat__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n min-width: 0px;\n}\n\n.g9-tab-flat__pill {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n}\n\n.g9-tab-flat__pill--on {\n background-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__badge {\n position: absolute;\n top: -2px;\n}\n\n.g9-tab-flat__badge--ltr {\n right: 4px;\n}\n\n.g9-tab-flat__badge--rtl {\n left: 4px;\n}\n\n.g9-tab-flat__disc {\n display: flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-color: var(--g9-surface);\n background-color: var(--g9-primary);\n}\n\n.g9-tab-flat__disc--on {\n border-color: var(--g9-primary-container);\n}\n\n.g9-tab-flat__label {\n margin-top: 4px;\n font-size: 11px;\n line-height: 14px;\n font-family: var(--g9-font-text-500);\n font-weight: 500;\n color: var(--g9-text-secondary);\n}\n\n.g9-tab-flat__label--on {\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar.d.ts","sourceRoot":"","sources":["../../src/tab-bar/tab-bar.tsx"],"names":[],"mappings":"AACA,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"tab-bar.d.ts","sourceRoot":"","sources":["../../src/tab-bar/tab-bar.tsx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