@impulse-ui-native/theme 2.9.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/style.constants.d.mts +3 -3
- package/dist/constants/style.constants.js +3 -3
- package/dist/constants/style.constants.js.map +1 -1
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/use-colors.hook.d.mts +1 -0
- package/dist/hooks/use-components-tokens.hook.d.mts +1 -0
- package/dist/hooks/use-theme.hook.d.mts +1 -0
- package/dist/hooks/use-themed-styles.d.mts +1 -0
- package/dist/index.d.mts +3 -1
- package/dist/providers/index.d.mts +1 -0
- package/dist/providers/theme.provider.d.mts +1 -0
- package/dist/theme/create-accordion-tokens.d.mts +1 -0
- package/dist/theme/create-avatar-tokens.d.mts +1 -0
- package/dist/theme/create-badge-tokens.d.mts +1 -0
- package/dist/theme/create-button-tokens.d.mts +1 -0
- package/dist/theme/create-card-tokens.d.mts +1 -0
- package/dist/theme/create-checkbox-tokens.d.mts +1 -0
- package/dist/theme/create-control-tokens.d.mts +1 -0
- package/dist/theme/create-data-state-tokens.d.mts +1 -0
- package/dist/theme/create-datetime-picker.d.mts +1 -0
- package/dist/theme/create-divider-tokens.d.mts +1 -0
- package/dist/theme/create-flyout-tokens.d.mts +1 -0
- package/dist/theme/create-icon-button-tokens.d.mts +1 -0
- package/dist/theme/create-progress-tokens.d.mts +1 -0
- package/dist/theme/create-radio-tokens.d.mts +1 -0
- package/dist/theme/create-select-tokens.d.mts +1 -0
- package/dist/theme/create-skeleton-tokens.d.mts +1 -0
- package/dist/theme/create-slider-tokens.d.mts +31 -0
- package/dist/theme/create-slider-tokens.js +79 -0
- package/dist/theme/create-slider-tokens.js.map +1 -0
- package/dist/theme/create-spinner-tokens.d.mts +1 -0
- package/dist/theme/create-stepper-tokens.d.mts +1 -0
- package/dist/theme/create-switch-tokens.d.mts +1 -0
- package/dist/theme/create-tag-tokens.d.mts +1 -0
- package/dist/theme/create-textarea-tokens.d.mts +1 -0
- package/dist/theme/create-time-picker-tokens.d.mts +1 -0
- package/dist/theme/dark.theme.d.mts +1 -0
- package/dist/theme/index.d.mts +2 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/light.theme.d.mts +1 -0
- package/dist/theme/tokens.theme.d.mts +1 -0
- package/dist/theme/tokens.theme.js +2 -0
- package/dist/theme/tokens.theme.js.map +1 -1
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/slider-tokens.types.d.mts +44 -0
- package/dist/types/slider-tokens.types.js +1 -0
- package/dist/types/slider-tokens.types.js.map +1 -0
- package/dist/types/theme-provider.types.d.mts +2 -0
- package/dist/utils/index.d.mts +1 -0
- package/dist/utils/style.utils.d.mts +1 -0
- package/dist/utils/style.utils.js +2 -2
- package/dist/utils/style.utils.js.map +1 -1
- package/package.json +3 -3
|
@@ -2,13 +2,13 @@ import { BorderProps } from '../types/border.types.mjs';
|
|
|
2
2
|
import { ColorProps } from '../types/color.types.mjs';
|
|
3
3
|
import { DimensionProps } from '../types/dimension.types.mjs';
|
|
4
4
|
import { FlexProps } from '../types/flex.types.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { ShadowLevel, ShadowIntensity, ShadowProps } from '../types/shadow.types.mjs';
|
|
6
6
|
import { SpacingProps } from '../types/spacing.types.mjs';
|
|
7
7
|
import { TypographyProps } from '../types/typography.types.mjs';
|
|
8
8
|
import 'react-native';
|
|
9
9
|
import '../types/tokens.types.mjs';
|
|
10
10
|
|
|
11
11
|
declare const StylePropsSet: Set<keyof SpacingProps | keyof ColorProps | keyof ShadowProps | keyof BorderProps | keyof TypographyProps | keyof FlexProps | keyof DimensionProps>;
|
|
12
|
-
declare const
|
|
12
|
+
declare const ShadowScale: Record<ShadowLevel, ShadowIntensity>;
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { ShadowScale, StylePropsSet };
|
|
@@ -85,7 +85,7 @@ const StylePropsRecord = {
|
|
|
85
85
|
const StylePropsSet = new Set(
|
|
86
86
|
Object.keys(StylePropsRecord)
|
|
87
87
|
);
|
|
88
|
-
const
|
|
88
|
+
const ShadowScale = {
|
|
89
89
|
none: { radius: 0, opacity: 0, elevation: 0 },
|
|
90
90
|
xs: { radius: 2, opacity: 0.08, elevation: 1 },
|
|
91
91
|
sm: { radius: 4, opacity: 0.1, elevation: 2 },
|
|
@@ -94,7 +94,7 @@ const shadowScale = {
|
|
|
94
94
|
xl: { radius: 24, opacity: 0.22, elevation: 12 }
|
|
95
95
|
};
|
|
96
96
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
ShadowScale,
|
|
98
|
+
StylePropsSet
|
|
99
99
|
};
|
|
100
100
|
//# sourceMappingURL=style.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/constants/style.constants.ts"],"sourcesContent":["import { ShadowIntensity, ShadowLevel, StyleProps } from \"../types\";\
|
|
1
|
+
{"version":3,"sources":["../../src/constants/style.constants.ts"],"sourcesContent":["import { ShadowIntensity, ShadowLevel, StyleProps } from \"../types\";\n\nconst StylePropsRecord: Record<keyof StyleProps, number> = {\n margin: 0,\n marginTop: 0,\n marginBottom: 0,\n marginLeft: 0,\n marginRight: 0,\n marginHorizontal: 0,\n marginVertical: 0,\n padding: 0,\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0,\n paddingHorizontal: 0,\n paddingVertical: 0,\n color: 0,\n backgroundColor: 0,\n opacity: 0,\n shadow: 0,\n shadowPosition: 0,\n shadowColor: 0,\n shadowOpacity: 0,\n shadowRadius: 0,\n shadowOffset: 0,\n elevation: 0,\n borderRadius: 0,\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n borderWidth: 0,\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderColor: 0,\n borderTopColor: 0,\n borderRightColor: 0,\n borderBottomColor: 0,\n borderLeftColor: 0,\n borderStyle: 0,\n fontSize: 0,\n fontFamily: 0,\n fontWeight: 0,\n fontStyle: 0,\n fontVariant: 0,\n letterSpacing: 0,\n lineHeight: 0,\n textAlign: 0,\n textDecorationLine: 0,\n textDecorationStyle: 0,\n textDecorationColor: 0,\n textTransform: 0,\n includeFontPadding: 0,\n textAlignVertical: 0,\n writingDirection: 0,\n flex: 0,\n flexGrow: 0,\n flexShrink: 0,\n flexBasis: 0,\n flexDirection: 0,\n flexWrap: 0,\n justifyContent: 0,\n alignItems: 0,\n alignSelf: 0,\n alignContent: 0,\n gap: 0,\n rowGap: 0,\n columnGap: 0,\n position: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n zIndex: 0,\n width: 0,\n height: 0,\n minWidth: 0,\n maxWidth: 0,\n minHeight: 0,\n maxHeight: 0,\n aspectRatio: 0,\n overflow: 0,\n} as const;\n\nexport const StylePropsSet = new Set<keyof StyleProps>(\n Object.keys(StylePropsRecord) as (keyof StyleProps)[],\n);\n\nexport const ShadowScale: Record<ShadowLevel, ShadowIntensity> = {\n none: { radius: 0, opacity: 0, elevation: 0 },\n xs: { radius: 2, opacity: 0.08, elevation: 1 },\n sm: { radius: 4, opacity: 0.1, elevation: 2 },\n md: { radius: 8, opacity: 0.15, elevation: 4 },\n lg: { radius: 16, opacity: 0.18, elevation: 8 },\n xl: { radius: 24, opacity: 0.22, elevation: 12 },\n};\n"],"mappings":"AAEA,MAAM,mBAAqD;AAAA,EACzD,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,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AA,EACX,aAAa;AAAA,EACb,UAAU;AACZ;AAEO,MAAM,gBAAgB,IAAI;AAAA,EAC/B,OAAO,KAAK,gBAAgB;AAC9B;AAEO,MAAM,cAAoD;AAAA,EAC/D,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,EAAE;AAAA,EAC5C,IAAI,EAAE,QAAQ,GAAG,SAAS,MAAM,WAAW,EAAE;AAAA,EAC7C,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,WAAW,EAAE;AAAA,EAC5C,IAAI,EAAE,QAAQ,GAAG,SAAS,MAAM,WAAW,EAAE;AAAA,EAC7C,IAAI,EAAE,QAAQ,IAAI,SAAS,MAAM,WAAW,EAAE;AAAA,EAC9C,IAAI,EAAE,QAAQ,IAAI,SAAS,MAAM,WAAW,GAAG;AACjD;","names":[]}
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -27,6 +27,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
27
27
|
import '../types/spinner-tokens.types.mjs';
|
|
28
28
|
import '../types/select-tokens.types.mjs';
|
|
29
29
|
import '../types/skeleton-tokens.types.mjs';
|
|
30
|
+
import '../types/slider-tokens.types.mjs';
|
|
30
31
|
import '../types/stepper-tokens.types.mjs';
|
|
31
32
|
import '../types/switch-tokens.types.mjs';
|
|
32
33
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/stepper-tokens.types.mjs';
|
|
23
24
|
import '../types/switch-tokens.types.mjs';
|
|
24
25
|
import '../types/tag-tokens.types.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ShadowScale, StylePropsSet } from './constants/style.constants.mjs';
|
|
2
2
|
export { useBorder } from './hooks/use-border.hook.mjs';
|
|
3
3
|
export { useColors } from './hooks/use-colors.hook.mjs';
|
|
4
4
|
export { useComponentsTokens } from './hooks/use-components-tokens.hook.mjs';
|
|
@@ -11,6 +11,7 @@ export { ThemeProvider, useThemeContext } from './providers/theme.provider.mjs';
|
|
|
11
11
|
export { DarkTheme } from './theme/dark.theme.mjs';
|
|
12
12
|
export { LightTheme } from './theme/light.theme.mjs';
|
|
13
13
|
export { BorderSizeTokens, ChartColorTokens, FontFamilyTokens, FontFamilyWeightsItalicTokens, FontFamilyWeightsNormalTokens, FontSizeTokens, FontWeightTokens, LetterSpacingTokens, LightColors, LineHeightTokens, NeutralColorTokens, RadiiTokens, SpaceTokens, createComponentsTokens } from './theme/tokens.theme.mjs';
|
|
14
|
+
export { createSliderTokens } from './theme/create-slider-tokens.mjs';
|
|
14
15
|
export { BorderProps } from './types/border.types.mjs';
|
|
15
16
|
export { ColorProps } from './types/color.types.mjs';
|
|
16
17
|
export { ChartColorPalette } from './types/chart.types.mjs';
|
|
@@ -41,6 +42,7 @@ export { PressableTokens } from './types/pressable-tokens.types.mjs';
|
|
|
41
42
|
export { ProgressColorTokens, ProgressSizeTokens, ProgressTokens, ProgressTone, ProgressVariant } from './types/progress-tokens.types.mjs';
|
|
42
43
|
export { RadioSizeTokens, RadioTokens, RadioVariantTokens } from './types/radio-tokens.types.mjs';
|
|
43
44
|
export { SkeletonBoneTokens, SkeletonTextTokens, SkeletonTokens } from './types/skeleton-tokens.types.mjs';
|
|
45
|
+
export { SliderSizeTokens, SliderTokens, SliderVariant, SliderVariantTokens } from './types/slider-tokens.types.mjs';
|
|
44
46
|
export { SpinnerTokens, SpinnerTone } from './types/spinner-tokens.types.mjs';
|
|
45
47
|
export { StepperNavigationTokens, StepperTokens } from './types/stepper-tokens.types.mjs';
|
|
46
48
|
export { SwitchSizeTokens, SwitchTokens, SwitchVariantTokens } from './types/switch-tokens.types.mjs';
|
|
@@ -22,6 +22,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
22
22
|
import '../types/spinner-tokens.types.mjs';
|
|
23
23
|
import '../types/select-tokens.types.mjs';
|
|
24
24
|
import '../types/skeleton-tokens.types.mjs';
|
|
25
|
+
import '../types/slider-tokens.types.mjs';
|
|
25
26
|
import '../types/stepper-tokens.types.mjs';
|
|
26
27
|
import '../types/switch-tokens.types.mjs';
|
|
27
28
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -22,6 +22,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
22
22
|
import '../types/spinner-tokens.types.mjs';
|
|
23
23
|
import '../types/select-tokens.types.mjs';
|
|
24
24
|
import '../types/skeleton-tokens.types.mjs';
|
|
25
|
+
import '../types/slider-tokens.types.mjs';
|
|
25
26
|
import '../types/stepper-tokens.types.mjs';
|
|
26
27
|
import '../types/switch-tokens.types.mjs';
|
|
27
28
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -17,6 +17,7 @@ import '../types/icon-tokens.types.mjs';
|
|
|
17
17
|
import '../types/pressable-tokens.types.mjs';
|
|
18
18
|
import '../types/select-tokens.types.mjs';
|
|
19
19
|
import '../types/skeleton-tokens.types.mjs';
|
|
20
|
+
import '../types/slider-tokens.types.mjs';
|
|
20
21
|
import '../types/spinner-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/pressable-tokens.types.mjs';
|
|
|
18
18
|
import '../types/progress-tokens.types.mjs';
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/pressable-tokens.types.mjs';
|
|
|
18
18
|
import '../types/progress-tokens.types.mjs';
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PrimitiveThemeTokens } from '../types/theme-provider.types.mjs';
|
|
2
|
+
import { SliderTokens } from '../types/slider-tokens.types.mjs';
|
|
3
|
+
import '../types/badge-tokens.types.mjs';
|
|
4
|
+
import '../types/components.types.mjs';
|
|
5
|
+
import '../types/checkbox-tokens.types.mjs';
|
|
6
|
+
import '../types/radio-tokens.types.mjs';
|
|
7
|
+
import '../types/accordion-tokens.types.mjs';
|
|
8
|
+
import '../types/avatar-tokens.types.mjs';
|
|
9
|
+
import '../types/buttons-tokens.types.mjs';
|
|
10
|
+
import '../types/card-tokens.types.mjs';
|
|
11
|
+
import '../types/control-tokes.types.mjs';
|
|
12
|
+
import '../types/data-state-tokens.types.mjs';
|
|
13
|
+
import '../types/datetime-picker-tokens.types.mjs';
|
|
14
|
+
import '../types/divider-tokens.types.mjs';
|
|
15
|
+
import '../types/flyout-tokens.types.mjs';
|
|
16
|
+
import '../types/icon-tokens.types.mjs';
|
|
17
|
+
import '../types/pressable-tokens.types.mjs';
|
|
18
|
+
import '../types/progress-tokens.types.mjs';
|
|
19
|
+
import '../types/spinner-tokens.types.mjs';
|
|
20
|
+
import '../types/select-tokens.types.mjs';
|
|
21
|
+
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/stepper-tokens.types.mjs';
|
|
23
|
+
import '../types/switch-tokens.types.mjs';
|
|
24
|
+
import '../types/tag-tokens.types.mjs';
|
|
25
|
+
import '../types/textarea-tokens.types.mjs';
|
|
26
|
+
import '../types/time-picker-token.types.mjs';
|
|
27
|
+
import '../types/tokens.types.mjs';
|
|
28
|
+
|
|
29
|
+
declare function createSliderTokens(tokens: PrimitiveThemeTokens): SliderTokens;
|
|
30
|
+
|
|
31
|
+
export { createSliderTokens };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function createSliderTokens(tokens) {
|
|
2
|
+
return {
|
|
3
|
+
trackBorderRadius: tokens.radii.round,
|
|
4
|
+
thumbBorderRadius: tokens.radii.round,
|
|
5
|
+
thumbBorderWidth: tokens.borderSize.sm,
|
|
6
|
+
outlinedThumbBorderWidth: tokens.borderSize.md,
|
|
7
|
+
focusRingWidth: tokens.borderSize.md,
|
|
8
|
+
focusRingOffset: 2,
|
|
9
|
+
inactiveTrackColor: tokens.colors.neutral["5"],
|
|
10
|
+
markColor: tokens.colors.neutral["6"],
|
|
11
|
+
activeMarkColor: tokens.colors.primary.value,
|
|
12
|
+
disabledTrackColor: tokens.colors.neutral["5"],
|
|
13
|
+
disabledThumbColor: tokens.colors.neutral["6"],
|
|
14
|
+
disabledTextColor: tokens.colors.text.disabled,
|
|
15
|
+
focusRingColor: tokens.colors.border.focus.value,
|
|
16
|
+
valueBubbleBorderRadius: tokens.radii.md,
|
|
17
|
+
valueBubbleBorderWidth: tokens.borderSize.sm,
|
|
18
|
+
valueBubblePaddingHorizontal: tokens.space.xs,
|
|
19
|
+
valueBubblePaddingVertical: tokens.space.xxs,
|
|
20
|
+
valueBubbleGap: tokens.space.xxs,
|
|
21
|
+
labelGap: tokens.space.xxs,
|
|
22
|
+
sizes: {
|
|
23
|
+
small: {
|
|
24
|
+
trackHeight: 4,
|
|
25
|
+
thumbSize: 16,
|
|
26
|
+
markSize: 6,
|
|
27
|
+
hitSlop: 16
|
|
28
|
+
},
|
|
29
|
+
medium: {
|
|
30
|
+
trackHeight: 6,
|
|
31
|
+
thumbSize: 20,
|
|
32
|
+
markSize: 6,
|
|
33
|
+
hitSlop: 14
|
|
34
|
+
},
|
|
35
|
+
large: {
|
|
36
|
+
trackHeight: 8,
|
|
37
|
+
thumbSize: 24,
|
|
38
|
+
markSize: 8,
|
|
39
|
+
hitSlop: 12
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
filled: {
|
|
44
|
+
activeTrackColor: tokens.colors.primary.value,
|
|
45
|
+
labelColor: tokens.colors.primary.value,
|
|
46
|
+
thumbBackgroundColor: tokens.colors.primary.value,
|
|
47
|
+
thumbBorderColor: tokens.colors.primary.value,
|
|
48
|
+
thumbHighlightColor: tokens.colors.primary.contrast,
|
|
49
|
+
valueBubbleBackgroundColor: tokens.colors.primary.value,
|
|
50
|
+
valueBubbleBorderColor: tokens.colors.primary.value,
|
|
51
|
+
valueBubbleColor: tokens.colors.primary.contrast
|
|
52
|
+
},
|
|
53
|
+
outlined: {
|
|
54
|
+
activeTrackColor: tokens.colors.primary.value,
|
|
55
|
+
labelColor: tokens.colors.primary.value,
|
|
56
|
+
thumbBackgroundColor: tokens.colors.surface.elevated.value,
|
|
57
|
+
thumbBorderColor: tokens.colors.primary.value,
|
|
58
|
+
thumbHighlightColor: "transparent",
|
|
59
|
+
valueBubbleBackgroundColor: "transparent",
|
|
60
|
+
valueBubbleBorderColor: tokens.colors.primary.value,
|
|
61
|
+
valueBubbleColor: tokens.colors.primary.value
|
|
62
|
+
},
|
|
63
|
+
soft: {
|
|
64
|
+
activeTrackColor: tokens.colors.secondary.value,
|
|
65
|
+
labelColor: tokens.colors.secondary.contrast,
|
|
66
|
+
thumbBackgroundColor: tokens.colors.accent.value,
|
|
67
|
+
thumbBorderColor: tokens.colors.accent.value,
|
|
68
|
+
thumbHighlightColor: tokens.colors.primary.value,
|
|
69
|
+
valueBubbleBackgroundColor: tokens.colors.secondary.value,
|
|
70
|
+
valueBubbleBorderColor: tokens.colors.secondary.value,
|
|
71
|
+
valueBubbleColor: tokens.colors.secondary.contrast
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
createSliderTokens
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=create-slider-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/create-slider-tokens.ts"],"sourcesContent":["import type { PrimitiveThemeTokens, SliderTokens } from \"../types\";\n\nexport function createSliderTokens(tokens: PrimitiveThemeTokens): SliderTokens {\n return {\n trackBorderRadius: tokens.radii.round,\n thumbBorderRadius: tokens.radii.round,\n thumbBorderWidth: tokens.borderSize.sm,\n outlinedThumbBorderWidth: tokens.borderSize.md,\n focusRingWidth: tokens.borderSize.md,\n focusRingOffset: 2,\n inactiveTrackColor: tokens.colors.neutral[\"5\"],\n markColor: tokens.colors.neutral[\"6\"],\n activeMarkColor: tokens.colors.primary.value,\n disabledTrackColor: tokens.colors.neutral[\"5\"],\n disabledThumbColor: tokens.colors.neutral[\"6\"],\n disabledTextColor: tokens.colors.text.disabled,\n focusRingColor: tokens.colors.border.focus.value,\n valueBubbleBorderRadius: tokens.radii.md,\n valueBubbleBorderWidth: tokens.borderSize.sm,\n valueBubblePaddingHorizontal: tokens.space.xs,\n valueBubblePaddingVertical: tokens.space.xxs,\n valueBubbleGap: tokens.space.xxs,\n labelGap: tokens.space.xxs,\n sizes: {\n small: {\n trackHeight: 4,\n thumbSize: 16,\n markSize: 6,\n hitSlop: 16,\n },\n medium: {\n trackHeight: 6,\n thumbSize: 20,\n markSize: 6,\n hitSlop: 14,\n },\n large: {\n trackHeight: 8,\n thumbSize: 24,\n markSize: 8,\n hitSlop: 12,\n },\n },\n variants: {\n filled: {\n activeTrackColor: tokens.colors.primary.value,\n labelColor: tokens.colors.primary.value,\n thumbBackgroundColor: tokens.colors.primary.value,\n thumbBorderColor: tokens.colors.primary.value,\n thumbHighlightColor: tokens.colors.primary.contrast,\n valueBubbleBackgroundColor: tokens.colors.primary.value,\n valueBubbleBorderColor: tokens.colors.primary.value,\n valueBubbleColor: tokens.colors.primary.contrast,\n },\n outlined: {\n activeTrackColor: tokens.colors.primary.value,\n labelColor: tokens.colors.primary.value,\n thumbBackgroundColor: tokens.colors.surface.elevated.value,\n thumbBorderColor: tokens.colors.primary.value,\n thumbHighlightColor: \"transparent\",\n valueBubbleBackgroundColor: \"transparent\",\n valueBubbleBorderColor: tokens.colors.primary.value,\n valueBubbleColor: tokens.colors.primary.value,\n },\n soft: {\n activeTrackColor: tokens.colors.secondary.value,\n labelColor: tokens.colors.secondary.contrast,\n thumbBackgroundColor: tokens.colors.accent.value,\n thumbBorderColor: tokens.colors.accent.value,\n thumbHighlightColor: tokens.colors.primary.value,\n valueBubbleBackgroundColor: tokens.colors.secondary.value,\n valueBubbleBorderColor: tokens.colors.secondary.value,\n valueBubbleColor: tokens.colors.secondary.contrast,\n },\n },\n };\n}\n"],"mappings":"AAEO,SAAS,mBAAmB,QAA4C;AAC7E,SAAO;AAAA,IACL,mBAAmB,OAAO,MAAM;AAAA,IAChC,mBAAmB,OAAO,MAAM;AAAA,IAChC,kBAAkB,OAAO,WAAW;AAAA,IACpC,0BAA0B,OAAO,WAAW;AAAA,IAC5C,gBAAgB,OAAO,WAAW;AAAA,IAClC,iBAAiB;AAAA,IACjB,oBAAoB,OAAO,OAAO,QAAQ,GAAG;AAAA,IAC7C,WAAW,OAAO,OAAO,QAAQ,GAAG;AAAA,IACpC,iBAAiB,OAAO,OAAO,QAAQ;AAAA,IACvC,oBAAoB,OAAO,OAAO,QAAQ,GAAG;AAAA,IAC7C,oBAAoB,OAAO,OAAO,QAAQ,GAAG;AAAA,IAC7C,mBAAmB,OAAO,OAAO,KAAK;AAAA,IACtC,gBAAgB,OAAO,OAAO,OAAO,MAAM;AAAA,IAC3C,yBAAyB,OAAO,MAAM;AAAA,IACtC,wBAAwB,OAAO,WAAW;AAAA,IAC1C,8BAA8B,OAAO,MAAM;AAAA,IAC3C,4BAA4B,OAAO,MAAM;AAAA,IACzC,gBAAgB,OAAO,MAAM;AAAA,IAC7B,UAAU,OAAO,MAAM;AAAA,IACvB,OAAO;AAAA,MACL,OAAO;AAAA,QACL,aAAa;AAAA,QACb,WAAW;AAAA,QACX,UAAU;AAAA,QACV,SAAS;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,QACN,aAAa;AAAA,QACb,WAAW;AAAA,QACX,UAAU;AAAA,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
|
|
18
18
|
import '../types/progress-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
24
25
|
import '../types/textarea-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/stepper-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
24
25
|
import '../types/textarea-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/stepper-tokens.types.mjs';
|
|
23
24
|
import '../types/switch-tokens.types.mjs';
|
|
24
25
|
import '../types/textarea-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/stepper-tokens.types.mjs';
|
|
23
24
|
import '../types/switch-tokens.types.mjs';
|
|
24
25
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -19,6 +19,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
19
19
|
import '../types/spinner-tokens.types.mjs';
|
|
20
20
|
import '../types/select-tokens.types.mjs';
|
|
21
21
|
import '../types/skeleton-tokens.types.mjs';
|
|
22
|
+
import '../types/slider-tokens.types.mjs';
|
|
22
23
|
import '../types/stepper-tokens.types.mjs';
|
|
23
24
|
import '../types/switch-tokens.types.mjs';
|
|
24
25
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
package/dist/theme/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DarkTheme } from './dark.theme.mjs';
|
|
2
2
|
export { LightTheme } from './light.theme.mjs';
|
|
3
3
|
export { BorderSizeTokens, ChartColorTokens, FontFamilyTokens, FontFamilyWeightsItalicTokens, FontFamilyWeightsNormalTokens, FontSizeTokens, FontWeightTokens, LetterSpacingTokens, LightColors, LineHeightTokens, NeutralColorTokens, RadiiTokens, SpaceTokens, createComponentsTokens } from './tokens.theme.mjs';
|
|
4
|
+
export { createSliderTokens } from './create-slider-tokens.mjs';
|
|
4
5
|
import '../types/theme-provider.types.mjs';
|
|
5
6
|
import '../types/badge-tokens.types.mjs';
|
|
6
7
|
import '../types/components.types.mjs';
|
|
@@ -21,6 +22,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
21
22
|
import '../types/spinner-tokens.types.mjs';
|
|
22
23
|
import '../types/select-tokens.types.mjs';
|
|
23
24
|
import '../types/skeleton-tokens.types.mjs';
|
|
25
|
+
import '../types/slider-tokens.types.mjs';
|
|
24
26
|
import '../types/stepper-tokens.types.mjs';
|
|
25
27
|
import '../types/switch-tokens.types.mjs';
|
|
26
28
|
import '../types/tag-tokens.types.mjs';
|
package/dist/theme/index.js
CHANGED
package/dist/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export { DarkTheme } from \"./dark.theme\";\nexport { LightTheme } from \"./light.theme\";\nexport * from \"./tokens.theme\";\n"],"mappings":"AAAA,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["export { DarkTheme } from \"./dark.theme\";\nexport { LightTheme } from \"./light.theme\";\nexport * from \"./tokens.theme\";\nexport * from \"./create-slider-tokens\";\n"],"mappings":"AAAA,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -18,6 +18,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
18
18
|
import '../types/spinner-tokens.types.mjs';
|
|
19
19
|
import '../types/select-tokens.types.mjs';
|
|
20
20
|
import '../types/skeleton-tokens.types.mjs';
|
|
21
|
+
import '../types/slider-tokens.types.mjs';
|
|
21
22
|
import '../types/stepper-tokens.types.mjs';
|
|
22
23
|
import '../types/switch-tokens.types.mjs';
|
|
23
24
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -20,6 +20,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
20
20
|
import '../types/spinner-tokens.types.mjs';
|
|
21
21
|
import '../types/select-tokens.types.mjs';
|
|
22
22
|
import '../types/skeleton-tokens.types.mjs';
|
|
23
|
+
import '../types/slider-tokens.types.mjs';
|
|
23
24
|
import '../types/stepper-tokens.types.mjs';
|
|
24
25
|
import '../types/switch-tokens.types.mjs';
|
|
25
26
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -22,6 +22,7 @@ import { createProgressTokens } from "./create-progress-tokens";
|
|
|
22
22
|
import { createRadioTokens } from "./create-radio-tokens";
|
|
23
23
|
import { createSelectTokens } from "./create-select-tokens";
|
|
24
24
|
import { createSkeletonTokens } from "./create-skeleton-tokens";
|
|
25
|
+
import { createSliderTokens } from "./create-slider-tokens";
|
|
25
26
|
import { createSpinnerTokens } from "./create-spinner-tokens";
|
|
26
27
|
import { createStepperTokens } from "./create-stepper-tokens";
|
|
27
28
|
import { createSwitchTokens } from "./create-switch-tokens";
|
|
@@ -270,6 +271,7 @@ function createComponentsTokens(tokens) {
|
|
|
270
271
|
timePicker: createTimePickerTokens(tokens),
|
|
271
272
|
flyout: createFlyoutTokens(tokens),
|
|
272
273
|
skeleton: createSkeletonTokens(tokens),
|
|
274
|
+
slider: createSliderTokens(tokens),
|
|
273
275
|
spinner: createSpinnerTokens(tokens),
|
|
274
276
|
stepper: createStepperTokens(tokens),
|
|
275
277
|
switch: createSwitchTokens(tokens),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/tokens.theme.ts"],"sourcesContent":["import {\n BorderSize,\n ChartColorPalette,\n ComponentsTokens,\n FontFamily,\n FontSize,\n FontWeight,\n FontWeightItalic,\n FontWeightNormal,\n FontWeightValue,\n LetterSpacings,\n LineHeight,\n NeutralColor,\n PrimitiveThemeTokens,\n Radii,\n Space,\n ThemeColors,\n} from \"../types\";\nimport { createAccordionTokens } from \"./create-accordion-tokens\";\nimport { createAvatarTokens } from \"./create-avatar-tokens\";\nimport { createBadgeTokens } from \"./create-badge-tokens\";\nimport { createButtonTokens } from \"./create-button-tokens\";\nimport { createCardTokens } from \"./create-card-tokens\";\nimport { createCheckboxTokens } from \"./create-checkbox-tokens\";\nimport {\n createControlAddonTokens,\n createControlContainerTokens,\n createControlErrorTokens,\n createControlInputTokens,\n createControlLabelTokens,\n} from \"./create-control-tokens\";\nimport { createDataStateTokens } from \"./create-data-state-tokens\";\nimport { createDatetimePickerTokens } from \"./create-datetime-picker\";\nimport { createDividerTokens } from \"./create-divider-tokens\";\nimport { createFlyoutTokens } from \"./create-flyout-tokens\";\nimport { createIconButtonTokens } from \"./create-icon-button-tokens\";\nimport { createIconTokens } from \"./create-icon-tokens\";\nimport { createPressableTokens } from \"./create-pressable-tokens\";\nimport { createProgressTokens } from \"./create-progress-tokens\";\nimport { createRadioTokens } from \"./create-radio-tokens\";\nimport { createSelectTokens } from \"./create-select-tokens\";\nimport { createSkeletonTokens } from \"./create-skeleton-tokens\";\nimport { createSpinnerTokens } from \"./create-spinner-tokens\";\nimport { createStepperTokens } from \"./create-stepper-tokens\";\nimport { createSwitchTokens } from \"./create-switch-tokens\";\nimport { createTagTokens } from \"./create-tag-tokens\";\nimport { createTextareaTokens } from \"./create-textarea-tokens\";\nimport { createTimePickerTokens } from \"./create-time-picker-tokens\";\n\nexport const ChartColorTokens: ChartColorPalette = [\n \"#f55d6b\",\n \"#2563eb\",\n \"#16a34a\",\n \"#9333ea\",\n \"#ea580c\",\n \"#0891b2\",\n \"#db2777\",\n \"#65a30d\",\n \"#4f46e5\",\n \"#0d9488\",\n \"#ca8a04\",\n \"#c026d3\",\n \"#0284c7\",\n \"#7c3aed\",\n \"#9f5f3f\",\n];\n\nexport const SpaceTokens: Space = {\n none: 0,\n xxs: 4,\n xs: 8,\n mxs: 12,\n sm: 16,\n msm: 24,\n md: 32,\n lg: 48,\n xl: 64,\n xxl: 96,\n};\n\nexport const BorderSizeTokens: BorderSize = {\n sm: 1,\n md: 2,\n lg: 3,\n xl: 5,\n xxl: 10,\n};\n\nexport const RadiiTokens: Radii = {\n sm: 4,\n md: 8,\n lg: 16,\n xl: 32,\n xxl: 64,\n xxxl: 128,\n round: 100000,\n};\n\nexport const FontSizeTokens: FontSize = {\n xxs: 8,\n xs: 12,\n xsm: 14,\n sm: 16,\n md: 18,\n lg: 20,\n xl: 24,\n xxl: 28,\n xxxl: 32,\n huge: 36,\n massive: 40,\n giant: 48,\n colossal: 56,\n};\n\nexport const LineHeightTokens: LineHeight = {\n xxs: 12,\n xs: 16,\n xsm: 20,\n sm: 24,\n md: 26,\n lg: 28,\n xl: 32,\n xxl: 36,\n xxxl: 40,\n huge: 44,\n massive: 48,\n giant: 56,\n colossal: 64,\n};\n\nexport const LetterSpacingTokens: LetterSpacings = {\n tightest: -1,\n tighter: -0.5,\n tight: -0.25,\n normal: 0,\n wide: 0.25,\n wider: 0.5,\n widest: 0.75,\n ultraWide: 1,\n};\n\nexport const FontWeightTokens: FontWeight = {\n thin: 100,\n extraLight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n black: 900,\n};\n\nexport const FontFamilyWeightsNormalTokens: Record<\n FontWeightValue,\n FontWeightNormal\n> = {\n 100: \"Montserrat_100Thin\",\n 200: \"Montserrat_200ExtraLight\",\n 300: \"Montserrat_300Light\",\n 400: \"Montserrat_400Regular\",\n 500: \"Montserrat_500Medium\",\n 600: \"Montserrat_600SemiBold\",\n 700: \"Montserrat_700Bold\",\n 800: \"Montserrat_800ExtraBold\",\n 900: \"Montserrat_900Black\",\n};\n\nexport const FontFamilyWeightsItalicTokens: Record<\n FontWeightValue,\n FontWeightItalic\n> = {\n 100: \"Montserrat_100Thin_Italic\",\n 200: \"Montserrat_200ExtraLight_Italic\",\n 300: \"Montserrat_300Light_Italic\",\n 400: \"Montserrat_400Regular_Italic\",\n 500: \"Montserrat_500Medium_Italic\",\n 600: \"Montserrat_600SemiBold_Italic\",\n 700: \"Montserrat_700Bold_Italic\",\n 800: \"Montserrat_800ExtraBold_Italic\",\n 900: \"Montserrat_900Black_Italic\",\n};\n\nexport const FontFamilyTokens: FontFamily = {\n normal: FontFamilyWeightsNormalTokens,\n italic: FontFamilyWeightsItalicTokens,\n};\n\nexport const NeutralColorTokens: NeutralColor = {\n \"0\": \"#ffffff\",\n \"1\": \"#f8f9fa\",\n \"2\": \"#f1f3f5\",\n \"3\": \"#e9ecef\",\n \"4\": \"#dee2e6\",\n \"5\": \"#ced4da\",\n \"6\": \"#adb5bd\",\n \"7\": \"#868e96\",\n \"8\": \"#495057\",\n \"9\": \"#343a40\",\n \"10\": \"#212529\",\n \"11\": \"#16191d\",\n \"12\": \"#0d0f12\",\n \"13\": \"#000000\",\n};\n\nexport const LightColors: ThemeColors = {\n primary: {\n value: \"#f55d6b\",\n contrast: NeutralColorTokens[\"0\"],\n },\n\n accent: {\n value: \"#FA9EA7\",\n contrast: NeutralColorTokens[\"0\"],\n },\n\n secondary: {\n value: \"#FEE7E9\",\n contrast: \"#f55d6b\",\n },\n\n neutral: NeutralColorTokens,\n\n surface: {\n primary: {\n value: NeutralColorTokens[\"2\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n secondary: {\n value: NeutralColorTokens[\"0\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n elevated: {\n value: NeutralColorTokens[\"0\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n inverse: {\n value: NeutralColorTokens[\"13\"],\n contrast: NeutralColorTokens[\"0\"],\n },\n },\n\n text: {\n primary: NeutralColorTokens[\"11\"],\n secondary: NeutralColorTokens[\"10\"],\n tertiary: NeutralColorTokens[\"9\"],\n inverse: NeutralColorTokens[\"0\"],\n disabled: NeutralColorTokens[\"7\"],\n },\n\n border: {\n subtle: {\n value: NeutralColorTokens[\"3\"],\n contrast: NeutralColorTokens[\"9\"],\n },\n default: {\n value: NeutralColorTokens[\"4\"],\n contrast: NeutralColorTokens[\"10\"],\n },\n strong: {\n value: NeutralColorTokens[\"6\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n focus: {\n value: \"#f55d6b\",\n contrast: NeutralColorTokens[\"0\"],\n },\n },\n\n feedback: {\n error: {\n value: \"#c92a2a\",\n contrast: \"#fff5f5\",\n },\n warning: {\n value: \"#e67700\",\n contrast: \"#fff4e6\",\n },\n success: {\n value: \"#7a9908\",\n contrast: \"#f4fce3\",\n },\n info: {\n value: \"#1864ab\",\n contrast: \"#e7f5ff\",\n },\n },\n\n overlay: \"rgba(0, 0, 0, 0.45)\",\n\n white: NeutralColorTokens[\"0\"],\n black: NeutralColorTokens[\"13\"],\n};\n\nexport function createComponentsTokens(\n tokens: PrimitiveThemeTokens,\n): ComponentsTokens {\n return {\n accordion: createAccordionTokens(tokens),\n avatar: createAvatarTokens(tokens),\n badge: createBadgeTokens(tokens),\n button: createButtonTokens(tokens),\n card: createCardTokens(tokens),\n checkbox: createCheckboxTokens(tokens),\n iconButton: createIconButtonTokens(tokens),\n icon: createIconTokens(),\n pressable: createPressableTokens(),\n progress: createProgressTokens(tokens),\n radio: createRadioTokens(tokens),\n tag: createTagTokens(tokens),\n controlAddon: createControlAddonTokens(tokens),\n controlContainer: createControlContainerTokens(tokens),\n controlError: createControlErrorTokens(tokens),\n controlInput: createControlInputTokens(tokens),\n controlLabel: createControlLabelTokens(tokens),\n select: createSelectTokens(tokens),\n datetimePicker: createDatetimePickerTokens(tokens),\n divider: createDividerTokens(tokens),\n timePicker: createTimePickerTokens(tokens),\n flyout: createFlyoutTokens(tokens),\n skeleton: createSkeletonTokens(tokens),\n spinner: createSpinnerTokens(tokens),\n stepper: createStepperTokens(tokens),\n switch: createSwitchTokens(tokens),\n textarea: createTextareaTokens(tokens),\n dataState: createDataStateTokens(tokens),\n };\n}\n"],"mappings":"AAkBA,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AAC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SAAS,oBAAoB,MAAM;AAAA,IACnC,SAAS,oBAAoB,MAAM;AAAA,IACnC,QAAQ,mBAAmB,MAAM;AAAA,IACjC,UAAU,qBAAqB,MAAM;AAAA,IACrC,WAAW,sBAAsB,MAAM;AAAA,EACzC;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/tokens.theme.ts"],"sourcesContent":["import {\n BorderSize,\n ChartColorPalette,\n ComponentsTokens,\n FontFamily,\n FontSize,\n FontWeight,\n FontWeightItalic,\n FontWeightNormal,\n FontWeightValue,\n LetterSpacings,\n LineHeight,\n NeutralColor,\n PrimitiveThemeTokens,\n Radii,\n Space,\n ThemeColors,\n} from \"../types\";\nimport { createAccordionTokens } from \"./create-accordion-tokens\";\nimport { createAvatarTokens } from \"./create-avatar-tokens\";\nimport { createBadgeTokens } from \"./create-badge-tokens\";\nimport { createButtonTokens } from \"./create-button-tokens\";\nimport { createCardTokens } from \"./create-card-tokens\";\nimport { createCheckboxTokens } from \"./create-checkbox-tokens\";\nimport {\n createControlAddonTokens,\n createControlContainerTokens,\n createControlErrorTokens,\n createControlInputTokens,\n createControlLabelTokens,\n} from \"./create-control-tokens\";\nimport { createDataStateTokens } from \"./create-data-state-tokens\";\nimport { createDatetimePickerTokens } from \"./create-datetime-picker\";\nimport { createDividerTokens } from \"./create-divider-tokens\";\nimport { createFlyoutTokens } from \"./create-flyout-tokens\";\nimport { createIconButtonTokens } from \"./create-icon-button-tokens\";\nimport { createIconTokens } from \"./create-icon-tokens\";\nimport { createPressableTokens } from \"./create-pressable-tokens\";\nimport { createProgressTokens } from \"./create-progress-tokens\";\nimport { createRadioTokens } from \"./create-radio-tokens\";\nimport { createSelectTokens } from \"./create-select-tokens\";\nimport { createSkeletonTokens } from \"./create-skeleton-tokens\";\nimport { createSliderTokens } from \"./create-slider-tokens\";\nimport { createSpinnerTokens } from \"./create-spinner-tokens\";\nimport { createStepperTokens } from \"./create-stepper-tokens\";\nimport { createSwitchTokens } from \"./create-switch-tokens\";\nimport { createTagTokens } from \"./create-tag-tokens\";\nimport { createTextareaTokens } from \"./create-textarea-tokens\";\nimport { createTimePickerTokens } from \"./create-time-picker-tokens\";\n\nexport const ChartColorTokens: ChartColorPalette = [\n \"#f55d6b\",\n \"#2563eb\",\n \"#16a34a\",\n \"#9333ea\",\n \"#ea580c\",\n \"#0891b2\",\n \"#db2777\",\n \"#65a30d\",\n \"#4f46e5\",\n \"#0d9488\",\n \"#ca8a04\",\n \"#c026d3\",\n \"#0284c7\",\n \"#7c3aed\",\n \"#9f5f3f\",\n];\n\nexport const SpaceTokens: Space = {\n none: 0,\n xxs: 4,\n xs: 8,\n mxs: 12,\n sm: 16,\n msm: 24,\n md: 32,\n lg: 48,\n xl: 64,\n xxl: 96,\n};\n\nexport const BorderSizeTokens: BorderSize = {\n sm: 1,\n md: 2,\n lg: 3,\n xl: 5,\n xxl: 10,\n};\n\nexport const RadiiTokens: Radii = {\n sm: 4,\n md: 8,\n lg: 16,\n xl: 32,\n xxl: 64,\n xxxl: 128,\n round: 100000,\n};\n\nexport const FontSizeTokens: FontSize = {\n xxs: 8,\n xs: 12,\n xsm: 14,\n sm: 16,\n md: 18,\n lg: 20,\n xl: 24,\n xxl: 28,\n xxxl: 32,\n huge: 36,\n massive: 40,\n giant: 48,\n colossal: 56,\n};\n\nexport const LineHeightTokens: LineHeight = {\n xxs: 12,\n xs: 16,\n xsm: 20,\n sm: 24,\n md: 26,\n lg: 28,\n xl: 32,\n xxl: 36,\n xxxl: 40,\n huge: 44,\n massive: 48,\n giant: 56,\n colossal: 64,\n};\n\nexport const LetterSpacingTokens: LetterSpacings = {\n tightest: -1,\n tighter: -0.5,\n tight: -0.25,\n normal: 0,\n wide: 0.25,\n wider: 0.5,\n widest: 0.75,\n ultraWide: 1,\n};\n\nexport const FontWeightTokens: FontWeight = {\n thin: 100,\n extraLight: 200,\n light: 300,\n regular: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n black: 900,\n};\n\nexport const FontFamilyWeightsNormalTokens: Record<\n FontWeightValue,\n FontWeightNormal\n> = {\n 100: \"Montserrat_100Thin\",\n 200: \"Montserrat_200ExtraLight\",\n 300: \"Montserrat_300Light\",\n 400: \"Montserrat_400Regular\",\n 500: \"Montserrat_500Medium\",\n 600: \"Montserrat_600SemiBold\",\n 700: \"Montserrat_700Bold\",\n 800: \"Montserrat_800ExtraBold\",\n 900: \"Montserrat_900Black\",\n};\n\nexport const FontFamilyWeightsItalicTokens: Record<\n FontWeightValue,\n FontWeightItalic\n> = {\n 100: \"Montserrat_100Thin_Italic\",\n 200: \"Montserrat_200ExtraLight_Italic\",\n 300: \"Montserrat_300Light_Italic\",\n 400: \"Montserrat_400Regular_Italic\",\n 500: \"Montserrat_500Medium_Italic\",\n 600: \"Montserrat_600SemiBold_Italic\",\n 700: \"Montserrat_700Bold_Italic\",\n 800: \"Montserrat_800ExtraBold_Italic\",\n 900: \"Montserrat_900Black_Italic\",\n};\n\nexport const FontFamilyTokens: FontFamily = {\n normal: FontFamilyWeightsNormalTokens,\n italic: FontFamilyWeightsItalicTokens,\n};\n\nexport const NeutralColorTokens: NeutralColor = {\n \"0\": \"#ffffff\",\n \"1\": \"#f8f9fa\",\n \"2\": \"#f1f3f5\",\n \"3\": \"#e9ecef\",\n \"4\": \"#dee2e6\",\n \"5\": \"#ced4da\",\n \"6\": \"#adb5bd\",\n \"7\": \"#868e96\",\n \"8\": \"#495057\",\n \"9\": \"#343a40\",\n \"10\": \"#212529\",\n \"11\": \"#16191d\",\n \"12\": \"#0d0f12\",\n \"13\": \"#000000\",\n};\n\nexport const LightColors: ThemeColors = {\n primary: {\n value: \"#f55d6b\",\n contrast: NeutralColorTokens[\"0\"],\n },\n\n accent: {\n value: \"#FA9EA7\",\n contrast: NeutralColorTokens[\"0\"],\n },\n\n secondary: {\n value: \"#FEE7E9\",\n contrast: \"#f55d6b\",\n },\n\n neutral: NeutralColorTokens,\n\n surface: {\n primary: {\n value: NeutralColorTokens[\"2\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n secondary: {\n value: NeutralColorTokens[\"0\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n elevated: {\n value: NeutralColorTokens[\"0\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n inverse: {\n value: NeutralColorTokens[\"13\"],\n contrast: NeutralColorTokens[\"0\"],\n },\n },\n\n text: {\n primary: NeutralColorTokens[\"11\"],\n secondary: NeutralColorTokens[\"10\"],\n tertiary: NeutralColorTokens[\"9\"],\n inverse: NeutralColorTokens[\"0\"],\n disabled: NeutralColorTokens[\"7\"],\n },\n\n border: {\n subtle: {\n value: NeutralColorTokens[\"3\"],\n contrast: NeutralColorTokens[\"9\"],\n },\n default: {\n value: NeutralColorTokens[\"4\"],\n contrast: NeutralColorTokens[\"10\"],\n },\n strong: {\n value: NeutralColorTokens[\"6\"],\n contrast: NeutralColorTokens[\"11\"],\n },\n focus: {\n value: \"#f55d6b\",\n contrast: NeutralColorTokens[\"0\"],\n },\n },\n\n feedback: {\n error: {\n value: \"#c92a2a\",\n contrast: \"#fff5f5\",\n },\n warning: {\n value: \"#e67700\",\n contrast: \"#fff4e6\",\n },\n success: {\n value: \"#7a9908\",\n contrast: \"#f4fce3\",\n },\n info: {\n value: \"#1864ab\",\n contrast: \"#e7f5ff\",\n },\n },\n\n overlay: \"rgba(0, 0, 0, 0.45)\",\n\n white: NeutralColorTokens[\"0\"],\n black: NeutralColorTokens[\"13\"],\n};\n\nexport function createComponentsTokens(\n tokens: PrimitiveThemeTokens,\n): ComponentsTokens {\n return {\n accordion: createAccordionTokens(tokens),\n avatar: createAvatarTokens(tokens),\n badge: createBadgeTokens(tokens),\n button: createButtonTokens(tokens),\n card: createCardTokens(tokens),\n checkbox: createCheckboxTokens(tokens),\n iconButton: createIconButtonTokens(tokens),\n icon: createIconTokens(),\n pressable: createPressableTokens(),\n progress: createProgressTokens(tokens),\n radio: createRadioTokens(tokens),\n tag: createTagTokens(tokens),\n controlAddon: createControlAddonTokens(tokens),\n controlContainer: createControlContainerTokens(tokens),\n controlError: createControlErrorTokens(tokens),\n controlInput: createControlInputTokens(tokens),\n controlLabel: createControlLabelTokens(tokens),\n select: createSelectTokens(tokens),\n datetimePicker: createDatetimePickerTokens(tokens),\n divider: createDividerTokens(tokens),\n timePicker: createTimePickerTokens(tokens),\n flyout: createFlyoutTokens(tokens),\n skeleton: createSkeletonTokens(tokens),\n slider: createSliderTokens(tokens),\n spinner: createSpinnerTokens(tokens),\n stepper: createStepperTokens(tokens),\n switch: createSwitchTokens(tokens),\n textarea: createTextareaTokens(tokens),\n dataState: createDataStateTokens(tokens),\n };\n}\n"],"mappings":"AAkBA,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AACtC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AAEhC,MAAM,mBAAsC;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,cAAqB;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,IAAI;AA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mB,MAAM;AAAA,IACjC,MAAM,iBAAiB,MAAM;AAAA,IAC7B,UAAU,qBAAqB,MAAM;AAAA,IACrC,YAAY,uBAAuB,MAAM;AAAA,IACzC,MAAM,iBAAiB;AAAA,IACvB,WAAW,sBAAsB;AAAA,IACjC,UAAU,qBAAqB,MAAM;AAAA,IACrC,OAAO,kBAAkB,MAAM;AAAA,IAC/B,KAAK,gBAAgB,MAAM;AAAA,IAC3B,cAAc,yBAAyB,MAAM;AAAA,IAC7C,kBAAkB,6BAA6B,MAAM;AAAA,IACrD,cAAc,yBAAyB,MAAM;AAAA,IAC7C,cAAc,yBAAyB,MAAM;AAAA,IAC7C,cAAc,yBAAyB,MAAM;AAAA,IAC7C,QAAQ,mBAAmB,MAAM;AAAA,IACjC,gBAAgB,2BAA2B,MAAM;AAAA,IACjD,SAAS,oBAAoB,MAAM;AAAA,IACnC,YAAY,uBAAuB,MAAM;AAAA,IACzC,QAAQ,mBAAmB,MAAM;AAAA,IACjC,UAAU,qBAAqB,MAAM;AAAA,IACrC,QAAQ,mBAAmB,MAAM;AAAA,IACjC,SAAS,oBAAoB,MAAM;AAAA,IACnC,SAAS,oBAAoB,MAAM;AAAA,IACnC,QAAQ,mBAAmB,MAAM;AAAA,IACjC,UAAU,qBAAqB,MAAM;AAAA,IACrC,WAAW,sBAAsB,MAAM;AAAA,EACzC;AACF;","names":[]}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -28,6 +28,7 @@ export { PressableTokens } from './pressable-tokens.types.mjs';
|
|
|
28
28
|
export { ProgressColorTokens, ProgressSizeTokens, ProgressTokens, ProgressTone, ProgressVariant } from './progress-tokens.types.mjs';
|
|
29
29
|
export { RadioSizeTokens, RadioTokens, RadioVariantTokens } from './radio-tokens.types.mjs';
|
|
30
30
|
export { SkeletonBoneTokens, SkeletonTextTokens, SkeletonTokens } from './skeleton-tokens.types.mjs';
|
|
31
|
+
export { SliderSizeTokens, SliderTokens, SliderVariant, SliderVariantTokens } from './slider-tokens.types.mjs';
|
|
31
32
|
export { SpinnerTokens, SpinnerTone } from './spinner-tokens.types.mjs';
|
|
32
33
|
export { StepperNavigationTokens, StepperTokens } from './stepper-tokens.types.mjs';
|
|
33
34
|
export { SwitchSizeTokens, SwitchTokens, SwitchVariantTokens } from './switch-tokens.types.mjs';
|
package/dist/types/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export * from "./pressable-tokens.types";
|
|
|
28
28
|
export * from "./progress-tokens.types";
|
|
29
29
|
export * from "./radio-tokens.types";
|
|
30
30
|
export * from "./skeleton-tokens.types";
|
|
31
|
+
export * from "./slider-tokens.types";
|
|
31
32
|
export * from "./spinner-tokens.types";
|
|
32
33
|
export * from "./stepper-tokens.types";
|
|
33
34
|
export * from "./switch-tokens.types";
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./border.types\";\nexport * from \"./color.types\";\nexport * from \"./chart.types\";\nexport * from \"./components.types\";\nexport * from \"./dimension.types\";\nexport * from \"./flex.types\";\nexport * from \"./shadow.types\";\nexport * from \"./spacing.types\";\nexport * from \"./style.types\";\nexport * from \"./theme-provider.types\";\nexport * from \"./tokens.types\";\nexport * from \"./typography.types\";\nexport * from \"./buttons-tokens.types\";\nexport * from \"./accordion-tokens.types\";\nexport * from \"./avatar-tokens.types\";\nexport * from \"./badge-tokens.types\";\nexport * from \"./card-tokens.types\";\nexport * from \"./checkbox-tokens.types\";\nexport * from \"./tag-tokens.types\";\nexport * from \"./control-tokes.types\";\nexport * from \"./select-tokens.types\";\nexport * from \"./datetime-picker-tokens.types\";\nexport * from \"./divider-tokens.types\";\nexport * from \"./time-picker-token.types\";\nexport * from \"./flyout-tokens.types\";\nexport * from \"./icon-tokens.types\";\nexport * from \"./pressable-tokens.types\";\nexport * from \"./progress-tokens.types\";\nexport * from \"./radio-tokens.types\";\nexport * from \"./skeleton-tokens.types\";\nexport * from \"./spinner-tokens.types\";\nexport * from \"./stepper-tokens.types\";\nexport * from \"./switch-tokens.types\";\nexport * from \"./textarea-tokens.types\";\nexport * from \"./data-state-tokens.types\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./border.types\";\nexport * from \"./color.types\";\nexport * from \"./chart.types\";\nexport * from \"./components.types\";\nexport * from \"./dimension.types\";\nexport * from \"./flex.types\";\nexport * from \"./shadow.types\";\nexport * from \"./spacing.types\";\nexport * from \"./style.types\";\nexport * from \"./theme-provider.types\";\nexport * from \"./tokens.types\";\nexport * from \"./typography.types\";\nexport * from \"./buttons-tokens.types\";\nexport * from \"./accordion-tokens.types\";\nexport * from \"./avatar-tokens.types\";\nexport * from \"./badge-tokens.types\";\nexport * from \"./card-tokens.types\";\nexport * from \"./checkbox-tokens.types\";\nexport * from \"./tag-tokens.types\";\nexport * from \"./control-tokes.types\";\nexport * from \"./select-tokens.types\";\nexport * from \"./datetime-picker-tokens.types\";\nexport * from \"./divider-tokens.types\";\nexport * from \"./time-picker-token.types\";\nexport * from \"./flyout-tokens.types\";\nexport * from \"./icon-tokens.types\";\nexport * from \"./pressable-tokens.types\";\nexport * from \"./progress-tokens.types\";\nexport * from \"./radio-tokens.types\";\nexport * from \"./skeleton-tokens.types\";\nexport * from \"./slider-tokens.types\";\nexport * from \"./spinner-tokens.types\";\nexport * from \"./stepper-tokens.types\";\nexport * from \"./switch-tokens.types\";\nexport * from \"./textarea-tokens.types\";\nexport * from \"./data-state-tokens.types\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentSize } from './components.types.mjs';
|
|
2
|
+
|
|
3
|
+
type SliderVariant = "filled" | "outlined" | "soft";
|
|
4
|
+
type SliderSizeTokens = Record<ComponentSize, {
|
|
5
|
+
trackHeight: number;
|
|
6
|
+
thumbSize: number;
|
|
7
|
+
markSize: number;
|
|
8
|
+
hitSlop: number;
|
|
9
|
+
}>;
|
|
10
|
+
type SliderVariantTokens = Record<SliderVariant, {
|
|
11
|
+
activeTrackColor: string;
|
|
12
|
+
labelColor: string;
|
|
13
|
+
thumbBackgroundColor: string;
|
|
14
|
+
thumbBorderColor: string;
|
|
15
|
+
thumbHighlightColor: string;
|
|
16
|
+
valueBubbleBackgroundColor: string;
|
|
17
|
+
valueBubbleBorderColor: string;
|
|
18
|
+
valueBubbleColor: string;
|
|
19
|
+
}>;
|
|
20
|
+
interface SliderTokens {
|
|
21
|
+
trackBorderRadius: number;
|
|
22
|
+
thumbBorderRadius: number;
|
|
23
|
+
thumbBorderWidth: number;
|
|
24
|
+
outlinedThumbBorderWidth: number;
|
|
25
|
+
focusRingWidth: number;
|
|
26
|
+
focusRingOffset: number;
|
|
27
|
+
inactiveTrackColor: string;
|
|
28
|
+
markColor: string;
|
|
29
|
+
activeMarkColor: string;
|
|
30
|
+
disabledTrackColor: string;
|
|
31
|
+
disabledThumbColor: string;
|
|
32
|
+
disabledTextColor: string;
|
|
33
|
+
focusRingColor: string;
|
|
34
|
+
valueBubbleBorderRadius: number;
|
|
35
|
+
valueBubbleBorderWidth: number;
|
|
36
|
+
valueBubblePaddingHorizontal: number;
|
|
37
|
+
valueBubblePaddingVertical: number;
|
|
38
|
+
valueBubbleGap: number;
|
|
39
|
+
labelGap: number;
|
|
40
|
+
sizes: SliderSizeTokens;
|
|
41
|
+
variants: SliderVariantTokens;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type { SliderSizeTokens, SliderTokens, SliderVariant, SliderVariantTokens };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=slider-tokens.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -15,6 +15,7 @@ import { PressableTokens } from './pressable-tokens.types.mjs';
|
|
|
15
15
|
import { ProgressTokens } from './progress-tokens.types.mjs';
|
|
16
16
|
import { SelectTokens } from './select-tokens.types.mjs';
|
|
17
17
|
import { SkeletonTokens } from './skeleton-tokens.types.mjs';
|
|
18
|
+
import { SliderTokens } from './slider-tokens.types.mjs';
|
|
18
19
|
import { SpinnerTokens } from './spinner-tokens.types.mjs';
|
|
19
20
|
import { StepperTokens } from './stepper-tokens.types.mjs';
|
|
20
21
|
import { SwitchTokens } from './switch-tokens.types.mjs';
|
|
@@ -95,6 +96,7 @@ interface ComponentsTokens {
|
|
|
95
96
|
timePicker: TimePickerTokens;
|
|
96
97
|
flyout: FlyoutTokens;
|
|
97
98
|
skeleton: SkeletonTokens;
|
|
99
|
+
slider: SliderTokens;
|
|
98
100
|
spinner: SpinnerTokens;
|
|
99
101
|
stepper: StepperTokens;
|
|
100
102
|
switch: SwitchTokens;
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -29,6 +29,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
29
29
|
import '../types/spinner-tokens.types.mjs';
|
|
30
30
|
import '../types/select-tokens.types.mjs';
|
|
31
31
|
import '../types/skeleton-tokens.types.mjs';
|
|
32
|
+
import '../types/slider-tokens.types.mjs';
|
|
32
33
|
import '../types/stepper-tokens.types.mjs';
|
|
33
34
|
import '../types/switch-tokens.types.mjs';
|
|
34
35
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -28,6 +28,7 @@ import '../types/progress-tokens.types.mjs';
|
|
|
28
28
|
import '../types/spinner-tokens.types.mjs';
|
|
29
29
|
import '../types/select-tokens.types.mjs';
|
|
30
30
|
import '../types/skeleton-tokens.types.mjs';
|
|
31
|
+
import '../types/slider-tokens.types.mjs';
|
|
31
32
|
import '../types/stepper-tokens.types.mjs';
|
|
32
33
|
import '../types/switch-tokens.types.mjs';
|
|
33
34
|
import '../types/tag-tokens.types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import { ShadowScale, StylePropsSet } from "../constants";
|
|
3
3
|
const isStylePropKey = (k) => StylePropsSet.has(k);
|
|
4
4
|
const extractStyleProps = (props) => {
|
|
5
5
|
const style = {};
|
|
@@ -20,7 +20,7 @@ const createStyleKey = (props) => {
|
|
|
20
20
|
return key;
|
|
21
21
|
};
|
|
22
22
|
const getShadowStyle = (level = "none", position = "bottom", colors) => {
|
|
23
|
-
const token =
|
|
23
|
+
const token = ShadowScale[level];
|
|
24
24
|
if (level === "none") return {};
|
|
25
25
|
if (Platform.OS === "android") {
|
|
26
26
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/style.utils.ts"],"sourcesContent":["import { Platform, ViewStyle } from \"react-native\";\
|
|
1
|
+
{"version":3,"sources":["../../src/utils/style.utils.ts"],"sourcesContent":["import { Platform, ViewStyle } from \"react-native\";\n\nimport { ShadowScale, StylePropsSet } from \"../constants\";\nimport {\n ShadowLevel,\n ShadowPosition,\n StylePropKey,\n StyleProps,\n ThemeColors,\n} from \"../types\";\n\nconst isStylePropKey = (k: string): k is StylePropKey =>\n StylePropsSet.has(k as StylePropKey);\n\nexport const extractStyleProps = <Props extends object>(\n props: Props,\n): StyleProps => {\n const style: StyleProps = {};\n\n for (const k in props) {\n if (isStylePropKey(k) && props[k] !== undefined) {\n style[k] = props[k] as any;\n }\n }\n\n return style;\n};\n\nexport const createStyleKey = <Props extends object>(props: Props) => {\n let key = \"\";\n\n for (const k in props) {\n if (isStylePropKey(k)) {\n key += String(props[k as keyof Props]);\n }\n }\n\n return key;\n};\n\nexport const getShadowStyle = (\n level: ShadowLevel = \"none\",\n position: ShadowPosition = \"bottom\",\n colors: ThemeColors,\n): ViewStyle => {\n const token = ShadowScale[level];\n\n if (level === \"none\") return {};\n\n if (Platform.OS === \"android\") {\n return {\n elevation: token.elevation,\n };\n }\n\n let offsetY = 0;\n\n if (position === \"bottom\") offsetY = token.radius / 2;\n if (position === \"top\") offsetY = -token.radius / 2;\n if (position === \"around\") offsetY = 0;\n\n return {\n shadowColor: colors.black,\n shadowOpacity: token.opacity,\n shadowRadius: token.radius,\n shadowOffset: {\n width: 0,\n height: offsetY,\n },\n };\n};\n"],"mappings":"AAAA,SAAS,gBAA2B;AAEpC,SAAS,aAAa,qBAAqB;AAS3C,MAAM,iBAAiB,CAAC,MACtB,cAAc,IAAI,CAAiB;AAE9B,MAAM,oBAAoB,CAC/B,UACe;AACf,QAAM,QAAoB,CAAC;AAE3B,aAAW,KAAK,OAAO;AACrB,QAAI,eAAe,CAAC,KAAK,MAAM,CAAC,MAAM,QAAW;AAC/C,YAAM,CAAC,IAAI,MAAM,CAAC;AAAA,IACpB;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,iBAAiB,CAAuB,UAAiB;AACpE,MAAI,MAAM;AAEV,aAAW,KAAK,OAAO;AACrB,QAAI,eAAe,CAAC,GAAG;AACrB,aAAO,OAAO,MAAM,CAAgB,CAAC;AAAA,IACvC;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,iBAAiB,CAC5B,QAAqB,QACrB,WAA2B,UAC3B,WACc;AACd,QAAM,QAAQ,YAAY,KAAK;AAE/B,MAAI,UAAU,OAAQ,QAAO,CAAC;AAE9B,MAAI,SAAS,OAAO,WAAW;AAC7B,WAAO;AAAA,MACL,WAAW,MAAM;AAAA,IACnB;AAAA,EACF;AAEA,MAAI,UAAU;AAEd,MAAI,aAAa,SAAU,WAAU,MAAM,SAAS;AACpD,MAAI,aAAa,MAAO,WAAU,CAAC,MAAM,SAAS;AAClD,MAAI,aAAa,SAAU,WAAU;AAErC,SAAO;AAAA,IACL,aAAa,OAAO;AAAA,IACpB,eAAe,MAAM;AAAA,IACrB,cAAc,MAAM;AAAA,IACpB,cAAc;AAAA,MACZ,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,EACF;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Theme tokens, providers, and styling utilities for ImpulseUI Native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@impulse-ui-native/core": "
|
|
31
|
+
"@impulse-ui-native/core": "3.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "~19.2.14",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"react": "19.2.3",
|
|
38
38
|
"react-native": "0.86.2",
|
|
39
39
|
"typescript": "~6.0.3",
|
|
40
|
-
"@impulse-ui-native/prettier-config": "1.0.0",
|
|
41
40
|
"@impulse-ui-native/eslint-config": "1.0.0",
|
|
41
|
+
"@impulse-ui-native/prettier-config": "1.0.0",
|
|
42
42
|
"@impulse-ui-native/tsconfig": "1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|