@4sh/ui-kit 0.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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* Generated by Style Dictionary — do not edit (run `npm run tokens:build`, config in tokens.config.json). */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--shadow-default-sm: 0px 0px 2px 1px var(--effects-default);
|
|
5
|
+
--shadow-default-md: 0px 0px 6px 2px var(--effects-default);
|
|
6
|
+
--shadow-default-lg: 0px 0px 6px 4px var(--effects-default);
|
|
7
|
+
--shadow-highlight-sm: 0px 0px 2px 1px var(--effects-highlight);
|
|
8
|
+
--shadow-highlight-md: 0px 0px 6px 2px var(--effects-highlight);
|
|
9
|
+
--shadow-highlight-lg: 0px 0px 6px 4px var(--effects-highlight);
|
|
10
|
+
--shadow-success-sm: 0px 0px 2px 1px var(--effects-success);
|
|
11
|
+
--shadow-success-md: 0px 0px 6px 2px var(--effects-success);
|
|
12
|
+
--shadow-success-lg: 0px 0px 6px 4px var(--effects-success);
|
|
13
|
+
--shadow-warning-sm: 0px 0px 2px 1px var(--effects-warning);
|
|
14
|
+
--shadow-warning-md: 0px 0px 6px 2px var(--effects-warning);
|
|
15
|
+
--shadow-warning-lg: 0px 0px 6px 4px var(--effects-warning);
|
|
16
|
+
--shadow-error-sm: 0px 0px 2px 1px var(--effects-error);
|
|
17
|
+
--shadow-error-md: 0px 0px 6px 2px var(--effects-error);
|
|
18
|
+
--shadow-error-lg: 0px 0px 6px 4px var(--effects-error);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.shadow-default-sm { box-shadow: var(--shadow-default-sm); }
|
|
22
|
+
.shadow-default-md { box-shadow: var(--shadow-default-md); }
|
|
23
|
+
.shadow-default-lg { box-shadow: var(--shadow-default-lg); }
|
|
24
|
+
.shadow-highlight-sm { box-shadow: var(--shadow-highlight-sm); }
|
|
25
|
+
.shadow-highlight-md { box-shadow: var(--shadow-highlight-md); }
|
|
26
|
+
.shadow-highlight-lg { box-shadow: var(--shadow-highlight-lg); }
|
|
27
|
+
.shadow-success-sm { box-shadow: var(--shadow-success-sm); }
|
|
28
|
+
.shadow-success-md { box-shadow: var(--shadow-success-md); }
|
|
29
|
+
.shadow-success-lg { box-shadow: var(--shadow-success-lg); }
|
|
30
|
+
.shadow-warning-sm { box-shadow: var(--shadow-warning-sm); }
|
|
31
|
+
.shadow-warning-md { box-shadow: var(--shadow-warning-md); }
|
|
32
|
+
.shadow-warning-lg { box-shadow: var(--shadow-warning-lg); }
|
|
33
|
+
.shadow-error-sm { box-shadow: var(--shadow-error-sm); }
|
|
34
|
+
.shadow-error-md { box-shadow: var(--shadow-error-md); }
|
|
35
|
+
.shadow-error-lg { box-shadow: var(--shadow-error-lg); }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Generated by Style Dictionary — do not edit (run `npm run tokens:build`, config in tokens.config.json). */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--transition-fast: 80ms;
|
|
5
|
+
--transition-default: 180ms;
|
|
6
|
+
--transition-slow: 280ms;
|
|
7
|
+
--transition-easein: ease-in;
|
|
8
|
+
--transition-easeout: ease-out;
|
|
9
|
+
--transition-easeinout: ease-in-out;
|
|
10
|
+
--transition-linear: linear;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* Generated by Style Dictionary — do not edit (run `npm run tokens:build`, config in tokens.config.json). */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--fontfamily-title: DM Sans;
|
|
5
|
+
--fontfamily-base: Inter;
|
|
6
|
+
--fontfamily-monospace: Roboto Mono;
|
|
7
|
+
--fontfamily-icon: Font Awesome 6 Free;
|
|
8
|
+
--weight-light: Light;
|
|
9
|
+
--weight-regular: Regular;
|
|
10
|
+
--weight-bold: Bold;
|
|
11
|
+
--weight-italic: Italic;
|
|
12
|
+
--weight-solidicon: Solid;
|
|
13
|
+
--weight-outlineicon: Regular;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* Generated by Style Dictionary — do not edit (run `npm run tokens:build`, config in tokens.config.json). */
|
|
2
|
+
|
|
3
|
+
@use './tokens-metrics';
|
|
4
|
+
@use './tokens-primitives';
|
|
5
|
+
@use './tokens-responsive';
|
|
6
|
+
@use './tokens-semantics';
|
|
7
|
+
@use './tokens-transitions';
|
|
8
|
+
@use './tokens-typography';
|
|
9
|
+
@use './tokens-breakpoint';
|
|
10
|
+
@use './tokens-styles';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// -----------------------------------------------------------------------------
|
|
2
|
+
// @4sh/ui-kit — global stylesheet shipped with the package (compiled to
|
|
3
|
+
// `dist/ui-kit/styles.css` by `npm run ui-kit:styles`).
|
|
4
|
+
//
|
|
5
|
+
// The components are headless: they read CSS custom properties and never hard
|
|
6
|
+
// code a colour, size or spacing. Loading this file ONCE, globally, is what
|
|
7
|
+
// gives them their appearance — without it they render unstyled.
|
|
8
|
+
//
|
|
9
|
+
// // angular.json
|
|
10
|
+
// "styles": ["node_modules/@4sh/ui-kit/styles.css", "src/styles/main.scss"]
|
|
11
|
+
//
|
|
12
|
+
// Contains: the generated design tokens (all brands + light/dark + responsive),
|
|
13
|
+
// the base layer that binds them to the page, the typography utility classes
|
|
14
|
+
// and the motion presets the `UiMotion` directive toggles.
|
|
15
|
+
//
|
|
16
|
+
// NOT included: `@font-face` declarations. The tokens only *name* the families
|
|
17
|
+
// (`--fontfamily-base`), so each project ships and declares its own font files;
|
|
18
|
+
// override `--fontfamily-*` to point at yours.
|
|
19
|
+
// -----------------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
@use 'generated/tokens';
|
|
22
|
+
@use 'base/base';
|
|
23
|
+
@use 'base/typography';
|
|
24
|
+
@use 'base/motion';
|
|
25
|
+
@use 'utils/helpers'; // global utility classes (.text-center, .no-margin…)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// =====================================================================
|
|
2
|
+
// ui-config : shared structural constants for ui-* components.
|
|
3
|
+
//
|
|
4
|
+
// Two levers: edit a value here (kit-wide) or override the LOCAL var in a
|
|
5
|
+
// component's .scss (that component only). No colors — themable colors are
|
|
6
|
+
// runtime design tokens.
|
|
7
|
+
// =====================================================================
|
|
8
|
+
|
|
9
|
+
// --- Global UI --------------------------------------------------------
|
|
10
|
+
$focus-ring-width: var(--units-2xs);
|
|
11
|
+
|
|
12
|
+
$control-stroke-width: var(--stroke-default);
|
|
13
|
+
$control-transition-duration: var(--transition-default);
|
|
14
|
+
$control-transition-easing: var(--transition-easeinout);
|
|
15
|
+
|
|
16
|
+
// --- Global : motion --------------------------------------------------
|
|
17
|
+
// Shared timing for the motion system (enter/leave presets + transitions).
|
|
18
|
+
// Durations/easings map to the `--transition-*` tokens; distance/scale are
|
|
19
|
+
// structural (never colors). Override per instance via the `--ui-motion-*`
|
|
20
|
+
// custom properties (see utils.motion-transition / base/_motion.scss).
|
|
21
|
+
$motion-duration-fast: var(--transition-fast); // 80ms — micro-feedback
|
|
22
|
+
$motion-duration-base: var(--transition-default); // 180ms — default
|
|
23
|
+
$motion-duration-slow: var(--transition-slow); // 280ms — large surfaces
|
|
24
|
+
$motion-easing-standard: var(--transition-easeinout); // symmetric (toggles)
|
|
25
|
+
$motion-easing-enter: var(--transition-easeout); // decelerate (appear)
|
|
26
|
+
$motion-easing-leave: var(--transition-easein); // accelerate (dismiss)
|
|
27
|
+
$motion-distance: 0.5rem; // slide offset (8px)
|
|
28
|
+
$motion-scale: 0.96; // zoom start/end scale
|
|
29
|
+
|
|
30
|
+
// --- Global : overlay panels ------------------------------------------
|
|
31
|
+
$overlay-panel-radius: var(--radius-default);
|
|
32
|
+
$overlay-panel-padding: var(--units-sm);
|
|
33
|
+
$overlay-panel-shadow: var(--shadow-default-md);
|
|
34
|
+
$overlay-panel-stroke-width: $control-stroke-width;
|
|
35
|
+
$overlay-panel-offset: 8px;
|
|
36
|
+
|
|
37
|
+
// --- Category : forms -------------------------------------------------
|
|
38
|
+
$form-control-size: var(--size-components-2xs);
|
|
39
|
+
$form-control-gap: var(--units-sm);
|
|
40
|
+
$form-focus-ring-width: $focus-ring-width;
|
|
41
|
+
|
|
42
|
+
// Field
|
|
43
|
+
$form-field-height: var(--size-components-default);
|
|
44
|
+
$form-field-height-small: var(--size-components-sm);
|
|
45
|
+
$form-field-radius: var(--radius-sm);
|
|
46
|
+
$form-field-padding-x: var(--units-md);
|
|
47
|
+
$form-field-gap: var(--units-sm);
|
|
48
|
+
$form-field-stroke-width: $control-stroke-width;
|
|
49
|
+
$form-field-focus-ring-width: $form-focus-ring-width;
|
|
50
|
+
|
|
51
|
+
// Textarea (multiline field box)
|
|
52
|
+
$form-textarea-min-height: var(--size-components-sm);
|
|
53
|
+
$form-textarea-min-height-small: var(--size-components-sm);
|
|
54
|
+
$form-textarea-padding-y: var(--units-default);
|
|
55
|
+
$form-textarea-padding-y-small: var(--units-md);
|
|
56
|
+
|
|
57
|
+
// --- Category : actions -----------------------------------------------
|
|
58
|
+
$action-focus-ring-width: $focus-ring-width;
|
|
59
|
+
|
|
60
|
+
// --- Category : informative -------------------------------------------
|
|
61
|
+
// Avatar
|
|
62
|
+
$avatar-size-tiny: 34px;
|
|
63
|
+
$avatar-size-small: 42px;
|
|
64
|
+
$avatar-size-default: 56px;
|
|
65
|
+
$avatar-size-large: 64px;
|
|
66
|
+
$avatar-square-radius: var(--radius-md);
|
|
67
|
+
$avatar-group-overlap: var(--units-md);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "sass:list";
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
|
|
6
|
+
/** map-deep-get
|
|
7
|
+
* Fetch nested keys
|
|
8
|
+
* @param {Map} $map - Map
|
|
9
|
+
* @param {Arglist} $keys - Keys to fetch
|
|
10
|
+
* @return {*}
|
|
11
|
+
* By @HugoGiraudel : http://www.sitepoint.com/extra-map-functions-sass/
|
|
12
|
+
*/
|
|
13
|
+
@function map-deep-get($map, $keys...) {
|
|
14
|
+
@each $key in $keys {
|
|
15
|
+
$map: map.get($map, $key);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@return $map;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// FONT BASE - REM CALC
|
|
22
|
+
|
|
23
|
+
$rem-base: 16px;
|
|
24
|
+
|
|
25
|
+
@function strip-unit($num) {
|
|
26
|
+
@return math.div($num, $num * 0 + 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@function convert-to-rem($value, $base-value: $rem-base) {
|
|
30
|
+
$value: math.div(strip-unit($value), strip-unit($base-value)) * 1rem;
|
|
31
|
+
@if ($value == 0rem) {
|
|
32
|
+
$value: 0;
|
|
33
|
+
} // Turn 0rem into 0
|
|
34
|
+
@return $value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@function rem-calc($values, $base-value: $rem-base) {
|
|
38
|
+
$max: list.length($values);
|
|
39
|
+
@if $max == 1 {
|
|
40
|
+
@return convert-to-rem(list.nth($values, 1), $base-value);
|
|
41
|
+
}
|
|
42
|
+
$remValues: ();
|
|
43
|
+
@for $i from 1 through $max {
|
|
44
|
+
$remValues: list.append(
|
|
45
|
+
$remValues,
|
|
46
|
+
convert-to-rem(list.nth($values, $i), $base-value)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
@return $remValues;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@function getHSLvalue($color) {
|
|
53
|
+
@return #{color.hue($color)} #{color.saturation($color)}
|
|
54
|
+
#{color.lightness($color)};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@function getHueValue($color) {
|
|
58
|
+
@return #{color.hue($color)};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@function getSaturationValue($color) {
|
|
62
|
+
@return #{color.saturation($color)};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@function getLightnessValue($color) {
|
|
66
|
+
@return #{color.lightness($color)};
|
|
67
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers class (v.0.1)
|
|
3
|
+
*
|
|
4
|
+
* Table of Contents:
|
|
5
|
+
* 1. Alignment
|
|
6
|
+
* 2. Margin
|
|
7
|
+
* 3. Padding
|
|
8
|
+
* 4. Typography
|
|
9
|
+
* 5. Visibility
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 1. Alignment
|
|
14
|
+
*/
|
|
15
|
+
.text-right {
|
|
16
|
+
text-align: right !important;
|
|
17
|
+
}
|
|
18
|
+
.text-center {
|
|
19
|
+
text-align: center !important;
|
|
20
|
+
}
|
|
21
|
+
.text-left {
|
|
22
|
+
text-align: left !important;
|
|
23
|
+
}
|
|
24
|
+
.text-justify {
|
|
25
|
+
text-align: justify !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 2. Margin
|
|
30
|
+
*/
|
|
31
|
+
.no-margin {
|
|
32
|
+
margin: 0 !important;
|
|
33
|
+
}
|
|
34
|
+
.no-margin-top {
|
|
35
|
+
margin-top: 0 !important;
|
|
36
|
+
}
|
|
37
|
+
.no-margin-right {
|
|
38
|
+
margin-right: 0 !important;
|
|
39
|
+
}
|
|
40
|
+
.no-margin-left {
|
|
41
|
+
margin-left: 0 !important;
|
|
42
|
+
}
|
|
43
|
+
.no-margin-bottom {
|
|
44
|
+
margin-bottom: 0 !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 3. Padding
|
|
49
|
+
*/
|
|
50
|
+
.no-padding {
|
|
51
|
+
padding: 0 !important;
|
|
52
|
+
}
|
|
53
|
+
.no-padding-top {
|
|
54
|
+
padding-top: 0 !important;
|
|
55
|
+
}
|
|
56
|
+
.no-padding-right {
|
|
57
|
+
padding-right: 0 !important;
|
|
58
|
+
}
|
|
59
|
+
.no-padding-left {
|
|
60
|
+
padding-left: 0 !important;
|
|
61
|
+
}
|
|
62
|
+
.no-padding-bottom {
|
|
63
|
+
padding-bottom: 0 !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 4. Typography
|
|
68
|
+
*/
|
|
69
|
+
.font-italic {
|
|
70
|
+
font-style: italic !important;
|
|
71
|
+
}
|
|
72
|
+
.font-bold {
|
|
73
|
+
font-weight: bold !important;
|
|
74
|
+
}
|
|
75
|
+
.font-normal {
|
|
76
|
+
font-weight: normal !important;
|
|
77
|
+
}
|
|
78
|
+
.font-light {
|
|
79
|
+
font-weight: lighter !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.text-uppercase {
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
}
|
|
85
|
+
.text-lowercase {
|
|
86
|
+
text-transform: lowercase;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 5. Visibility
|
|
91
|
+
*/
|
|
92
|
+
.overflow {
|
|
93
|
+
overflow: auto;
|
|
94
|
+
}
|
|
95
|
+
.overflow-visible {
|
|
96
|
+
overflow: visible !important;
|
|
97
|
+
}
|
|
98
|
+
.overflow-hidden {
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
.overflow-y {
|
|
102
|
+
overflow-y: auto;
|
|
103
|
+
}
|
|
104
|
+
.overflow-x {
|
|
105
|
+
overflow-x: auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.visibility-hidden {
|
|
109
|
+
visibility: hidden;
|
|
110
|
+
}
|
|
111
|
+
.visibility-collapse {
|
|
112
|
+
visibility: collapse;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.hide-for-print {
|
|
116
|
+
@media print {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.hide-for-screen {
|
|
121
|
+
@media screen {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
._expanded {
|
|
127
|
+
display: block;
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// =====================================================================
|
|
2
|
+
// Shared SASS mixins (emit nothing by themselves).
|
|
3
|
+
// =====================================================================
|
|
4
|
+
|
|
5
|
+
@use 'sass:list';
|
|
6
|
+
@use '../settings/ui-config';
|
|
7
|
+
|
|
8
|
+
/// Transition recipe (duration/easing from ui-config) for the given properties.
|
|
9
|
+
/// e.g. @include utils.control-transition(background-color, border-color);
|
|
10
|
+
@mixin control-transition($properties...) {
|
|
11
|
+
$transitions: ();
|
|
12
|
+
@each $property in $properties {
|
|
13
|
+
$transitions: list.append(
|
|
14
|
+
$transitions,
|
|
15
|
+
$property ui-config.$control-transition-duration ui-config.$control-transition-easing,
|
|
16
|
+
comma
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
transition: $transitions;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// Route a form palette (high | low | success | error) onto the private props
|
|
23
|
+
/// consumed by selection controls: --_surface, --_stroke, --_content, --_focus-ring
|
|
24
|
+
/// (+ --ui-label-color). State selectors live here; re-include to swap palette.
|
|
25
|
+
@mixin form-control-palette($palette, $control: '.ui-form-control-input') {
|
|
26
|
+
--_surface: var(--form-#{$palette}-surface-default);
|
|
27
|
+
--_stroke: var(--form-#{$palette}-stroke-default);
|
|
28
|
+
--_content: var(--form-#{$palette}-content-checked);
|
|
29
|
+
|
|
30
|
+
&:hover:not(._disabled):not(._readonly) {
|
|
31
|
+
--_surface: var(--form-#{$palette}-surface-hover);
|
|
32
|
+
--_stroke: var(--form-#{$palette}-stroke-hover);
|
|
33
|
+
--ui-label-color: var(--form-#{$palette}-content-hover);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&._checked:not(._disabled),
|
|
37
|
+
&._indeterminate:not(._disabled) {
|
|
38
|
+
--_surface: var(--form-#{$palette}-surface-checked);
|
|
39
|
+
--_stroke: var(--form-#{$palette}-stroke-checked);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:has(#{$control}:focus-visible) {
|
|
43
|
+
--_stroke: var(--form-#{$palette}-stroke-focused);
|
|
44
|
+
--_focus-ring: rgb(from var(--form-#{$palette}-stroke-focused) r g b / 50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&._disabled {
|
|
48
|
+
--_surface: var(--form-#{$palette}-surface-disabled);
|
|
49
|
+
--_stroke: var(--form-#{$palette}-stroke-disabled);
|
|
50
|
+
--_content: var(--form-#{$palette}-content-disabled);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ---------------------------------------------------------------------
|
|
55
|
+
// Field parts — shared by ui-input / ui-input-number / ui-input-mask.
|
|
56
|
+
// The field shell (`ui-field`) owns the box; these style the projected
|
|
57
|
+
// input + affixes (which live in the concrete component's view).
|
|
58
|
+
//
|
|
59
|
+
// Inset contract: the box has NO padding — each direct child owns the field
|
|
60
|
+
// inset on the side where it touches the border. The interactive control
|
|
61
|
+
// therefore spans the box edge to edge, so its hit area, caret zone, autofill
|
|
62
|
+
// background and focus outline all match the visible field.
|
|
63
|
+
// ---------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
/// Field inset carried by a direct child of the box on the edges it touches.
|
|
66
|
+
/// `$mode: 'padding'` grows the control's own box (interactive surfaces:
|
|
67
|
+
/// native input, trigger, wrapping control) — `'margin'` keeps the box tight
|
|
68
|
+
/// and only offsets it (fixed-size affixes: icons, units, round buttons).
|
|
69
|
+
@mixin field-inset-edges($mode: 'padding', $inset: ui-config.$form-field-padding-x) {
|
|
70
|
+
@if $mode == 'padding' {
|
|
71
|
+
&:first-child { padding-inline-start: $inset; }
|
|
72
|
+
&:last-child { padding-inline-end: $inset; }
|
|
73
|
+
} @else {
|
|
74
|
+
&:first-child { margin-inline-start: $inset; }
|
|
75
|
+
&:last-child { margin-inline-end: $inset; }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/// Bare native <input>/<textarea> filling the field box (no border/bg).
|
|
80
|
+
/// `$inset` = horizontal field inset owned by the control (see
|
|
81
|
+
/// `field-inset-edges`); pass `false` when the control is nested in a wrapper
|
|
82
|
+
/// that already carries the inset, or lives in a box with its own padding.
|
|
83
|
+
@mixin field-native-input($inset: ui-config.$form-field-padding-x) {
|
|
84
|
+
flex: 1 1 auto;
|
|
85
|
+
align-self: stretch;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
margin: 0;
|
|
88
|
+
padding: 0;
|
|
89
|
+
border: none;
|
|
90
|
+
border-radius: inherit;
|
|
91
|
+
background: transparent;
|
|
92
|
+
outline: none;
|
|
93
|
+
font-family: var(--fontfamily-base);
|
|
94
|
+
font-size: var(--size-typography-text-default);
|
|
95
|
+
color: var(--form-high-content-default);
|
|
96
|
+
|
|
97
|
+
@if $inset { @include field-inset-edges('padding', $inset); }
|
|
98
|
+
|
|
99
|
+
&::placeholder {
|
|
100
|
+
color: var(--form-low-content-default);
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
&:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/// Low-emphasis affix (decorative icon, unit text) sitting inside the box.
|
|
107
|
+
/// Toggle `._disabled` on the element to dim it with the field.
|
|
108
|
+
@mixin field-affix {
|
|
109
|
+
flex-shrink: 0;
|
|
110
|
+
color: var(--form-low-content-default);
|
|
111
|
+
@include field-inset-edges('margin');
|
|
112
|
+
|
|
113
|
+
&._disabled { color: var(--form-high-content-disabled); }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// Square, full-height, flush-right action button (password reveal, clear…).
|
|
117
|
+
@mixin field-action {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
align-self: stretch;
|
|
122
|
+
aspect-ratio: 1;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
padding: 0;
|
|
125
|
+
border: none;
|
|
126
|
+
background: none;
|
|
127
|
+
border-radius: 0 calc(#{ui-config.$form-field-radius} - #{ui-config.$form-field-stroke-width})
|
|
128
|
+
calc(#{ui-config.$form-field-radius} - #{ui-config.$form-field-stroke-width}) 0;
|
|
129
|
+
color: var(--form-low-content-default);
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
@include control-transition(color, background-color);
|
|
132
|
+
|
|
133
|
+
// Flush by design: no inset, the box has no padding to cancel.
|
|
134
|
+
|
|
135
|
+
&:hover:not(:disabled) {
|
|
136
|
+
color: var(--form-high-content-hover);
|
|
137
|
+
background-color: var(--form-high-surface-hover);
|
|
138
|
+
}
|
|
139
|
+
// Focus is a surface, never a border: the box already draws the field ring on
|
|
140
|
+
// `:focus-within`, so an inset stroke here would nest a second outline inside
|
|
141
|
+
// the field. The fill + `content-focused` say which control holds the focus.
|
|
142
|
+
&:focus-visible {
|
|
143
|
+
outline: none;
|
|
144
|
+
color: var(--form-high-content-focused);
|
|
145
|
+
background-color: var(--form-high-surface-focused);
|
|
146
|
+
}
|
|
147
|
+
&:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/// Vertical up/down spinner (number stepper), flush right + full height, split
|
|
151
|
+
@mixin field-spinner($btn: 'button', $width: 2rem) {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: column;
|
|
154
|
+
align-self: stretch;
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
width: $width;
|
|
157
|
+
// Flush by design: no inset, the box has no padding to cancel.
|
|
158
|
+
border-left: ui-config.$form-field-stroke-width solid var(--form-high-stroke-default);
|
|
159
|
+
border-radius: 0 ui-config.$form-field-radius ui-config.$form-field-radius 0;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
|
|
162
|
+
#{$btn} {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex: 1 1 50%;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
min-height: 0;
|
|
168
|
+
padding: 0;
|
|
169
|
+
border: none;
|
|
170
|
+
background: none;
|
|
171
|
+
line-height: 0;
|
|
172
|
+
color: var(--form-low-content-default);
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
@include control-transition(color, background-color);
|
|
175
|
+
|
|
176
|
+
&:hover:not(:disabled) {
|
|
177
|
+
color: var(--form-high-content-hover);
|
|
178
|
+
background-color: var(--form-high-surface-hover);
|
|
179
|
+
}
|
|
180
|
+
&:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
#{$btn} + #{$btn} {
|
|
184
|
+
border-top: ui-config.$form-field-stroke-width solid var(--form-high-stroke-default);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =====================================================================
|
|
2
|
+
// Motion mixins — shared timing recipes for the motion system.
|
|
3
|
+
//
|
|
4
|
+
// Emit nothing by themselves. Durations/easings come from `ui-config`
|
|
5
|
+
// ($motion-*, mapped to `--transition-*` tokens) and are overridable per
|
|
6
|
+
// instance through the `--ui-motion-*` custom properties, so a single
|
|
7
|
+
// element can be re-timed (or disabled) without touching the tokens.
|
|
8
|
+
//
|
|
9
|
+
// Two complementary primitives:
|
|
10
|
+
// • `motion-transition()` — state-toggle transitions (open/close, show/hide).
|
|
11
|
+
// • `motion-reduce` — the reduced-motion guard (`@content` sink).
|
|
12
|
+
// Enter/leave keyframe presets live in `base/_motion.scss` (global classes).
|
|
13
|
+
// =====================================================================
|
|
14
|
+
|
|
15
|
+
@use 'sass:list';
|
|
16
|
+
@use '../settings/ui-config';
|
|
17
|
+
|
|
18
|
+
/// Transition recipe timed by the motion system.
|
|
19
|
+
/// Duration/easing/delay resolve from `--ui-motion-*` (per-instance override)
|
|
20
|
+
/// falling back to the motion tokens. Easing defaults to the symmetric curve.
|
|
21
|
+
/// e.g. @include utils.motion-transition(opacity, translate);
|
|
22
|
+
@mixin motion-transition($properties...) {
|
|
23
|
+
$transitions: ();
|
|
24
|
+
@each $property in $properties {
|
|
25
|
+
$transitions: list.append(
|
|
26
|
+
$transitions,
|
|
27
|
+
$property var(--ui-motion-duration, #{ui-config.$motion-duration-base})
|
|
28
|
+
var(--ui-motion-easing, #{ui-config.$motion-easing-standard})
|
|
29
|
+
var(--ui-motion-delay, 0ms),
|
|
30
|
+
comma
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
transition: $transitions;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// Reduced-motion guard. Wrap the neutralising declarations you want applied
|
|
37
|
+
/// when the user asked for less motion (or the global kill-switch is on).
|
|
38
|
+
/// e.g. @include utils.motion-reduce { transition-duration: 0.01ms; }
|
|
39
|
+
@mixin motion-reduce {
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:root[data-motion='off'] & {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// =====================================================================
|
|
2
|
+
// Overlay mixins — shared structural recipe for floating panels
|
|
3
|
+
// (dropdowns, menus, datepicker calendar, future select/multiselect…).
|
|
4
|
+
//
|
|
5
|
+
// The STRUCTURE (radius, padding, shadow, stroke width) is shared through
|
|
6
|
+
// the `$overlay-panel-*` constants in `ui-config`; the COLORS stay a
|
|
7
|
+
// per-component choice: each caller passes its own token family (a menu
|
|
8
|
+
// panel uses `navigation.*`, a form dropdown uses `form.*`), so restyling
|
|
9
|
+
// one family never leaks into the others. A last per-instance escape
|
|
10
|
+
// hatch is available through the `--ui-overlay-*` custom properties.
|
|
11
|
+
// =====================================================================
|
|
12
|
+
|
|
13
|
+
@use '../settings/ui-config';
|
|
14
|
+
|
|
15
|
+
/// Floating panel shell. Pass the surface/stroke tokens of the component's
|
|
16
|
+
/// family; structure resolves from `--ui-overlay-*` (per-instance override)
|
|
17
|
+
/// falling back to the shared `$overlay-panel-*` constants.
|
|
18
|
+
/// e.g. @include utils.overlay-panel(var(--navigation-high-surface-default), var(--navigation-high-stroke-default));
|
|
19
|
+
@mixin overlay-panel($surface, $stroke) {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
border: ui-config.$overlay-panel-stroke-width solid var(--ui-overlay-stroke, #{$stroke});
|
|
22
|
+
border-radius: var(--ui-overlay-radius, #{ui-config.$overlay-panel-radius});
|
|
23
|
+
background-color: var(--ui-overlay-surface, #{$surface});
|
|
24
|
+
box-shadow: var(--ui-overlay-shadow, #{ui-config.$overlay-panel-shadow});
|
|
25
|
+
font-family: var(--fontfamily-base);
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Build-time SCSS surface of the kit — API ONLY (functions, mixins, shared
|
|
2
|
+
// constants). Nothing here emits CSS: every component does `@use 'utils'`, and
|
|
3
|
+
// each component `.scss` is its own Sass compilation unit, so anything that
|
|
4
|
+
// emitted rules would be duplicated into all 54 components' scoped styles.
|
|
5
|
+
// Global utility classes (`_helpers.scss`) therefore live in `index.scss`.
|
|
6
|
+
//
|
|
7
|
+
// Build-time SCSS surface of the kit: every component's `.scss` starts with
|
|
8
|
+
// `@use 'utils'`, resolved through `styleIncludePaths` (see each entry point's
|
|
9
|
+
// ng-package.json). Ships as source in the package so a consumer can build
|
|
10
|
+
// their own component against the same helpers.
|
|
11
|
+
@forward "utils/functions";
|
|
12
|
+
@forward "utils/mixins";
|
|
13
|
+
@forward "utils/motion";
|
|
14
|
+
@forward "utils/overlay";
|
|
15
|
+
@forward "settings/ui-config";
|