@purpur/library 9.7.4 → 9.8.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/.lintstagedrc.mts +10 -0
- package/@types/scss.d.ts +4 -0
- package/CHANGELOG.json +4062 -0
- package/CHANGELOG.md +2118 -0
- package/dist/LICENSE.txt +7 -7
- package/dist/{ThemeProvider-DiDBfyFA.mjs → ThemeProvider-BJ25_asg.mjs} +13 -13
- package/dist/{ThemeProvider-DiDBfyFA.mjs.map → ThemeProvider-BJ25_asg.mjs.map} +1 -1
- package/dist/{ThemeProvider-D7oXcAde.js → ThemeProvider-BJGm3zai.js} +2 -2
- package/dist/{ThemeProvider-D7oXcAde.js.map → ThemeProvider-BJGm3zai.js.map} +1 -1
- package/dist/{autocomplete-BEGRn-Wh.mjs → autocomplete-A9-Ni60G.mjs} +2 -2
- package/dist/{autocomplete-BEGRn-Wh.mjs.map → autocomplete-A9-Ni60G.mjs.map} +1 -1
- package/dist/{autocomplete-3kV1btuI.js → autocomplete-Bbth0nDG.js} +2 -2
- package/dist/{autocomplete-3kV1btuI.js.map → autocomplete-Bbth0nDG.js.map} +1 -1
- package/dist/autocomplete.cjs.js +1 -1
- package/dist/autocomplete.es.js +1 -1
- package/dist/components/accordion/src/accordion.visual.fixtures.d.ts +13 -0
- package/dist/components/accordion/src/accordion.visual.fixtures.d.ts.map +1 -0
- package/dist/components/badge/src/badge.visual.fixtures.d.ts +13 -0
- package/dist/components/badge/src/badge.visual.fixtures.d.ts.map +1 -0
- package/dist/components/footer/src/telia-logo.d.ts.map +1 -1
- package/dist/components/hero-banner/src/hero-banner-types.d.ts +48 -0
- package/dist/components/hero-banner/src/hero-banner-types.d.ts.map +1 -0
- package/dist/components/hero-banner/src/hero-banner.d.ts +5 -48
- package/dist/components/hero-banner/src/hero-banner.d.ts.map +1 -1
- package/dist/components/hero-banner/src/hero-banner.visual.fixtures.d.ts +1 -1
- package/dist/components/hero-banner/src/hero-banner.visual.fixtures.d.ts.map +1 -1
- package/dist/components-metadata.js +2 -2
- package/dist/{date-field-BKKty89_.js → date-field-CKxEWHG3.js} +2 -2
- package/dist/{date-field-BKKty89_.js.map → date-field-CKxEWHG3.js.map} +1 -1
- package/dist/{date-field-Cv5CKR1y.mjs → date-field-HEFdHIxk.mjs} +2 -2
- package/dist/{date-field-Cv5CKR1y.mjs.map → date-field-HEFdHIxk.mjs.map} +1 -1
- package/dist/date-field.cjs.js +1 -1
- package/dist/date-field.es.js +1 -1
- package/dist/{date-picker-CIizn3Pv.js → date-picker-CDBwkAJI.js} +2 -2
- package/dist/{date-picker-CIizn3Pv.js.map → date-picker-CDBwkAJI.js.map} +1 -1
- package/dist/{date-picker-DixxW60s.mjs → date-picker-cQewKIMN.mjs} +6 -6
- package/dist/{date-picker-DixxW60s.mjs.map → date-picker-cQewKIMN.mjs.map} +1 -1
- package/dist/date-picker.cjs.js +1 -1
- package/dist/date-picker.es.js +1 -1
- package/dist/{date-range-field-D8vLeSwp.js → date-range-field-D7Hn9FGN.js} +2 -2
- package/dist/{date-range-field-D8vLeSwp.js.map → date-range-field-D7Hn9FGN.js.map} +1 -1
- package/dist/{date-range-field-CFcjprIl.mjs → date-range-field-_WctWD29.mjs} +2 -2
- package/dist/{date-range-field-CFcjprIl.mjs.map → date-range-field-_WctWD29.mjs.map} +1 -1
- package/dist/date-range-field.cjs.js +1 -1
- package/dist/date-range-field.es.js +1 -1
- package/dist/{drawer-DyhsP34o.js → drawer-DyLQfvEh.js} +2 -2
- package/dist/{drawer-DyhsP34o.js.map → drawer-DyLQfvEh.js.map} +1 -1
- package/dist/{drawer-BzkRd9F0.mjs → drawer-cIUx6WSZ.mjs} +3 -3
- package/dist/{drawer-BzkRd9F0.mjs.map → drawer-cIUx6WSZ.mjs.map} +1 -1
- package/dist/drawer.cjs.js +1 -1
- package/dist/drawer.es.js +1 -1
- package/dist/{footer-DenAcikt.mjs → footer-BMlXRro2.mjs} +86 -96
- package/dist/footer-BMlXRro2.mjs.map +1 -0
- package/dist/footer-cet787Iq.js +2 -0
- package/dist/footer-cet787Iq.js.map +1 -0
- package/dist/footer.cjs.js +1 -1
- package/dist/footer.es.js +1 -1
- package/dist/{hero-banner-B7xrDfzN.mjs → hero-banner-B08jC0Sf.mjs} +77 -77
- package/dist/hero-banner-B08jC0Sf.mjs.map +1 -0
- package/dist/hero-banner-D__doaU7.js +2 -0
- package/dist/hero-banner-D__doaU7.js.map +1 -0
- package/dist/hero-banner.cjs.js +1 -1
- package/dist/hero-banner.es.js +1 -1
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +21 -21
- package/dist/{modal-DJn9idcw.js → modal-CmPPxJ7Y.js} +2 -2
- package/dist/{modal-DJn9idcw.js.map → modal-CmPPxJ7Y.js.map} +1 -1
- package/dist/{modal-EIP36327.mjs → modal-Evh8sCBO.mjs} +3 -3
- package/dist/{modal-EIP36327.mjs.map → modal-Evh8sCBO.mjs.map} +1 -1
- package/dist/modal.cjs.js +1 -1
- package/dist/modal.es.js +1 -1
- package/dist/{popover-DERrvReO.mjs → popover-BSUdf0Ae.mjs} +3 -3
- package/dist/{popover-DERrvReO.mjs.map → popover-BSUdf0Ae.mjs.map} +1 -1
- package/dist/{popover-DnGgzfQr.js → popover-XJqF5DHT.js} +2 -2
- package/dist/{popover-DnGgzfQr.js.map → popover-XJqF5DHT.js.map} +1 -1
- package/dist/popover.cjs.js +1 -1
- package/dist/popover.es.js +1 -1
- package/dist/{promotion-card-DKc2Cx1h.js → promotion-card-BnXD2mkp.js} +2 -2
- package/dist/{promotion-card-DKc2Cx1h.js.map → promotion-card-BnXD2mkp.js.map} +1 -1
- package/dist/{promotion-card-BnzIVNQ4.mjs → promotion-card-DOO0VCI8.mjs} +2 -2
- package/dist/{promotion-card-BnzIVNQ4.mjs.map → promotion-card-DOO0VCI8.mjs.map} +1 -1
- package/dist/promotion-card.cjs.js +1 -1
- package/dist/promotion-card.es.js +1 -1
- package/dist/purpur.css +1 -1
- package/dist/{quantity-selector-CvBvnMeB.mjs → quantity-selector-B4YnfmNb.mjs} +2 -2
- package/dist/{quantity-selector-CvBvnMeB.mjs.map → quantity-selector-B4YnfmNb.mjs.map} +1 -1
- package/dist/{quantity-selector-CDSfcTb1.js → quantity-selector-CTBoxiPO.js} +2 -2
- package/dist/{quantity-selector-CDSfcTb1.js.map → quantity-selector-CTBoxiPO.js.map} +1 -1
- package/dist/quantity-selector.cjs.js +1 -1
- package/dist/quantity-selector.es.js +1 -1
- package/dist/{search-field-DKyNh7pE.mjs → search-field-_h8xn-sj.mjs} +2 -2
- package/dist/{search-field-DKyNh7pE.mjs.map → search-field-_h8xn-sj.mjs.map} +1 -1
- package/dist/{search-field-2vdDbiT0.js → search-field-vh6uz5KV.js} +2 -2
- package/dist/{search-field-2vdDbiT0.js.map → search-field-vh6uz5KV.js.map} +1 -1
- package/dist/search-field.cjs.js +1 -1
- package/dist/search-field.es.js +1 -1
- package/dist/{stepper-e0qicwqd.mjs → stepper-B-nCLs2D.mjs} +2 -2
- package/dist/{stepper-e0qicwqd.mjs.map → stepper-B-nCLs2D.mjs.map} +1 -1
- package/dist/{stepper-5qMo_shq.js → stepper-CTKlnH0q.js} +2 -2
- package/dist/{stepper-5qMo_shq.js.map → stepper-CTKlnH0q.js.map} +1 -1
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.es.js +1 -1
- package/dist/{table-i1Gs9e0e.mjs → table-DOPXfD-s.mjs} +6 -6
- package/dist/{table-i1Gs9e0e.mjs.map → table-DOPXfD-s.mjs.map} +1 -1
- package/dist/{table-BOCcBzSO.js → table-DTQe4nN8.js} +2 -2
- package/dist/{table-BOCcBzSO.js.map → table-DTQe4nN8.js.map} +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.es.js +1 -1
- package/dist/{text-area-D0truMT1.js → text-area-9RUldq6W.js} +2 -2
- package/dist/{text-area-D0truMT1.js.map → text-area-9RUldq6W.js.map} +1 -1
- package/dist/{text-area-IVH-k4MM.mjs → text-area-C58aZEPa.mjs} +3 -3
- package/dist/{text-area-IVH-k4MM.mjs.map → text-area-C58aZEPa.mjs.map} +1 -1
- package/dist/text-area.cjs.js +1 -1
- package/dist/text-area.es.js +1 -1
- package/dist/text-field-C2W13n15.js +2 -0
- package/dist/{text-field-CYJzQG3h.js.map → text-field-C2W13n15.js.map} +1 -1
- package/dist/{text-field-BQfxJobW.mjs → text-field-D8MMa6ij.mjs} +114 -114
- package/dist/{text-field-BQfxJobW.mjs.map → text-field-D8MMa6ij.mjs.map} +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.es.js +1 -1
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.es.js +3 -3
- package/dist/tokens/color/variables.css +1 -1
- package/dist/tokens/color/variables.dark.css +1 -1
- package/dist/tokens/color/variables.dark.js +1 -1
- package/dist/tokens/color/variables.dark.json +1 -1
- package/dist/tokens/color/variables.dark.scss +1 -1
- package/dist/tokens/color/variables.js +1 -1
- package/dist/tokens/color/variables.json +1 -1
- package/dist/tokens/color/variables.scss +1 -1
- package/dist/tokens.cjs.js +1 -1
- package/dist/tokens.es.js +1 -1
- package/dist/{tooltip-CJGmJDFQ.js → tooltip-CDnJKoIA.js} +2 -2
- package/dist/{tooltip-CJGmJDFQ.js.map → tooltip-CDnJKoIA.js.map} +1 -1
- package/dist/{tooltip-RA-03bKs.mjs → tooltip-pwJMEBBP.mjs} +3 -3
- package/dist/{tooltip-RA-03bKs.mjs.map → tooltip-pwJMEBBP.mjs.map} +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.es.js +1 -1
- package/dist/{useColorScheme-B9DWd-LN.mjs → useColorScheme-B7lGBSe4.mjs} +2 -2
- package/dist/{useColorScheme-B9DWd-LN.mjs.map → useColorScheme-B7lGBSe4.mjs.map} +1 -1
- package/dist/useColorScheme-BHhPgv9q.js +2 -0
- package/dist/{useColorScheme-DbTQjxNB.js.map → useColorScheme-BHhPgv9q.js.map} +1 -1
- package/dist/useThemePortalContainer-CUcqV327.js +2 -0
- package/dist/{useThemePortalContainer-D9BYjEvT.js.map → useThemePortalContainer-CUcqV327.js.map} +1 -1
- package/dist/useThemePortalContainer-D13Xx24N.mjs +9 -0
- package/dist/{useThemePortalContainer-tFLTaYKN.mjs.map → useThemePortalContainer-D13Xx24N.mjs.map} +1 -1
- package/dist/{variables-B5hbV0Uy.mjs → variables-BrsAsWIF.mjs} +2 -2
- package/dist/{variables-B5hbV0Uy.mjs.map → variables-BrsAsWIF.mjs.map} +1 -1
- package/dist/{variables-DoI78zZc.js → variables-D1vNo1lO.js} +2 -2
- package/dist/{variables-DoI78zZc.js.map → variables-D1vNo1lO.js.map} +1 -1
- package/eslint.config.mjs +2 -0
- package/package.json +27 -31
- package/scripts/generate.mts +269 -0
- package/src/accordion.ts +6 -0
- package/src/alert-badge.ts +6 -0
- package/src/aliases.ts +302 -0
- package/src/autocomplete.ts +6 -0
- package/src/avatar.ts +6 -0
- package/src/badge.ts +6 -0
- package/src/breadcrumbs.ts +6 -0
- package/src/button.ts +6 -0
- package/src/calendar.ts +6 -0
- package/src/card.ts +6 -0
- package/src/carousel.ts +6 -0
- package/src/chat-field.ts +6 -0
- package/src/checkbox.ts +6 -0
- package/src/chip-group.ts +6 -0
- package/src/color-dot.ts +6 -0
- package/src/comparison-table.ts +6 -0
- package/src/container.ts +6 -0
- package/src/content-block.ts +6 -0
- package/src/countdown.ts +6 -0
- package/src/counter-badge.ts +6 -0
- package/src/cta-link.ts +6 -0
- package/src/date-field.ts +6 -0
- package/src/date-picker.ts +6 -0
- package/src/date-range-field.ts +6 -0
- package/src/dismissable-chip-group.ts +6 -0
- package/src/drawer.ts +6 -0
- package/src/dropdown.ts +6 -0
- package/src/entries.js +73 -0
- package/src/field-error-text.ts +6 -0
- package/src/field-helper-text.ts +6 -0
- package/src/footer.ts +6 -0
- package/src/grid.ts +6 -0
- package/src/heading.ts +6 -0
- package/src/hero-banner.ts +6 -0
- package/src/label.ts +6 -0
- package/src/library.ts +77 -0
- package/src/link.ts +6 -0
- package/src/listbox.ts +6 -0
- package/src/loading.ts +6 -0
- package/src/message.ts +6 -0
- package/src/modal.ts +6 -0
- package/src/notification-banner.ts +6 -0
- package/src/notification.ts +6 -0
- package/src/pagination.ts +6 -0
- package/src/paragraph.ts +6 -0
- package/src/password-field.ts +7 -0
- package/src/popover.ts +6 -0
- package/src/product-card.ts +6 -0
- package/src/promotion-card.ts +6 -0
- package/src/purpur.css +1 -0
- package/src/quantity-selector.ts +6 -0
- package/src/radio-button-group.ts +6 -0
- package/src/radio-card-group.ts +6 -0
- package/src/rich-text.ts +6 -0
- package/src/search-field.ts +6 -0
- package/src/select.ts +6 -0
- package/src/skeleton.ts +6 -0
- package/src/slider.ts +6 -0
- package/src/spacer.ts +6 -0
- package/src/spinner.ts +6 -0
- package/src/stepper.ts +6 -0
- package/src/table.ts +6 -0
- package/src/tabs.ts +6 -0
- package/src/text-area.ts +6 -0
- package/src/text-field.ts +6 -0
- package/src/text-spacing.ts +6 -0
- package/src/theme.ts +6 -0
- package/src/toggle.ts +6 -0
- package/src/tokens.ts +6 -0
- package/src/tooltip.ts +6 -0
- package/src/visually-hidden.ts +6 -0
- package/tokens/_dark.scss +9 -0
- package/tokens/_index.scss +9 -0
- package/tokens/border/variables.css +13 -0
- package/tokens/border/variables.d.ts +10 -0
- package/tokens/border/variables.dark.css +12 -0
- package/tokens/border/variables.dark.d.ts +10 -0
- package/tokens/border/variables.dark.js +10 -0
- package/tokens/border/variables.dark.json +18 -0
- package/tokens/border/variables.dark.scss +10 -0
- package/tokens/border/variables.js +10 -0
- package/tokens/border/variables.json +18 -0
- package/tokens/border/variables.scss +10 -0
- package/tokens/breakpoint/variables.css +11 -0
- package/tokens/breakpoint/variables.d.ts +8 -0
- package/tokens/breakpoint/variables.dark.css +10 -0
- package/tokens/breakpoint/variables.dark.d.ts +8 -0
- package/tokens/breakpoint/variables.dark.js +8 -0
- package/tokens/breakpoint/variables.dark.json +14 -0
- package/tokens/breakpoint/variables.dark.scss +8 -0
- package/tokens/breakpoint/variables.js +8 -0
- package/tokens/breakpoint/variables.json +14 -0
- package/tokens/breakpoint/variables.scss +8 -0
- package/tokens/color/variables.css +262 -0
- package/tokens/color/variables.d.ts +253 -0
- package/tokens/color/variables.dark.css +262 -0
- package/tokens/color/variables.dark.d.ts +252 -0
- package/tokens/color/variables.dark.js +252 -0
- package/tokens/color/variables.dark.json +306 -0
- package/tokens/color/variables.dark.scss +252 -0
- package/tokens/color/variables.js +253 -0
- package/tokens/color/variables.json +307 -0
- package/tokens/color/variables.scss +253 -0
- package/tokens/dark.css +9 -0
- package/tokens/dark.d.ts +9 -0
- package/tokens/dark.js +9 -0
- package/tokens/filter/variables.css +4 -0
- package/tokens/filter/variables.d.ts +1 -0
- package/tokens/filter/variables.dark.css +3 -0
- package/tokens/filter/variables.dark.d.ts +1 -0
- package/tokens/filter/variables.dark.js +1 -0
- package/tokens/filter/variables.dark.json +7 -0
- package/tokens/filter/variables.dark.scss +1 -0
- package/tokens/filter/variables.js +1 -0
- package/tokens/filter/variables.json +7 -0
- package/tokens/filter/variables.scss +1 -0
- package/tokens/gradient/variables.css +53 -0
- package/tokens/gradient/variables.d.ts +9 -0
- package/tokens/gradient/variables.dark.css +51 -0
- package/tokens/gradient/variables.dark.d.ts +9 -0
- package/tokens/gradient/variables.dark.js +18 -0
- package/tokens/gradient/variables.dark.json +27 -0
- package/tokens/gradient/variables.dark.scss +36 -0
- package/tokens/gradient/variables.js +18 -0
- package/tokens/gradient/variables.json +27 -0
- package/tokens/gradient/variables.scss +42 -0
- package/tokens/index.css +18 -0
- package/tokens/index.d.ts +9 -0
- package/tokens/index.js +9 -0
- package/tokens/motion/variables.css +14 -0
- package/tokens/motion/variables.d.ts +11 -0
- package/tokens/motion/variables.dark.css +13 -0
- package/tokens/motion/variables.dark.d.ts +11 -0
- package/tokens/motion/variables.dark.js +11 -0
- package/tokens/motion/variables.dark.json +19 -0
- package/tokens/motion/variables.dark.scss +11 -0
- package/tokens/motion/variables.js +11 -0
- package/tokens/motion/variables.json +19 -0
- package/tokens/motion/variables.scss +11 -0
- package/tokens/shadow/variables.css +11 -0
- package/tokens/shadow/variables.d.ts +4 -0
- package/tokens/shadow/variables.dark.css +10 -0
- package/tokens/shadow/variables.dark.d.ts +4 -0
- package/tokens/shadow/variables.dark.js +4 -0
- package/tokens/shadow/variables.dark.json +8 -0
- package/tokens/shadow/variables.dark.scss +4 -0
- package/tokens/shadow/variables.js +4 -0
- package/tokens/shadow/variables.json +8 -0
- package/tokens/shadow/variables.scss +4 -0
- package/tokens/spacing/variables.css +26 -0
- package/tokens/spacing/variables.d.ts +23 -0
- package/tokens/spacing/variables.dark.css +17 -0
- package/tokens/spacing/variables.dark.d.ts +15 -0
- package/tokens/spacing/variables.dark.js +15 -0
- package/tokens/spacing/variables.dark.json +19 -0
- package/tokens/spacing/variables.dark.scss +15 -0
- package/tokens/spacing/variables.js +23 -0
- package/tokens/spacing/variables.json +31 -0
- package/tokens/spacing/variables.scss +23 -0
- package/tokens/typography/variables.css +30 -0
- package/tokens/typography/variables.d.ts +26 -0
- package/tokens/typography/variables.dark.css +29 -0
- package/tokens/typography/variables.dark.d.ts +26 -0
- package/tokens/typography/variables.dark.js +28 -0
- package/tokens/typography/variables.dark.json +38 -0
- package/tokens/typography/variables.dark.scss +26 -0
- package/tokens/typography/variables.js +28 -0
- package/tokens/typography/variables.json +38 -0
- package/tokens/typography/variables.scss +26 -0
- package/vite-plugin-generate-components-metadata.js +62 -0
- package/dist/footer-3Y-664-8.js +0 -2
- package/dist/footer-3Y-664-8.js.map +0 -1
- package/dist/footer-DenAcikt.mjs.map +0 -1
- package/dist/hero-banner-B7xrDfzN.mjs.map +0 -1
- package/dist/hero-banner-DthITuQ7.js +0 -2
- package/dist/hero-banner-DthITuQ7.js.map +0 -1
- package/dist/text-field-CYJzQG3h.js +0 -2
- package/dist/useColorScheme-DbTQjxNB.js +0 -2
- package/dist/useThemePortalContainer-D9BYjEvT.js +0 -2
- package/dist/useThemePortalContainer-tFLTaYKN.mjs +0 -9
package/package.json
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpur/library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.8.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.scss"
|
|
8
8
|
],
|
|
9
|
-
"files": [
|
|
10
|
-
"dist",
|
|
11
|
-
"tokens"
|
|
12
|
-
],
|
|
13
9
|
"main": "./dist/library.cjs.js",
|
|
14
10
|
"types": "./dist/libraries/library/src/library.d.ts",
|
|
15
11
|
"exports": {
|
|
@@ -110,78 +106,78 @@
|
|
|
110
106
|
"vite-plugin-static-copy": "3.1.6",
|
|
111
107
|
"vite": "7.3.2",
|
|
112
108
|
"shx": "0.4.0",
|
|
113
|
-
"@purpur/action": "8.21.0",
|
|
114
|
-
"@purpur/alert-badge": "8.21.0",
|
|
115
109
|
"@purpur/accordion": "8.21.0",
|
|
116
|
-
"@purpur/
|
|
110
|
+
"@purpur/action": "8.21.0",
|
|
117
111
|
"@purpur/badge": "8.21.0",
|
|
112
|
+
"@purpur/autocomplete": "8.21.0",
|
|
113
|
+
"@purpur/alert-badge": "8.21.0",
|
|
118
114
|
"@purpur/breadcrumbs": "8.21.0",
|
|
119
115
|
"@purpur/button": "8.21.0",
|
|
120
116
|
"@purpur/calendar": "8.21.0",
|
|
121
117
|
"@purpur/checkbox": "8.21.0",
|
|
122
|
-
"@purpur/card": "8.21.0",
|
|
123
118
|
"@purpur/chip-group": "8.21.0",
|
|
124
|
-
"@purpur/common-types": "8.21.0",
|
|
125
119
|
"@purpur/color-dot": "8.21.0",
|
|
120
|
+
"@purpur/common-types": "8.21.0",
|
|
126
121
|
"@purpur/component-rig": "1.0.0",
|
|
127
|
-
"@purpur/
|
|
122
|
+
"@purpur/card": "8.21.0",
|
|
128
123
|
"@purpur/content-block": "8.21.0",
|
|
124
|
+
"@purpur/container": "8.21.0",
|
|
129
125
|
"@purpur/countdown": "8.21.0",
|
|
130
126
|
"@purpur/counter-badge": "8.21.0",
|
|
131
127
|
"@purpur/date-field": "8.21.0",
|
|
132
|
-
"@purpur/cta-link": "8.21.0",
|
|
133
128
|
"@purpur/date-picker": "8.21.0",
|
|
129
|
+
"@purpur/cta-link": "8.21.0",
|
|
134
130
|
"@purpur/dismissable-chip-group": "8.21.0",
|
|
135
|
-
"@purpur/field-error-text": "8.21.0",
|
|
136
131
|
"@purpur/drawer": "8.21.0",
|
|
137
132
|
"@purpur/field-helper-text": "8.21.0",
|
|
133
|
+
"@purpur/field-error-text": "8.21.0",
|
|
138
134
|
"@purpur/footer": "8.21.0",
|
|
139
135
|
"@purpur/grid": "8.21.0",
|
|
140
|
-
"@purpur/hero-banner": "8.21.0",
|
|
141
|
-
"@purpur/illustrative-icon": "8.21.0",
|
|
142
136
|
"@purpur/heading": "8.21.0",
|
|
143
|
-
"@purpur/
|
|
137
|
+
"@purpur/hero-banner": "8.21.0",
|
|
144
138
|
"@purpur/icon": "8.21.0",
|
|
139
|
+
"@purpur/label": "8.21.0",
|
|
140
|
+
"@purpur/illustrative-icon": "8.21.0",
|
|
145
141
|
"@purpur/link": "8.21.0",
|
|
146
|
-
"@purpur/
|
|
142
|
+
"@purpur/logo": "8.21.0",
|
|
147
143
|
"@purpur/modal": "8.21.0",
|
|
144
|
+
"@purpur/listbox": "8.21.0",
|
|
148
145
|
"@purpur/notification-banner": "8.21.0",
|
|
149
|
-
"@purpur/
|
|
146
|
+
"@purpur/notification": "8.21.0",
|
|
150
147
|
"@purpur/pagination": "8.21.0",
|
|
151
148
|
"@purpur/paragraph": "8.21.0",
|
|
152
|
-
"@purpur/password-field": "8.21.0",
|
|
153
149
|
"@purpur/product-card": "8.21.0",
|
|
154
|
-
"@purpur/notification": "8.21.0",
|
|
155
150
|
"@purpur/popover": "8.21.0",
|
|
156
151
|
"@purpur/promotion-card": "8.21.0",
|
|
157
152
|
"@purpur/quantity-selector": "8.21.0",
|
|
158
|
-
"@purpur/
|
|
153
|
+
"@purpur/password-field": "8.21.0",
|
|
159
154
|
"@purpur/radio-card-group": "8.21.0",
|
|
155
|
+
"@purpur/radio-button-group": "8.21.0",
|
|
160
156
|
"@purpur/search-field": "8.21.0",
|
|
161
157
|
"@purpur/rich-text": "8.21.0",
|
|
162
158
|
"@purpur/select": "8.21.0",
|
|
159
|
+
"@purpur/skeleton": "8.21.0",
|
|
163
160
|
"@purpur/slider": "8.21.0",
|
|
164
161
|
"@purpur/spinner": "8.21.0",
|
|
165
|
-
"@purpur/skeleton": "8.21.0",
|
|
166
|
-
"@purpur/table": "8.21.0",
|
|
167
162
|
"@purpur/spacer": "8.21.0",
|
|
168
|
-
"@purpur/
|
|
163
|
+
"@purpur/table": "8.21.0",
|
|
169
164
|
"@purpur/stepper": "8.21.0",
|
|
165
|
+
"@purpur/tabs": "8.21.0",
|
|
166
|
+
"@purpur/text-area": "8.21.0",
|
|
170
167
|
"@purpur/text-field": "8.21.0",
|
|
171
168
|
"@purpur/text-spacing": "8.21.0",
|
|
169
|
+
"@purpur/tokens": "8.21.0",
|
|
172
170
|
"@purpur/theme": "8.21.0",
|
|
173
|
-
"@purpur/text-area": "8.21.0",
|
|
174
|
-
"@purpur/toggle": "8.21.0",
|
|
175
171
|
"@purpur/tooltip": "8.21.0",
|
|
176
|
-
"@purpur/
|
|
172
|
+
"@purpur/toggle": "8.21.0",
|
|
177
173
|
"@purpur/visually-hidden": "8.21.0",
|
|
178
|
-
"@purpur/dropdown": "0.1.0",
|
|
179
174
|
"@purpur/chat-field": "9.4.2",
|
|
180
|
-
"@purpur/
|
|
175
|
+
"@purpur/dropdown": "0.1.0",
|
|
181
176
|
"@purpur/carousel": "8.21.0",
|
|
182
|
-
"@purpur/loading": "1.0.0",
|
|
183
|
-
"@purpur/date-range-field": "8.21.0",
|
|
184
177
|
"@purpur/avatar": "1.0.0",
|
|
178
|
+
"@purpur/date-range-field": "8.21.0",
|
|
179
|
+
"@purpur/comparison-table": "8.21.0",
|
|
180
|
+
"@purpur/loading": "1.0.0",
|
|
185
181
|
"@purpur/message": "1.0.0"
|
|
186
182
|
},
|
|
187
183
|
"peerDependencies": {
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { join, relative } from "path";
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const rushLib = require("@microsoft/rush-lib");
|
|
7
|
+
|
|
8
|
+
const rushConfiguration = rushLib.RushConfiguration.loadFromDefaultLocation({
|
|
9
|
+
startingFolder: process.cwd(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const libraryProject = rushConfiguration.findProjectByShorthandName("@purpur/library");
|
|
13
|
+
|
|
14
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
15
|
+
"@purpur/tokens",
|
|
16
|
+
"workspace:*",
|
|
17
|
+
rushLib.DependencyType.Dev
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
21
|
+
"@purpur/theme",
|
|
22
|
+
"workspace:*",
|
|
23
|
+
rushLib.DependencyType.Dev
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
27
|
+
"@purpur/action",
|
|
28
|
+
"workspace:*",
|
|
29
|
+
rushLib.DependencyType.Dev
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
33
|
+
"@purpur/common-types",
|
|
34
|
+
"workspace:*",
|
|
35
|
+
rushLib.DependencyType.Dev
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Special-cased components: their dist is copied via vite-plugin-static-copy
|
|
39
|
+
const specialComponents = [
|
|
40
|
+
"@purpur/icon",
|
|
41
|
+
"@purpur/illustrative-icon",
|
|
42
|
+
"@purpur/logo",
|
|
43
|
+
"@purpur/password-field",
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
// Special components need to be devDependencies (their dist is copied, styles are imported)
|
|
47
|
+
for (const specialPkg of specialComponents) {
|
|
48
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
49
|
+
specialPkg,
|
|
50
|
+
"workspace:*",
|
|
51
|
+
rushLib.DependencyType.Dev
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const components = rushConfiguration.projects.filter(
|
|
56
|
+
(project) =>
|
|
57
|
+
project.projectRelativeFolder.startsWith("components/") &&
|
|
58
|
+
!specialComponents.includes(project.packageName)
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const allComponents = rushConfiguration.projects.filter((project) =>
|
|
62
|
+
project.projectRelativeFolder.startsWith("components/")
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const getComponentName = (packageName: string) => packageName.replace("@purpur/", "");
|
|
66
|
+
|
|
67
|
+
const getFileContent = (lines: string[]) => {
|
|
68
|
+
return [
|
|
69
|
+
"/**",
|
|
70
|
+
" * ⚠️ WARNING ⚠️",
|
|
71
|
+
" * This file is automatically generated, do not edit it manually",
|
|
72
|
+
" */",
|
|
73
|
+
"",
|
|
74
|
+
]
|
|
75
|
+
.concat(lines)
|
|
76
|
+
.join("\n");
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const getJsonContent = (value: unknown) => `${JSON.stringify(value, null, 2)}\n`;
|
|
80
|
+
|
|
81
|
+
// Generate per-component entry files (no more style imports — styles come from source via aliases)
|
|
82
|
+
const getIndexFileLines = async () => {
|
|
83
|
+
const projectFileLines = await Promise.all(
|
|
84
|
+
components.map(async (project) => {
|
|
85
|
+
const { packageName } = project;
|
|
86
|
+
|
|
87
|
+
libraryProject?.packageJsonEditor.addOrUpdateDependency(
|
|
88
|
+
packageName,
|
|
89
|
+
"workspace:*",
|
|
90
|
+
rushLib.DependencyType.Dev
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const lines = [`export * from "${packageName}";`, ""];
|
|
94
|
+
|
|
95
|
+
fs.writeFileSync(
|
|
96
|
+
join(process.cwd(), "src", `${getComponentName(packageName)}.ts`),
|
|
97
|
+
getFileContent(lines)
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
return lines;
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
return projectFileLines;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const indexFileLines = await getIndexFileLines();
|
|
108
|
+
|
|
109
|
+
// Generate tokens entry
|
|
110
|
+
fs.writeFileSync(
|
|
111
|
+
join(process.cwd(), "src", "tokens.ts"),
|
|
112
|
+
getFileContent([`export * from "@purpur/tokens";`, ""])
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
// Generate theme entry
|
|
116
|
+
fs.writeFileSync(
|
|
117
|
+
join(process.cwd(), "src", "theme.ts"),
|
|
118
|
+
getFileContent([`export * from "@purpur/theme";`, ""])
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
// Generate Vite resolve aliases
|
|
122
|
+
const libraryDir = process.cwd();
|
|
123
|
+
const srcDir = join(libraryDir, "src");
|
|
124
|
+
const aliases: Array<{ find: string; replacement: string }> = [];
|
|
125
|
+
|
|
126
|
+
// Add aliases for non-special components (resolve to source)
|
|
127
|
+
// Special components (icon, illustrative-icon, logo, password-field) are NOT aliased
|
|
128
|
+
// because they have complex subpath exports. Their dist is copied via vite-plugin-static-copy.
|
|
129
|
+
for (const project of components) {
|
|
130
|
+
const packageJson = await import(
|
|
131
|
+
join(libraryDir, "../../", project.projectRelativeFolder, "package.json")
|
|
132
|
+
);
|
|
133
|
+
const sourceFile = packageJson.source as string; // e.g. "src/button.tsx"
|
|
134
|
+
const absSourcePath = join(libraryDir, "../../", project.projectRelativeFolder, sourceFile);
|
|
135
|
+
const relPath = relative(srcDir, absSourcePath);
|
|
136
|
+
|
|
137
|
+
aliases.push({
|
|
138
|
+
find: project.packageName,
|
|
139
|
+
replacement: relPath,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Add aliases for internal libraries (resolve to source)
|
|
144
|
+
const internalLibs = [
|
|
145
|
+
{
|
|
146
|
+
name: "@purpur/common-types",
|
|
147
|
+
folder: "libraries/common-types",
|
|
148
|
+
source: "src/common-types.ts",
|
|
149
|
+
types: "src/common-types.ts",
|
|
150
|
+
include: "../../libraries/common-types/src",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "@purpur/theme",
|
|
154
|
+
folder: "libraries/theme",
|
|
155
|
+
source: "src/theme.ts",
|
|
156
|
+
types: "src/theme.ts",
|
|
157
|
+
include: "../../libraries/theme/src",
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "@purpur/action",
|
|
161
|
+
folder: "libraries/action",
|
|
162
|
+
source: "src/action.tsx",
|
|
163
|
+
types: "src/action.tsx",
|
|
164
|
+
include: "../../libraries/action/src",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "@purpur/tokens",
|
|
168
|
+
folder: "libraries/tokens",
|
|
169
|
+
source: "dist/index.js",
|
|
170
|
+
types: "dist/index.d.ts",
|
|
171
|
+
include: "../../libraries/tokens/dist",
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
for (const lib of internalLibs) {
|
|
176
|
+
const absSourcePath = join(libraryDir, "../../", lib.folder, lib.source);
|
|
177
|
+
const relPath = relative(srcDir, absSourcePath);
|
|
178
|
+
aliases.push({ find: lib.name, replacement: relPath });
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
fs.writeFileSync(
|
|
182
|
+
join(process.cwd(), "src", "aliases.ts"),
|
|
183
|
+
getFileContent([
|
|
184
|
+
`import { resolve } from "path";`,
|
|
185
|
+
`import { fileURLToPath } from "url";`,
|
|
186
|
+
``,
|
|
187
|
+
`const __dirname = fileURLToPath(new URL(".", import.meta.url));`,
|
|
188
|
+
``,
|
|
189
|
+
`export const aliases = [`,
|
|
190
|
+
...aliases.map((alias) => {
|
|
191
|
+
const escapedFind = alias.find.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
192
|
+
return ` { find: /^${escapedFind}$/, replacement: resolve(__dirname, ${JSON.stringify(
|
|
193
|
+
alias.replacement
|
|
194
|
+
)}) },`;
|
|
195
|
+
}),
|
|
196
|
+
`];`,
|
|
197
|
+
"",
|
|
198
|
+
])
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
fs.writeFileSync(
|
|
202
|
+
join(process.cwd(), "tsconfig.types.json"),
|
|
203
|
+
getJsonContent({
|
|
204
|
+
extends: "@purpur/component-rig/tsconfig.types.json",
|
|
205
|
+
compilerOptions: {
|
|
206
|
+
baseUrl: ".",
|
|
207
|
+
noImplicitAny: true,
|
|
208
|
+
outDir: "types",
|
|
209
|
+
rootDir: "../..",
|
|
210
|
+
paths: Object.fromEntries(
|
|
211
|
+
internalLibs.map((lib) => [
|
|
212
|
+
lib.name,
|
|
213
|
+
[join("../../", lib.folder, lib.types).replace(/\\/g, "/")],
|
|
214
|
+
])
|
|
215
|
+
),
|
|
216
|
+
types: ["node"],
|
|
217
|
+
skipLibCheck: true,
|
|
218
|
+
},
|
|
219
|
+
include: ["src", "@types", "../../components/*/src", ...internalLibs.map((lib) => lib.include)],
|
|
220
|
+
exclude: [
|
|
221
|
+
"**/*.test.*",
|
|
222
|
+
"**/*.stories.*",
|
|
223
|
+
"**/*.spec.*",
|
|
224
|
+
"../../components/*/src/**/*.test.*",
|
|
225
|
+
"../../components/*/src/**/*.stories.*",
|
|
226
|
+
"../../components/*/src/**/*.spec.*",
|
|
227
|
+
"../../libraries/*/src/**/*.test.*",
|
|
228
|
+
"../../libraries/*/src/**/*.stories.*",
|
|
229
|
+
"../../libraries/*/src/**/*.spec.*",
|
|
230
|
+
"node_modules",
|
|
231
|
+
"dist",
|
|
232
|
+
"src/aliases.ts",
|
|
233
|
+
"src/entries.js",
|
|
234
|
+
],
|
|
235
|
+
})
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
// Generate main barrel entry (library.ts)
|
|
239
|
+
fs.writeFileSync(
|
|
240
|
+
join(process.cwd(), "src", "library.ts"),
|
|
241
|
+
getFileContent(
|
|
242
|
+
[
|
|
243
|
+
`import "./purpur.css";`,
|
|
244
|
+
``,
|
|
245
|
+
`import "@purpur/icon/styles";`,
|
|
246
|
+
``,
|
|
247
|
+
`import "@purpur/illustrative-icon/styles";`,
|
|
248
|
+
``,
|
|
249
|
+
`import "@purpur/logo/styles";`,
|
|
250
|
+
``,
|
|
251
|
+
`import "@purpur/password-field/styles";`,
|
|
252
|
+
``,
|
|
253
|
+
]
|
|
254
|
+
.concat(indexFileLines.flat())
|
|
255
|
+
.concat([`export * from "@purpur/tokens";`, ``, `export * from "@purpur/theme";`, ``])
|
|
256
|
+
)
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
// Generate entries.js (includes tokens and theme)
|
|
260
|
+
const componentEntries = components.map(({ packageName }) => `"${getComponentName(packageName)}"`);
|
|
261
|
+
|
|
262
|
+
fs.writeFileSync(
|
|
263
|
+
join(process.cwd(), "src", "entries.js"),
|
|
264
|
+
getFileContent([
|
|
265
|
+
`export const entries = [${[...componentEntries, `"tokens"`, `"theme"`].join(",")}];`,
|
|
266
|
+
])
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
libraryProject?.packageJsonEditor.saveIfModified();
|
package/src/accordion.ts
ADDED