@alfalab/core-components-pure-cell 5.0.1 → 5.0.2
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/component.d.ts +10 -16
- package/component.js +6 -6
- package/component.js.map +1 -1
- package/components/addon/component.d.ts +1 -1
- package/components/addon/component.js +2 -2
- package/components/addon/component.js.map +1 -1
- package/components/addon/index.css +17 -15
- package/components/addon/index.module.css.js +1 -1
- package/components/amount/component.d.ts +1 -1
- package/components/amount/component.js +2 -2
- package/components/amount/component.js.map +1 -1
- package/components/amount/index.css +3 -3
- package/components/amount/index.module.css.js +1 -1
- package/components/amount/index.module.css.js.map +1 -1
- package/components/amount-title/component.d.ts +1 -1
- package/components/amount-title/component.js +2 -2
- package/components/amount-title/component.js.map +1 -1
- package/components/amount-title/index.css +14 -14
- package/components/amount-title/index.module.css.js +1 -1
- package/components/amount-title/index.module.css.js.map +1 -1
- package/components/category/component.d.ts +1 -1
- package/components/category/component.js +2 -2
- package/components/category/component.js.map +1 -1
- package/components/category/index.css +4 -4
- package/components/category/index.module.css.js +1 -1
- package/components/category/index.module.css.js.map +1 -1
- package/components/content/component.d.ts +1 -1
- package/components/content/component.js +2 -2
- package/components/content/component.js.map +1 -1
- package/components/content/index.css +3 -3
- package/components/content/index.module.css.js +1 -1
- package/components/content/index.module.css.js.map +1 -1
- package/components/footer/component.d.ts +1 -1
- package/components/footer/component.js +2 -2
- package/components/footer/component.js.map +1 -1
- package/components/footer/index.css +4 -4
- package/components/footer/index.module.css.js +1 -1
- package/components/footer/index.module.css.js.map +1 -1
- package/components/footer-button/component.d.ts +2 -2
- package/components/footer-button/component.js +2 -2
- package/components/footer-button/component.js.map +1 -1
- package/components/footer-button/index.css +1 -1
- package/components/footer-button/index.module.css.js +1 -1
- package/components/footer-button/index.module.css.js.map +1 -1
- package/components/footer-text/component.d.ts +1 -1
- package/components/footer-text/component.js +2 -2
- package/components/footer-text/component.js.map +1 -1
- package/components/graphics/component.d.ts +1 -1
- package/components/graphics/component.js +2 -2
- package/components/graphics/component.js.map +1 -1
- package/components/graphics/index.css +23 -21
- package/components/graphics/index.module.css.js +1 -1
- package/components/main/component.d.ts +1 -1
- package/components/main/component.js +2 -2
- package/components/main/component.js.map +1 -1
- package/components/main/index.css +11 -9
- package/components/main/index.module.css.js +1 -1
- package/components/text/component.d.ts +1 -1
- package/components/text/component.js +2 -2
- package/components/text/component.js.map +1 -1
- package/components/text/index.css +6 -6
- package/components/text/index.module.css.js +1 -1
- package/components/text/index.module.css.js.map +1 -1
- package/components/types.d.ts +8 -8
- package/components/typesProps.d.ts +2 -2
- package/context.d.ts +9 -0
- package/context.js +11 -0
- package/context.js.map +1 -0
- package/cssm/component.d.ts +10 -16
- package/cssm/component.js +6 -6
- package/cssm/component.js.map +1 -1
- package/cssm/components/addon/component.d.ts +1 -1
- package/cssm/components/addon/component.js +2 -2
- package/cssm/components/addon/component.js.map +1 -1
- package/cssm/components/addon/index.module.css +5 -3
- package/cssm/components/amount/component.d.ts +1 -1
- package/cssm/components/amount/component.js +2 -2
- package/cssm/components/amount/component.js.map +1 -1
- package/cssm/components/amount-title/component.d.ts +1 -1
- package/cssm/components/amount-title/component.js +2 -2
- package/cssm/components/amount-title/component.js.map +1 -1
- package/cssm/components/category/component.d.ts +1 -1
- package/cssm/components/category/component.js +2 -2
- package/cssm/components/category/component.js.map +1 -1
- package/cssm/components/content/component.d.ts +1 -1
- package/cssm/components/content/component.js +2 -2
- package/cssm/components/content/component.js.map +1 -1
- package/cssm/components/content/index.module.css +1 -1
- package/cssm/components/footer/component.d.ts +1 -1
- package/cssm/components/footer/component.js +2 -2
- package/cssm/components/footer/component.js.map +1 -1
- package/cssm/components/footer/index.module.css +1 -1
- package/cssm/components/footer-button/component.d.ts +2 -2
- package/cssm/components/footer-button/component.js +2 -2
- package/cssm/components/footer-button/component.js.map +1 -1
- package/cssm/components/footer-text/component.d.ts +1 -1
- package/cssm/components/footer-text/component.js +2 -2
- package/cssm/components/footer-text/component.js.map +1 -1
- package/cssm/components/graphics/component.d.ts +1 -1
- package/cssm/components/graphics/component.js +2 -2
- package/cssm/components/graphics/component.js.map +1 -1
- package/cssm/components/graphics/index.module.css +16 -14
- package/cssm/components/main/component.d.ts +1 -1
- package/cssm/components/main/component.js +2 -2
- package/cssm/components/main/component.js.map +1 -1
- package/cssm/components/main/index.module.css +5 -3
- package/cssm/components/text/component.d.ts +1 -1
- package/cssm/components/text/component.js +2 -2
- package/cssm/components/text/component.js.map +1 -1
- package/cssm/components/types.d.ts +8 -8
- package/cssm/components/typesProps.d.ts +2 -2
- package/cssm/context.d.ts +9 -0
- package/cssm/context.js +11 -0
- package/cssm/context.js.map +1 -0
- package/cssm/index.module.css +6 -4
- package/esm/component.d.ts +10 -16
- package/esm/component.js +2 -2
- package/esm/component.js.map +1 -1
- package/esm/components/addon/component.d.ts +1 -1
- package/esm/components/addon/component.js +1 -1
- package/esm/components/addon/component.js.map +1 -1
- package/esm/components/addon/index.css +17 -15
- package/esm/components/addon/index.module.css.js +1 -1
- package/esm/components/amount/component.d.ts +1 -1
- package/esm/components/amount/component.js +1 -1
- package/esm/components/amount/component.js.map +1 -1
- package/esm/components/amount/index.css +3 -3
- package/esm/components/amount/index.module.css.js +1 -1
- package/esm/components/amount/index.module.css.js.map +1 -1
- package/esm/components/amount-title/component.d.ts +1 -1
- package/esm/components/amount-title/component.js +1 -1
- package/esm/components/amount-title/component.js.map +1 -1
- package/esm/components/amount-title/index.css +14 -14
- package/esm/components/amount-title/index.module.css.js +1 -1
- package/esm/components/amount-title/index.module.css.js.map +1 -1
- package/esm/components/category/component.d.ts +1 -1
- package/esm/components/category/component.js +1 -1
- package/esm/components/category/component.js.map +1 -1
- package/esm/components/category/index.css +4 -4
- package/esm/components/category/index.module.css.js +1 -1
- package/esm/components/category/index.module.css.js.map +1 -1
- package/esm/components/content/component.d.ts +1 -1
- package/esm/components/content/component.js +1 -1
- package/esm/components/content/component.js.map +1 -1
- package/esm/components/content/index.css +3 -3
- package/esm/components/content/index.module.css.js +1 -1
- package/esm/components/content/index.module.css.js.map +1 -1
- package/esm/components/footer/component.d.ts +1 -1
- package/esm/components/footer/component.js +1 -1
- package/esm/components/footer/component.js.map +1 -1
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/index.module.css.js +1 -1
- package/esm/components/footer/index.module.css.js.map +1 -1
- package/esm/components/footer-button/component.d.ts +2 -2
- package/esm/components/footer-button/component.js +1 -1
- package/esm/components/footer-button/component.js.map +1 -1
- package/esm/components/footer-button/index.css +1 -1
- package/esm/components/footer-button/index.module.css.js +1 -1
- package/esm/components/footer-button/index.module.css.js.map +1 -1
- package/esm/components/footer-text/component.d.ts +1 -1
- package/esm/components/footer-text/component.js +1 -1
- package/esm/components/footer-text/component.js.map +1 -1
- package/esm/components/graphics/component.d.ts +1 -1
- package/esm/components/graphics/component.js +1 -1
- package/esm/components/graphics/component.js.map +1 -1
- package/esm/components/graphics/index.css +23 -21
- package/esm/components/graphics/index.module.css.js +1 -1
- package/esm/components/main/component.d.ts +1 -1
- package/esm/components/main/component.js +1 -1
- package/esm/components/main/component.js.map +1 -1
- package/esm/components/main/index.css +11 -9
- package/esm/components/main/index.module.css.js +1 -1
- package/esm/components/text/component.d.ts +1 -1
- package/esm/components/text/component.js +1 -1
- package/esm/components/text/component.js.map +1 -1
- package/esm/components/text/index.css +6 -6
- package/esm/components/text/index.module.css.js +1 -1
- package/esm/components/text/index.module.css.js.map +1 -1
- package/esm/components/types.d.ts +8 -8
- package/esm/components/typesProps.d.ts +2 -2
- package/esm/context.d.ts +9 -0
- package/esm/context.js +7 -0
- package/esm/context.js.map +1 -0
- package/esm/index.css +34 -32
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/index.css +34 -32
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/component.d.ts +10 -16
- package/modern/component.js +2 -3
- package/modern/component.js.map +1 -1
- package/modern/components/addon/component.d.ts +1 -1
- package/modern/components/addon/component.js +1 -1
- package/modern/components/addon/component.js.map +1 -1
- package/modern/components/addon/index.css +17 -15
- package/modern/components/addon/index.module.css.js +1 -1
- package/modern/components/amount/component.d.ts +1 -1
- package/modern/components/amount/component.js +1 -1
- package/modern/components/amount/component.js.map +1 -1
- package/modern/components/amount/index.css +3 -3
- package/modern/components/amount/index.module.css.js +1 -1
- package/modern/components/amount/index.module.css.js.map +1 -1
- package/modern/components/amount-title/component.d.ts +1 -1
- package/modern/components/amount-title/component.js +1 -1
- package/modern/components/amount-title/component.js.map +1 -1
- package/modern/components/amount-title/index.css +14 -14
- package/modern/components/amount-title/index.module.css.js +1 -1
- package/modern/components/amount-title/index.module.css.js.map +1 -1
- package/modern/components/category/component.d.ts +1 -1
- package/modern/components/category/component.js +1 -1
- package/modern/components/category/component.js.map +1 -1
- package/modern/components/category/index.css +4 -4
- package/modern/components/category/index.module.css.js +1 -1
- package/modern/components/category/index.module.css.js.map +1 -1
- package/modern/components/content/component.d.ts +1 -1
- package/modern/components/content/component.js +1 -1
- package/modern/components/content/component.js.map +1 -1
- package/modern/components/content/index.css +3 -3
- package/modern/components/content/index.module.css.js +1 -1
- package/modern/components/content/index.module.css.js.map +1 -1
- package/modern/components/footer/component.d.ts +1 -1
- package/modern/components/footer/component.js +1 -1
- package/modern/components/footer/component.js.map +1 -1
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/index.module.css.js +1 -1
- package/modern/components/footer/index.module.css.js.map +1 -1
- package/modern/components/footer-button/component.d.ts +2 -2
- package/modern/components/footer-button/component.js +1 -1
- package/modern/components/footer-button/component.js.map +1 -1
- package/modern/components/footer-button/index.css +1 -1
- package/modern/components/footer-button/index.module.css.js +1 -1
- package/modern/components/footer-button/index.module.css.js.map +1 -1
- package/modern/components/footer-text/component.d.ts +1 -1
- package/modern/components/footer-text/component.js +1 -1
- package/modern/components/footer-text/component.js.map +1 -1
- package/modern/components/graphics/component.d.ts +1 -1
- package/modern/components/graphics/component.js +1 -1
- package/modern/components/graphics/component.js.map +1 -1
- package/modern/components/graphics/index.css +23 -21
- package/modern/components/graphics/index.module.css.js +1 -1
- package/modern/components/main/component.d.ts +1 -1
- package/modern/components/main/component.js +1 -1
- package/modern/components/main/component.js.map +1 -1
- package/modern/components/main/index.css +11 -9
- package/modern/components/main/index.module.css.js +1 -1
- package/modern/components/text/component.d.ts +1 -1
- package/modern/components/text/component.js +1 -1
- package/modern/components/text/component.js.map +1 -1
- package/modern/components/text/index.css +6 -6
- package/modern/components/text/index.module.css.js +1 -1
- package/modern/components/text/index.module.css.js.map +1 -1
- package/modern/components/types.d.ts +8 -8
- package/modern/components/typesProps.d.ts +2 -2
- package/modern/context.d.ts +9 -0
- package/modern/context.js +7 -0
- package/modern/context.js.map +1 -0
- package/modern/index.css +34 -32
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/moderncssm/component.d.ts +10 -16
- package/moderncssm/component.js +2 -3
- package/moderncssm/component.js.map +1 -1
- package/moderncssm/components/addon/component.d.ts +1 -1
- package/moderncssm/components/addon/component.js +1 -1
- package/moderncssm/components/addon/component.js.map +1 -1
- package/moderncssm/components/addon/index.module.css +5 -3
- package/moderncssm/components/amount/component.d.ts +1 -1
- package/moderncssm/components/amount/component.js +1 -1
- package/moderncssm/components/amount/component.js.map +1 -1
- package/moderncssm/components/amount/index.module.css +2 -0
- package/moderncssm/components/amount-title/component.d.ts +1 -1
- package/moderncssm/components/amount-title/component.js +1 -1
- package/moderncssm/components/amount-title/component.js.map +1 -1
- package/moderncssm/components/amount-title/index.module.css +2 -0
- package/moderncssm/components/category/component.d.ts +1 -1
- package/moderncssm/components/category/component.js +1 -1
- package/moderncssm/components/category/component.js.map +1 -1
- package/moderncssm/components/category/index.module.css +2 -0
- package/moderncssm/components/content/component.d.ts +1 -1
- package/moderncssm/components/content/component.js +1 -1
- package/moderncssm/components/content/component.js.map +1 -1
- package/moderncssm/components/content/index.module.css +3 -2
- package/moderncssm/components/footer/component.d.ts +1 -1
- package/moderncssm/components/footer/component.js +1 -1
- package/moderncssm/components/footer/component.js.map +1 -1
- package/moderncssm/components/footer/index.module.css +3 -3
- package/moderncssm/components/footer-button/component.d.ts +2 -2
- package/moderncssm/components/footer-button/component.js +1 -1
- package/moderncssm/components/footer-button/component.js.map +1 -1
- package/moderncssm/components/footer-button/index.module.css +2 -0
- package/moderncssm/components/footer-text/component.d.ts +1 -1
- package/moderncssm/components/footer-text/component.js +1 -1
- package/moderncssm/components/footer-text/component.js.map +1 -1
- package/moderncssm/components/graphics/component.d.ts +1 -1
- package/moderncssm/components/graphics/component.js +1 -1
- package/moderncssm/components/graphics/component.js.map +1 -1
- package/moderncssm/components/graphics/index.module.css +16 -14
- package/moderncssm/components/main/component.d.ts +1 -1
- package/moderncssm/components/main/component.js +1 -1
- package/moderncssm/components/main/component.js.map +1 -1
- package/moderncssm/components/main/index.module.css +5 -3
- package/moderncssm/components/text/component.d.ts +1 -1
- package/moderncssm/components/text/component.js +1 -1
- package/moderncssm/components/text/component.js.map +1 -1
- package/moderncssm/components/text/index.module.css +2 -0
- package/moderncssm/components/types.d.ts +8 -8
- package/moderncssm/components/typesProps.d.ts +2 -2
- package/moderncssm/context.d.ts +9 -0
- package/moderncssm/context.js +7 -0
- package/moderncssm/context.js.map +1 -0
- package/moderncssm/index.module.css +6 -4
- package/package.json +4 -4
- package/src/component.tsx +11 -21
- package/src/components/addon/component.tsx +2 -2
- package/src/components/amount/component.tsx +2 -2
- package/src/components/amount/index.module.css +1 -1
- package/src/components/amount-title/component.tsx +2 -2
- package/src/components/amount-title/index.module.css +1 -1
- package/src/components/category/component.tsx +2 -2
- package/src/components/category/index.module.css +1 -1
- package/src/components/content/component.tsx +2 -2
- package/src/components/content/index.module.css +1 -1
- package/src/components/footer/component.tsx +2 -2
- package/src/components/footer/index.module.css +1 -1
- package/src/components/footer-button/component.tsx +8 -3
- package/src/components/footer-button/index.module.css +1 -1
- package/src/components/footer-text/component.tsx +2 -2
- package/src/components/graphics/component.tsx +2 -2
- package/src/components/main/component.tsx +2 -2
- package/src/components/text/component.tsx +2 -2
- package/src/components/text/index.module.css +1 -3
- package/src/components/types.ts +8 -8
- package/src/components/typesProps.ts +2 -2
- package/src/context.ts +12 -0
- package/src/index.module.css +2 -2
- package/src/vars.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: 0;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: var(--border-radius-0);\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
package/index.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-light-status-info: #2288fa;
|
|
3
|
+
} :root {
|
|
4
|
+
--border-radius-0: 0;
|
|
3
5
|
} :root {
|
|
4
6
|
--gap-2xs: 4px;
|
|
5
7
|
--gap-xs: 8px;
|
|
@@ -12,75 +14,75 @@
|
|
|
12
14
|
--gap-16: var(--gap-m);
|
|
13
15
|
} :root {
|
|
14
16
|
--focus-color: var(--color-light-status-info);
|
|
15
|
-
} .pure-
|
|
16
|
-
text-align:
|
|
17
|
+
} .pure-cell__component_2e0lh {
|
|
18
|
+
text-align: inherit;
|
|
17
19
|
box-sizing: border-box;
|
|
18
|
-
} .pure-
|
|
20
|
+
} .pure-cell__horizontal_2e0lh {
|
|
19
21
|
display: flex;
|
|
20
22
|
width: 100%;
|
|
21
|
-
} .pure-
|
|
23
|
+
} .pure-cell__vertical_2e0lh {
|
|
22
24
|
display: flex;
|
|
23
25
|
align-items: center;
|
|
24
26
|
flex-direction: column;
|
|
25
|
-
} .pure-
|
|
27
|
+
} .pure-cell__button_2e0lh {
|
|
26
28
|
font-family: inherit;
|
|
27
29
|
background: none;
|
|
28
30
|
border: 0;
|
|
29
|
-
border-radius: 0;
|
|
31
|
+
border-radius: var(--border-radius-0);
|
|
30
32
|
cursor: pointer;
|
|
31
33
|
transition: opacity 0.15s ease-in-out;
|
|
32
|
-
padding: var(--gap-0)
|
|
33
|
-
} .pure-
|
|
34
|
+
padding: var(--gap-0);
|
|
35
|
+
} .pure-cell__button_2e0lh.pure-cell__hover_2e0lh {
|
|
34
36
|
opacity: 0.8;
|
|
35
|
-
} .pure-
|
|
37
|
+
} .pure-cell__button_2e0lh.pure-cell__active_2e0lh {
|
|
36
38
|
opacity: 0.6;
|
|
37
|
-
} .pure-
|
|
39
|
+
} .pure-cell__link_2e0lh {
|
|
38
40
|
text-decoration: none;
|
|
39
41
|
color: inherit;
|
|
40
42
|
cursor: pointer;
|
|
41
|
-
transition: opacity 0.15s ease-in-out
|
|
42
|
-
} .pure-
|
|
43
|
+
transition: opacity 0.15s ease-in-out;
|
|
44
|
+
} .pure-cell__link_2e0lh.pure-cell__hover_2e0lh {
|
|
43
45
|
opacity: 0.8;
|
|
44
|
-
} .pure-
|
|
46
|
+
} .pure-cell__link_2e0lh.pure-cell__active_2e0lh {
|
|
45
47
|
opacity: 0.6;
|
|
46
|
-
} .pure-
|
|
48
|
+
} .pure-cell__none_2e0lh {
|
|
47
49
|
padding: var(--gap-0);
|
|
48
|
-
} .pure-
|
|
50
|
+
} .pure-cell__airy_2e0lh {
|
|
49
51
|
padding: var(--gap-16) var(--gap-0);
|
|
50
|
-
} .pure-
|
|
52
|
+
} .pure-cell__default_2e0lh {
|
|
51
53
|
padding: var(--gap-12) var(--gap-0);
|
|
52
|
-
} .pure-
|
|
54
|
+
} .pure-cell__compact_2e0lh {
|
|
53
55
|
padding: var(--gap-8) var(--gap-0);
|
|
54
|
-
} .pure-
|
|
56
|
+
} .pure-cell__tiny_2e0lh {
|
|
55
57
|
padding: var(--gap-4) var(--gap-0);
|
|
56
|
-
} .pure-
|
|
58
|
+
} .pure-cell__noneTop_2e0lh {
|
|
57
59
|
padding-top: var(--gap-0);
|
|
58
|
-
} .pure-
|
|
60
|
+
} .pure-cell__airyTop_2e0lh {
|
|
59
61
|
padding-top: var(--gap-16);
|
|
60
|
-
} .pure-
|
|
62
|
+
} .pure-cell__defaultTop_2e0lh {
|
|
61
63
|
padding-top: var(--gap-12);
|
|
62
|
-
} .pure-
|
|
64
|
+
} .pure-cell__compactTop_2e0lh {
|
|
63
65
|
padding-top: var(--gap-8);
|
|
64
|
-
} .pure-
|
|
66
|
+
} .pure-cell__tinyTop_2e0lh {
|
|
65
67
|
padding-top: var(--gap-4);
|
|
66
|
-
} .pure-
|
|
68
|
+
} .pure-cell__noneBottom_2e0lh {
|
|
67
69
|
padding-bottom: var(--gap-0);
|
|
68
|
-
} .pure-
|
|
70
|
+
} .pure-cell__airyBottom_2e0lh {
|
|
69
71
|
padding-bottom: var(--gap-16);
|
|
70
|
-
} .pure-
|
|
72
|
+
} .pure-cell__defaultBottom_2e0lh {
|
|
71
73
|
padding-bottom: var(--gap-12);
|
|
72
|
-
} .pure-
|
|
74
|
+
} .pure-cell__compactBottom_2e0lh {
|
|
73
75
|
padding-bottom: var(--gap-8);
|
|
74
|
-
} .pure-
|
|
76
|
+
} .pure-cell__tinyBottom_2e0lh {
|
|
75
77
|
padding-bottom: var(--gap-4);
|
|
76
|
-
} .pure-
|
|
78
|
+
} .pure-cell__left_2e0lh {
|
|
77
79
|
padding-left: var(--gap-16);
|
|
78
|
-
} .pure-
|
|
80
|
+
} .pure-cell__right_2e0lh {
|
|
79
81
|
padding-right: var(--gap-16);
|
|
80
|
-
} .pure-
|
|
82
|
+
} .pure-cell__both_2e0lh {
|
|
81
83
|
padding-right: var(--gap-16);
|
|
82
84
|
padding-left: var(--gap-16);
|
|
83
|
-
} .pure-
|
|
85
|
+
} .pure-cell__focused_2e0lh {
|
|
84
86
|
outline: 2px solid var(--focus-color);
|
|
85
87
|
outline-offset: 2px;
|
|
86
88
|
}
|
package/index.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"pure-
|
|
5
|
+
var styles = {"component":"pure-cell__component_2e0lh","horizontal":"pure-cell__horizontal_2e0lh","vertical":"pure-cell__vertical_2e0lh","button":"pure-cell__button_2e0lh","hover":"pure-cell__hover_2e0lh","active":"pure-cell__active_2e0lh","link":"pure-cell__link_2e0lh","none":"pure-cell__none_2e0lh","airy":"pure-cell__airy_2e0lh","default":"pure-cell__default_2e0lh","compact":"pure-cell__compact_2e0lh","tiny":"pure-cell__tiny_2e0lh","noneTop":"pure-cell__noneTop_2e0lh","airyTop":"pure-cell__airyTop_2e0lh","defaultTop":"pure-cell__defaultTop_2e0lh","compactTop":"pure-cell__compactTop_2e0lh","tinyTop":"pure-cell__tinyTop_2e0lh","noneBottom":"pure-cell__noneBottom_2e0lh","airyBottom":"pure-cell__airyBottom_2e0lh","defaultBottom":"pure-cell__defaultBottom_2e0lh","compactBottom":"pure-cell__compactBottom_2e0lh","tinyBottom":"pure-cell__tinyBottom_2e0lh","left":"pure-cell__left_2e0lh","right":"pure-cell__right_2e0lh","both":"pure-cell__both_2e0lh","focused":"pure-cell__focused_2e0lh"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: 0;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n text-align: unset;\n box-sizing: border-box;\n}\n\n.horizontal {\n display: flex;\n width: 100%;\n}\n\n.vertical {\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n\n.button {\n font-family: inherit;\n background: none;\n border: 0;\n border-radius: var(--border-radius-0);\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n padding: var(--gap-0);\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n\n.link {\n text-decoration: none;\n color: inherit;\n cursor: pointer;\n transition: opacity 0.15s ease-in-out;\n\n &.hover {\n opacity: 0.8;\n }\n\n &.active {\n opacity: 0.6;\n }\n}\n.none {\n padding: var(--gap-0);\n}\n\n.airy {\n padding: var(--gap-16) var(--gap-0);\n}\n\n.default {\n padding: var(--gap-12) var(--gap-0);\n}\n\n.compact {\n padding: var(--gap-8) var(--gap-0);\n}\n\n.tiny {\n padding: var(--gap-4) var(--gap-0);\n}\n\n.noneTop {\n padding-top: var(--gap-0);\n}\n\n.airyTop {\n padding-top: var(--gap-16);\n}\n\n.defaultTop {\n padding-top: var(--gap-12);\n}\n\n.compactTop {\n padding-top: var(--gap-8);\n}\n\n.tinyTop {\n padding-top: var(--gap-4);\n}\n\n.noneBottom {\n padding-bottom: var(--gap-0);\n}\n\n.airyBottom {\n padding-bottom: var(--gap-16);\n}\n\n.defaultBottom {\n padding-bottom: var(--gap-12);\n}\n\n.compactBottom {\n padding-bottom: var(--gap-8);\n}\n\n.tinyBottom {\n padding-bottom: var(--gap-4);\n}\n\n.left {\n padding-left: var(--gap-16);\n}\n\n.right {\n padding-right: var(--gap-16);\n}\n\n.both {\n padding-right: var(--gap-16);\n padding-left: var(--gap-16);\n}\n\n.focused {\n @mixin focus-outline;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,YAAY,CAAC,6BAA6B,CAAC,UAAU,CAAC,2BAA2B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,SAAS,CAAC,0BAA0B,CAAC,YAAY,CAAC,6BAA6B,CAAC,YAAY,CAAC,6BAA6B,CAAC,eAAe,CAAC,gCAAgC,CAAC,eAAe,CAAC,gCAAgC,CAAC,YAAY,CAAC,6BAA6B,CAAC,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC,0BAA0B,CAAC;;;;"}
|
package/modern/component.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, HTMLAttributes } from 'react';
|
|
2
|
-
import { ButtonProps } from '@alfalab/core-components-button/modern';
|
|
1
|
+
import React, { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ElementType, type HTMLAttributes } from 'react';
|
|
3
2
|
import { Comment } from '@alfalab/core-components-comment/modern';
|
|
4
3
|
import { Addon } from './components/addon';
|
|
5
4
|
import { Amount } from './components/amount';
|
|
@@ -8,19 +7,12 @@ import { Category } from './components/category';
|
|
|
8
7
|
import { Content } from './components/content';
|
|
9
8
|
import { Footer } from './components/footer';
|
|
10
9
|
import { FooterButton } from './components/footer-button';
|
|
11
|
-
import { FooterTextProps } from './components/footer-text';
|
|
12
10
|
import { Graphics } from './components/graphics';
|
|
13
11
|
import { Main } from './components/main';
|
|
14
12
|
import { Text } from './components/text';
|
|
15
|
-
import { PureCellElement } from './components/types';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
direction?: 'horizontal' | 'vertical';
|
|
19
|
-
dataTestId?: string;
|
|
20
|
-
setMainHover?: () => void;
|
|
21
|
-
unsetMainHover?: () => void;
|
|
22
|
-
};
|
|
23
|
-
export declare const PureCellContext: React.Context<PureCellContext>;
|
|
13
|
+
import { type PureCellElement } from './components/types';
|
|
14
|
+
import { PureCellContext } from './context';
|
|
15
|
+
export { PureCellContext };
|
|
24
16
|
declare type BasePureCellProps = {
|
|
25
17
|
/**
|
|
26
18
|
* Направление
|
|
@@ -69,7 +61,7 @@ declare type ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTML
|
|
|
69
61
|
declare type ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;
|
|
70
62
|
export declare type PureCellProps = Partial<AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps>;
|
|
71
63
|
declare const PureCellComponent: React.ForwardRefExoticComponent<PureCellProps & React.RefAttributes<HTMLElement>>;
|
|
72
|
-
declare const ExtraSubtitle: React.FC<FooterTextProps>;
|
|
64
|
+
declare const ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
|
|
73
65
|
/**
|
|
74
66
|
* Универсальный конструктор для сборки любой ячейки.
|
|
75
67
|
*
|
|
@@ -96,7 +88,9 @@ declare const PureCell: React.ForwardRefExoticComponent<PureCellProps & React.Re
|
|
|
96
88
|
titleColor: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive";
|
|
97
89
|
value?: React.ReactNode;
|
|
98
90
|
valueColor?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive" | undefined;
|
|
99
|
-
dataTestId?: string | undefined;
|
|
91
|
+
dataTestId?: string | undefined; /**
|
|
92
|
+
* Направление
|
|
93
|
+
*/
|
|
100
94
|
}>;
|
|
101
95
|
Amount: React.FC<{
|
|
102
96
|
weight?: "bold" | "normal" | undefined;
|
|
@@ -123,8 +117,8 @@ declare const PureCell: React.ForwardRefExoticComponent<PureCellProps & React.Re
|
|
|
123
117
|
footerPadding?: "default" | "none" | undefined;
|
|
124
118
|
dataTestId?: string | undefined;
|
|
125
119
|
}>;
|
|
126
|
-
ExtraSubtitle: React.FC<FooterTextProps>;
|
|
127
|
-
FooterButton: React.ForwardRefExoticComponent<(Omit<ButtonProps, "dataTestId"> & {
|
|
120
|
+
ExtraSubtitle: React.FC<import("./components/footer-text").FooterTextProps>;
|
|
121
|
+
FooterButton: React.ForwardRefExoticComponent<(Omit<import("@alfalab/core-components-button").ButtonProps, "dataTestId"> & {
|
|
128
122
|
dataTestId?: string | undefined;
|
|
129
123
|
} & Partial<React.AnchorHTMLAttributes<HTMLAnchorElement> | React.ButtonHTMLAttributes<HTMLButtonElement>>) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
130
124
|
Comment: React.FC<import("@alfalab/core-components-comment").CommentProps>;
|
package/modern/component.js
CHANGED
|
@@ -15,11 +15,9 @@ import { FooterText } from './components/footer-text/component.js';
|
|
|
15
15
|
import { Graphics } from './components/graphics/component.js';
|
|
16
16
|
import { Main } from './components/main/component.js';
|
|
17
17
|
import { Text } from './components/text/component.js';
|
|
18
|
+
import { PureCellContext } from './context.js';
|
|
18
19
|
import styles from './index.module.css.js';
|
|
19
20
|
|
|
20
|
-
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
22
|
-
const PureCellContext = React.createContext({});
|
|
23
21
|
const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, tag: Component = (href && 'a') || (onClick && 'button') || 'section', children, horizontalPadding = 'none', verticalPadding = 'none', direction = 'horizontal', ...restProps }, ref) => {
|
|
24
22
|
const cellRef = useRef(null);
|
|
25
23
|
const [focused] = useFocus(cellRef, 'keyboard');
|
|
@@ -47,6 +45,7 @@ const PureCellComponent = forwardRef(({ className, dataTestId, onClick, href, ta
|
|
|
47
45
|
[styles.hover]: hoverState,
|
|
48
46
|
[styles.active]: activeState,
|
|
49
47
|
};
|
|
48
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
50
49
|
const contextState = {
|
|
51
50
|
direction,
|
|
52
51
|
dataTestId,
|
package/modern/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["/* eslint-disable react/jsx-no-constructed-context-values */\nimport React, {\n AnchorHTMLAttributes,\n ButtonHTMLAttributes,\n ElementType,\n forwardRef,\n HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { ButtonProps } from '@alfalab/core-components-button';\nimport { Comment } from '@alfalab/core-components-comment';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { Addon } from './components/addon';\nimport { Amount } from './components/amount';\nimport { AmountTitle } from './components/amount-title';\nimport { Category } from './components/category';\nimport { Content } from './components/content';\nimport { Footer } from './components/footer';\nimport { FooterButton } from './components/footer-button';\nimport { FooterText, FooterTextProps } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { PureCellElement } from './components/types';\n\nimport styles from './index.module.css';\n\nexport type PureCellContext = {\n /** Направление */\n direction?: 'horizontal' | 'vertical';\n dataTestId?: string;\n setMainHover?: () => void;\n unsetMainHover?: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const PureCellContext = React.createContext<PureCellContext>({});\n\ntype BasePureCellProps = {\n /**\n * Направление\n */\n direction?: 'horizontal' | 'vertical';\n\n /**\n * Сss класс для стилизации общей обёртки\n */\n className?: string;\n\n /**\n * Выводит ссылку в виде ячейки\n */\n href?: string;\n\n /**\n * Вертикальные отступы\n */\n verticalPadding?:\n | 'airy'\n | 'default'\n | 'compact'\n | 'tiny'\n | 'none'\n | {\n /**\n * Вертикальный отступ сверху\n */\n top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n /**\n * Вертикальный отступ снизу\n */\n bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n };\n\n /**\n * Горизонтальные отступы\n */\n horizontalPadding?: 'left' | 'right' | 'both' | 'none';\n\n /**\n * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)\n */\n tag?: ElementType;\n\n /**\n * Компоненты\n */\n children: PureCellElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\ntype AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;\ntype ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;\ntype ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;\nexport type PureCellProps = Partial<\n AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps\n>;\n\nconst PureCellComponent = forwardRef<HTMLElement, PureCellProps>(\n (\n {\n className,\n dataTestId,\n onClick,\n href,\n tag: Component = (href && 'a') || (onClick && 'button') || 'section',\n children,\n horizontalPadding = 'none',\n verticalPadding = 'none',\n direction = 'horizontal',\n ...restProps\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLDivElement>(null);\n const [focused] = useFocus(cellRef, 'keyboard');\n const [hoverState, setHoverState] = useState<boolean>(false);\n const [activeState, setActiveState] = useState<boolean>(false);\n\n const setHover = () => setHoverState(true);\n const unsetHover = () => setHoverState(false);\n const setActive = () => setActiveState(true);\n\n const unsetActive = () => setActiveState(false);\n\n const mouseEvents = {\n onMouseEnter: setHover,\n onMouseLeave: () => {\n unsetHover();\n // Убираем на случай, если уводим курсор за пределы компонента при сработавшем onMouseDown\n unsetActive();\n },\n onMouseDown: setActive,\n onMouseUp: unsetActive,\n };\n\n const addClasses = {\n [styles.component]: true,\n [styles.focused]: focused,\n [styles[direction]]: true,\n [styles[horizontalPadding]]: true,\n [styles.hover]: hoverState,\n [styles.active]: activeState,\n };\n\n const contextState: PureCellContext = {\n direction,\n dataTestId,\n setMainHover: setHover,\n unsetMainHover: unsetHover,\n };\n\n if (typeof verticalPadding === 'string') {\n addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';\n }\n\n if (typeof verticalPadding === 'object') {\n addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;\n addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;\n }\n\n if (href) {\n const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;\n\n // Для совместимости с react-router-dom, меняем href на to\n const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };\n\n return (\n <Component\n rel={target === '_blank' ? 'noreferrer noopener' : undefined}\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n {...hrefProps}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.link, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n if (onClick) {\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.button, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={ref}\n tabIndex={0}\n className={cn(addClasses, className)}\n data-test-id={dataTestId}\n >\n <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>\n </Component>\n );\n },\n);\n\nconst ExtraSubtitle = FooterText as React.FC<FooterTextProps>;\n\n/**\n * Универсальный конструктор для сборки любой ячейки.\n *\n * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)\n */\nconst PureCell = Object.assign(PureCellComponent, {\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n});\n\nPureCellComponent.displayName = 'PureCellComponent';\n\nexport {\n PureCell,\n PureCellComponent,\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAyCA;AACa,MAAA,eAAe,GAAG,KAAK,CAAC,aAAa,CAAkB,EAAE;AAiEhE,MAAA,iBAAiB,GAAG,UAAU,CAChC,CACI,EACI,SAAS,EACT,UAAU,EACV,OAAO,EACP,IAAI,EACJ,GAAG,EAAE,SAAS,GAAG,CAAC,IAAI,IAAI,GAAG,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,EACpE,QAAQ,EACR,iBAAiB,GAAG,MAAM,EAC1B,eAAe,GAAG,MAAM,EACxB,SAAS,GAAG,YAAY,EACxB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC;IAC5C,MAAM,CA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AA,cAAA,EACrC,UAAU,EACxB,OAAO,EAAE,OAAO,KACZ,WAAW,EAAA;AAEf,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EACxC,QAAQ,CACc,CACnB;AAEnB;IAED,QACI,oBAAC,SAAS,EAAA,EAAA,GACD,SAAqD,EAC1D,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACtB,UAAU,EAAA;AAExB,QAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EAAG,QAAQ,CAA4B,CAC5E;AAEpB,CAAC;AAGC,MAAA,aAAa,GAAG;AAEtB;;;;AAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;IAC9C,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,MAAM;IACN,WAAW;IACX,KAAK;IACL,MAAM;IACN,aAAa;IACb,YAAY;IACZ,OAAO;IACP,QAAQ;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import React, {\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ElementType,\n forwardRef,\n type HTMLAttributes,\n useRef,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { Comment } from '@alfalab/core-components-comment';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { Addon } from './components/addon';\nimport { Amount } from './components/amount';\nimport { AmountTitle } from './components/amount-title';\nimport { Category } from './components/category';\nimport { Content } from './components/content';\nimport { Footer } from './components/footer';\nimport { FooterButton } from './components/footer-button';\nimport { FooterText } from './components/footer-text';\nimport { Graphics } from './components/graphics';\nimport { Main } from './components/main';\nimport { Text } from './components/text';\nimport { type PureCellElement } from './components/types';\nimport { PureCellContext, type PureCellContextValue } from './context';\n\nimport styles from './index.module.css';\n\nexport { PureCellContext };\n\ntype BasePureCellProps = {\n /**\n * Направление\n */\n direction?: 'horizontal' | 'vertical';\n\n /**\n * Сss класс для стилизации общей обёртки\n */\n className?: string;\n\n /**\n * Выводит ссылку в виде ячейки\n */\n href?: string;\n\n /**\n * Вертикальные отступы\n */\n verticalPadding?:\n | 'airy'\n | 'default'\n | 'compact'\n | 'tiny'\n | 'none'\n | {\n /**\n * Вертикальный отступ сверху\n */\n top?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n /**\n * Вертикальный отступ снизу\n */\n bottom?: 'airy' | 'default' | 'compact' | 'tiny' | 'none';\n };\n\n /**\n * Горизонтальные отступы\n */\n horizontalPadding?: 'left' | 'right' | 'both' | 'none';\n\n /**\n * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)\n */\n tag?: ElementType;\n\n /**\n * Компоненты\n */\n children: PureCellElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\ntype AnchorPureCellProps = BasePureCellProps & AnchorHTMLAttributes<HTMLAnchorElement>;\ntype ButtonPureCellProps = BasePureCellProps & ButtonHTMLAttributes<HTMLButtonElement>;\ntype ElementPureCellProps = BasePureCellProps & HTMLAttributes<HTMLElement>;\nexport type PureCellProps = Partial<\n AnchorPureCellProps | ButtonPureCellProps | ElementPureCellProps\n>;\n\nconst PureCellComponent = forwardRef<HTMLElement, PureCellProps>(\n (\n {\n className,\n dataTestId,\n onClick,\n href,\n tag: Component = (href && 'a') || (onClick && 'button') || 'section',\n children,\n horizontalPadding = 'none',\n verticalPadding = 'none',\n direction = 'horizontal',\n ...restProps\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLDivElement>(null);\n const [focused] = useFocus(cellRef, 'keyboard');\n const [hoverState, setHoverState] = useState<boolean>(false);\n const [activeState, setActiveState] = useState<boolean>(false);\n\n const setHover = () => setHoverState(true);\n const unsetHover = () => setHoverState(false);\n const setActive = () => setActiveState(true);\n\n const unsetActive = () => setActiveState(false);\n\n const mouseEvents = {\n onMouseEnter: setHover,\n onMouseLeave: () => {\n unsetHover();\n // Убираем на случай, если уводим курсор за пределы компонента при сработавшем onMouseDown\n unsetActive();\n },\n onMouseDown: setActive,\n onMouseUp: unsetActive,\n };\n\n const addClasses = {\n [styles.component]: true,\n [styles.focused]: focused,\n [styles[direction]]: true,\n [styles[horizontalPadding]]: true,\n [styles.hover]: hoverState,\n [styles.active]: activeState,\n };\n\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const contextState: PureCellContextValue = {\n direction,\n dataTestId,\n setMainHover: setHover,\n unsetMainHover: unsetHover,\n };\n\n if (typeof verticalPadding === 'string') {\n addClasses[styles[verticalPadding as string]] = typeof verticalPadding === 'string';\n }\n\n if (typeof verticalPadding === 'object') {\n addClasses[styles[`${verticalPadding.top}Top`]] = !!verticalPadding.top;\n addClasses[styles[`${verticalPadding.bottom}Bottom`]] = !!verticalPadding.bottom;\n }\n\n if (href) {\n const { target } = restProps as AnchorHTMLAttributes<HTMLAnchorElement>;\n\n // Для совместимости с react-router-dom, меняем href на to\n const hrefProps = { [typeof Component === 'string' ? 'href' : 'to']: href };\n\n return (\n <Component\n rel={target === '_blank' ? 'noreferrer noopener' : undefined}\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n {...hrefProps}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.link, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n if (onClick) {\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={mergeRefs([cellRef, ref])}\n className={cn(styles.button, addClasses, className)}\n data-test-id={dataTestId}\n onClick={onClick}\n {...mouseEvents}\n >\n <PureCellContext.Provider value={contextState}>\n {children}\n </PureCellContext.Provider>\n </Component>\n );\n }\n\n return (\n <Component\n {...(restProps as AnchorHTMLAttributes<HTMLAnchorElement>)}\n ref={ref}\n tabIndex={0}\n className={cn(addClasses, className)}\n data-test-id={dataTestId}\n >\n <PureCellContext.Provider value={contextState}>{children}</PureCellContext.Provider>\n </Component>\n );\n },\n);\n\nconst ExtraSubtitle = FooterText;\n\n/**\n * Универсальный конструктор для сборки любой ячейки.\n *\n * [Макет](https://www.figma.com/file/KlFOLLkKO8rtvvQE3RXuhq/Click-Library?node-id=43525%3A240018)\n */\nconst PureCell = Object.assign(PureCellComponent, {\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n});\n\nPureCellComponent.displayName = 'PureCellComponent';\n\nexport {\n PureCell,\n PureCellComponent,\n Main,\n Graphics,\n Content,\n Text,\n Amount,\n AmountTitle,\n Addon,\n Footer,\n ExtraSubtitle,\n FooterButton,\n Comment,\n Category,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgGM,MAAA,iBAAiB,GAAG,UAAU,CAChC,CACI,EACI,SAAS,EACT,UAAU,EACV,OAAO,EACP,IAAI,EACJ,GAAG,EAAE,SAAS,GAAG,CAAC,IAAI,IAAI,GAAG,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,EACpE,QAAQ,EACR,iBAAiB,GAAG,MAAM,EAC1B,eAAe,GAAG,MAAM,EACxB,SAAS,GAAG,YAAY,EACxB,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC;IAC5C,MAAM,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC/C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC;IAC5D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EAAE,YAAY,EAAA,EACxC,QAAQ,CACc,CACnB;AAEnB;IAED,QACI,oBAAC,SAAS,EAAA,EAAA,GACD,SAAqD,EAC1D,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACtB,UAAU,EAAA;AAExB,QAAA,KAAA,CAAA,aAAA,CAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,YAAY,EAAA,EAAG,QAAQ,CAA4B,CAC5E;AAEpB,CAAC;AAGC,MAAA,aAAa,GAAG;AAEtB;;;;AAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE;IAC9C,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,IAAI;IACJ,MAAM;IACN,WAAW;IACX,KAAK;IACL,MAAM;IACN,aAAa;IACb,YAAY;IACZ,OAAO;IACP,QAAQ;AACX,CAAA;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
|
-
import { PureCellContext } from '../../
|
|
4
|
+
import { PureCellContext } from '../../context.js';
|
|
5
5
|
import styles from './index.module.css.js';
|
|
6
6
|
|
|
7
7
|
const ADDON_COMPONENT = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/addon/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/addon/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\n\nimport { PureCellContext } from '../../context';\nimport { type AddonElement } from '../types';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Вертикальное выравнивание\n */\n verticalAlign?: 'auto' | 'top' | 'center' | 'bottom';\n\n /**\n * Горизонтальные отступы\n */\n addonPadding?: 'default' | 'none';\n\n /**\n * Компоненты\n */\n children: AddonElement;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Используется модификатор -addon\n */\n dataTestId?: string;\n\n /**\n * Клик по контенту аддона.\n */\n onClick?: () => void;\n};\n\nconst ADDON_COMPONENT: Record<string, keyof Pick<React.ReactHTML, 'button' | 'section'>> = {\n button: 'button',\n section: 'section',\n};\n\nexport const Addon: React.FC<Props> = ({\n children,\n verticalAlign = 'top',\n addonPadding = 'default',\n dataTestId,\n onClick,\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const Component = onClick ? ADDON_COMPONENT.button : ADDON_COMPONENT.section;\n\n const onMouseEvents = {\n onClick: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.();\n },\n onMouseEnter: () => {\n pureCellContext.unsetMainHover?.();\n },\n onMouseLeave: () => {\n pureCellContext.setMainHover?.();\n },\n onMouseDown: (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n },\n };\n\n return (\n <Component\n className={cn(styles.component, styles[addonPadding], styles[verticalAlign], {\n [styles.button]: onClick,\n })}\n data-test-id={getDataTestId(dataTestId || pureCellContext.dataTestId, 'addon')}\n {...(onClick && onMouseEvents)}\n >\n {children}\n </Component>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsCA,MAAM,eAAe,GAAsE;AACvF,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,OAAO,EAAE,SAAS;CACrB;MAEY,KAAK,GAAoB,CAAC,EACnC,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,SAAS,EACxB,UAAU,EACV,OAAO,GACV,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,MAAM,SAAS,GAAG,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO;AAE5E,IAAA,MAAM,aAAa,GAAG;AAClB,QAAA,OAAO,EAAE,CAAC,CAAsC,KAAI;YAChD,CAAC,CAAC,eAAe,EAAE;YACnB,OAAO,IAAI;SACd;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,cAAc,IAAI;SACrC;QACD,YAAY,EAAE,MAAK;AACf,YAAA,eAAe,CAAC,YAAY,IAAI;SACnC;AACD,QAAA,WAAW,EAAE,CAAC,CAAsC,KAAI;YACpD,CAAC,CAAC,eAAe,EAAE;SACtB;KACJ;IAED,QACI,oBAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,EAAE;AACzE,YAAA,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO;SAC3B,CAAC,EAAA,cAAA,EACY,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,OAAO,CAAC,EAC1E,IAAC,OAAO,IAAI,aAAa,CAAC,EAE7B,EAAA,QAAQ,CACD;AAEpB;;;;"}
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
--border-radius-0: 0;
|
|
3
|
+
} :root {
|
|
2
4
|
--gap-m: 16px;
|
|
3
5
|
--gap-0: 0px;
|
|
4
6
|
--gap-16: var(--gap-m);
|
|
5
7
|
} :root {
|
|
6
8
|
--pure-cell-clickable-area-hover-opacity: 1;
|
|
7
9
|
--pure-cell-clickable-area-active-opacity: 1;
|
|
8
|
-
} .pure-
|
|
10
|
+
} .pure-cell__component_mxkr8 {
|
|
9
11
|
display: flex;
|
|
10
12
|
flex-direction: column;
|
|
11
|
-
align-items: flex-end
|
|
12
|
-
} .pure-
|
|
13
|
+
align-items: flex-end;
|
|
14
|
+
} .pure-cell__component_mxkr8 > * {
|
|
13
15
|
justify-content: flex-end;
|
|
14
|
-
} .pure-
|
|
16
|
+
} .pure-cell__component_mxkr8.pure-cell__none_mxkr8 {
|
|
15
17
|
padding-left: var(--gap-0);
|
|
16
|
-
} .pure-
|
|
18
|
+
} .pure-cell__component_mxkr8.pure-cell__default_mxkr8 {
|
|
17
19
|
padding-left: var(--gap-16);
|
|
18
|
-
} .pure-
|
|
20
|
+
} .pure-cell__component_mxkr8.pure-cell__addonPadding_mxkr8 {
|
|
19
21
|
padding-left: var(--gap-16);
|
|
20
|
-
} .pure-
|
|
22
|
+
} .pure-cell__component_mxkr8.pure-cell__auto_mxkr8 {
|
|
21
23
|
align-self: auto;
|
|
22
|
-
} .pure-
|
|
24
|
+
} .pure-cell__component_mxkr8.pure-cell__top_mxkr8 {
|
|
23
25
|
align-self: flex-start;
|
|
24
|
-
} .pure-
|
|
26
|
+
} .pure-cell__component_mxkr8.pure-cell__center_mxkr8 {
|
|
25
27
|
align-self: center;
|
|
26
|
-
} .pure-
|
|
28
|
+
} .pure-cell__component_mxkr8.pure-cell__bottom_mxkr8 {
|
|
27
29
|
align-self: flex-end;
|
|
28
|
-
} .pure-
|
|
30
|
+
} .pure-cell__button_mxkr8 {
|
|
29
31
|
-webkit-tap-highlight-color: transparent;
|
|
30
32
|
box-sizing: border-box;
|
|
31
33
|
background-color: transparent;
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
border: 0;
|
|
34
36
|
margin: var(--gap-0);
|
|
35
37
|
box-shadow: none;
|
|
36
|
-
border-radius: 0;
|
|
38
|
+
border-radius: var(--border-radius-0);
|
|
37
39
|
-webkit-user-select: none;
|
|
38
40
|
-moz-user-select: none;
|
|
39
41
|
user-select: none;
|
|
@@ -45,9 +47,9 @@
|
|
|
45
47
|
min-width: 0;
|
|
46
48
|
cursor: pointer;
|
|
47
49
|
padding: var(--gap-0);
|
|
48
|
-
transition: opacity 0.15s ease-in-out
|
|
49
|
-
} .pure-
|
|
50
|
+
transition: opacity 0.15s ease-in-out;
|
|
51
|
+
} .pure-cell__button_mxkr8:hover {
|
|
50
52
|
opacity: var(--pure-cell-clickable-area-hover-opacity);
|
|
51
|
-
} .pure-
|
|
53
|
+
} .pure-cell__button_mxkr8:active {
|
|
52
54
|
opacity: var(--pure-cell-clickable-area-active-opacity);
|
|
53
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_mxkr8","none":"pure-cell__none_mxkr8","default":"pure-cell__default_mxkr8","addonPadding":"pure-cell__addonPadding_mxkr8","auto":"pure-cell__auto_mxkr8","top":"pure-cell__top_mxkr8","center":"pure-cell__center_mxkr8","bottom":"pure-cell__bottom_mxkr8","button":"pure-cell__button_mxkr8"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Color } from '@alfalab/core-components-typography/modern';
|
|
3
|
-
import { AmountProps as AmountType } from '../typesProps';
|
|
3
|
+
import { type AmountProps as AmountType } from '../typesProps';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* Начертание шрифта денежного значения
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Amount as Amount$1 } from '@alfalab/core-components-amount/modern';
|
|
4
4
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
5
5
|
import { Text } from '@alfalab/core-components-typography/modern';
|
|
6
|
-
import { PureCellContext } from '../../
|
|
6
|
+
import { PureCellContext } from '../../context.js';
|
|
7
7
|
import styles from './index.module.css.js';
|
|
8
8
|
|
|
9
9
|
const Amount = ({ weight = 'normal', textView = 'component', color = 'primary', minority, minorUnits = 100, hidden, dataTestId, ...restProps }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/amount/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/amount/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, Text } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Начертание шрифта денежного значения\n */\n weight?: 'bold' | 'normal';\n\n /**\n * Размер денежного значения\n */\n textView?: 'component' | 'primary-small';\n\n /**\n * Цвет денежного значения\n */\n color?: Color;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-text, для компонента Amount -amount\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const Amount: React.FC<Props> = ({\n weight = 'normal',\n textView = 'component',\n color = 'primary',\n minority,\n minorUnits = 100,\n hidden,\n dataTestId,\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n if (hidden) {\n return (\n <div className={styles.hiddenWrapper}>\n <div className={styles.hidden} />\n </div>\n );\n }\n\n return (\n <Text\n view={textView}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-text')}\n className={cn(styles.component)}\n color={color}\n >\n <CoreAmount\n minority={minority || minorUnits}\n bold={weight === 'bold' ? 'full' : 'none'}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount')}\n {...restProps}\n />\n </Text>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAwCO,MAAM,MAAM,GAAoB,CAAC,EACpC,MAAM,GAAG,QAAQ,EACjB,QAAQ,GAAG,WAAW,EACtB,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,UAAU,EACV,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;AAEnD,IAAA,IAAI,MAAM,EAAE;AACR,QAAA,QACI,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA;YAChC,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,MAAM,EAAI,CAAA,CAC/B;AAEb;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,aAAa,CAAC,EAClF,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAA,KAAA,CAAA,aAAA,CAACA,QAAU,EACP,EAAA,QAAQ,EAAE,QAAQ,IAAI,UAAU,EAChC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,EACzC,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,eAAe,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAA,GACzE,SAAS,EACf,CAAA,CACC;AAEf;;;;"}
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
--gap-0: 0px;
|
|
10
10
|
--gap-2: var(--gap-3xs);
|
|
11
11
|
--gap-8: var(--gap-xs);
|
|
12
|
-
} .pure-
|
|
12
|
+
} .pure-cell__component_10m75 {
|
|
13
13
|
padding: var(--gap-2) var(--gap-0);
|
|
14
14
|
display: flex;
|
|
15
|
-
} .pure-
|
|
15
|
+
} .pure-cell__hidden_10m75 {
|
|
16
16
|
background: var(--color-light-neutral-translucent-400);
|
|
17
17
|
border-radius: var(--border-radius-8);
|
|
18
18
|
display: inline-block;
|
|
19
19
|
height: 24px;
|
|
20
20
|
width: 120px;
|
|
21
|
-
} .pure-
|
|
21
|
+
} .pure-cell__hiddenWrapper_10m75 {
|
|
22
22
|
display: flex;
|
|
23
23
|
padding: var(--gap-8) var(--gap-0);
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_10m75","hidden":"pure-cell__hidden_10m75","hiddenWrapper":"pure-cell__hiddenWrapper_10m75"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n padding: var(--gap-2) var(--gap-0);\n display: flex;\n}\n\n.hidden {\n background: var(--color-light-neutral-translucent-400);\n border-radius: var(--border-radius-8);\n display: inline-block;\n height: 24px;\n width: 120px;\n}\n\n.hiddenWrapper {\n display: flex;\n padding: var(--gap-8) var(--gap-0);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,eAAe,CAAC,gCAAgC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/amount/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n padding: var(--gap-2) var(--gap-0);\n display: flex;\n}\n\n.hidden {\n background: var(--color-light-neutral-translucent-400);\n border-radius: var(--border-radius-8);\n display: inline-block;\n height: 24px;\n width: 120px;\n}\n\n.hiddenWrapper {\n display: flex;\n padding: var(--gap-8) var(--gap-0);\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,QAAQ,CAAC,yBAAyB,CAAC,eAAe,CAAC,gCAAgC,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Color, type TitleProps } from '@alfalab/core-components-typography/modern';
|
|
3
|
-
import { AmountProps as AmountType } from '../typesProps';
|
|
3
|
+
import { type AmountProps as AmountType } from '../typesProps';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* Цвет денежного значения
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Amount } from '@alfalab/core-components-amount/modern';
|
|
4
4
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
5
5
|
import { TitleResponsive } from '@alfalab/core-components-typography/modern';
|
|
6
|
-
import { PureCellContext } from '../../
|
|
6
|
+
import { PureCellContext } from '../../context.js';
|
|
7
7
|
import styles from './index.module.css.js';
|
|
8
8
|
|
|
9
9
|
const AmountTitle = ({ minority, minorUnits = 100, hidden, className, color = 'primary', dataTestId, titleProps: titlePropsFromProps = {}, ...restProps }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/amount-title/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, type TitleProps, TitleResponsive } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/amount-title/component.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Amount as CoreAmount } from '@alfalab/core-components-amount';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { type Color, type TitleProps, TitleResponsive } from '@alfalab/core-components-typography';\n\nimport { PureCellContext } from '../../context';\nimport { type AmountProps as AmountType } from '../typesProps';\n\nimport styles from './index.module.css';\n\ntype Props = {\n /**\n * Цвет денежного значения\n * @deprecated Используйте titleProps.color\n */\n color?: Color;\n\n /**\n * Пропсы, которые будут прокинуты в компонент типографики\n */\n titleProps?: TitleProps;\n\n /**\n * Скрыть денежное значение\n */\n hidden?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для typography используется модификатор -amount-title, для компонента Amount -core-amount-title\n */\n dataTestId?: string;\n} & Omit<AmountType, 'dataTestId'>;\n\nexport const AmountTitle: React.FC<Props> = ({\n minority,\n minorUnits = 100,\n hidden,\n className,\n color = 'primary',\n dataTestId,\n titleProps: titlePropsFromProps = {},\n ...restProps\n}) => {\n const pureCellContext = useContext(PureCellContext);\n\n const titleProps = {\n tag: 'h4',\n view: 'small',\n color,\n ...titlePropsFromProps,\n } as Omit<TitleProps, 'className' | 'dataTestId'>;\n\n if (hidden) {\n return (\n <div className={cn(styles.hiddenWrapper, styles[`hiddenWrapper-${titleProps.view}`])}>\n <div className={cn(styles.hidden, styles[`hidden-${titleProps.view}`])} />\n </div>\n );\n }\n\n return (\n <TitleResponsive\n {...titleProps}\n dataTestId={getDataTestId(dataTestId || pureCellContext.dataTestId, 'amount-title')}\n className={cn(styles.component, titlePropsFromProps?.className)}\n >\n <CoreAmount\n minority={minority || minorUnits}\n className={cn(styles.weight, className)}\n dataTestId={getDataTestId(\n dataTestId || pureCellContext.dataTestId,\n 'core-amount-title',\n )}\n {...restProps}\n bold='none'\n />\n </TitleResponsive>\n );\n};\n"],"names":["CoreAmount"],"mappings":";;;;;;;;AAoCO,MAAM,WAAW,GAAoB,CAAC,EACzC,QAAQ,EACR,UAAU,GAAG,GAAG,EAChB,MAAM,EACN,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,UAAU,EA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14
14
|
--gap-12: var(--gap-s);
|
|
15
15
|
--gap-16: var(--gap-m);
|
|
16
|
-
} .pure-
|
|
16
|
+
} .pure-cell__component_1ro8s {
|
|
17
17
|
display: flex;
|
|
18
|
-
} .pure-
|
|
18
|
+
} .pure-cell__weight_1ro8s {
|
|
19
19
|
font-weight: inherit;
|
|
20
|
-
} .pure-
|
|
20
|
+
} .pure-cell__hidden_1ro8s {
|
|
21
21
|
background: var(--color-light-neutral-translucent-400);
|
|
22
22
|
border-radius: var(--border-radius-8);
|
|
23
23
|
display: inline-block;
|
|
24
|
-
} .pure-cell__hidden-
|
|
24
|
+
} .pure-cell__hidden-xsmall_1ro8s {
|
|
25
25
|
height: 16px;
|
|
26
26
|
width: 88px;
|
|
27
|
-
} .pure-cell__hidden-
|
|
27
|
+
} .pure-cell__hidden-small_1ro8s {
|
|
28
28
|
height: 18px;
|
|
29
29
|
width: 100px;
|
|
30
|
-
} .pure-cell__hidden-
|
|
30
|
+
} .pure-cell__hidden-medium_1ro8s {
|
|
31
31
|
height: 24px;
|
|
32
32
|
width: 120px;
|
|
33
|
-
} .pure-cell__hidden-
|
|
33
|
+
} .pure-cell__hidden-large_1ro8s {
|
|
34
34
|
height: 28px;
|
|
35
35
|
width: 136px;
|
|
36
|
-
} .pure-cell__hidden-
|
|
36
|
+
} .pure-cell__hidden-xlarge_1ro8s {
|
|
37
37
|
height: 32px;
|
|
38
38
|
width: 156px;
|
|
39
|
-
} .pure-
|
|
39
|
+
} .pure-cell__hiddenWrapper_1ro8s {
|
|
40
40
|
display: flex;
|
|
41
|
-
} .pure-cell__hiddenWrapper-
|
|
41
|
+
} .pure-cell__hiddenWrapper-xsmall_1ro8s {
|
|
42
42
|
padding: var(--gap-4) var(--gap-0);
|
|
43
|
-
} .pure-cell__hiddenWrapper-
|
|
43
|
+
} .pure-cell__hiddenWrapper-small_1ro8s {
|
|
44
44
|
padding: var(--gap-8) var(--gap-0);
|
|
45
|
-
} .pure-cell__hiddenWrapper-
|
|
45
|
+
} .pure-cell__hiddenWrapper-medium_1ro8s {
|
|
46
46
|
padding: var(--gap-8) var(--gap-0);
|
|
47
|
-
} .pure-cell__hiddenWrapper-
|
|
47
|
+
} .pure-cell__hiddenWrapper-large_1ro8s {
|
|
48
48
|
padding: var(--gap-12) var(--gap-0);
|
|
49
|
-
} .pure-cell__hiddenWrapper-
|
|
49
|
+
} .pure-cell__hiddenWrapper-xlarge_1ro8s {
|
|
50
50
|
padding: var(--gap-16) var(--gap-0);
|
|
51
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"pure-
|
|
3
|
+
const styles = {"component":"pure-cell__component_1ro8s","weight":"pure-cell__weight_1ro8s","hidden":"pure-cell__hidden_1ro8s","hidden-xsmall":"pure-cell__hidden-xsmall_1ro8s","hidden-small":"pure-cell__hidden-small_1ro8s","hidden-medium":"pure-cell__hidden-medium_1ro8s","hidden-large":"pure-cell__hidden-large_1ro8s","hidden-xlarge":"pure-cell__hidden-xlarge_1ro8s","hiddenWrapper":"pure-cell__hiddenWrapper_1ro8s","hiddenWrapper-xsmall":"pure-cell__hiddenWrapper-xsmall_1ro8s","hiddenWrapper-small":"pure-cell__hiddenWrapper-small_1ro8s","hiddenWrapper-medium":"pure-cell__hiddenWrapper-medium_1ro8s","hiddenWrapper-large":"pure-cell__hiddenWrapper-large_1ro8s","hiddenWrapper-xlarge":"pure-cell__hiddenWrapper-xlarge_1ro8s"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|