@fluixi-css/core 0.1.0-next.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 +21 -0
- package/README.md +52 -0
- package/base.css +4 -0
- package/components.css +1 -0
- package/dist/base.css +4 -0
- package/dist/components.css +1 -0
- package/dist/index.css +2 -0
- package/dist/package.json +139 -0
- package/dist/reset.css +168 -0
- package/dist/src/ast.d.ts +298 -0
- package/dist/src/ast.js +2240 -0
- package/dist/src/ast.js.map +1 -0
- package/dist/src/commons/constants.d.ts +1193 -0
- package/dist/src/commons/constants.js +1323 -0
- package/dist/src/commons/constants.js.map +1 -0
- package/dist/src/commons/helper.d.ts +1298 -0
- package/dist/src/commons/helper.js +1310 -0
- package/dist/src/commons/helper.js.map +1 -0
- package/dist/src/commons/index.d.ts +3 -0
- package/dist/src/commons/index.js +4 -0
- package/dist/src/commons/index.js.map +1 -0
- package/dist/src/commons/properties.d.ts +1431 -0
- package/dist/src/commons/properties.js +2855 -0
- package/dist/src/commons/properties.js.map +1 -0
- package/dist/src/commons/types.d.ts +359 -0
- package/dist/src/commons/types.js +4 -0
- package/dist/src/commons/types.js.map +1 -0
- package/dist/src/components/avatar/index.d.ts +19 -0
- package/dist/src/components/avatar/index.js +22 -0
- package/dist/src/components/avatar/index.js.map +1 -0
- package/dist/src/components/button/index.d.ts +48 -0
- package/dist/src/components/button/index.js +51 -0
- package/dist/src/components/button/index.js.map +1 -0
- package/dist/src/components/card/index.d.ts +44 -0
- package/dist/src/components/card/index.js +47 -0
- package/dist/src/components/card/index.js.map +1 -0
- package/dist/src/components/checkbox/index.d.ts +69 -0
- package/dist/src/components/checkbox/index.js +80 -0
- package/dist/src/components/checkbox/index.js.map +1 -0
- package/dist/src/components/daterangepicker/index.d.ts +147 -0
- package/dist/src/components/daterangepicker/index.js +150 -0
- package/dist/src/components/daterangepicker/index.js.map +1 -0
- package/dist/src/components/dialog/index.d.ts +71 -0
- package/dist/src/components/dialog/index.js +74 -0
- package/dist/src/components/dialog/index.js.map +1 -0
- package/dist/src/components/drawer/index.d.ts +26 -0
- package/dist/src/components/drawer/index.js +29 -0
- package/dist/src/components/drawer/index.js.map +1 -0
- package/dist/src/components/dropdown/index.d.ts +101 -0
- package/dist/src/components/dropdown/index.js +104 -0
- package/dist/src/components/dropdown/index.js.map +1 -0
- package/dist/src/components/forms/index.d.ts +58 -0
- package/dist/src/components/forms/index.js +62 -0
- package/dist/src/components/forms/index.js.map +1 -0
- package/dist/src/components/index.d.ts +1228 -0
- package/dist/src/components/index.js +64 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/layout/index.d.ts +28 -0
- package/dist/src/components/layout/index.js +33 -0
- package/dist/src/components/layout/index.js.map +1 -0
- package/dist/src/components/list/index.d.ts +65 -0
- package/dist/src/components/list/index.js +68 -0
- package/dist/src/components/list/index.js.map +1 -0
- package/dist/src/components/popover/index.d.ts +79 -0
- package/dist/src/components/popover/index.js +82 -0
- package/dist/src/components/popover/index.js.map +1 -0
- package/dist/src/components/radio/index.d.ts +77 -0
- package/dist/src/components/radio/index.js +80 -0
- package/dist/src/components/radio/index.js.map +1 -0
- package/dist/src/components/select/index.d.ts +102 -0
- package/dist/src/components/select/index.js +105 -0
- package/dist/src/components/select/index.js.map +1 -0
- package/dist/src/components/sidenav/index.d.ts +98 -0
- package/dist/src/components/sidenav/index.js +101 -0
- package/dist/src/components/sidenav/index.js.map +1 -0
- package/dist/src/components/table/index.d.ts +95 -0
- package/dist/src/components/table/index.js +98 -0
- package/dist/src/components/table/index.js.map +1 -0
- package/dist/src/constants.d.ts +3 -0
- package/dist/src/constants.js +29 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/css-ast.d.ts +48 -0
- package/dist/src/css-ast.js +2 -0
- package/dist/src/css-ast.js.map +1 -0
- package/dist/src/css-generator.d.ts +29 -0
- package/dist/src/css-generator.js +104 -0
- package/dist/src/css-generator.js.map +1 -0
- package/dist/src/css-helpers.d.ts +76 -0
- package/dist/src/css-helpers.js +272 -0
- package/dist/src/css-helpers.js.map +1 -0
- package/dist/src/css-lexer.d.ts +48 -0
- package/dist/src/css-lexer.js +255 -0
- package/dist/src/css-lexer.js.map +1 -0
- package/dist/src/css-parser.cjs +2047 -0
- package/dist/src/css-parser.cjs.map +1 -0
- package/dist/src/css-parser.d.ts +100 -0
- package/dist/src/css-parser.js +1098 -0
- package/dist/src/css-parser.js.map +1 -0
- package/dist/src/css-parser.mjs +2028 -0
- package/dist/src/css-parser.mjs.map +1 -0
- package/dist/src/design-system.d.ts +210 -0
- package/dist/src/design-system.js +1034 -0
- package/dist/src/design-system.js.map +1 -0
- package/dist/src/engine/ast.d.ts +44 -0
- package/dist/src/engine/ast.js +92 -0
- package/dist/src/engine/ast.js.map +1 -0
- package/dist/src/engine/atom.d.ts +74 -0
- package/dist/src/engine/atom.js +227 -0
- package/dist/src/engine/atom.js.map +1 -0
- package/dist/src/engine/compile.d.ts +5 -0
- package/dist/src/engine/compile.js +79 -0
- package/dist/src/engine/compile.js.map +1 -0
- package/dist/src/engine/defaults.d.ts +2 -0
- package/dist/src/engine/defaults.js +14 -0
- package/dist/src/engine/defaults.js.map +1 -0
- package/dist/src/engine/directives.d.ts +2 -0
- package/dist/src/engine/directives.js +191 -0
- package/dist/src/engine/directives.js.map +1 -0
- package/dist/src/engine/index.d.ts +41 -0
- package/dist/src/engine/index.js +88 -0
- package/dist/src/engine/index.js.map +1 -0
- package/dist/src/engine/registry.d.ts +46 -0
- package/dist/src/engine/registry.js +49 -0
- package/dist/src/engine/registry.js.map +1 -0
- package/dist/src/engine/scanner.d.ts +1 -0
- package/dist/src/engine/scanner.js +45 -0
- package/dist/src/engine/scanner.js.map +1 -0
- package/dist/src/engine/source.d.ts +12 -0
- package/dist/src/engine/source.js +81 -0
- package/dist/src/engine/source.js.map +1 -0
- package/dist/src/engine/theme-defaults.d.ts +2 -0
- package/dist/src/engine/theme-defaults.js +54 -0
- package/dist/src/engine/theme-defaults.js.map +1 -0
- package/dist/src/engine/theme-source.d.ts +5 -0
- package/dist/src/engine/theme-source.js +71 -0
- package/dist/src/engine/theme-source.js.map +1 -0
- package/dist/src/engine/theme.d.ts +10 -0
- package/dist/src/engine/theme.js +42 -0
- package/dist/src/engine/theme.js.map +1 -0
- package/dist/src/engine/transform.d.ts +25 -0
- package/dist/src/engine/transform.js +91 -0
- package/dist/src/engine/transform.js.map +1 -0
- package/dist/src/engine/ui-preset.d.ts +4 -0
- package/dist/src/engine/ui-preset.js +56 -0
- package/dist/src/engine/ui-preset.js.map +1 -0
- package/dist/src/engine/utilities/backgrounds.d.ts +2 -0
- package/dist/src/engine/utilities/backgrounds.js +32 -0
- package/dist/src/engine/utilities/backgrounds.js.map +1 -0
- package/dist/src/engine/utilities/borders.d.ts +2 -0
- package/dist/src/engine/utilities/borders.js +95 -0
- package/dist/src/engine/utilities/borders.js.map +1 -0
- package/dist/src/engine/utilities/effects.d.ts +2 -0
- package/dist/src/engine/utilities/effects.js +61 -0
- package/dist/src/engine/utilities/effects.js.map +1 -0
- package/dist/src/engine/utilities/flexgrid.d.ts +2 -0
- package/dist/src/engine/utilities/flexgrid.js +125 -0
- package/dist/src/engine/utilities/flexgrid.js.map +1 -0
- package/dist/src/engine/utilities/index.d.ts +3 -0
- package/dist/src/engine/utilities/index.js +20 -0
- package/dist/src/engine/utilities/index.js.map +1 -0
- package/dist/src/engine/utilities/layout.d.ts +2 -0
- package/dist/src/engine/utilities/layout.js +84 -0
- package/dist/src/engine/utilities/layout.js.map +1 -0
- package/dist/src/engine/utilities/sizing.d.ts +2 -0
- package/dist/src/engine/utilities/sizing.js +21 -0
- package/dist/src/engine/utilities/sizing.js.map +1 -0
- package/dist/src/engine/utilities/spacing.d.ts +2 -0
- package/dist/src/engine/utilities/spacing.js +39 -0
- package/dist/src/engine/utilities/spacing.js.map +1 -0
- package/dist/src/engine/utilities/typography.d.ts +2 -0
- package/dist/src/engine/utilities/typography.js +120 -0
- package/dist/src/engine/utilities/typography.js.map +1 -0
- package/dist/src/engine/utilities/values.d.ts +16 -0
- package/dist/src/engine/utilities/values.js +91 -0
- package/dist/src/engine/utilities/values.js.map +1 -0
- package/dist/src/engine/variants.d.ts +2 -0
- package/dist/src/engine/variants.js +99 -0
- package/dist/src/engine/variants.js.map +1 -0
- package/dist/src/extractor.d.ts +146 -0
- package/dist/src/extractor.js +3862 -0
- package/dist/src/extractor.js.map +1 -0
- package/dist/src/index.cjs +4518 -0
- package/dist/src/index.cjs.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.mjs +4480 -0
- package/dist/src/index.mjs.map +1 -0
- package/dist/src/keyframes.cjs +367 -0
- package/dist/src/keyframes.cjs.map +1 -0
- package/dist/src/keyframes.d.ts +27 -0
- package/dist/src/keyframes.js +188 -0
- package/dist/src/keyframes.js.map +1 -0
- package/dist/src/keyframes.mjs +362 -0
- package/dist/src/keyframes.mjs.map +1 -0
- package/dist/src/logger.d.ts +2 -0
- package/dist/src/logger.js +31 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/plugin.cjs +43 -0
- package/dist/src/plugin.cjs.map +1 -0
- package/dist/src/plugin.d.ts +12 -0
- package/dist/src/plugin.js +39 -0
- package/dist/src/plugin.js.map +1 -0
- package/dist/src/plugin.mjs +41 -0
- package/dist/src/plugin.mjs.map +1 -0
- package/dist/src/presets-plugins.cjs +99 -0
- package/dist/src/presets-plugins.cjs.map +1 -0
- package/dist/src/presets-plugins.d.ts +1 -0
- package/dist/src/presets-plugins.js +56 -0
- package/dist/src/presets-plugins.js.map +1 -0
- package/dist/src/presets-plugins.mjs +97 -0
- package/dist/src/presets-plugins.mjs.map +1 -0
- package/dist/src/state.d.ts +76 -0
- package/dist/src/state.js +314 -0
- package/dist/src/state.js.map +1 -0
- package/dist/src/theme/constants.d.ts +22 -0
- package/dist/src/theme/constants.js +17 -0
- package/dist/src/theme/constants.js.map +1 -0
- package/dist/src/theme/index.d.ts +2 -0
- package/dist/src/theme/index.js +48 -0
- package/dist/src/theme/index.js.map +1 -0
- package/dist/src/theme/types.d.ts +13 -0
- package/dist/src/theme/types.js +2 -0
- package/dist/src/theme/types.js.map +1 -0
- package/dist/src/types/ast.d.ts +23 -0
- package/dist/src/types/ast.js +2 -0
- package/dist/src/types/ast.js.map +1 -0
- package/dist/src/types/base-types.d.ts +53 -0
- package/dist/src/types/base-types.js +2 -0
- package/dist/src/types/base-types.js.map +1 -0
- package/dist/src/types/components-types.d.ts +28 -0
- package/dist/src/types/components-types.js +2 -0
- package/dist/src/types/components-types.js.map +1 -0
- package/dist/src/types/config.d.ts +90 -0
- package/dist/src/types/config.js +3 -0
- package/dist/src/types/config.js.map +1 -0
- package/dist/src/types/css-parser.d.ts +361 -0
- package/dist/src/types/css-parser.js +2 -0
- package/dist/src/types/css-parser.js.map +1 -0
- package/dist/src/types/keyframes-type.d.ts +47 -0
- package/dist/src/types/keyframes-type.js +2 -0
- package/dist/src/types/keyframes-type.js.map +1 -0
- package/dist/src/types/plugin.d.ts +10 -0
- package/dist/src/types/plugin.js +2 -0
- package/dist/src/types/plugin.js.map +1 -0
- package/dist/src/types/screens-types.d.ts +47 -0
- package/dist/src/types/screens-types.js +2 -0
- package/dist/src/types/screens-types.js.map +1 -0
- package/dist/src/types/utilities-types.d.ts +147 -0
- package/dist/src/types/utilities-types.js +2 -0
- package/dist/src/types/utilities-types.js.map +1 -0
- package/dist/src/types.d.ts +77 -0
- package/dist/src/types.js +12 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/units/constants.d.ts +35 -0
- package/dist/src/units/constants.js +9 -0
- package/dist/src/units/constants.js.map +1 -0
- package/dist/src/units/index.d.ts +15 -0
- package/dist/src/units/index.js +7 -0
- package/dist/src/units/index.js.map +1 -0
- package/dist/src/units/types.d.ts +9 -0
- package/dist/src/units/types.js +2 -0
- package/dist/src/units/types.js.map +1 -0
- package/dist/src/utilities/backgrounds/constants.d.ts +2810 -0
- package/dist/src/utilities/backgrounds/constants.js +119 -0
- package/dist/src/utilities/backgrounds/constants.js.map +1 -0
- package/dist/src/utilities/backgrounds/index.d.ts +1 -0
- package/dist/src/utilities/backgrounds/index.js +2 -0
- package/dist/src/utilities/backgrounds/index.js.map +1 -0
- package/dist/src/utilities/borders/constants.d.ts +10586 -0
- package/dist/src/utilities/borders/constants.js +309 -0
- package/dist/src/utilities/borders/constants.js.map +1 -0
- package/dist/src/utilities/borders/index.d.ts +1 -0
- package/dist/src/utilities/borders/index.js +2 -0
- package/dist/src/utilities/borders/index.js.map +1 -0
- package/dist/src/utilities/breakpoints/constants.d.ts +330 -0
- package/dist/src/utilities/breakpoints/constants.js +269 -0
- package/dist/src/utilities/breakpoints/constants.js.map +1 -0
- package/dist/src/utilities/breakpoints/index.d.ts +2 -0
- package/dist/src/utilities/breakpoints/index.js +3 -0
- package/dist/src/utilities/breakpoints/index.js.map +1 -0
- package/dist/src/utilities/breakpoints/types.d.ts +8 -0
- package/dist/src/utilities/breakpoints/types.js +2 -0
- package/dist/src/utilities/breakpoints/types.js.map +1 -0
- package/dist/src/utilities/colors/base.d.ts +778 -0
- package/dist/src/utilities/colors/base.js +872 -0
- package/dist/src/utilities/colors/base.js.map +1 -0
- package/dist/src/utilities/colors/color.d.ts +1122 -0
- package/dist/src/utilities/colors/color.js +957 -0
- package/dist/src/utilities/colors/color.js.map +1 -0
- package/dist/src/utilities/colors/constants.d.ts +1 -0
- package/dist/src/utilities/colors/constants.js +2 -0
- package/dist/src/utilities/colors/constants.js.map +1 -0
- package/dist/src/utilities/colors/index.d.ts +4 -0
- package/dist/src/utilities/colors/index.js +29 -0
- package/dist/src/utilities/colors/index.js.map +1 -0
- package/dist/src/utilities/colors/types.d.ts +3 -0
- package/dist/src/utilities/colors/types.js +2 -0
- package/dist/src/utilities/colors/types.js.map +1 -0
- package/dist/src/utilities/effects/constants.d.ts +641 -0
- package/dist/src/utilities/effects/constants.js +83 -0
- package/dist/src/utilities/effects/constants.js.map +1 -0
- package/dist/src/utilities/effects/index.d.ts +1 -0
- package/dist/src/utilities/effects/index.js +2 -0
- package/dist/src/utilities/effects/index.js.map +1 -0
- package/dist/src/utilities/filters/constants.d.ts +406 -0
- package/dist/src/utilities/filters/constants.js +206 -0
- package/dist/src/utilities/filters/constants.js.map +1 -0
- package/dist/src/utilities/filters/index.d.ts +1 -0
- package/dist/src/utilities/filters/index.js +2 -0
- package/dist/src/utilities/filters/index.js.map +1 -0
- package/dist/src/utilities/flex/constants.d.ts +934 -0
- package/dist/src/utilities/flex/constants.js +221 -0
- package/dist/src/utilities/flex/constants.js.map +1 -0
- package/dist/src/utilities/flex/index.d.ts +1 -0
- package/dist/src/utilities/flex/index.js +2 -0
- package/dist/src/utilities/flex/index.js.map +1 -0
- package/dist/src/utilities/flex/types.d.ts +0 -0
- package/dist/src/utilities/flex/types.js +4 -0
- package/dist/src/utilities/flex/types.js.map +1 -0
- package/dist/src/utilities/index.d.ts +31338 -0
- package/dist/src/utilities/index.js +333 -0
- package/dist/src/utilities/index.js.map +1 -0
- package/dist/src/utilities/interactivity/constants.d.ts +1244 -0
- package/dist/src/utilities/interactivity/constants.js +165 -0
- package/dist/src/utilities/interactivity/constants.js.map +1 -0
- package/dist/src/utilities/interactivity/index.d.ts +1 -0
- package/dist/src/utilities/interactivity/index.js +2 -0
- package/dist/src/utilities/interactivity/index.js.map +1 -0
- package/dist/src/utilities/layout/constants.d.ts +837 -0
- package/dist/src/utilities/layout/constants.js +159 -0
- package/dist/src/utilities/layout/constants.js.map +1 -0
- package/dist/src/utilities/layout/index.d.ts +1 -0
- package/dist/src/utilities/layout/index.js +2 -0
- package/dist/src/utilities/layout/index.js.map +1 -0
- package/dist/src/utilities/layout/types.d.ts +0 -0
- package/dist/src/utilities/layout/types.js +2 -0
- package/dist/src/utilities/layout/types.js.map +1 -0
- package/dist/src/utilities/sizing/constants.d.ts +989 -0
- package/dist/src/utilities/sizing/constants.js +53 -0
- package/dist/src/utilities/sizing/constants.js.map +1 -0
- package/dist/src/utilities/sizing/index.d.ts +2 -0
- package/dist/src/utilities/sizing/index.js +3 -0
- package/dist/src/utilities/sizing/index.js.map +1 -0
- package/dist/src/utilities/sizing/types.d.ts +10 -0
- package/dist/src/utilities/sizing/types.js +2 -0
- package/dist/src/utilities/sizing/types.js.map +1 -0
- package/dist/src/utilities/spacing/constants.d.ts +1779 -0
- package/dist/src/utilities/spacing/constants.js +142 -0
- package/dist/src/utilities/spacing/constants.js.map +1 -0
- package/dist/src/utilities/spacing/index.d.ts +2 -0
- package/dist/src/utilities/spacing/index.js +3 -0
- package/dist/src/utilities/spacing/index.js.map +1 -0
- package/dist/src/utilities/spacing/types.d.ts +15 -0
- package/dist/src/utilities/spacing/types.js +8 -0
- package/dist/src/utilities/spacing/types.js.map +1 -0
- package/dist/src/utilities/svg/constants.d.ts +1062 -0
- package/dist/src/utilities/svg/constants.js +34 -0
- package/dist/src/utilities/svg/constants.js.map +1 -0
- package/dist/src/utilities/transforms/constants.d.ts +247 -0
- package/dist/src/utilities/transforms/constants.js +74 -0
- package/dist/src/utilities/transforms/constants.js.map +1 -0
- package/dist/src/utilities/transforms/index.d.ts +1 -0
- package/dist/src/utilities/transforms/index.js +2 -0
- package/dist/src/utilities/transforms/index.js.map +1 -0
- package/dist/src/utilities/transitions/constants.d.ts +116 -0
- package/dist/src/utilities/transitions/constants.js +91 -0
- package/dist/src/utilities/transitions/constants.js.map +1 -0
- package/dist/src/utilities/transitions/index.d.ts +1 -0
- package/dist/src/utilities/transitions/index.js +2 -0
- package/dist/src/utilities/transitions/index.js.map +1 -0
- package/dist/src/utilities/typography/constants.d.ts +2401 -0
- package/dist/src/utilities/typography/constants.js +401 -0
- package/dist/src/utilities/typography/constants.js.map +1 -0
- package/dist/src/utilities/typography/index.d.ts +1 -0
- package/dist/src/utilities/typography/index.js +2 -0
- package/dist/src/utilities/typography/index.js.map +1 -0
- package/dist/src/utils.d.ts +18 -0
- package/dist/src/utils.js +282 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/src/watcher.d.ts +15 -0
- package/dist/src/watcher.js +62 -0
- package/dist/src/watcher.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/utilities.css +1 -0
- package/index.css +2 -0
- package/package.json +139 -0
- package/reset.css +168 -0
- package/utilities.css +1 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { AXIS, AutoMap, POSITIONS_PROPERTIES, StylesVariants } from '../../commons/constants.js';
|
|
2
|
+
import { Zero_100_Map_Rem, NumericPropertyKeys, dynamicPick, createMutable, objectKeys } from '../../commons/helper.js';
|
|
3
|
+
export const SPACES = Object.assign({}, NumericPropertyKeys);
|
|
4
|
+
// //@ts-ignore Type instantiation is excessively deep and possibly infinite.(2589)
|
|
5
|
+
// export const SIZING = generateRange<300, 'number', 10>(0, 301, 5) as const;
|
|
6
|
+
export const MARGIN = { name: 'margin', shortcut: 'm' };
|
|
7
|
+
export const PADDING = { name: 'padding', shortcut: 'p' };
|
|
8
|
+
export const MARGIN_POSITIONS = {
|
|
9
|
+
x: [`${MARGIN.name}${POSITIONS_PROPERTIES.left.capitalize}`, `${MARGIN.name}${POSITIONS_PROPERTIES.right.capitalize}`],
|
|
10
|
+
y: [`${MARGIN.name}${POSITIONS_PROPERTIES.top.capitalize}`, `${MARGIN.name}${POSITIONS_PROPERTIES.bottom.capitalize}`]
|
|
11
|
+
};
|
|
12
|
+
export const PADDING_POSITIONS = {
|
|
13
|
+
x: [`${PADDING.name}${POSITIONS_PROPERTIES.left.capitalize}`, `${PADDING.name}${POSITIONS_PROPERTIES.right.capitalize}`],
|
|
14
|
+
y: [`${PADDING.name}${POSITIONS_PROPERTIES.top.capitalize}`, `${PADDING.name}${POSITIONS_PROPERTIES.bottom.capitalize}`]
|
|
15
|
+
};
|
|
16
|
+
export const MARGIN_PROPERTIES = [...MARGIN_POSITIONS.x, ...MARGIN_POSITIONS.y];
|
|
17
|
+
export const PADDING_PROPERTIES = [...PADDING_POSITIONS.x, ...PADDING_POSITIONS.y];
|
|
18
|
+
export const MARGIN_TOP = `${MARGIN.name}${POSITIONS_PROPERTIES.top.capitalize}`;
|
|
19
|
+
export const MARGIN_RIGHT = `${MARGIN.name}${POSITIONS_PROPERTIES.right.capitalize}`;
|
|
20
|
+
export const MARGIN_BOTTOM = `${MARGIN.name}${POSITIONS_PROPERTIES.bottom.capitalize}`;
|
|
21
|
+
export const MARGIN_LEFT = `${MARGIN.name}${POSITIONS_PROPERTIES.left.capitalize}`;
|
|
22
|
+
export const PADDING_TOP = `${PADDING.name}${POSITIONS_PROPERTIES.top.capitalize}`;
|
|
23
|
+
export const PADDING_RIGHT = `${PADDING.name}${POSITIONS_PROPERTIES.right.capitalize}`;
|
|
24
|
+
export const PADDING_BOTTOM = `${PADDING.name}${POSITIONS_PROPERTIES.bottom.capitalize}`;
|
|
25
|
+
export const PADDING_LEFT = `${PADDING.name}${POSITIONS_PROPERTIES.left.capitalize}`;
|
|
26
|
+
export const SpacingProperties = {
|
|
27
|
+
margin: {
|
|
28
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
29
|
+
shorthands: {
|
|
30
|
+
[MARGIN.shortcut]: [MARGIN.name],
|
|
31
|
+
[`${Object.assign({}, MARGIN).shortcut}${AXIS.x.shortcut}`]: [...MARGIN_POSITIONS.x],
|
|
32
|
+
[`${Object.assign({}, MARGIN).shortcut}${AXIS.y.shortcut}`]: [...MARGIN_POSITIONS.y],
|
|
33
|
+
},
|
|
34
|
+
variants: StylesVariants.margin
|
|
35
|
+
},
|
|
36
|
+
marginTop: {
|
|
37
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
38
|
+
shorthands: {
|
|
39
|
+
[`${Object.assign({}, MARGIN).shortcut}${POSITIONS_PROPERTIES.top.shortcut}`]: [MARGIN_POSITIONS.y[0]],
|
|
40
|
+
},
|
|
41
|
+
variants: StylesVariants.margin
|
|
42
|
+
},
|
|
43
|
+
marginRight: {
|
|
44
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
45
|
+
shorthands: {
|
|
46
|
+
[`${Object.assign({}, MARGIN).shortcut}${POSITIONS_PROPERTIES.right.shortcut}`]: [MARGIN_POSITIONS.x[1]],
|
|
47
|
+
},
|
|
48
|
+
variants: StylesVariants.margin
|
|
49
|
+
},
|
|
50
|
+
marginBottom: {
|
|
51
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
52
|
+
shorthands: {
|
|
53
|
+
[`${Object.assign({}, MARGIN).shortcut}${POSITIONS_PROPERTIES.bottom.shortcut}`]: [MARGIN_POSITIONS.y[1]]
|
|
54
|
+
},
|
|
55
|
+
variants: StylesVariants.margin
|
|
56
|
+
},
|
|
57
|
+
marginLeft: {
|
|
58
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
59
|
+
shorthands: {
|
|
60
|
+
[`${Object.assign({}, MARGIN).shortcut}${POSITIONS_PROPERTIES.left.shortcut}`]: [MARGIN_POSITIONS.x[0]],
|
|
61
|
+
},
|
|
62
|
+
variants: StylesVariants.margin
|
|
63
|
+
},
|
|
64
|
+
marginInlineStart: {
|
|
65
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
66
|
+
shorthands: {
|
|
67
|
+
ms: ['marginInlineStart'],
|
|
68
|
+
},
|
|
69
|
+
variants: StylesVariants.margin
|
|
70
|
+
},
|
|
71
|
+
marginInlineEnd: {
|
|
72
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
73
|
+
shorthands: {
|
|
74
|
+
me: ['marginInlineEnd'],
|
|
75
|
+
},
|
|
76
|
+
variants: StylesVariants.margin
|
|
77
|
+
},
|
|
78
|
+
padding: {
|
|
79
|
+
values: Object.assign({}, Zero_100_Map_Rem),
|
|
80
|
+
shorthands: {
|
|
81
|
+
[PADDING.shortcut]: [PADDING.name],
|
|
82
|
+
[`${PADDING.shortcut}${AXIS.x.shortcut}`]: [...PADDING_POSITIONS.x],
|
|
83
|
+
[`${PADDING.shortcut}${AXIS.y.shortcut}`]: [...PADDING_POSITIONS.y],
|
|
84
|
+
},
|
|
85
|
+
variants: StylesVariants.padding
|
|
86
|
+
},
|
|
87
|
+
paddingTop: {
|
|
88
|
+
values: Object.assign({}, Zero_100_Map_Rem),
|
|
89
|
+
shorthands: {
|
|
90
|
+
[`${PADDING.shortcut}${POSITIONS_PROPERTIES.top.shortcut}`]: [PADDING_POSITIONS.y[0]],
|
|
91
|
+
},
|
|
92
|
+
variants: StylesVariants.padding
|
|
93
|
+
},
|
|
94
|
+
paddingRight: {
|
|
95
|
+
values: Object.assign({}, Zero_100_Map_Rem),
|
|
96
|
+
shorthands: {
|
|
97
|
+
[`${PADDING.shortcut}${POSITIONS_PROPERTIES.right.shortcut}`]: [PADDING_POSITIONS.x[1]],
|
|
98
|
+
},
|
|
99
|
+
variants: StylesVariants.padding
|
|
100
|
+
},
|
|
101
|
+
paddingBottom: {
|
|
102
|
+
values: Object.assign({}, Zero_100_Map_Rem),
|
|
103
|
+
shorthands: {
|
|
104
|
+
[`${PADDING.shortcut}${POSITIONS_PROPERTIES.bottom.shortcut}`]: [PADDING_POSITIONS.y[1]],
|
|
105
|
+
},
|
|
106
|
+
variants: StylesVariants.padding
|
|
107
|
+
},
|
|
108
|
+
paddingLeft: {
|
|
109
|
+
values: Object.assign({}, Zero_100_Map_Rem),
|
|
110
|
+
shorthands: {
|
|
111
|
+
[`${PADDING.shortcut}${POSITIONS_PROPERTIES.left.shortcut}`]: [PADDING_POSITIONS.x[0]],
|
|
112
|
+
},
|
|
113
|
+
variants: StylesVariants.padding
|
|
114
|
+
},
|
|
115
|
+
paddingInlineStart: {
|
|
116
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
117
|
+
shorthands: {
|
|
118
|
+
ps: ['paddingInlineStart'],
|
|
119
|
+
},
|
|
120
|
+
variants: StylesVariants.padding
|
|
121
|
+
},
|
|
122
|
+
paddingInlineEnd: {
|
|
123
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap),
|
|
124
|
+
shorthands: {
|
|
125
|
+
pe: ['paddingInlineEnd'],
|
|
126
|
+
},
|
|
127
|
+
variants: StylesVariants.padding
|
|
128
|
+
},
|
|
129
|
+
spaceBetween: {
|
|
130
|
+
values: Object.assign(Object.assign({}, Zero_100_Map_Rem), { "reverse": "reverse" }),
|
|
131
|
+
shorthands: {
|
|
132
|
+
"space-x": ["spaceBetweenX"],
|
|
133
|
+
"space-y": ["spaceBetweenY"],
|
|
134
|
+
},
|
|
135
|
+
variants: StylesVariants.margin
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
export const SpacingValues = Object.assign(Object.assign({}, Zero_100_Map_Rem), AutoMap);
|
|
139
|
+
export const SpacingProps = Object.assign({}, dynamicPick(Object.assign({}, createMutable(SpacingProperties)), objectKeys(SpacingProperties), true, false, ["values"]));
|
|
140
|
+
export const SpacingVariants = Object.assign({}, dynamicPick(Object.assign({}, createMutable(SpacingProperties)), objectKeys(SpacingProperties), true, false, ["variants"]));
|
|
141
|
+
export const SpacingShorthands = Object.assign({}, dynamicPick(Object.assign({}, createMutable(SpacingProperties)), objectKeys(SpacingProperties), true, false, ['shorthands'], true));
|
|
142
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utilities/spacing/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAExH,MAAM,CAAC,MAAM,MAAM,GAAI,kBAAI,mBAAmB,CAAU,CAAC;AACzD,mF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AAa,GAAG,gCAClB,gBAAgB,GAChB,OAAO,CACR,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAI,WAAW,mBAAK,aAAa,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAU,CAAC;AACrJ,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAI,WAAW,mBAAK,aAAa,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC,CAAU,CAAC;AAC1J,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAI,WAAW,mBAAK,aAAa,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,CAAU,CAAC","sourcesContent":["\nimport { AXIS, AutoMap, POSITIONS_PROPERTIES, StylesVariants } from '../../commons/constants.js';\nimport { Zero_100_Map_Rem, NumericPropertyKeys, dynamicPick, createMutable, objectKeys } from '../../commons/helper.js';\n\nexport const SPACES = {...NumericPropertyKeys} as const;\n// //@ts-ignore Type instantiation is excessively deep and possibly infinite.(2589)\n// export const SIZING = generateRange<300, 'number', 10>(0, 301, 5) as const;\nexport const MARGIN = {name: 'margin', shortcut: 'm'} as const;\nexport const PADDING = {name: 'padding', shortcut: 'p'} as const;\n\nexport const MARGIN_POSITIONS = {\n x: [`${MARGIN.name}${POSITIONS_PROPERTIES.left.capitalize}`,`${MARGIN.name}${POSITIONS_PROPERTIES.right.capitalize}`],\n y: [`${MARGIN.name}${POSITIONS_PROPERTIES.top.capitalize}`,`${MARGIN.name}${POSITIONS_PROPERTIES.bottom.capitalize}`]\n} as const;\n\nexport const PADDING_POSITIONS = {\n x: [`${PADDING.name}${POSITIONS_PROPERTIES.left.capitalize}`,`${PADDING.name}${POSITIONS_PROPERTIES.right.capitalize}`],\n y: [`${PADDING.name}${POSITIONS_PROPERTIES.top.capitalize}`,`${PADDING.name}${POSITIONS_PROPERTIES.bottom.capitalize}`]\n} as const;\n\nexport const MARGIN_PROPERTIES = [...MARGIN_POSITIONS.x, ...MARGIN_POSITIONS.y] as const;\nexport const PADDING_PROPERTIES = [...PADDING_POSITIONS.x, ...PADDING_POSITIONS.y] as const;\n\nexport const MARGIN_TOP = `${MARGIN.name}${POSITIONS_PROPERTIES.top.capitalize}` as const;\nexport const MARGIN_RIGHT = `${MARGIN.name}${POSITIONS_PROPERTIES.right.capitalize}` as const;\nexport const MARGIN_BOTTOM = `${MARGIN.name}${POSITIONS_PROPERTIES.bottom.capitalize}` as const;\nexport const MARGIN_LEFT = `${MARGIN.name}${POSITIONS_PROPERTIES.left.capitalize}` as const;\n\nexport const PADDING_TOP = `${PADDING.name}${POSITIONS_PROPERTIES.top.capitalize}` as const;\nexport const PADDING_RIGHT = `${PADDING.name}${POSITIONS_PROPERTIES.right.capitalize}` as const;\nexport const PADDING_BOTTOM = `${PADDING.name}${POSITIONS_PROPERTIES.bottom.capitalize}` as const;\nexport const PADDING_LEFT = `${PADDING.name}${POSITIONS_PROPERTIES.left.capitalize}` as const;\n\n\nexport const SpacingProperties = {\n margin: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n [MARGIN.shortcut]: [MARGIN.name],\n [`${{...MARGIN}.shortcut}${AXIS.x.shortcut}` as `${typeof MARGIN.shortcut}${typeof AXIS.x.name}`]: [...MARGIN_POSITIONS.x],\n [`${{...MARGIN}.shortcut}${AXIS.y.shortcut}` as `${typeof MARGIN.shortcut}${typeof AXIS.y.name}`]: [...MARGIN_POSITIONS.y],\n },\n variants: StylesVariants.margin\n },\n marginTop: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n [`${{...MARGIN}.shortcut}${POSITIONS_PROPERTIES.top.shortcut}` as `${typeof MARGIN.shortcut}${typeof POSITIONS_PROPERTIES.top.shortcut}`]: [MARGIN_POSITIONS.y[0]],\n },\n variants: StylesVariants.margin\n },\n marginRight: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n [`${{...MARGIN}.shortcut}${POSITIONS_PROPERTIES.right.shortcut}` as `${typeof MARGIN.shortcut}${typeof POSITIONS_PROPERTIES.right.shortcut}`]: [MARGIN_POSITIONS.x[1]],\n },\n variants: StylesVariants.margin\n },\n marginBottom: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n [`${{...MARGIN}.shortcut}${POSITIONS_PROPERTIES.bottom.shortcut}` as `${typeof MARGIN.shortcut}${typeof POSITIONS_PROPERTIES.bottom.shortcut}`]: [MARGIN_POSITIONS.y[1]]\n },\n variants: StylesVariants.margin\n },\n marginLeft: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n [`${{...MARGIN}.shortcut}${POSITIONS_PROPERTIES.left.shortcut}` as `${typeof MARGIN.shortcut}${typeof POSITIONS_PROPERTIES.left.shortcut}`]: [MARGIN_POSITIONS.x[0]],\n },\n variants: StylesVariants.margin\n },\n marginInlineStart: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n ms: ['marginInlineStart'],\n },\n variants: StylesVariants.margin\n },\n marginInlineEnd: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n me: ['marginInlineEnd'],\n },\n variants: StylesVariants.margin\n },\n padding: {\n values: {\n ...Zero_100_Map_Rem\n },\n shorthands: {\n [PADDING.shortcut]: [PADDING.name],\n [`${PADDING.shortcut}${AXIS.x.shortcut}` as `${typeof PADDING.shortcut}${typeof AXIS.x.name}`]: [...PADDING_POSITIONS.x],\n [`${PADDING.shortcut}${AXIS.y.shortcut}` as `${typeof PADDING.shortcut}${typeof AXIS.y.name}`]: [...PADDING_POSITIONS.y],\n },\n variants: StylesVariants.padding\n },\n paddingTop: {\n values: {\n ...Zero_100_Map_Rem\n },\n shorthands: {\n [`${PADDING.shortcut}${POSITIONS_PROPERTIES.top.shortcut}` as `${typeof PADDING.shortcut}${typeof POSITIONS_PROPERTIES.top.shortcut}`]: [PADDING_POSITIONS.y[0]],\n },\n variants: StylesVariants.padding\n },\n paddingRight: {\n values: {\n ...Zero_100_Map_Rem\n },\n shorthands: {\n [`${PADDING.shortcut}${POSITIONS_PROPERTIES.right.shortcut}` as `${typeof PADDING.shortcut}${typeof POSITIONS_PROPERTIES.right.shortcut}`]: [PADDING_POSITIONS.x[1]],\n },\n variants: StylesVariants.padding\n },\n paddingBottom: {\n values: {\n ...Zero_100_Map_Rem\n },\n shorthands: {\n [`${PADDING.shortcut}${POSITIONS_PROPERTIES.bottom.shortcut}` as `${typeof PADDING.shortcut}${typeof POSITIONS_PROPERTIES.bottom.shortcut}`]: [PADDING_POSITIONS.y[1]],\n },\n variants: StylesVariants.padding\n },\n paddingLeft: {\n values: {\n ...Zero_100_Map_Rem\n },\n shorthands: {\n [`${PADDING.shortcut}${POSITIONS_PROPERTIES.left.shortcut}` as `${typeof PADDING.shortcut}${typeof POSITIONS_PROPERTIES.left.shortcut}`]: [PADDING_POSITIONS.x[0]],\n },\n variants: StylesVariants.padding\n },\n paddingInlineStart: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n ps: ['paddingInlineStart'],\n },\n variants: StylesVariants.padding\n },\n paddingInlineEnd: {\n values: {\n ...Zero_100_Map_Rem,\n ...AutoMap\n },\n shorthands: {\n pe: ['paddingInlineEnd'],\n },\n variants: StylesVariants.padding\n },\n spaceBetween: {\n values: {\n ...Zero_100_Map_Rem,\n \"reverse\": \"reverse\"\n },\n shorthands: {\n \"space-x\": [\"spaceBetweenX\"],\n \"space-y\": [\"spaceBetweenY\"],\n },\n variants: StylesVariants.margin\n }\n} as const;\n\n\nexport const SpacingValues = {\n ...Zero_100_Map_Rem,\n ...AutoMap\n} as const;\n\nexport const SpacingProps = {...dynamicPick({...createMutable(SpacingProperties)}, objectKeys(SpacingProperties), true, false, [\"values\"])} as const;\nexport const SpacingVariants = {...dynamicPick({...createMutable(SpacingProperties)}, objectKeys(SpacingProperties), true, false, [\"variants\"])} as const;\nexport const SpacingShorthands = {...dynamicPick({...createMutable(SpacingProperties)}, objectKeys(SpacingProperties), true, false, ['shorthands'], true)} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/spacing/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC","sourcesContent":["export * from './constants.js';\nexport * from './types.js';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExtendsBreakpointMap } from '../breakpoints/types.js';
|
|
2
|
+
import { UnitNameMap } from '../../units/types.js';
|
|
3
|
+
import { SPACES, MARGIN_PROPERTIES, PADDING_PROPERTIES } from './constants.js';
|
|
4
|
+
import { StringOrNumber, ToString } from '../../commons/types.js';
|
|
5
|
+
export type Margins = typeof MARGIN_PROPERTIES[number];
|
|
6
|
+
export type Paddings = typeof PADDING_PROPERTIES[number];
|
|
7
|
+
export type SpacingLevel = ToString<typeof SPACES[number]>;
|
|
8
|
+
export type SpacingMapValue = {
|
|
9
|
+
[K in SpacingLevel as K]: string;
|
|
10
|
+
};
|
|
11
|
+
export type SpacingUnitValue = UnitNameMap<SpacingMapValue>;
|
|
12
|
+
export type Spacing = ExtendsBreakpointMap<SpacingUnitValue>;
|
|
13
|
+
export type SpaceObject<T extends StringOrNumber, Q extends StringOrNumber> = {
|
|
14
|
+
[K in T as K]: Q;
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// export type EmSizingKeys = keyof typeof Zero_100_Map;
|
|
3
|
+
// export type PercentSizingKeys = keyof typeof PercentMap;
|
|
4
|
+
// export type EmSizing = typeof Zero_100_Map;
|
|
5
|
+
// export type PercentSizing = typeof PercentMap;
|
|
6
|
+
// export type IMargin = EmSizing & PercentSizing & IAuto;
|
|
7
|
+
// export type IPadding = EmSizing;
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/utilities/spacing/types.ts"],"names":[],"mappings":";AAaA,wDAAwD;AACxD,2DAA2D;AAC3D,8CAA8C;AAC9C,iDAAiD;AAGjD,0DAA0D;AAC1D,mCAAmC","sourcesContent":["import { ExtendsBreakpointMap } from '../breakpoints/types.js';\nimport { UnitNameMap } from '../../units/types.js';\nimport {SPACES, MARGIN_PROPERTIES, PADDING_PROPERTIES} from './constants.js';\nimport { StringOrNumber, ToString } from '../../commons/types.js';\n\nexport type Margins = typeof MARGIN_PROPERTIES[number];\nexport type Paddings = typeof PADDING_PROPERTIES[number];\nexport type SpacingLevel = ToString<typeof SPACES[number]>;\nexport type SpacingMapValue = { [K in SpacingLevel as K]: string};\nexport type SpacingUnitValue = UnitNameMap<SpacingMapValue>;\nexport type Spacing = ExtendsBreakpointMap<SpacingUnitValue>;\nexport type SpaceObject<T extends StringOrNumber, Q extends StringOrNumber> = { [K in T as K]: Q};\n\n// export type EmSizingKeys = keyof typeof Zero_100_Map;\n// export type PercentSizingKeys = keyof typeof PercentMap;\n// export type EmSizing = typeof Zero_100_Map;\n// export type PercentSizing = typeof PercentMap;\n\n\n// export type IMargin = EmSizing & PercentSizing & IAuto;\n// export type IPadding = EmSizing;\n"]}
|